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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 }; |
OLD | NEW |