Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 992cc48f56 | |||
| 897d6f2dde |
+28
-20
@@ -10,7 +10,7 @@
|
||||
"use strict";
|
||||
|
||||
function ListViewGridLayoutController($scope, $routeParams, mediaHelper, mediaResource,
|
||||
listViewHelper, mediaTypeHelper, editorService) {
|
||||
listViewHelper, mediaTypeHelper, editorService, $location) {
|
||||
|
||||
var vm = this;
|
||||
var umbracoSettings = Umbraco.Sys.ServerVariables.umbracoSettings;
|
||||
@@ -120,26 +120,34 @@
|
||||
function goToItem(node, $event, $index) {
|
||||
$event.stopPropagation();
|
||||
|
||||
var contentEditor = {
|
||||
id: node.id,
|
||||
submit: function (model) {
|
||||
// update the node
|
||||
node.name = model.contentNode.name;
|
||||
// TODO: node.description = model.contentNode.description;
|
||||
node.published = model.contentNode.hasPublishedVersion;
|
||||
if (entityType !== "Member") {
|
||||
entityResource.getUrl(model.contentNode.id, entityType).then(function (data) {
|
||||
node.url = data;
|
||||
});
|
||||
if ($scope.entityType === "content") {
|
||||
|
||||
var contentEditor = {
|
||||
id: node.id,
|
||||
submit: function (model) {
|
||||
// update the node
|
||||
node.name = model.contentNode.name;
|
||||
// TODO: node.description = model.contentNode.description;
|
||||
node.published = model.contentNode.hasPublishedVersion;
|
||||
if (entityType !== "Member") {
|
||||
entityResource.getUrl(model.contentNode.id, entityType).then(function (data) {
|
||||
node.url = data;
|
||||
});
|
||||
}
|
||||
editorService.close();
|
||||
},
|
||||
close: function () {
|
||||
editorService.close();
|
||||
}
|
||||
editorService.close();
|
||||
},
|
||||
close: function () {
|
||||
editorService.close();
|
||||
}
|
||||
};
|
||||
editorService.contentEditor(contentEditor);
|
||||
|
||||
};
|
||||
editorService.contentEditor(contentEditor);
|
||||
|
||||
} else {
|
||||
|
||||
// if node.id is 2147483647 (int.MaxValue) use node.key
|
||||
$location.path($scope.entityType + '/' + $scope.entityType + '/edit/' + (node.id === 2147483647 ? node.key : node.id));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
activate();
|
||||
|
||||
+27
-20
@@ -1,7 +1,7 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
function ListViewListLayoutController($scope, listViewHelper, mediaHelper, mediaTypeHelper, editorService) {
|
||||
function ListViewListLayoutController($scope, listViewHelper, mediaHelper, mediaTypeHelper, editorService, $location) {
|
||||
|
||||
var vm = this;
|
||||
var umbracoSettings = Umbraco.Sys.ServerVariables.umbracoSettings;
|
||||
@@ -54,26 +54,33 @@
|
||||
|
||||
function clickItem(node) {
|
||||
|
||||
var contentEditor = {
|
||||
id: node.id,
|
||||
submit: function (model) {
|
||||
// update the node
|
||||
node.name = model.contentNode.name;
|
||||
// TODO: node.description = model.contentNode.description;
|
||||
node.published = model.contentNode.hasPublishedVersion;
|
||||
if (entityType !== "Member") {
|
||||
entityResource.getUrl(model.contentNode.id, entityType).then(function (data) {
|
||||
node.url = data;
|
||||
});
|
||||
if ($scope.entityType === "content") {
|
||||
|
||||
var contentEditor = {
|
||||
id: node.id,
|
||||
submit: function (model) {
|
||||
// update the node
|
||||
node.name = model.contentNode.name;
|
||||
// TODO: node.description = model.contentNode.description;
|
||||
node.published = model.contentNode.hasPublishedVersion;
|
||||
if (entityType !== "Member") {
|
||||
entityResource.getUrl(model.contentNode.id, entityType).then(function (data) {
|
||||
node.url = data;
|
||||
});
|
||||
}
|
||||
editorService.close();
|
||||
},
|
||||
close: function () {
|
||||
editorService.close();
|
||||
}
|
||||
editorService.close();
|
||||
},
|
||||
close: function () {
|
||||
editorService.close();
|
||||
}
|
||||
};
|
||||
editorService.contentEditor(contentEditor);
|
||||
|
||||
};
|
||||
editorService.contentEditor(contentEditor);
|
||||
|
||||
} else {
|
||||
// if node.id is 2147483647 (int.MaxValue) use node.key
|
||||
$location.path($scope.entityType + '/' + $scope.entityType + '/edit/' + (node.id === 2147483647 ? node.key : node.id));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user