(js) Close sidenav on small devices
This commit is contained in:
parent
b9462ed86d
commit
6918650f5b
|
@ -45,10 +45,10 @@
|
|||
// templateUrl: 'bottomSheetTemplate.html'
|
||||
// });
|
||||
// };
|
||||
$scope.toggleDetailView = function() {
|
||||
var detail = angular.element(document.getElementById('detailView'));
|
||||
detail.toggleClass('sg-close');
|
||||
};
|
||||
// $scope.toggleDetailView = function() {
|
||||
// var detail = angular.element(document.getElementById('detailView'));
|
||||
// detail.toggleClass('sg-close');
|
||||
// };
|
||||
$scope.$watch(function() {
|
||||
return $mdMedia(sgConstant['gt-md']);
|
||||
}, function(newVal) {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
AddressBooksController.$inject = ['$state', '$scope', '$rootScope', '$stateParams', '$timeout', '$mdDialog', '$mdToast', 'FileUploader', 'sgFocus', 'Card', 'AddressBook', 'Dialog', 'sgSettings', 'User', 'stateAddressbooks'];
|
||||
function AddressBooksController($state, $scope, $rootScope, $stateParams, $timeout, $mdDialog, $mdToast, FileUploader, focus, Card, AddressBook, Dialog, Settings, User, stateAddressbooks) {
|
||||
AddressBooksController.$inject = ['$state', '$scope', '$rootScope', '$stateParams', '$timeout', '$mdDialog', '$mdToast', '$mdMedia', '$mdSidenav', 'FileUploader', 'sgFocus', 'Card', 'AddressBook', 'Dialog', 'sgSettings', 'User', 'stateAddressbooks'];
|
||||
function AddressBooksController($state, $scope, $rootScope, $stateParams, $timeout, $mdDialog, $mdToast, $mdMedia, $mdSidenav, FileUploader, focus, Card, AddressBook, Dialog, Settings, User, stateAddressbooks) {
|
||||
var vm = this;
|
||||
|
||||
vm.activeUser = Settings.activeUser;
|
||||
|
@ -30,6 +30,9 @@
|
|||
vm.editMode != folder.id) {
|
||||
vm.editMode = false;
|
||||
AddressBook.$query.value = '';
|
||||
// Close sidenav on small devices
|
||||
if ($mdMedia('sm'))
|
||||
$mdSidenav('left').close();
|
||||
$state.go('app.addressbook', {addressbookId: folder.id});
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
MailboxesController.$inject = ['$state', '$timeout', '$mdDialog', 'sgFocus', 'encodeUriFilter', 'Dialog', 'sgSettings', 'Account', 'Mailbox', 'VirtualMailbox', 'User', 'Preferences', 'stateAccounts'];
|
||||
function MailboxesController($state, $timeout, $mdDialog, focus, encodeUriFilter, Dialog, Settings, Account, Mailbox, VirtualMailbox, User, Preferences, stateAccounts) {
|
||||
MailboxesController.$inject = ['$state', '$timeout', '$mdDialog', '$mdMedia', '$mdSidenav', 'sgFocus', 'encodeUriFilter', 'Dialog', 'sgSettings', 'Account', 'Mailbox', 'VirtualMailbox', 'User', 'Preferences', 'stateAccounts'];
|
||||
function MailboxesController($state, $timeout, $mdDialog, $mdMedia, $mdSidenav, focus, encodeUriFilter, Dialog, Settings, Account, Mailbox, VirtualMailbox, User, Preferences, stateAccounts) {
|
||||
var vm = this,
|
||||
account,
|
||||
mailbox;
|
||||
|
@ -221,6 +221,9 @@
|
|||
vm.editMode = false;
|
||||
vm.showingAdvancedSearch = false;
|
||||
vm.service.$virtualMode = false;
|
||||
// Close sidenav on small devices
|
||||
if ($mdMedia('sm'))
|
||||
$mdSidenav('left').close();
|
||||
$state.go('mail.account.mailbox', { accountId: account.id, mailboxId: encodeUriFilter(folder.path) });
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue