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

Unified Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 7310002: Filebrowser: keep selection when switching between list and grid. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/file_manager.js
===================================================================
--- chrome/browser/resources/file_manager/js/file_manager.js (revision 91530)
+++ chrome/browser/resources/file_manager/js/file_manager.js (working copy)
@@ -644,6 +644,7 @@
return;
if (type == FileManager.ListType.DETAIL) {
+ var selectedIndexes = this.grid_.selectionModel.selectedIndexes;
this.table_.dataModel = this.dataModel_;
this.table_.style.display = '';
this.grid_.style.display = 'none';
@@ -651,7 +652,9 @@
this.currentList_ = this.table_;
this.dialogDom_.querySelector('button.detail-view').disabled = true;
this.dialogDom_.querySelector('button.thumbnail-view').disabled = false;
+ this.table_.selectionModel.selectedIndexes = selectedIndexes;
} else if (type == FileManager.ListType.THUMBNAIL) {
+ var selectedIndexes = this.table_.selectionModel.selectedIndexes;
this.grid_.dataModel = this.dataModel_;
this.grid_.style.display = '';
this.table_.style.display = 'none';
@@ -659,6 +662,7 @@
this.currentList_ = this.grid_;
this.dialogDom_.querySelector('button.thumbnail-view').disabled = true;
this.dialogDom_.querySelector('button.detail-view').disabled = false;
+ this.grid_.selectionModel.selectedIndexes = selectedIndexes;
} else {
throw new Error('Unknown list type: ' + type);
}
« 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