| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview The section of the history page that shows tabs from sessions | 6 * @fileoverview The section of the history page that shows tabs from sessions |
| 7 on other devices. | 7 on other devices. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 /////////////////////////////////////////////////////////////////////////////// | 10 /////////////////////////////////////////////////////////////////////////////// |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 String(win.sessionId), | 287 String(win.sessionId), |
| 288 String(tab.sessionId))); | 288 String(tab.sessionId))); |
| 289 contents.appendChild(a); | 289 contents.appendChild(a); |
| 290 } else { | 290 } else { |
| 291 numTabsHidden++; | 291 numTabsHidden++; |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 } | 294 } |
| 295 | 295 |
| 296 if (numTabsHidden > 0) { | 296 if (numTabsHidden > 0) { |
| 297 var moreLinkButton = createElementWithClassName('button', | 297 var moreLink = document.createElement('a', 'action-link'); |
| 298 'device-show-more-tabs link-button'); | 298 moreLink.classList.add('device-show-more-tabs'); |
| 299 moreLinkButton.addEventListener('click', this.view_.increaseRowHeight.bind( | 299 moreLink.addEventListener('click', this.view_.increaseRowHeight.bind( |
| 300 this.view_, this.row_, numTabsHidden)); | 300 this.view_, this.row_, numTabsHidden)); |
| 301 var xMore = loadTimeData.getString('xMore'); | 301 moreLink.textContent = loadTimeData.getStringF('xMore', numTabsHidden); |
| 302 moreLinkButton.appendChild( | 302 contents.appendChild(moreLink); |
| 303 document.createTextNode(xMore.replace('$1', numTabsHidden))); | |
| 304 contents.appendChild(moreLinkButton); | |
| 305 } | 303 } |
| 306 | 304 |
| 307 return contents; | 305 return contents; |
| 308 }; | 306 }; |
| 309 | 307 |
| 310 /** | 308 /** |
| 311 * Add child text nodes to a node such that occurrences of this.searchText_ are | 309 * Add child text nodes to a node such that occurrences of this.searchText_ are |
| 312 * highlighted. | 310 * highlighted. |
| 313 * @param {Node} node The node under which new text nodes will be made as | 311 * @param {Node} node The node under which new text nodes will be made as |
| 314 * children. | 312 * children. |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 | 549 |
| 552 var doSearch = function(e) { | 550 var doSearch = function(e) { |
| 553 devicesView.setSearchText($('search-field').value); | 551 devicesView.setSearchText($('search-field').value); |
| 554 }; | 552 }; |
| 555 $('search-field').addEventListener('search', doSearch); | 553 $('search-field').addEventListener('search', doSearch); |
| 556 $('search-button').addEventListener('click', doSearch); | 554 $('search-button').addEventListener('click', doSearch); |
| 557 } | 555 } |
| 558 | 556 |
| 559 // Add handlers to HTML elements. | 557 // Add handlers to HTML elements. |
| 560 document.addEventListener('DOMContentLoaded', load); | 558 document.addEventListener('DOMContentLoaded', load); |
| OLD | NEW |