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

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

Issue 10834087: In FileManager when clicking on the current root while viewing the top directory, do nothing (inste… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 /** 5 /**
6 * FileManager constructor. 6 * FileManager constructor.
7 * 7 *
8 * FileManager objects encapsulate the functionality of the file selector 8 * FileManager objects encapsulate the functionality of the file selector
9 * dialogs, as well as the full screen file manager application (though the 9 * dialogs, as well as the full screen file manager application (though the
10 * latter is not yet implemented). 10 * latter is not yet implemented).
(...skipping 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 icon.className = 'detail-icon'; 1887 icon.className = 'detail-icon';
1888 icon.setAttribute('file-type-icon', FileType.getIcon(entry)); 1888 icon.setAttribute('file-type-icon', FileType.getIcon(entry));
1889 return icon; 1889 return icon;
1890 }; 1890 };
1891 1891
1892 FileManager.prototype.renderRoot_ = function(path) { 1892 FileManager.prototype.renderRoot_ = function(path) {
1893 var li = this.document_.createElement('li'); 1893 var li = this.document_.createElement('li');
1894 li.className = 'root-item'; 1894 li.className = 'root-item';
1895 var dm = this.directoryModel_; 1895 var dm = this.directoryModel_;
1896 var handleClick = function() { 1896 var handleClick = function() {
1897 if (li.selected) { 1897 if (li.selected && path !== dm.getCurrentDirPath()) {
1898 dm.changeDirectory(path); 1898 dm.changeDirectory(path);
1899 } 1899 }
1900 }; 1900 };
1901 li.addEventListener('mousedown', handleClick); 1901 li.addEventListener('mousedown', handleClick);
1902 li.addEventListener(cr.ui.TouchHandler.EventType.TOUCH_START, handleClick); 1902 li.addEventListener(cr.ui.TouchHandler.EventType.TOUCH_START, handleClick);
1903 1903
1904 var rootType = PathUtil.getRootType(path); 1904 var rootType = PathUtil.getRootType(path);
1905 1905
1906 var div = this.document_.createElement('div'); 1906 var div = this.document_.createElement('div');
1907 div.className = 'root-label'; 1907 div.className = 'root-label';
(...skipping 2323 matching lines...) Expand 10 before | Expand all | Expand 10 after
4231 } 4231 }
4232 4232
4233 var defaultActionSeparator = 4233 var defaultActionSeparator =
4234 this.dialogDom_.querySelector('#default-action-separator'); 4234 this.dialogDom_.querySelector('#default-action-separator');
4235 4235
4236 this.defaultActionMenuItem_.hidden = !taskItem; 4236 this.defaultActionMenuItem_.hidden = !taskItem;
4237 defaultActionSeparator.hidden = !taskItem; 4237 defaultActionSeparator.hidden = !taskItem;
4238 } 4238 }
4239 })(); 4239 })();
4240 4240
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