| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 cr.define('ntp4', function() { | 5 cr.define('ntp4', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 var localStrings = new LocalStrings; | 8 var localStrings = new LocalStrings; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 | 499 |
| 500 /** @inheritDoc */ | 500 /** @inheritDoc */ |
| 501 get extraBottomPadding() { | 501 get extraBottomPadding() { |
| 502 return 40; | 502 return 40; |
| 503 }, | 503 }, |
| 504 | 504 |
| 505 /** @inheritDoc */ | 505 /** @inheritDoc */ |
| 506 setDropEffect: function(dataTransfer) { | 506 setDropEffect: function(dataTransfer) { |
| 507 var tile = ntp4.getCurrentlyDraggingTile(); | 507 var tile = ntp4.getCurrentlyDraggingTile(); |
| 508 if (tile && tile.querySelector('.bookmark')) | 508 if (tile && tile.querySelector('.bookmark')) |
| 509 dataTransfer.dropEffect = 'move'; | 509 ntp4.setCurrentDropEffect(dataTransfer, 'move'); |
| 510 else | 510 else |
| 511 dataTransfer.dropEffect = 'copy'; | 511 ntp4.setCurrentDropEffect(dataTransfer, 'copy'); |
| 512 }, | 512 }, |
| 513 | 513 |
| 514 /** @inheritDoc */ | 514 /** @inheritDoc */ |
| 515 addDragData: function(dataTransfer, index) { | 515 addDragData: function(dataTransfer, index) { |
| 516 var parentId = ROOT_NODE_ID == this.id ? BOOKMARKS_BAR_ID : this.id; | 516 var parentId = ROOT_NODE_ID == this.id ? BOOKMARKS_BAR_ID : this.id; |
| 517 var currentlyDraggingTile = ntp4.getCurrentlyDraggingTile(); | 517 var currentlyDraggingTile = ntp4.getCurrentlyDraggingTile(); |
| 518 if (currentlyDraggingTile) { | 518 if (currentlyDraggingTile) { |
| 519 var tileContents = currentlyDraggingTile.firstChild; | 519 var tileContents = currentlyDraggingTile.firstChild; |
| 520 if (tileContents.classList.contains('most-visited')) { | 520 if (tileContents.classList.contains('most-visited')) { |
| 521 this.generateBookmarkForLink(parentId, index, | 521 this.generateBookmarkForLink(parentId, index, |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 tile.stripeColor = color; | 633 tile.stripeColor = color; |
| 634 } | 634 } |
| 635 | 635 |
| 636 return { | 636 return { |
| 637 BookmarksPage: BookmarksPage, | 637 BookmarksPage: BookmarksPage, |
| 638 initBookmarkChevron: initBookmarkChevron, | 638 initBookmarkChevron: initBookmarkChevron, |
| 639 }; | 639 }; |
| 640 }); | 640 }); |
| 641 | 641 |
| 642 window.addEventListener('load', ntp4.initBookmarkChevron); | 642 window.addEventListener('load', ntp4.initBookmarkChevron); |
| OLD | NEW |