OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html i18n-values="dir:textdirection"> | 2 <html i18n-values="dir:textdirection"> |
3 <!-- | 3 <!-- |
4 | 4 |
5 Copyright (c) 2010 The Chromium Authors. All rights reserved. | 5 Copyright (c) 2010 The Chromium Authors. All rights reserved. |
6 Use of this source code is governed by a BSD-style license that can be | 6 Use of this source code is governed by a BSD-style license that can be |
7 found in the LICENSE file. | 7 found in the LICENSE file. |
8 | 8 |
9 | 9 |
10 This is work in progress: | 10 This is work in progress: |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 * Calback for the dragover event. | 674 * Calback for the dragover event. |
675 * @param {Event} e The dragover event. | 675 * @param {Event} e The dragover event. |
676 */ | 676 */ |
677 handleDragOver: function(e) { | 677 handleDragOver: function(e) { |
678 // console.log(e.type); | 678 // console.log(e.type); |
679 | 679 |
680 // The default operation is to allow dropping links etc to do navigation. | 680 // The default operation is to allow dropping links etc to do navigation. |
681 // We never want to do that for the bookmark manager. | 681 // We never want to do that for the bookmark manager. |
682 e.preventDefault(); | 682 e.preventDefault(); |
683 | 683 |
| 684 // Set to none. This will get set to something if we can do the drop. |
| 685 e.dataTransfer.dropEffect = 'none'; |
| 686 |
684 if (!this.dragData) | 687 if (!this.dragData) |
685 return; | 688 return; |
686 | 689 |
687 var overElement = this.getBookmarkElement(e.target); | 690 var overElement = this.getBookmarkElement(e.target); |
688 if (!overElement && e.target == list) | 691 if (!overElement && e.target == list) |
689 overElement = list; | 692 overElement = list; |
690 | 693 |
691 if (!overElement) | 694 if (!overElement) |
692 return; | 695 return; |
693 | 696 |
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1576 localStrings.templateData = data; | 1579 localStrings.templateData = data; |
1577 i18nTemplate.process(document, data); | 1580 i18nTemplate.process(document, data); |
1578 }); | 1581 }); |
1579 | 1582 |
1580 </script> | 1583 </script> |
1581 | 1584 |
1582 <div id="drop-overlay"></div> | 1585 <div id="drop-overlay"></div> |
1583 | 1586 |
1584 </body> | 1587 </body> |
1585 </html> | 1588 </html> |
OLD | NEW |