Chromium Code Reviews| 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 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Global (placed in the window object) variable name to hold internal | 8 * Global (placed in the window object) variable name to hold internal |
| 9 * file dragging information. Needed to show visual feedback while dragging | 9 * file dragging information. Needed to show visual feedback while dragging |
| 10 * since DataTransfer object is in protected state. Reachable from other | 10 * since DataTransfer object is in protected state. Reachable from other |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 283 }, | 283 }, |
| 284 | 284 |
| 285 /** | 285 /** |
| 286 * @this {FileTransferController} | 286 * @this {FileTransferController} |
| 287 * @param {cr.ui.List} list Drop target list | 287 * @param {cr.ui.List} list Drop target list |
| 288 * @param {Event} event A dragstart event of DOM. | 288 * @param {Event} event A dragstart event of DOM. |
| 289 */ | 289 */ |
| 290 onDragStart_: function(list, event) { | 290 onDragStart_: function(list, event) { |
| 291 // Check if a drag selection should be initiated or not. | 291 // Check if a drag selection should be initiated or not. |
| 292 // TODO(hirono): Support drag selection on the grid view. crbug.com/247278 | 292 // TODO(hirono): Support drag selection on the grid view. crbug.com/247278 |
| 293 if (list.id == 'file-list') { | 293 if (list.id == 'file-list' && list.parentNode.id == 'detail-table') { |
|
mtomasz
2013/06/21 06:20:58
This is quite ugly, since the dom structure can ch
| |
| 294 if (list.parentNode.shouldStartDragSelection(event)) { | 294 if (list.parentNode.shouldStartDragSelection(event)) { |
| 295 this.dragSelector_.startDragSelection(list, event); | 295 this.dragSelector_.startDragSelection(list, event); |
| 296 return; | 296 return; |
| 297 } | 297 } |
| 298 } | 298 } |
| 299 | 299 |
| 300 // Nothing selected. | 300 // Nothing selected. |
| 301 if (!this.selectedEntries_.length) { | 301 if (!this.selectedEntries_.length) { |
| 302 event.preventDefault(); | 302 event.preventDefault(); |
| 303 return; | 303 return; |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 814 !event.ctrlKey) { | 814 !event.ctrlKey) { |
| 815 return 'move'; | 815 return 'move'; |
| 816 } | 816 } |
| 817 if (event.dataTransfer.effectAllowed == 'copyMove' && | 817 if (event.dataTransfer.effectAllowed == 'copyMove' && |
| 818 event.shiftKey) { | 818 event.shiftKey) { |
| 819 return 'move'; | 819 return 'move'; |
| 820 } | 820 } |
| 821 return 'copy'; | 821 return 'copy'; |
| 822 }, | 822 }, |
| 823 }; | 823 }; |
| OLD | NEW |