rename members folder to match tree

This commit is contained in:
Mads Rasmussen
2015-09-28 20:05:53 +02:00
parent 6f5fef6d2c
commit f7b4b906cc
8 changed files with 22 additions and 22 deletions

View File

@@ -2,7 +2,7 @@
* @ngdoc controller
* @name Umbraco.Editors.Member.DeleteController
* @function
*
*
* @description
* The controller for deleting content
*/
@@ -17,10 +17,10 @@ function MemberDeleteController($scope, memberResource, treeService, navigationS
$scope.currentNode.loading = false;
treeService.removeNode($scope.currentNode);
//if the current edited item is the same one as we're deleting, we need to navigate elsewhere
if (editorState.current && editorState.current.key == $scope.currentNode.id) {
$location.path("/member/member/list/" + ($routeParams.listName ? $routeParams.listName : 'all-members'));
$location.path("/member/members/list/" + ($routeParams.listName ? $routeParams.listName : 'all-members'));
}
navigationService.hideMenu();

View File

@@ -2,12 +2,12 @@
* @ngdoc controller
* @name Umbraco.Editors.Member.EditController
* @function
*
*
* @description
* The controller for the member editor
*/
function MemberEditController($scope, $routeParams, $location, $q, $window, appState, memberResource, entityResource, navigationService, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, formHelper, umbModelMapper, editorState, umbRequestHelper, $http) {
//setup scope vars
$scope.page = {};
$scope.page.loading = false;
@@ -19,7 +19,7 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, appS
$scope.page.saveButtonState = "init";
$scope.page.listViewPath = ($routeParams.page && $routeParams.listName)
? "/member/member/list/" + $routeParams.listName + "?page=" + $routeParams.page
? "/member/members/list/" + $routeParams.listName + "?page=" + $routeParams.page
: null;
//build a path to sync the tree with
@@ -28,8 +28,8 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, appS
}
if ($routeParams.create) {
//if there is no doc type specified then we are going to assume that
//if there is no doc type specified then we are going to assume that
// we are not using the umbraco membership provider
if ($routeParams.doctype) {
@@ -69,14 +69,14 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, appS
}
else {
//so, we usually refernce all editors with the Int ID, but with members we have
//a different pattern, adding a route-redirect here to handle this:
//a different pattern, adding a route-redirect here to handle this:
//isNumber doesnt work here since its seen as a string
//TODO: Why is this here - I don't understand why this would ever be an integer? This will not work when we support non-umbraco membership providers.
if ($routeParams.id && $routeParams.id.length < 9) {
entityResource.getById($routeParams.id, "Member").then(function(entity) {
$location.path("/member/member/edit/" + entity.key);
$location.path("/member/members/edit/" + entity.key);
});
}
else {
@@ -92,13 +92,13 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, appS
setHeaderNameState($scope.content);
editorState.set($scope.content);
var path = buildTreePath(data);
//sync the tree (only for ui purposes)
navigationService.syncTree({ tree: "member", path: path.split(",") });
navigationService.syncTree({ tree: "members", path: path.split(",") });
//it's the initial load of the editor, we need to get the tree node
//it's the initial load of the editor, we need to get the tree node
// from the server so that we can load in the actions menu.
umbRequestHelper.resourcePromise(
$http.get(data.treeNodeUrl),
@@ -130,7 +130,7 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, appS
$scope.save = function() {
if (!$scope.busy && formHelper.submitForm({ scope: $scope, statusMessage: "Saving..." })) {
$scope.busy = true;
$scope.page.saveButtonState = "busy";
@@ -146,7 +146,7 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, appS
redirectId: data.key,
rebindCallback: contentEditingHelper.reBindChangedProperties($scope.content, data)
});
editorState.set($scope.content);
$scope.busy = false;
$scope.page.saveButtonState = "success";
@@ -154,16 +154,16 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, appS
var path = buildTreePath(data);
//sync the tree (only for ui purposes)
navigationService.syncTree({ tree: "member", path: path.split(","), forceReload: true });
navigationService.syncTree({ tree: "members", path: path.split(","), forceReload: true });
}, function (err) {
contentEditingHelper.handleSaveError({
redirectOnFailure: false,
err: err,
rebindCallback: contentEditingHelper.reBindChangedProperties($scope.content, err.data)
});
editorState.set($scope.content);
$scope.busy = false;
$scope.page.saveButtonState = "error";
@@ -172,7 +172,7 @@ function MemberEditController($scope, $routeParams, $location, $q, $window, appS
}else{
$scope.busy = false;
}
};
}

View File

@@ -2,12 +2,12 @@
* @ngdoc controller
* @name Umbraco.Editors.Member.ListController
* @function
*
*
* @description
* The controller for the member list view
*/
function MemberListController($scope, $routeParams, $location, $q, $window, appState, memberResource, entityResource, navigationService, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, formHelper, umbModelMapper, editorState, localizationService) {
//setup scope vars
$scope.currentSection = appState.getSectionState("currentSection");
$scope.currentNode = null; //the editors affiliated node
@@ -31,7 +31,7 @@ function MemberListController($scope, $routeParams, $location, $q, $window, appS
editorState.set($scope.content);
navigationService.syncTree({ tree: "member", path: data.path.split(",") }).then(function (syncArgs) {
navigationService.syncTree({ tree: "members", path: data.path.split(",") }).then(function (syncArgs) {
$scope.currentNode = syncArgs.node;
});