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

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

Issue 10843005: Polished file error messages for the Files app (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
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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 */ 195 */
196 function getFileErrorString(code) { 196 function getFileErrorString(code) {
197 for (var key in FileError) { 197 for (var key in FileError) {
198 var match = /(.*)_ERR$/.exec(key); 198 var match = /(.*)_ERR$/.exec(key);
199 if (match && FileError[key] == code) { 199 if (match && FileError[key] == code) {
200 // This would convert 1 to 'NOT_FOUND'. 200 // This would convert 1 to 'NOT_FOUND'.
201 code = match[1]; 201 code = match[1];
202 break; 202 break;
203 } 203 }
204 } 204 }
205 console.warn('File error: ' + code);
205 return loadTimeData.getString('FILE_ERROR_' + code) || 206 return loadTimeData.getString('FILE_ERROR_' + code) ||
206 loadTimeData.getStringF('FILE_ERROR_GENERIC', code); 207 loadTimeData.getString('FILE_ERROR_GENERIC');
207 } 208 }
208 209
209 function removeChildren(element) { 210 function removeChildren(element) {
210 element.textContent = ''; 211 element.textContent = '';
211 } 212 }
212 213
213 function setClassIf(element, className, condition) { 214 function setClassIf(element, className, condition) {
214 if (condition) 215 if (condition)
215 element.classList.add(className); 216 element.classList.add(className);
216 else 217 else
(...skipping 4007 matching lines...) Expand 10 before | Expand all | Expand 10 after
4224 } 4225 }
4225 4226
4226 var defaultActionSeparator = 4227 var defaultActionSeparator =
4227 this.dialogDom_.querySelector('#default-action-separator'); 4228 this.dialogDom_.querySelector('#default-action-separator');
4228 4229
4229 this.defaultActionMenuItem_.hidden = !taskItem; 4230 this.defaultActionMenuItem_.hidden = !taskItem;
4230 defaultActionSeparator.hidden = !taskItem; 4231 defaultActionSeparator.hidden = !taskItem;
4231 } 4232 }
4232 })(); 4233 })();
4233 4234
OLDNEW
« chrome/app/generated_resources.grd ('K') | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698