Reload the node when publishing all unpublished children
This commit is contained in:
committed by
Sebastiaan Janssen
parent
ef343f04a8
commit
00cf8dcf05
@@ -150,7 +150,8 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
|
||||
sourceUrl: currentMenuNode.childNodesUrl,
|
||||
updateDefinition: function() {
|
||||
throw "'updateDefinition' method is not supported in Umbraco 7, consider upgrading to the new v7 APIs";
|
||||
}
|
||||
},
|
||||
expanded: currentMenuNode.expanded === true
|
||||
};
|
||||
//defined getters that will throw a not implemented/supported exception
|
||||
Object.defineProperty(legacyNode, "menu", {
|
||||
|
||||
@@ -37,12 +37,13 @@
|
||||
},
|
||||
startPublish: function() {
|
||||
this.processStatus("publishing");
|
||||
|
||||
|
||||
var includeUnpublished = self._koViewModel.includeUnpublished();
|
||||
$.post(self._opts.restServiceLocation + "PublishDocument",
|
||||
JSON.stringify({
|
||||
documentId: self._opts.documentId,
|
||||
publishDescendants: self._koViewModel.publishAll(),
|
||||
includeUnpublished: self._koViewModel.includeUnpublished()
|
||||
includeUnpublished: includeUnpublished
|
||||
}),
|
||||
function (e) {
|
||||
self._koViewModel.processStatus("complete");
|
||||
@@ -59,7 +60,13 @@
|
||||
|
||||
//sync the tree
|
||||
UmbClientMgr.mainTree().setActiveTreeType('content');
|
||||
UmbClientMgr.mainTree().syncTree(self._opts.documentPath, true);
|
||||
UmbClientMgr.mainTree().syncTree(self._opts.documentPath, true)
|
||||
if (includeUnpublished) {
|
||||
var node = UmbClientMgr.mainTree().getActionNode();
|
||||
if (node.expanded === true) {
|
||||
UmbClientMgr.mainTree().reloadActionNode();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user