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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 numTabsHidden++; | 290 numTabsHidden++; |
291 } | 291 } |
292 } | 292 } |
293 } | 293 } |
294 | 294 |
295 if (numTabsHidden > 0) { | 295 if (numTabsHidden > 0) { |
296 var moreLink = document.createElement('a', 'action-link'); | 296 var moreLink = document.createElement('a', 'action-link'); |
297 moreLink.classList.add('device-show-more-tabs'); | 297 moreLink.classList.add('device-show-more-tabs'); |
298 moreLink.addEventListener('click', this.view_.increaseRowHeight.bind( | 298 moreLink.addEventListener('click', this.view_.increaseRowHeight.bind( |
299 this.view_, this.row_, numTabsHidden)); | 299 this.view_, this.row_, numTabsHidden)); |
300 moreLink.textContent = loadTimeData.getStringF('xMore', numTabsHidden); | 300 // TODO(jshin): Use plural message formatter when available in JS. |
| 301 moreLink.textContent = loadTimeData.getStringF('xMore', |
| 302 numTabsHidden.toLocaleString()); |
301 var moreWrapper = createElementWithClassName('div', 'more-wrapper'); | 303 var moreWrapper = createElementWithClassName('div', 'more-wrapper'); |
302 moreWrapper.appendChild(moreLink); | 304 moreWrapper.appendChild(moreLink); |
303 contents.appendChild(moreWrapper); | 305 contents.appendChild(moreWrapper); |
304 } | 306 } |
305 | 307 |
306 return contents; | 308 return contents; |
307 }; | 309 }; |
308 | 310 |
309 /** | 311 /** |
310 * Add child text nodes to a node such that occurrences of this.searchText_ are | 312 * Add child text nodes to a node such that occurrences of this.searchText_ are |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 devicesView.setSearchText($('search-field').value); | 566 devicesView.setSearchText($('search-field').value); |
565 }; | 567 }; |
566 $('search-field').addEventListener('search', doSearch); | 568 $('search-field').addEventListener('search', doSearch); |
567 $('search-button').addEventListener('click', doSearch); | 569 $('search-button').addEventListener('click', doSearch); |
568 | 570 |
569 chrome.send('otherDevicesInitialized'); | 571 chrome.send('otherDevicesInitialized'); |
570 } | 572 } |
571 | 573 |
572 // Add handlers to HTML elements. | 574 // Add handlers to HTML elements. |
573 document.addEventListener('DOMContentLoaded', load); | 575 document.addEventListener('DOMContentLoaded', load); |
OLD | NEW |