Merge pull request #190 from nextcloud/app-navigation-mobile-fix
Don't hide sidebar when creating new list, closes #175
This commit is contained in:
commit
aa07132c2a
2 changed files with 9 additions and 6 deletions
|
@ -60,13 +60,14 @@ angular.module('Tasks').controller('ListController', [
|
|||
});
|
||||
};
|
||||
|
||||
this._$scope.startCreate = function() {
|
||||
this._$scope.startCreate = function(e) {
|
||||
_$scope.status.addingList = true;
|
||||
_$scope.nameError = false;
|
||||
$('.hasTooltip').tooltip('hide');
|
||||
_$timeout(function() {
|
||||
$('#newList').focus();
|
||||
}, 50);
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
this._$scope.create = function() {
|
||||
|
@ -89,7 +90,7 @@ angular.module('Tasks').controller('ListController', [
|
|||
_$scope.status.newListName = "";
|
||||
};
|
||||
|
||||
this._$scope.startEdit = function(calendar) {
|
||||
this._$scope.startEdit = function(e, calendar) {
|
||||
_$scope.status.addingList = false;
|
||||
_$scope.nameError = false;
|
||||
$('.hasTooltip').tooltip('hide');
|
||||
|
@ -98,15 +99,17 @@ angular.module('Tasks').controller('ListController', [
|
|||
_$timeout(function() {
|
||||
$('#list_' + calendar.uri + ' input.edit').focus();
|
||||
}, 50);
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
this._$scope.showCalDAVUrl = function(calendar) {
|
||||
this._$scope.showCalDAVUrl = function(e, calendar) {
|
||||
_$scope.status.addingList = false;
|
||||
_$scope.nameError = false;
|
||||
$location.path('/calendars/' + _$scope.route.calendarID + '/edit/caldav');
|
||||
_$timeout(function() {
|
||||
$('#list_' + calendar.uri + ' input.caldav').focus();
|
||||
}, 50);
|
||||
e.stopPropagation();
|
||||
};
|
||||
|
||||
this._$scope.hideCalDAVUrl = function() {
|
||||
|
|
|
@ -45,13 +45,13 @@
|
|||
<div class="app-navigation-entry-menu" ng-show="calendar.writable">
|
||||
<ul>
|
||||
<li>
|
||||
<a ng-click="startEdit(calendar)">
|
||||
<a ng-click="startEdit($event, calendar)">
|
||||
<span class="icon-rename"></span>
|
||||
<span><?php p($l->t('Edit')); ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a ng-click="showCalDAVUrl(calendar)">
|
||||
<a ng-click="showCalDAVUrl($event, calendar)">
|
||||
<span class="icon-public"></span>
|
||||
<span><?php p($l->t('Link')); ?></span>
|
||||
</a>
|
||||
|
@ -104,7 +104,7 @@
|
|||
</li>
|
||||
<li class="newList handler icon-add reactive editing" ng-class="{edit: status.addingList}">
|
||||
<a class="addlist icon sprite"
|
||||
ng-click="startCreate()"
|
||||
ng-click="startCreate($event)"
|
||||
oc-click-focus="{selector: '#newList', timeout: 0}">
|
||||
<span class="title"><?php p($l->t('Add List...')); ?></span>
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue