Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: chrome/browser/resources/file_manager/js/file_transfer_controller.js

Issue 17356006: Files.app: Stop using DragSelector on the grid view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698