| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 (function() { | 5 (function() { |
| 6 /** @const */ var BookmarkList = bmm.BookmarkList; | 6 /** @const */ var BookmarkList = bmm.BookmarkList; |
| 7 /** @const */ var BookmarkTree = bmm.BookmarkTree; | 7 /** @const */ var BookmarkTree = bmm.BookmarkTree; |
| 8 /** @const */ var Command = cr.ui.Command; | 8 /** @const */ var Command = cr.ui.Command; |
| 9 /** @const */ var CommandBinding = cr.ui.CommandBinding; | 9 /** @const */ var CommandBinding = cr.ui.CommandBinding; |
| 10 /** @const */ var LinkKind = cr.LinkKind; | 10 /** @const */ var LinkKind = cr.LinkKind; |
| (...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1321 // when // the user goes back and forward in the history. | 1321 // when // the user goes back and forward in the history. |
| 1322 window.addEventListener('hashchange', processHash); | 1322 window.addEventListener('hashchange', processHash); |
| 1323 | 1323 |
| 1324 document.querySelector('header form').onsubmit = function(e) { | 1324 document.querySelector('header form').onsubmit = function(e) { |
| 1325 setSearch($('term').value); | 1325 setSearch($('term').value); |
| 1326 e.preventDefault(); | 1326 e.preventDefault(); |
| 1327 }; | 1327 }; |
| 1328 | 1328 |
| 1329 $('term').addEventListener('search', handleSearch); | 1329 $('term').addEventListener('search', handleSearch); |
| 1330 | 1330 |
| 1331 document.querySelector('.summary > button').addEventListener( | 1331 document.querySelector('.summary button').addEventListener( |
| 1332 'click', handleOrganizeButtonClick); | 1332 'click', handleOrganizeButtonClick); |
| 1333 | 1333 |
| 1334 document.addEventListener('canExecute', handleCanExecuteForDocument); | 1334 document.addEventListener('canExecute', handleCanExecuteForDocument); |
| 1335 document.addEventListener('command', handleCommand); | 1335 document.addEventListener('command', handleCommand); |
| 1336 | 1336 |
| 1337 // Listen to copy, cut and paste events and execute the associated commands. | 1337 // Listen to copy, cut and paste events and execute the associated commands. |
| 1338 installEventHandlerForCommand('copy', 'copy-command'); | 1338 installEventHandlerForCommand('copy', 'copy-command'); |
| 1339 installEventHandlerForCommand('cut', 'cut-command'); | 1339 installEventHandlerForCommand('cut', 'cut-command'); |
| 1340 installEventHandlerForCommand('paste', 'paste-from-organize-menu-command'); | 1340 installEventHandlerForCommand('paste', 'paste-from-organize-menu-command'); |
| 1341 | 1341 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1369 | 1369 |
| 1370 cr.ui.FocusOutlineManager.forDocument(document); | 1370 cr.ui.FocusOutlineManager.forDocument(document); |
| 1371 initializeSplitter(); | 1371 initializeSplitter(); |
| 1372 bmm.addBookmarkModelListeners(); | 1372 bmm.addBookmarkModelListeners(); |
| 1373 dnd.init(selectItemsAfterUserAction); | 1373 dnd.init(selectItemsAfterUserAction); |
| 1374 tree.reload(); | 1374 tree.reload(); |
| 1375 } | 1375 } |
| 1376 | 1376 |
| 1377 initializeBookmarkManager(); | 1377 initializeBookmarkManager(); |
| 1378 })(); | 1378 })(); |
| OLD | NEW |