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

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

Issue 10108017: Prevent dragging in open/save dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « chrome/browser/resources/file_manager/css/file_manager.css ('k') | 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 var MAX_DRAG_THUMBAIL_COUNT = 4; 5 var MAX_DRAG_THUMBAIL_COUNT = 4;
6 6
7 function FileTransferController(fileList, 7 function FileTransferController(fileList,
8 fileListSelection, 8 fileListSelection,
9 dragNodeConstructor, 9 dragNodeConstructor,
10 copyManager, 10 copyManager,
(...skipping 21 matching lines...) Expand all
32 32
33 } 33 }
34 34
35 FileTransferController.prototype = { 35 FileTransferController.prototype = {
36 __proto__: cr.EventTarget.prototype, 36 __proto__: cr.EventTarget.prototype,
37 37
38 /** 38 /**
39 * @param {cr.ui.List} list Items in the list will be draggable. 39 * @param {cr.ui.List} list Items in the list will be draggable.
40 */ 40 */
41 attachDragSource: function(list) { 41 attachDragSource: function(list) {
42 list.style.webkitUserDrag = 'element';
42 list.addEventListener('dragstart', this.onDragStart_.bind(this, list)); 43 list.addEventListener('dragstart', this.onDragStart_.bind(this, list));
43 list.addEventListener('dragend', this.onDragEnd_.bind(this, list)); 44 list.addEventListener('dragend', this.onDragEnd_.bind(this, list));
44 list.addEventListener('drag', this.onDrag_.bind(this, list)); 45 list.addEventListener('drag', this.onDrag_.bind(this, list));
45 }, 46 },
46 47
47 /** 48 /**
48 * @param {cr.ui.List} list List itself and its directory items will could 49 * @param {cr.ui.List} list List itself and its directory items will could
49 * be drop target. 50 * be drop target.
50 */ 51 */
51 attachDropTarget: function(list) { 52 attachDropTarget: function(list) {
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 * @type {Array.<Entry>} 397 * @type {Array.<Entry>}
397 */ 398 */
398 get selectedEntries_() { 399 get selectedEntries_() {
399 var list = this.fileList_; 400 var list = this.fileList_;
400 return this.fileListSelection_.selectedIndexes.map(function(index) { 401 return this.fileListSelection_.selectedIndexes.map(function(index) {
401 return list.item(index); 402 return list.item(index);
402 }); 403 });
403 } 404 }
404 }; 405 };
405 406
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/css/file_manager.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698