+
+
No items have been added
Sorry, we can not find what you are looking for.
-
-
+
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/upload/umb-property-file-upload.html b/src/Umbraco.Web.UI.Client/src/views/components/upload/umb-property-file-upload.html
index 41e24a6cda74..fadc0ac3b1d5 100644
--- a/src/Umbraco.Web.UI.Client/src/views/components/upload/umb-property-file-upload.html
+++ b/src/Umbraco.Web.UI.Client/src/views/components/upload/umb-property-file-upload.html
@@ -6,9 +6,9 @@
-
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.copy.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.copy.controller.js
index eac489ab0893..01526bb90780 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/content.copy.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/content/content.copy.controller.js
@@ -143,7 +143,7 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.CopyController",
// Mini list view
$scope.selectListViewNode = function (node) {
node.selected = node.selected === true ? false : true;
- nodeSelectHandler({}, { node: node });
+ nodeSelectHandler({ node: node });
};
$scope.closeMiniListView = function () {
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.html b/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.html
index fa9ab8c43777..36e01991dfa6 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.html
+++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/save.html
@@ -16,7 +16,9 @@
-
+
+
+
+
+
- *
@@ -36,10 +39,13 @@
-
-
+
- {{saveVariantSelectorForm.saveVariantSelector.errorMsg}}
+ {{saveVariantSelectorForm.saveVariantSelector.errorMsg}}
+
+
+ {{saveVariantSelectorForm.saveInvariant.errorMsg}}
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/unpublish.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/unpublish.controller.js
index 936ab3b1049e..5030f3e98e2c 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/unpublish.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/unpublish.controller.js
@@ -4,12 +4,18 @@
function UnpublishController($scope, localizationService, contentEditingHelper) {
var vm = this;
+
var autoSelectedVariants = [];
+ vm.id = $scope.content.id;
+
+ vm.warningText = null;
+
vm.changeSelection = changeSelection;
function onInit() {
+ $scope.model.hideSubmitButton = true;
vm.variants = $scope.model.variants;
vm.unpublishableVariants = vm.variants.filter(publishedVariantFilter)
@@ -26,7 +32,7 @@
// node has variants
if (vm.variants.length !== 1) {
-
+
vm.unpublishableVariants = contentEditingHelper.getSortedVariantsAndSegments(vm.unpublishableVariants);
var active = vm.variants.find(v => v.active);
@@ -39,7 +45,7 @@
// autoselect other variants if needed
changeSelection(active);
}
-
+
}
function changeSelection(selectedVariant) {
@@ -66,7 +72,7 @@
// that was automatically selected so it goes back to the state before the mandatory language was selected.
// We also want to enable all checkboxes again
if (!selectedVariant.save && selectedVariant.segment == null && selectedVariant.language && selectedVariant.language.isMandatory) {
-
+
vm.variants.forEach(variant => {
// check if variant was auto selected, then deselect
@@ -108,6 +114,17 @@
});
});
+ vm.checkingReferencesComplete = () => {
+ $scope.model.hideSubmitButton = false;
+ };
+
+ vm.onReferencesWarning = () => {
+ $scope.model.submitButtonStyle = "danger";
+ localizationService.localize("references_unpublishWarning").then((value) => {
+ vm.warningText = value;
+ });
+ };
+
onInit();
}
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/unpublish.html b/src/Umbraco.Web.UI.Client/src/views/content/overlays/unpublish.html
index dc3862879a51..9d8c27115145 100644
--- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/unpublish.html
+++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/unpublish.html
@@ -11,6 +11,8 @@
+
+
-
+
+
+
+
+
+
+ {{vm.warningText}}
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/media/delete.html b/src/Umbraco.Web.UI.Client/src/views/media/delete.html
index 7231ccf2c4fb..2c817e8cb942 100644
--- a/src/Umbraco.Web.UI.Client/src/views/media/delete.html
+++ b/src/Umbraco.Web.UI.Client/src/views/media/delete.html
@@ -14,11 +14,17 @@
Are you sure you want to delete {{currentNode.name}}?
+
+
+
+ {{warningText}}
+
+
When items are deleted from the recycle bin, they will be gone forever.
-
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/media/media.delete.controller.js b/src/Umbraco.Web.UI.Client/src/views/media/media.delete.controller.js
index 879257137752..c7b26ec9d04f 100644
--- a/src/Umbraco.Web.UI.Client/src/views/media/media.delete.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/media/media.delete.controller.js
@@ -2,11 +2,14 @@
* @ngdoc controller
* @name Umbraco.Editors.ContentDeleteController
* @function
- *
+ *
* @description
* The controller for deleting content
*/
-function MediaDeleteController($scope, mediaResource, treeService, navigationService, editorState, $location, overlayService) {
+function MediaDeleteController($scope, mediaResource, treeService, navigationService, editorState, $location, overlayService,localizationService) {
+
+ $scope.checkingReferences = true;
+ $scope.warningText = null;
$scope.performDelete = function() {
@@ -26,7 +29,7 @@ function MediaDeleteController($scope, mediaResource, treeService, navigationSer
treeService.removeNode($scope.currentNode);
if (rootNode) {
- //ensure the recycle bin has child nodes now
+ //ensure the recycle bin has child nodes now
var recycleBin = treeService.getDescendantNode(rootNode, -21);
if (recycleBin) {
recycleBin.hasChildren = true;
@@ -36,7 +39,7 @@ function MediaDeleteController($scope, mediaResource, treeService, navigationSer
}
}
}
-
+
//if the current edited item is the same one as we're deleting, we need to navigate elsewhere
if (editorState.current && editorState.current.id == $scope.currentNode.id) {
@@ -68,6 +71,17 @@ function MediaDeleteController($scope, mediaResource, treeService, navigationSer
$scope.close = function() {
navigationService.hideDialog();
};
+
+ $scope.checkingReferencesComplete = () => {
+ $scope.checkingReferences = false;
+ };
+
+ $scope.onReferencesWarning = () => {
+ localizationService.localize("references_deleteWarning").then((value) => {
+ $scope.warningText = value;
+ });
+ };
+
}
angular.module("umbraco").controller("Umbraco.Editors.Media.DeleteController", MediaDeleteController);
diff --git a/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js
index f41f22a1a9c9..88d112e2d638 100644
--- a/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js
@@ -2,29 +2,29 @@
* @ngdoc controller
* @name Umbraco.Editors.Media.EditController
* @function
- *
+ *
* @description
* The controller for the media editor
*/
-function mediaEditController($scope, $routeParams, $location, $http, $q, appState, mediaResource,
- entityResource, navigationService, notificationsService, localizationService,
- serverValidationManager, contentEditingHelper, fileManager, formHelper,
+function mediaEditController($scope, $routeParams, $location, $http, $q, appState, mediaResource,
+ entityResource, navigationService, notificationsService, localizationService,
+ serverValidationManager, contentEditingHelper, fileManager, formHelper,
editorState, umbRequestHelper, eventsService) {
-
+
var evts = [];
var nodeId = null;
var create = false;
var infiniteMode = $scope.model && $scope.model.infiniteMode;
- // when opening the editor through infinite editing get the
+ // when opening the editor through infinite editing get the
// node id from the model instead of the route param
if(infiniteMode && $scope.model.id) {
nodeId = $scope.model.id;
} else {
nodeId = $routeParams.id;
}
-
- // when opening the editor through infinite editing get the
+
+ // when opening the editor through infinite editing get the
// create option from the model instead of the route param
if(infiniteMode) {
create = $scope.model.create;
@@ -72,22 +72,22 @@ function mediaEditController($scope, $routeParams, $location, $http, $q, appStat
}
function init() {
-
+
var content = $scope.content;
-
+
// we need to check whether an app is present in the current data, if not we will present the default app.
var isAppPresent = false;
-
+
// on first init, we dont have any apps. but if we are re-initializing, we do, but ...
if ($scope.app) {
-
+
// lets check if it still exists as part of our apps array. (if not we have made a change to our docType, even just a re-save of the docType it will turn into new Apps.)
content.apps.forEach(app => {
if (app === $scope.app) {
isAppPresent = true;
}
});
-
+
// if we did reload our DocType, but still have the same app we will try to find it by the alias.
if (isAppPresent === false) {
content.apps.forEach(app => {
@@ -98,9 +98,9 @@ function mediaEditController($scope, $routeParams, $location, $http, $q, appStat
}
});
}
-
+
}
-
+
// if we still dont have a app, lets show the first one:
if (isAppPresent === false) {
content.apps[0].active = true;
@@ -108,16 +108,16 @@ function mediaEditController($scope, $routeParams, $location, $http, $q, appStat
}
editorState.set($scope.content);
-
+
bindEvents();
}
-
+
function bindEvents() {
//bindEvents can be called more than once and we don't want to have multiple bound events
for (var e in evts) {
eventsService.unsubscribe(evts[e]);
}
-
+
evts.push(eventsService.on("editors.mediaType.saved", function(name, args) {
// if this media item uses the updated media type we need to reload the media item
if(args && args.mediaType && args.mediaType.key === $scope.content.contentType.key) {
@@ -131,7 +131,7 @@ function mediaEditController($scope, $routeParams, $location, $http, $q, appStat
}));
}
$scope.page.submitButtonLabelKey = "buttons_save";
-
+
/** Syncs the content item to it's tree node - this occurs on first load and after saving */
function syncTreeNode(content, path, initialLoad) {
@@ -149,7 +149,7 @@ function mediaEditController($scope, $routeParams, $location, $http, $q, appStat
//it's a child item, just sync the ui node to the parent
navigationService.syncTree({ tree: "media", path: path.substring(0, path.lastIndexOf(",")).split(","), forceReload: initialLoad !== true });
- //if this is a child of a list view and it's the initial load of the editor, we need to get the tree node
+ //if this is a child of a list view and 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(content.treeNodeUrl),
@@ -176,7 +176,7 @@ function mediaEditController($scope, $routeParams, $location, $http, $q, appStat
$scope.save = function () {
if (formHelper.submitForm({ scope: $scope })) {
-
+
$scope.page.saveButtonState = "busy";
mediaResource.save($scope.content, create, fileManager.getFiles())
@@ -200,12 +200,16 @@ function mediaEditController($scope, $routeParams, $location, $http, $q, appStat
editorState.set($scope.content);
syncTreeNode($scope.content, data.path);
-
+
$scope.page.saveButtonState = "success";
init();
}
+ eventsService.emit("editors.media.saved", {media: data});
+
+ return data;
+
}, function(err) {
formHelper.resetForm({ scope: $scope, hasErrors: true });
@@ -213,16 +217,16 @@ function mediaEditController($scope, $routeParams, $location, $http, $q, appStat
err: err,
rebindCallback: contentEditingHelper.reBindChangedProperties($scope.content, err.data)
});
-
+
editorState.set($scope.content);
$scope.page.saveButtonState = "error";
});
}
else {
- showValidationNotification();
+ showValidationNotification();
}
-
+
};
function loadMedia() {
@@ -231,7 +235,7 @@ function mediaEditController($scope, $routeParams, $location, $http, $q, appStat
.then(function (data) {
$scope.content = data;
-
+
if (data.isChildOfListView && data.trashed === false) {
$scope.page.listViewPath = ($routeParams.page)
? "/media/media/edit/" + data.parentId + "?page=" + $routeParams.page
@@ -247,9 +251,9 @@ function mediaEditController($scope, $routeParams, $location, $http, $q, appStat
serverValidationManager.notifyAndClearAllSubscriptions();
if(!infiniteMode) {
- syncTreeNode($scope.content, data.path, true);
+ syncTreeNode($scope.content, data.path, true);
}
-
+
if ($scope.content.parentId && $scope.content.parentId !== -1 && $scope.content.parentId !== -21) {
//We fetch all ancestors of the node to generate the footer breadcrump navigation
entityResource.getAncestors(nodeId, "media")
@@ -279,7 +283,7 @@ function mediaEditController($scope, $routeParams, $location, $http, $q, appStat
$scope.appChanged = function (app) {
$scope.app = app;
-
+
// setup infinite mode
if(infiniteMode) {
$scope.page.submitButtonLabelKey = "buttons_saveAndClose";
@@ -296,7 +300,7 @@ function mediaEditController($scope, $routeParams, $location, $http, $q, appStat
$location.path($scope.page.listViewPath.split("?")[0]);
}
};
-
+
//ensure to unregister from all events!
$scope.$on('$destroy', function () {
for (var e in evts) {
diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/numberrange.html b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/numberrange.html
index d9d8cad9821b..6e67c947936f 100644
--- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/numberrange.html
+++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/numberrange.html
@@ -4,6 +4,7 @@
type="number"
ng-model="model.value.min"
placeholder="0"
+ min="0"
ng-max="model.value.max"
fix-number />
–
@@ -11,7 +12,7 @@
type="number"
ng-model="model.value.max"
placeholder="∞"
- ng-min="model.value.min"
+ ng-min="model.value.min || 0"
fix-number />
diff --git a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treesourcetypepicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treesourcetypepicker.controller.js
index dcc9add395d8..d02e626bfa2f 100644
--- a/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treesourcetypepicker.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/prevalueeditors/treesourcetypepicker.controller.js
@@ -99,6 +99,11 @@ function TreeSourceTypePickerController($scope, contentTypeResource, mediaTypeRe
eventsService.unsubscribe(evts[e]);
}
});
+
+ if ($scope.model.config.itemType) {
+ currentItemType = $scope.model.config.itemType;
+ init();
+ }
}
angular.module('umbraco').controller("Umbraco.PrevalueEditors.TreeSourceTypePickerController", TreeSourceTypePickerController);
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.less b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.less
index 12862d8f4160..9b408beccef1 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.less
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/inlineblock/inlineblock.editor.less
@@ -48,8 +48,14 @@
ng-form.ng-invalid-val-server-match-content > .umb-block-list__block > .umb-block-list__block--content > div > & {
> button {
color: @formErrorText;
+ .show-validation-type-warning & {
+ color: @formWarningText;
+ }
span.caret {
border-top-color: @formErrorText;
+ .show-validation-type-warning & {
+ border-top-color: @formWarningText;
+ }
}
}
}
@@ -72,6 +78,9 @@
padding: 2px;
line-height: 10px;
background-color: @formErrorText;
+ .show-validation-type-warning & {
+ background-color: @formWarningText;
+ }
font-weight: 900;
animation-duration: 1.4s;
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/labelblock/labelblock.editor.less b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/labelblock/labelblock.editor.less
index 613a47b92619..837fd3f56471 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/labelblock/labelblock.editor.less
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/blocklistentryeditors/labelblock/labelblock.editor.less
@@ -42,6 +42,9 @@
ng-form.ng-invalid-val-server-match-content > .umb-block-list__block > .umb-block-list__block--content > div > & {
color: @formErrorText;
+ .show-validation-type-warning & {
+ color: @formWarningText;
+ }
}
ng-form.ng-invalid-val-server-match-content > .umb-block-list__block:not(.--active) > .umb-block-list__block--content > div > & {
> span {
@@ -61,6 +64,9 @@
padding: 2px;
line-height: 10px;
background-color: @formErrorText;
+ .show-validation-type-warning & {
+ background-color: @formWarningText;
+ }
font-weight: 900;
animation-duration: 1.4s;
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html
index 38959da6ba8c..a6c1eb219955 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/blocklist/umb-block-list-property-editor.html
@@ -10,7 +10,7 @@