fh-wfm-user-angular
Advanced tools
Comparing version 0.2.1 to 0.2.2-pre.1
@@ -17,3 +17,3 @@ var ngModule; | ||
' <span flex></span>\n' + | ||
' <md-button class="md-icon-button" aria-label="Close" ng-click="ctrl.selectGroup($event, ctrl.model)">\n' + | ||
' <md-button class="md-icon-button" aria-label="Close" ng-click="ctrl.cancel($event, ctrl.model)">\n' + | ||
' <md-icon md-font-set="material-icons">close</md-icon>\n' + | ||
@@ -20,0 +20,0 @@ ' </md-button>\n' + |
@@ -17,3 +17,3 @@ var ngModule; | ||
' <span flex></span>\n' + | ||
' <md-button class="md-icon-button" aria-label="Close" ng-click="ctrl.selectWorker($event, ctrl.model)">\n' + | ||
' <md-button class="md-icon-button" aria-label="Close" ng-click="ctrl.cancel($event, ctrl.model)">\n' + | ||
' <md-icon md-font-set="material-icons">close</md-icon>\n' + | ||
@@ -20,0 +20,0 @@ ' </md-button>\n' + |
@@ -40,4 +40,17 @@ var CONSTANTS = require('../constants'); | ||
}; | ||
//Canceling the editing of a group | ||
self.cancel = function() { | ||
//If we are editing an existing group, then go to the group detail page. | ||
if ($stateParams.workerId) { | ||
$state.go('app.group.detail', {workerId: $stateParams.groupId}, {reload: false}); | ||
} else { | ||
//Otherwise, go back to the group list | ||
$state.go('app.group'); | ||
} | ||
}; | ||
} | ||
angular.module(CONSTANTS.USER_DIRECTIVE_MODULE).controller("GroupFormController", ['userMediatorService', '$stateParams', '$q', '$timeout', '$state', GroupFormController]); |
@@ -47,2 +47,15 @@ var CONSTANTS = require('../constants'); | ||
//Canceling the editing of a user | ||
self.cancel = function() { | ||
//If we are editing an existing user, then go to the user detail page. | ||
if ($stateParams.workerId) { | ||
$state.go('app.worker.detail', {workerId: $stateParams.workerId}, {reload: false}); | ||
} else { | ||
//Otherwise, go back to the user list | ||
$state.go('app.worker'); | ||
} | ||
}; | ||
self.done = function(isValid) { | ||
@@ -49,0 +62,0 @@ self.submitted = true; |
{ | ||
"name": "fh-wfm-user-angular", | ||
"version": "0.2.1", | ||
"version": "0.2.2-pre.1", | ||
"description": "An AngularJS module for viewing User details.", | ||
@@ -5,0 +5,0 @@ "main": "lib/user-ng.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
160408
1654