OLD | NEW |
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 * Base class that Ribbon uses to display photos. | 6 * Base class that Ribbon uses to display photos. |
7 */ | 7 */ |
8 | 8 |
9 function RibbonClient() {} | 9 function RibbonClient() {} |
10 | 10 |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 this.initiateFading_(); | 329 this.initiateFading_(); |
330 }; | 330 }; |
331 | 331 |
332 Gallery.prototype.onFilenameEditKeydown_ = function() { | 332 Gallery.prototype.onFilenameEditKeydown_ = function() { |
333 switch (event.keyCode) { | 333 switch (event.keyCode) { |
334 case 27: // Escape | 334 case 27: // Escape |
335 this.filenameEdit_.blur(); | 335 this.filenameEdit_.blur(); |
336 break; | 336 break; |
337 | 337 |
338 case 13: // Enter | 338 case 13: // Enter |
| 339 if (this.filenameEdit_.value && this.filenameEdit_.value[0] == '.') { |
| 340 this.editor_.getPrompt().show('file_hidden_name', 5000); |
| 341 break; |
| 342 } |
339 if (this.filenameEdit_.value) { | 343 if (this.filenameEdit_.value) { |
340 this.renameItem_(this.ribbon_.getSelectedItem(), | 344 this.renameItem_(this.ribbon_.getSelectedItem(), |
341 this.filenameEdit_.value); | 345 this.filenameEdit_.value); |
342 this.filenameEdit_.blur(); | 346 this.filenameEdit_.blur(); |
343 } | 347 } |
344 break; | 348 break; |
345 } | 349 } |
346 event.stopPropagation(); | 350 event.stopPropagation(); |
347 }; | 351 }; |
348 | 352 |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 ShareMode.prototype.setUp = function() { | 1213 ShareMode.prototype.setUp = function() { |
1210 ImageEditor.Mode.prototype.setUp.apply(this, arguments); | 1214 ImageEditor.Mode.prototype.setUp.apply(this, arguments); |
1211 ImageUtil.setAttribute(this.menu_, 'hidden', false); | 1215 ImageUtil.setAttribute(this.menu_, 'hidden', false); |
1212 ImageUtil.setAttribute(this.button_, 'pressed', false); | 1216 ImageUtil.setAttribute(this.button_, 'pressed', false); |
1213 }; | 1217 }; |
1214 | 1218 |
1215 ShareMode.prototype.cleanUpUI = function() { | 1219 ShareMode.prototype.cleanUpUI = function() { |
1216 ImageEditor.Mode.prototype.cleanUpUI.apply(this, arguments); | 1220 ImageEditor.Mode.prototype.cleanUpUI.apply(this, arguments); |
1217 ImageUtil.setAttribute(this.menu_, 'hidden', true); | 1221 ImageUtil.setAttribute(this.menu_, 'hidden', true); |
1218 }; | 1222 }; |
OLD | NEW |