Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,32 @@

function PickDynamicRootCustomStepController($scope, localizationService) {

var vm = this;
const vm = this;

vm.submit = submit;
vm.close = close;

function onInit() {
if(!$scope.model.title) {
localizationService.localize("dynamicRoot_pickDynamicRootQueryStepTitle").then(function(value){
if (!$scope.model.title) {
localizationService.localize("dynamicRoot_pickDynamicRootQueryStepTitle").then(value => {
$scope.model.title = value;
});
}
if(!$scope.model.subtitle) {
localizationService.localize("dynamicRoot_pickDynamicRootQueryStepDesc").then(function(value){
if (!$scope.model.subtitle) {
localizationService.localize("dynamicRoot_pickDynamicRootQueryStepDesc").then(value => {
$scope.model.subtitle = value;
});
}
}

vm.submit = submit;

function submit() {
if ($scope.model.submit) {
$scope.model.submit($scope.model);
}
}

vm.close = close;
function close() {
if($scope.model.close) {
if ($scope.model.close) {
$scope.model.close();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,59 @@

function PickDynamicRootOriginController($scope, localizationService, editorService, udiParser) {

var vm = this;
const vm = this;

vm.chooseRoot = chooseRoot;
vm.chooseParent = chooseParent;
vm.chooseCurrent = chooseCurrent;
vm.chooseSite = chooseSite;
vm.chooseByKey = chooseByKey;

vm.submit = submit;
vm.close = close;

function onInit() {

if(!$scope.model.title) {
localizationService.localize("dynamicRoot_pickDynamicRootOriginTitle").then(function(value){
if (!$scope.model.title) {
localizationService.localize("dynamicRoot_pickDynamicRootOriginTitle").then(value => {
$scope.model.title = value;
});
}
if(!$scope.model.subtitle) {
localizationService.localize("dynamicRoot_pickDynamicRootOriginDesc").then(function(value){
if (!$scope.model.subtitle) {
localizationService.localize("dynamicRoot_pickDynamicRootOriginDesc").then(value => {
$scope.model.subtitle = value;
});
}

}

vm.chooseRoot = function() {
function chooseRoot() {
$scope.model.value.originAlias = "Root";
$scope.model.value.originKey = null;
vm.submit($scope.model);
}
vm.chooseParent = function() {

function chooseParent() {
$scope.model.value.originAlias = "Parent";
$scope.model.value.originKey = null;
vm.submit($scope.model);
}
vm.chooseCurrent = function() {

function chooseCurrent() {
$scope.model.value.originAlias = "Current";
$scope.model.value.originKey = null;
vm.submit($scope.model);
}
vm.chooseSite = function() {

function chooseSite() {
$scope.model.value.originAlias = "Site";
$scope.model.value.originKey = null;
vm.submit($scope.model);
}
vm.chooseByKey = function() {
var treePicker = {

function chooseByKey() {
const editor = {
idType: "udi",
section: $scope.model.contentType,
treeAlias: $scope.model.contentType,
multiPicker: false,
submit: function(model) {
var item = model.selection[0];
Expand All @@ -57,19 +68,28 @@
editorService.close();
}
};
editorService.treePicker(treePicker);
}

vm.submit = submit;
switch ($scope.model.contentType) {
case "content":
editorService.contentPicker(editor);
break;
case "media":
editorService.mediaPicker(editor);
break;
case "member":
editorService.memberPicker(editor);
break;
}
}

function submit(model) {
if ($scope.model.submit) {
$scope.model.submit(model);
}
}

vm.close = close;

function close() {
if($scope.model.close) {
if ($scope.model.close) {
$scope.model.close();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,29 @@

function PickDynamicRootQueryStepController($scope, localizationService, editorService, udiParser) {

var vm = this;
const vm = this;

vm.choose = choose;
vm.chooseCustom = chooseCustom;

vm.submit = submit;
vm.close = close;

function onInit() {
if(!$scope.model.title) {
localizationService.localize("dynamicRoot_pickDynamicRootQueryStepTitle").then(function(value){
if (!$scope.model.title) {
localizationService.localize("dynamicRoot_pickDynamicRootQueryStepTitle").then(value => {
$scope.model.title = value;
});
}
if(!$scope.model.subtitle) {
localizationService.localize("dynamicRoot_pickDynamicRootQueryStepDesc").then(function(value){
if (!$scope.model.subtitle) {
localizationService.localize("dynamicRoot_pickDynamicRootQueryStepDesc").then(value => {
$scope.model.subtitle = value;
});
}
}

vm.choose = function(queryStepAlias) {
var editor = {
function choose(queryStepAlias) {
const editor = {
multiPicker: true,
filterCssClass: "not-allowed not-published",
filter: function (item) {
Expand All @@ -42,16 +48,18 @@

switch ($scope.model.contentType) {
case "content":
editorService.contentTypePicker(editor);
editor.entityType = "documentType";
break;
case "media":
editorService.mediaTypePicker(editor);
editor.entityType = "mediaType";
break;
}

editorService.contentTypePicker(editor);
}

vm.chooseCustom = function() {
var customStepPicker = {
function chooseCustom() {
const customStepPicker = {
view: "views/common/infiniteeditors/pickdynamicrootcustomstep/pickdynamicrootcustomstep.html",
size: "small",
value: "",
Expand All @@ -68,17 +76,15 @@
};
editorService.open(customStepPicker);
}

vm.submit = submit;

function submit(model) {
if ($scope.model.submit) {
$scope.model.submit(model);
}
}

vm.close = close;
function close() {
if($scope.model.close) {
if ($scope.model.close) {
$scope.model.close();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function TreeSourceTypePickerController($scope, contentTypeResource, mediaTypeRe
return;
}

var editor = {
const editor = {
multiPicker: true,
filterCssClass: "not-allowed not-published",
filter: function (item) {
Expand All @@ -62,15 +62,17 @@ function TreeSourceTypePickerController($scope, contentTypeResource, mediaTypeRe

switch (currentItemType) {
case "content":
editorService.contentTypePicker(editor);
editor.entityType = "documentType";
break;
case "media":
editorService.mediaTypePicker(editor);
editor.entityType = "mediaType";
break;
case "member":
editorService.memberTypePicker(editor);
editor.entityType = "memberType";
break;
}

editorService.contentTypePicker(editor);
}

function remove(itemType) {
Expand Down