| 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 const BookmarkList = bmm.BookmarkList; | 5 const BookmarkList = bmm.BookmarkList; |
| 6 const BookmarkTree = bmm.BookmarkTree; | 6 const BookmarkTree = bmm.BookmarkTree; |
| 7 const ListItem = cr.ui.ListItem; | 7 const ListItem = cr.ui.ListItem; |
| 8 const TreeItem = cr.ui.TreeItem; | 8 const TreeItem = cr.ui.TreeItem; |
| 9 const LinkKind = cr.LinkKind; | 9 const LinkKind = cr.LinkKind; |
| 10 const Command = cr.ui.Command; | 10 const Command = cr.ui.Command; |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 else if (dropPos == 'below') | 759 else if (dropPos == 'below') |
| 760 index = relatedIndex + 1; | 760 index = relatedIndex + 1; |
| 761 | 761 |
| 762 selectItemsAfterUserAction(selectTarget, selectedTreeId); | 762 selectItemsAfterUserAction(selectTarget, selectedTreeId); |
| 763 | 763 |
| 764 if (index != undefined && index != -1) | 764 if (index != undefined && index != -1) |
| 765 chrome.experimental.bookmarkManager.drop(parentId, index); | 765 chrome.experimental.bookmarkManager.drop(parentId, index); |
| 766 else | 766 else |
| 767 chrome.experimental.bookmarkManager.drop(parentId); | 767 chrome.experimental.bookmarkManager.drop(parentId); |
| 768 | 768 |
| 769 e.preventDefault(); |
| 770 |
| 769 // TODO(arv): Select the newly dropped items. | 771 // TODO(arv): Select the newly dropped items. |
| 770 } | 772 } |
| 771 this.dropDestination = null; | 773 this.dropDestination = null; |
| 772 this.hideDropOverlay_(); | 774 this.hideDropOverlay_(); |
| 773 }, | 775 }, |
| 774 | 776 |
| 775 clearDragData: function() { | 777 clearDragData: function() { |
| 776 this.dragData = null; | 778 this.dragData = null; |
| 777 }, | 779 }, |
| 778 | 780 |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1545 document.addEventListener('copy', handle('copy-command')); | 1547 document.addEventListener('copy', handle('copy-command')); |
| 1546 document.addEventListener('cut', handle('cut-command')); | 1548 document.addEventListener('cut', handle('cut-command')); |
| 1547 | 1549 |
| 1548 var pasteHandler = handle('paste-command'); | 1550 var pasteHandler = handle('paste-command'); |
| 1549 document.addEventListener('paste', function(e) { | 1551 document.addEventListener('paste', function(e) { |
| 1550 // Paste is a bit special since we need to do an async call to see if we can | 1552 // Paste is a bit special since we need to do an async call to see if we can |
| 1551 // paste because the paste command might not be up to date. | 1553 // paste because the paste command might not be up to date. |
| 1552 updatePasteCommand(pasteHandler); | 1554 updatePasteCommand(pasteHandler); |
| 1553 }); | 1555 }); |
| 1554 })(); | 1556 })(); |
| OLD | NEW |