mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-07 14:28:52 +00:00
(feat) can now batch delete messages
This commit is contained in:
committed by
Francis Lachapelle
parent
0edc2c1217
commit
6cd02043af
@@ -12,49 +12,49 @@
|
||||
|
||||
$rootScope.currentFolder = stateAddressbook;
|
||||
$rootScope.card = null;
|
||||
|
||||
|
||||
$scope.selectCard = function(card) {
|
||||
$state.go('app.addressbook.card.view', {addressbookId: stateAddressbook.id, cardId: card.id});
|
||||
};
|
||||
|
||||
$scope.newComponent = function(ev) {
|
||||
$mdDialog.show({
|
||||
parent: angular.element(document.body),
|
||||
targetEvent: ev,
|
||||
clickOutsideToClose: true,
|
||||
escapeToClose: true,
|
||||
template: [
|
||||
'<md-dialog aria-label="' + l('Create component') + '">',
|
||||
' <md-content>',
|
||||
' <div layout="column">',
|
||||
' <md-button ng-click="create(\'card\')">',
|
||||
' ' + l('Contact'),
|
||||
' </md-button>',
|
||||
' <md-button ng-click="create(\'list\')">',
|
||||
' ' + l('List'),
|
||||
' </md-button>',
|
||||
' </div>',
|
||||
' </md-content>',
|
||||
'</md-dialog>'
|
||||
].join(''),
|
||||
locals: {
|
||||
state: $state,
|
||||
addressbookId: $scope.currentFolder.id
|
||||
},
|
||||
controller: ComponentDialogController
|
||||
});
|
||||
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
ComponentDialogController.$inject = ['scope', '$mdDialog', 'state', 'addressbookId'];
|
||||
function ComponentDialogController(scope, $mdDialog, state, addressbookId) {
|
||||
scope.create = function(type) {
|
||||
$mdDialog.hide();
|
||||
state.go('app.addressbook.new', { addressbookId: addressbookId, contactType: type });
|
||||
}
|
||||
|
||||
$scope.newComponent = function(ev) {
|
||||
$mdDialog.show({
|
||||
parent: angular.element(document.body),
|
||||
targetEvent: ev,
|
||||
clickOutsideToClose: true,
|
||||
escapeToClose: true,
|
||||
template: [
|
||||
'<md-dialog aria-label="' + l('Create component') + '">',
|
||||
' <md-content>',
|
||||
' <div layout="column">',
|
||||
' <md-button ng-click="create(\'card\')">',
|
||||
' ' + l('Contact'),
|
||||
' </md-button>',
|
||||
' <md-button ng-click="create(\'list\')">',
|
||||
' ' + l('List'),
|
||||
' </md-button>',
|
||||
' </div>',
|
||||
' </md-content>',
|
||||
'</md-dialog>'
|
||||
].join(''),
|
||||
locals: {
|
||||
state: $state,
|
||||
addressbookId: $scope.currentFolder.id
|
||||
},
|
||||
controller: ComponentDialogController
|
||||
});
|
||||
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
ComponentDialogController.$inject = ['scope', '$mdDialog', 'state', 'addressbookId'];
|
||||
function ComponentDialogController(scope, $mdDialog, state, addressbookId) {
|
||||
scope.create = function(type) {
|
||||
$mdDialog.hide();
|
||||
state.go('app.addressbook.new', { addressbookId: addressbookId, contactType: type });
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
$scope.notSelectedComponent = function(currentCard, type) {
|
||||
return (currentCard.tag == type && !currentCard.selected);
|
||||
|
||||
Reference in New Issue
Block a user