Lines Matching refs:selection

70   this.addEventListener('selection-summarized',
575 this.selection.totalCount == 1);
710 this.deleteEntries(this.selection.entries);
892 if (this.selection && this.selection.entries.indexOf(entry) != -1) {
1044 * Compute summary information about the current selection.
1046 * This method dispatches the 'selection-summarized' event when it completes.
1051 var selection = this.selection = {
1066 if (!selection.indexes.length) {
1067 cr.dispatchSimpleEvent(this, 'selection-summarized');
1075 for (var i = 0; i < selection.indexes.length; i++) {
1076 var entry = this.dataModel_.item(selection.indexes[i]);
1078 selection.entries.push(entry);
1079 selection.urls.push(entry.toURL());
1081 if (selection.iconType == null) {
1082 selection.iconType = getIconType(entry);
1083 } else if (selection.iconType != 'unknown') {
1085 if (selection.iconType != iconType)
1086 selection.iconType = 'unknown';
1089 selection.totalCount++;
1096 // sizes for these files before telling the world the selection has
1101 selection.bytes += entry.cachedSize_;
1103 selection.fileCount += 1;
1105 selection.directoryCount += 1;
1111 selection.leadEntry = this.dataModel_.item(leadIndex);
1113 selection.leadEntry = selection.entries[0];
1120 // We're careful to modify the 'selection', rather than 'self.selection'
1121 // here, just in case the selection has changed since this summarization
1123 selection.bytes += fileEntry.cachedSize_;
1129 self.dispatchEvent(new cr.Event('selection-summarized'));
1134 chrome.fileBrowserPrivate.getFileTasks(selection.urls,
1235 g_slideshow_data = this.selection.urls;
1238 chrome.fileBrowserPrivate.viewFiles(this.selection.urls,
1241 chrome.fileBrowserPrivate.viewFiles(this.selection.urls,
1248 this.selection.urls);
1294 * The selection summary line is handled by the onSelectionSummarized handler
1308 if (!this.selection.totalCount) {
1313 var previewName = this.selection.leadEntry.name;
1319 var iconType = getIconType(this.selection.leadEntry);
1321 if (fileManager.selection.totalCount > 1)
1326 var leadEntry = this.selection.leadEntry;
1328 this.getThumbnailURL(this.selection.leadEntry, function(iconType, url) {
1329 if (self.selection.leadEntry != leadEntry) {
1486 * Update the selection summary UI when the selection summarization completes.
1489 if (this.selection.totalCount == 0) {
1492 } else if (this.selection.totalCount == 1) {
1494 strf('ONE_FILE_SELECTED', cr.locale.bytesToSi(this.selection.bytes));
1498 strf('MANY_FILES_SELECTED', this.selection.totalCount,
1499 cr.locale.bytesToSi(this.selection.bytes));
1515 // selection should be cleared).
1516 if (this.selection.totalCount == 1 && this.selection.entries[0].isFile) {
1517 var selectedIndex = this.selection.indexes[0];
1540 // multi-selection, we can prevent this shift click from toggling the
1547 * Update the UI when the selection model changes.
1582 if (this.selection.fileCount > 1) {
1585 for (var i = 0; i < this.selection.entries.length; i++) {
1586 if (!this.selection.entries[i].isFile)
1589 var selectedIndex = this.selection.indexes[i];
1599 selectable = this.selection.directoryCount == 1 &&
1600 this.selection.fileCount == 0;
1602 selectable = (this.selection.directoryCount == 0 &&
1603 this.selection.fileCount == 1);
1606 selectable = (this.selection.directoryCount == 0 &&
1607 this.selection.fileCount >= 1);
1609 if (this.selection.leadEntry && this.selection.leadEntry.isFile)
1610 this.filenameInput_.value = this.selection.leadEntry.name;
2012 if (this.selection.totalCount == 1 &&
2013 this.selection.leadEntry.isDirectory &&
2015 this.changeDirectory(this.selection.leadEntry.fullPath);
2037 this.selection.totalCount > 0) {
2039 this.deleteEntries(this.selection.entries);
2069 // Save-as doesn't require a valid selection from the list, since
2100 // Multi-file selection has no other restrictions.
2119 if (!this.selection.leadEntry.isDirectory)
2122 if (!this.selection.leadEntry.isFile)