(feat) can now batch delete messages

This commit is contained in:
Ludovic Marcotte
2015-05-09 14:37:40 -04:00
committed by Francis Lachapelle
parent 0edc2c1217
commit 6cd02043af
8 changed files with 101 additions and 42 deletions

View File

@@ -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);