(js) Fix renaming a folder under iOS
parent
c59e429346
commit
1d731ebb77
1
NEWS
1
NEWS
|
@ -8,6 +8,7 @@ Bug fixes
|
||||||
- [core] properly update the last-modified attribute (#4313)
|
- [core] properly update the last-modified attribute (#4313)
|
||||||
- [web] prevent deletion of special folders using del key
|
- [web] prevent deletion of special folders using del key
|
||||||
- [web] fixed SAML2 session timeout handling during XHR requests
|
- [web] fixed SAML2 session timeout handling during XHR requests
|
||||||
|
- [web] fixed renaming a folder under iOS
|
||||||
- [eas] improved alarms syncing with EAS devices (#4351)
|
- [eas] improved alarms syncing with EAS devices (#4351)
|
||||||
- [eas] avoid potential cache update when breaking sync queries (#4422)
|
- [eas] avoid potential cache update when breaking sync queries (#4422)
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,8 @@
|
||||||
/**
|
/**
|
||||||
* @ngInject
|
* @ngInject
|
||||||
*/
|
*/
|
||||||
sgMailboxListItemController.$inject = ['$scope', '$element', '$state', '$mdToast', '$mdPanel', '$mdMedia', '$mdSidenav', 'sgConstant', 'Dialog', 'Mailbox', 'encodeUriFilter'];
|
sgMailboxListItemController.$inject = ['$scope', '$element', '$state', '$timeout', '$mdToast', '$mdPanel', '$mdMedia', '$mdSidenav', 'sgConstant', 'Dialog', 'Mailbox', 'encodeUriFilter'];
|
||||||
function sgMailboxListItemController($scope, $element, $state, $mdToast, $mdPanel, $mdMedia, $mdSidenav, sgConstant, Dialog, Mailbox, encodeUriFilter) {
|
function sgMailboxListItemController($scope, $element, $state, $timeout, $mdToast, $mdPanel, $mdMedia, $mdSidenav, sgConstant, Dialog, Mailbox, encodeUriFilter) {
|
||||||
var $ctrl = this;
|
var $ctrl = this;
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,15 +105,24 @@
|
||||||
|
|
||||||
|
|
||||||
this.editFolder = function($event) {
|
this.editFolder = function($event) {
|
||||||
|
$event.stopPropagation();
|
||||||
|
$event.preventDefault();
|
||||||
this.editMode = true;
|
this.editMode = true;
|
||||||
this.inputElement.value = this.mailbox.name;
|
this.inputElement.value = this.mailbox.name;
|
||||||
this.clickableElement.classList.add('ng-hide');
|
this.clickableElement.classList.add('ng-hide');
|
||||||
this.inputContainer.classList.remove('ng-hide');
|
this.inputContainer.classList.remove('ng-hide');
|
||||||
this.inputElement.focus();
|
if ($event.srcEvent.type == 'touchend') {
|
||||||
this.inputElement.select();
|
$timeout(function() {
|
||||||
if ($event) {
|
$ctrl.inputElement.select();
|
||||||
$event.stopPropagation();
|
$ctrl.inputElement.focus();
|
||||||
$event.preventDefault();
|
}, 200); // delayed focus for iOS
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.inputElement.select();
|
||||||
|
this.inputElement.focus();
|
||||||
|
}
|
||||||
|
if (this.panel) {
|
||||||
|
this.panel.close();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -188,7 +197,8 @@
|
||||||
locals: {
|
locals: {
|
||||||
itemCtrl: this,
|
itemCtrl: this,
|
||||||
folder: this.mailbox,
|
folder: this.mailbox,
|
||||||
confirmDelete: this.confirmDelete
|
editFolder: angular.bind(this, this.editFolder),
|
||||||
|
confirmDelete: angular.bind(this, this.confirmDelete)
|
||||||
},
|
},
|
||||||
bindToController: true,
|
bindToController: true,
|
||||||
controller: MenuController,
|
controller: MenuController,
|
||||||
|
@ -205,6 +215,7 @@
|
||||||
|
|
||||||
$mdPanel.open(config)
|
$mdPanel.open(config)
|
||||||
.then(function(panelRef) {
|
.then(function(panelRef) {
|
||||||
|
$ctrl.panel = panelRef;
|
||||||
// Automatically close panel when clicking inside of it
|
// Automatically close panel when clicking inside of it
|
||||||
panelRef.panelEl.one('click', function() {
|
panelRef.panelEl.one('click', function() {
|
||||||
panelRef.close();
|
panelRef.close();
|
||||||
|
@ -233,10 +244,6 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.editFolder = function() {
|
|
||||||
this.itemCtrl.editFolder();
|
|
||||||
};
|
|
||||||
|
|
||||||
this.compactFolder = function() {
|
this.compactFolder = function() {
|
||||||
this.folder.$compact().then(function() {
|
this.folder.$compact().then(function() {
|
||||||
$mdToast.show(
|
$mdToast.show(
|
||||||
|
|
|
@ -53,8 +53,8 @@
|
||||||
/**
|
/**
|
||||||
* @ngInject
|
* @ngInject
|
||||||
*/
|
*/
|
||||||
sgCalendarListItemController.$inject = ['$rootScope', '$scope', '$element', '$mdToast', '$mdPanel', '$mdMedia', '$mdSidenav', 'sgConstant', 'Dialog', 'Calendar'];
|
sgCalendarListItemController.$inject = ['$rootScope', '$scope', '$element', '$timeout', '$mdToast', '$mdPanel', '$mdMedia', '$mdSidenav', 'sgConstant', 'Dialog', 'Calendar'];
|
||||||
function sgCalendarListItemController($rootScope, $scope, $element, $mdToast, $mdPanel, $mdMedia, $mdSidenav, sgConstant, Dialog, Calendar) {
|
function sgCalendarListItemController($rootScope, $scope, $element, $timeout, $mdToast, $mdPanel, $mdMedia, $mdSidenav, sgConstant, Dialog, Calendar) {
|
||||||
var $ctrl = this;
|
var $ctrl = this;
|
||||||
|
|
||||||
|
|
||||||
|
@ -81,15 +81,24 @@
|
||||||
|
|
||||||
|
|
||||||
this.editFolder = function($event) {
|
this.editFolder = function($event) {
|
||||||
|
$event.stopPropagation();
|
||||||
|
$event.preventDefault();
|
||||||
this.editMode = true;
|
this.editMode = true;
|
||||||
this.inputElement.value = this.calendar.name;
|
this.inputElement.value = this.calendar.name;
|
||||||
this.clickableElement.classList.add('ng-hide');
|
this.clickableElement.classList.add('ng-hide');
|
||||||
this.inputContainer.classList.remove('ng-hide');
|
this.inputContainer.classList.remove('ng-hide');
|
||||||
this.inputElement.focus();
|
if ($event.srcEvent.type == 'touchend') {
|
||||||
this.inputElement.select();
|
$timeout(function() {
|
||||||
if ($event) {
|
$ctrl.inputElement.focus();
|
||||||
$event.stopPropagation();
|
$ctrl.inputElement.select();
|
||||||
$event.preventDefault();
|
}, 200); // delayed focus for iOS
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.inputElement.select();
|
||||||
|
this.inputElement.focus();
|
||||||
|
}
|
||||||
|
if (this.panel) {
|
||||||
|
this.panel.close();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -180,6 +189,7 @@
|
||||||
|
|
||||||
$mdPanel.open(config)
|
$mdPanel.open(config)
|
||||||
.then(function(panelRef) {
|
.then(function(panelRef) {
|
||||||
|
$ctrl.panel = panelRef;
|
||||||
// Automatically close panel when clicking inside of it
|
// Automatically close panel when clicking inside of it
|
||||||
panelRef.panelEl.one('click', function() {
|
panelRef.panelEl.one('click', function() {
|
||||||
panelRef.close();
|
panelRef.close();
|
||||||
|
|
|
@ -54,12 +54,14 @@ md-list-item {
|
||||||
.sg-item-name {
|
.sg-item-name {
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
font-size: sg-size(button);
|
font-size: sg-size(button);
|
||||||
line-height: $list-item-height;
|
|
||||||
max-width: 75%; // leave some place for a secondary button
|
max-width: 75%; // leave some place for a secondary button
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
text-transform: initial;
|
text-transform: initial;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
@include from(md) {
|
||||||
|
line-height: $list-item-height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.sg-inline-list-icon-label {
|
.sg-inline-list-icon-label {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
|
Loading…
Reference in New Issue