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

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

Issue 10229003: [Photo Editor] Fixed an exception when renaming an edited image. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 * 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 537
538 function onSuccess(entry) { 538 function onSuccess(entry) {
539 item.setUrl(entry.toURL()); 539 item.setUrl(entry.toURL());
540 self.updateFilename_(); 540 self.updateFilename_();
541 } 541 }
542 542
543 function doRename() { 543 function doRename() {
544 if (self.imageChanges_ > 0) { 544 if (self.imageChanges_ > 0) {
545 // Use this name in the next save operation. 545 // Use this name in the next save operation.
546 item.setNameForSaving(newName); 546 item.setNameForSaving(newName);
547 this.filenameSpacer_.removeAttribute('overwrite'); 547 self.filenameSpacer_.removeAttribute('overwrite');
548 self.updateFilename_(); 548 self.updateFilename_();
549 } else { 549 } else {
550 // Rename file in place. 550 // Rename file in place.
551 dir.getFile( 551 dir.getFile(
552 ImageUtil.getFullNameFromUrl(item.getUrl()), 552 ImageUtil.getFullNameFromUrl(item.getUrl()),
553 {create: false}, 553 {create: false},
554 function(entry) { entry.moveTo(dir, newName, onSuccess, onError); }, 554 function(entry) { entry.moveTo(dir, newName, onSuccess, onError); },
555 onError); 555 onError);
556 } 556 }
557 } 557 }
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 ShareMode.prototype.setUp = function() { 1482 ShareMode.prototype.setUp = function() {
1483 ImageEditor.Mode.prototype.setUp.apply(this, arguments); 1483 ImageEditor.Mode.prototype.setUp.apply(this, arguments);
1484 ImageUtil.setAttribute(this.menu_, 'hidden', false); 1484 ImageUtil.setAttribute(this.menu_, 'hidden', false);
1485 ImageUtil.setAttribute(this.button_, 'pressed', false); 1485 ImageUtil.setAttribute(this.button_, 'pressed', false);
1486 }; 1486 };
1487 1487
1488 ShareMode.prototype.cleanUpUI = function() { 1488 ShareMode.prototype.cleanUpUI = function() {
1489 ImageEditor.Mode.prototype.cleanUpUI.apply(this, arguments); 1489 ImageEditor.Mode.prototype.cleanUpUI.apply(this, arguments);
1490 ImageUtil.setAttribute(this.menu_, 'hidden', true); 1490 ImageUtil.setAttribute(this.menu_, 'hidden', true);
1491 }; 1491 };
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