Update current urls on 'node.updateDate'

This commit is contained in:
Robert
2019-01-10 12:07:53 +01:00
parent 49668a48bc
commit eafbf6dcae

View File

@@ -22,14 +22,7 @@
// set currentVariant
scope.currentVariant = _.find(scope.node.variants, (v) => v.active);
// find the urls for the currently selected language
if(scope.node.variants.length > 1) {
// nodes with variants
scope.currentUrls = _.filter(scope.node.urls, (url) => scope.currentVariant.language.culture === url.culture);
} else {
// invariant nodes
scope.currentUrls = scope.node.urls;
}
updateCurrentUrls();
// if there are any infinite editors open we are in infinite editing
scope.isInfiniteMode = editorService.getNumberOfEditors() > 0 ? true : false;
@@ -304,6 +297,17 @@
});
}
function updateCurrentUrls() {
// find the urls for the currently selected language
if (scope.node.variants.length > 1) {
// nodes with variants
scope.currentUrls = _.filter(scope.node.urls, (url) => scope.currentVariant.language.culture === url.culture);
} else {
// invariant nodes
scope.currentUrls = scope.node.urls;
}
}
// load audit trail and redirects when on the info tab
evts.push(eventsService.on("app.tabChange", function (event, args) {
$timeout(function () {
@@ -328,6 +332,7 @@
loadAuditTrail();
loadRedirectUrls();
setNodePublishStatus();
updateCurrentUrls();
}
});