mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-02 05:32:18 +00:00
Don't allow duplicate GCS folder names
This commit is contained in:
@@ -498,18 +498,20 @@
|
||||
* @returns a promise of the HTTP operation
|
||||
*/
|
||||
Calendar.prototype.$save = function() {
|
||||
var _this = this;
|
||||
var _this = this,
|
||||
d = Calendar.$q.defer();
|
||||
|
||||
return Calendar.$$resource.save(this.id, this.$omit()).then(function(data) {
|
||||
Calendar.$$resource.save(this.id, this.$omit()).then(function(data) {
|
||||
// Make a copy of the data for an eventual reset
|
||||
_this.$shadowData = _this.$omit();
|
||||
return data;
|
||||
return d.resolve(data);
|
||||
}, function(data) {
|
||||
Calendar.$log.error(JSON.stringify(data, undefined, 2));
|
||||
// Restore previous version
|
||||
_this.$reset();
|
||||
return data;
|
||||
return d.reject(data);
|
||||
});
|
||||
|
||||
return d.promise;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
this.inputElement.value = this.calendar.name;
|
||||
this.clickableElement.classList.add('ng-hide');
|
||||
this.inputContainer.classList.remove('ng-hide');
|
||||
if ($event.srcEvent.type == 'touchend') {
|
||||
if ($event.srcEvent && $event.srcEvent.type == 'touchend') {
|
||||
$timeout(function() {
|
||||
$ctrl.inputElement.focus();
|
||||
$ctrl.inputElement.select();
|
||||
@@ -115,6 +115,12 @@
|
||||
$ctrl.inputContainer.classList.add('ng-hide');
|
||||
$ctrl.clickableElement.classList.remove('ng-hide');
|
||||
$ctrl.updateCalendarName();
|
||||
}, function() {
|
||||
$ctrl.editMode = true;
|
||||
$timeout(function() {
|
||||
$ctrl.inputElement.focus();
|
||||
$ctrl.inputElement.select();
|
||||
}, 200); // delayed focus for iOS
|
||||
})
|
||||
.finally(function() {
|
||||
$ctrl.inputElement.disabled = false;
|
||||
|
||||
Reference in New Issue
Block a user