diff --git a/src/Umbraco.Core/Models/ContentCultureInfos.cs b/src/Umbraco.Core/Models/ContentCultureInfos.cs index bcf1dbb1b1..f51e3a275a 100644 --- a/src/Umbraco.Core/Models/ContentCultureInfos.cs +++ b/src/Umbraco.Core/Models/ContentCultureInfos.cs @@ -28,11 +28,11 @@ namespace Umbraco.Core.Models /// Initializes a new instance of the class. /// /// Used for cloning, without change tracking. - private ContentCultureInfos(string culture, string name, DateTime date) - : this(culture) + internal ContentCultureInfos(ContentCultureInfos other) + : this(other.Culture) { - _name = name; - _date = date; + _name = other.Name; + _date = other.Date; } /// @@ -61,7 +61,7 @@ namespace Umbraco.Core.Models /// public object DeepClone() { - return new ContentCultureInfos(Culture, Name, Date); + return new ContentCultureInfos(this); } /// diff --git a/src/Umbraco.Core/Models/ContentCultureInfosCollection.cs b/src/Umbraco.Core/Models/ContentCultureInfosCollection.cs index 5238e65631..82b0ba6475 100644 --- a/src/Umbraco.Core/Models/ContentCultureInfosCollection.cs +++ b/src/Umbraco.Core/Models/ContentCultureInfosCollection.cs @@ -24,8 +24,12 @@ namespace Umbraco.Core.Models public ContentCultureInfosCollection(IEnumerable items) : base(x => x.Culture, StringComparer.InvariantCultureIgnoreCase) { + // make sure to add *copies* and not the original items, + // as items can be modified by AddOrUpdate, and therefore + // the new collection would be impacted by changes made + // to the old collection foreach (var item in items) - Add(item); + Add(new ContentCultureInfos(item)); } /// diff --git a/src/Umbraco.Core/Services/IContentService.cs b/src/Umbraco.Core/Services/IContentService.cs index 64877e393e..7371686c7c 100644 --- a/src/Umbraco.Core/Services/IContentService.cs +++ b/src/Umbraco.Core/Services/IContentService.cs @@ -368,6 +368,11 @@ namespace Umbraco.Core.Services /// A publishing document is a document with values that are being published, i.e. /// that have been published or cleared via and /// . + /// When one needs to publish or unpublish a single culture, or all cultures, using + /// and is the way to go. But if one needs to, say, publish two cultures and unpublish a third + /// one, in one go, then one needs to invoke and + /// on the content itself - this prepares the content, but does not commit anything - and then, invoke + /// to actually commit the changes to the database. /// The document is *always* saved, even when publishing fails. /// PublishResult SavePublishing(IContent content, int userId = 0, bool raiseEvents = true); @@ -375,11 +380,30 @@ namespace Umbraco.Core.Services /// /// Saves and publishes a document branch. /// + /// + /// Unless specified, all cultures are re-published. Otherwise, one culture can be specified. To act on more + /// that one culture, see the other overload of this method. + /// The parameter determines which documents are published. When false, + /// only those documents that are already published, are republished. When true, all documents are + /// published. + /// IEnumerable SaveAndPublishBranch(IContent content, bool force, string culture = "*", int userId = 0); /// /// Saves and publishes a document branch. /// + /// + /// The parameter determines which documents are published. When false, + /// only those documents that are already published, are republished. When true, all documents are + /// published. + /// The parameter is a function which determines whether a document has + /// values to publish (else there is no need to publish it). If one wants to publish only a selection of + /// cultures, one may want to check that only properties for these cultures have changed. Otherwise, other + /// cultures may trigger an unwanted republish. + /// The parameter is a function to execute to publish cultures, on + /// each document. It can publish all, one, or a selection of cultures. It returns a boolean indicating + /// whether the cultures could be published. + /// IEnumerable SaveAndPublishBranch(IContent content, bool force, Func editing, Func publishCultures, int userId = 0); /// diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Core/Services/Implement/ContentService.cs index 200c5af096..f14747cda3 100644 --- a/src/Umbraco.Core/Services/Implement/ContentService.cs +++ b/src/Umbraco.Core/Services/Implement/ContentService.cs @@ -1272,12 +1272,49 @@ namespace Umbraco.Core.Services.Implement bool IsEditing(IContent c, string l) => c.PublishName != c.Name || - c.PublishedCultures.Any(x => c.GetCultureName(x) != c.GetPublishName(x)) || - c.Properties.Any(x => x.Values.Where(y => culture == "*" || y.Culture == l).Any(y => !y.EditedValue.Equals(y.PublishedValue))); + c.PublishedCultures.Where(x => x.InvariantEquals(l)).Any(x => c.GetCultureName(x) != c.GetPublishName(x)) || + c.Properties.Any(x => x.Values.Where(y => culture == "*" || y.Culture.InvariantEquals(l)).Any(y => !y.EditedValue.Equals(y.PublishedValue))); return SaveAndPublishBranch(content, force, document => IsEditing(document, culture), document => document.PublishCulture(culture), userId); } + // fixme - make this public once we know it works + document + private IEnumerable SaveAndPublishBranch(IContent content, bool force, string[] cultures, int userId = 0) + { + // note: EditedValue and PublishedValue are objects here, so it is important to .Equals() + // and not to == them, else we would be comparing references, and that is a bad thing + + cultures = cultures ?? Array.Empty(); + + // determines whether the document is edited, and thus needs to be published, + // for the specified cultures (it may be edited for other cultures and that + // should not trigger a publish). + bool IsEdited(IContent c) + { + if (cultures.Length == 0) + { + // nothing = everything + return c.PublishName != c.Name || + c.PublishedCultures.Any(x => c.GetCultureName(x) != c.GetPublishName(x)) || + c.Properties.Any(x => x.Values.Any(y => !y.EditedValue.Equals(y.PublishedValue))); + } + + return c.PublishName != c.Name || + c.PublishedCultures.Where(x => cultures.Contains(x, StringComparer.InvariantCultureIgnoreCase)).Any(x => c.GetCultureName(x) != c.GetPublishName(x)) || + c.Properties.Any(x => x.Values.Where(y => cultures.Contains(y.Culture, StringComparer.InvariantCultureIgnoreCase)).Any(y => !y.EditedValue.Equals(y.PublishedValue))); + } + + // publish the specified cultures + bool PublishCultures(IContent c) + { + return cultures.Length == 0 + ? c.PublishCulture() // nothing = everything + : cultures.All(c.PublishCulture); + } + + return SaveAndPublishBranch(content, force, IsEdited, PublishCultures, userId); + } + /// public IEnumerable SaveAndPublishBranch(IContent document, bool force, Func editing, Func publishCultures, int userId = 0) diff --git a/src/Umbraco.Tests/Composing/ActionCollectionTests.cs b/src/Umbraco.Tests/Composing/ActionCollectionTests.cs index 04bd0a2e1e..46e4eee765 100644 --- a/src/Umbraco.Tests/Composing/ActionCollectionTests.cs +++ b/src/Umbraco.Tests/Composing/ActionCollectionTests.cs @@ -49,6 +49,8 @@ namespace Umbraco.Tests.Composing public bool ShowInNotifier => false; public bool CanBePermissionAssigned => true; + + public bool OpensDialog => true; } public class NonSingletonAction : IAction @@ -66,6 +68,8 @@ namespace Umbraco.Tests.Composing public bool ShowInNotifier => false; public bool CanBePermissionAssigned => true; + + public bool OpensDialog => true; } #endregion diff --git a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-actions.less b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-actions.less index f52258333d..15296a6aaa 100644 --- a/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-actions.less +++ b/src/Umbraco.Web.UI.Client/src/less/components/tree/umb-actions.less @@ -51,6 +51,15 @@ text-decoration: none; } +.umb-action { + &.-opens-dialog { + .menu-label:after { + // adds an ellipsis (...) after the menu label for actions that open a dialog + content: '\2026'; + } + } +} + .umb-actions-child { .umb-action { diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/insertcodesnippet/insertcodesnippet.html b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/insertcodesnippet/insertcodesnippet.html index 58b422ceb2..2ccbf11cc1 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/insertcodesnippet/insertcodesnippet.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/insertcodesnippet/insertcodesnippet.html @@ -16,24 +16,23 @@
-
+
...
-
+
...
-
+
...
-
-
+
...
diff --git a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-contextmenu.html b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-contextmenu.html index 32dd57ade3..9d3fa3765d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/application/umb-contextmenu.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/application/umb-contextmenu.html @@ -5,7 +5,7 @@ - \ No newline at end of file + diff --git a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html index 149fccd00a..e0f40a1b3b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-content-header.html @@ -72,7 +72,7 @@ + current-section="{{menu.currentNode.section}}"> diff --git a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html index f724f39be7..bf9c8fab8c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/editor/umb-editor-menu.html @@ -8,7 +8,7 @@ diff --git a/src/Umbraco.Web.UI.Client/src/views/components/umb-groups-builder.html b/src/Umbraco.Web.UI.Client/src/views/components/umb-groups-builder.html index 2a5bc4a572..1e8c1f74e5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/components/umb-groups-builder.html +++ b/src/Umbraco.Web.UI.Client/src/views/components/umb-groups-builder.html @@ -13,7 +13,8 @@ label-key="contentTypeEditor_compositions" icon="icon-merge" action="openCompositionsDialog()" - size="xs"> + size="xs" + add-ellipsis="true"> - New folder + New folder... diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/create.html b/src/Umbraco.Web.UI.Client/src/views/documenttypes/create.html index d19b1329d2..c9f62cd870 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/create.html @@ -25,7 +25,7 @@ - Document Type Collection + Document Type Collection... @@ -33,7 +33,7 @@
  • - + ...
  • diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/documenttypes/edit.controller.js index 10c563a289..ec7a30f9ec 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/edit.controller.js @@ -48,7 +48,8 @@ "shortcuts_toggleListView", "shortcuts_toggleAllowAsRoot", "shortcuts_addChildNode", - "shortcuts_addTemplate" + "shortcuts_addTemplate", + "shortcuts_toggleAllowCultureVariants" ]; onInit(); @@ -81,6 +82,7 @@ vm.labels.allowAsRoot = values[11]; vm.labels.addChildNode = values[12]; vm.labels.addTemplate = values[13]; + vm.labels.allowCultureVariants = values[14]; var buttons = [ { @@ -161,6 +163,10 @@ { "description": vm.labels.addChildNode, "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "c" }] + }, + { + "description": vm.labels.allowCultureVariants, + "keys": [{ "key": "alt" }, { "key": "shift" }, { "key": "v" }] } ] }, diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.controller.js b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.controller.js index 028380ff81..4a7a870618 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.controller.js @@ -23,7 +23,8 @@ vm.addChild = addChild; vm.removeChild = removeChild; - vm.toggle = toggle; + vm.toggleAllowAsRoot = toggleAllowAsRoot; + vm.toggleAllowCultureVariants = toggleAllowCultureVariants; /* ---------- INIT ---------- */ @@ -86,7 +87,7 @@ /** * Toggle the $scope.model.allowAsRoot value to either true or false */ - function toggle(){ + function toggleAllowAsRoot(){ if($scope.model.allowAsRoot){ $scope.model.allowAsRoot = false; return; @@ -95,6 +96,15 @@ $scope.model.allowAsRoot = true; } + function toggleAllowCultureVariants() { + if ($scope.model.allowCultureVariant) { + $scope.model.allowCultureVariant = false; + return; + } + + $scope.model.allowCultureVariant = true; + } + } angular.module("umbraco").controller("Umbraco.Editors.DocumentType.PermissionsController", PermissionsController); diff --git a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.html b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.html index 2ecd1c518c..ec1e528f8c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.html +++ b/src/Umbraco.Web.UI.Client/src/views/documenttypes/views/permissions/permissions.html @@ -10,11 +10,10 @@
    - +
    @@ -28,14 +27,13 @@
    - +
    @@ -44,18 +42,20 @@
    -
    Content Type Variation
    - Define the rules for how this content type's properties can be varied -
    -
    - +
    +
    +
    + + +
    +
    - +
    diff --git a/src/Umbraco.Web.UI.Client/src/views/mediatypes/create.html b/src/Umbraco.Web.UI.Client/src/views/mediatypes/create.html index ca85bcbf9e..795fd0ba7b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/mediatypes/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/mediatypes/create.html @@ -16,7 +16,7 @@
  • - + ...
  • diff --git a/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/create.html b/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/create.html index 36ab0e71c1..74a611b3d9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/partialviewmacros/create.html @@ -25,13 +25,13 @@
  • - >New partial view macro from snippet + >New partial view macro from snippet...
  • - + ...
  • diff --git a/src/Umbraco.Web.UI.Client/src/views/partialviews/create.html b/src/Umbraco.Web.UI.Client/src/views/partialviews/create.html index 59c0b0b344..cfeb2396a7 100644 --- a/src/Umbraco.Web.UI.Client/src/views/partialviews/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/partialviews/create.html @@ -18,13 +18,13 @@
  • - New partial view from snippet + New partial view from snippet...
  • - + ...
  • diff --git a/src/Umbraco.Web.UI.Client/src/views/scripts/create.html b/src/Umbraco.Web.UI.Client/src/views/scripts/create.html index d4c21b4b8a..8b5e0732d2 100644 --- a/src/Umbraco.Web.UI.Client/src/views/scripts/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/scripts/create.html @@ -13,7 +13,7 @@
  • - + ...
  • diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml index dc4cea3006..8bc9d190fa 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en.xml @@ -681,6 +681,7 @@ Move Lines Down General Editor + Toggle allow culture variants Background colour @@ -1484,6 +1485,9 @@ To manage your website, simply open the Umbraco back office and start adding con tab has no sort order Where is this composition used? This composition is currently used in the composition of the following content types: + Allow varying by culture + Allow editors to create content of this type in different languages + Allow varying by culture Building models diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index 6dbcd0d870..c283bac73e 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -702,6 +702,7 @@ Move Lines Down General Editor + Toggle allow culture variants Background color @@ -1507,6 +1508,9 @@ To manage your website, simply open the Umbraco back office and start adding con tab has no sort order Where is this composition used? This composition is currently used in the composition of the following content types: + Allow varying by culture + Allow editors to create content of this type in different languages + Allow varying by culture Add language diff --git a/src/Umbraco.Web/Models/Trees/MenuItem.cs b/src/Umbraco.Web/Models/Trees/MenuItem.cs index 88d772b939..412cd9106d 100644 --- a/src/Umbraco.Web/Models/Trees/MenuItem.cs +++ b/src/Umbraco.Web/Models/Trees/MenuItem.cs @@ -38,6 +38,7 @@ namespace Umbraco.Web.Models.Trees SeperatorBefore = false; Icon = legacyMenu.Icon; Action = legacyMenu; + OpensDialog = legacyMenu.OpensDialog; } #endregion @@ -71,6 +72,10 @@ namespace Umbraco.Web.Models.Trees [DataMember(Name = "cssclass")] public string Icon { get; set; } + + [DataMember(Name = "opensDialog")] + public bool OpensDialog { get; set; } + #endregion #region Constants diff --git a/src/Umbraco.Web/_Legacy/Actions/Action.cs b/src/Umbraco.Web/_Legacy/Actions/Action.cs index 388a5735fd..241218ddb7 100644 --- a/src/Umbraco.Web/_Legacy/Actions/Action.cs +++ b/src/Umbraco.Web/_Legacy/Actions/Action.cs @@ -174,6 +174,7 @@ namespace Umbraco.Web._Legacy.Actions public string Alias { get; set; } public string JsFunctionName { get; set; } public string JsSource { get; set; } + public bool OpensDialog { get; set; } public PlaceboAction() { } public PlaceboAction(IAction legacyAction) @@ -185,6 +186,7 @@ namespace Umbraco.Web._Legacy.Actions Alias = legacyAction.Alias; JsFunctionName = legacyAction.JsFunctionName; JsSource = legacyAction.JsSource; + OpensDialog = legacyAction.OpensDialog; } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionAssignDomain.cs b/src/Umbraco.Web/_Legacy/Actions/ActionAssignDomain.cs index 37de1f8e0f..c313f282ad 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionAssignDomain.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionAssignDomain.cs @@ -69,6 +69,9 @@ namespace Umbraco.Web._Legacy.Actions return true; } } + + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionBrowse.cs b/src/Umbraco.Web/_Legacy/Actions/ActionBrowse.cs index 1425b27917..20dc331516 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionBrowse.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionBrowse.cs @@ -60,6 +60,8 @@ namespace Umbraco.Web._Legacy.Actions get { return ""; } } + public bool OpensDialog => false; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionChangeDocType.cs b/src/Umbraco.Web/_Legacy/Actions/ActionChangeDocType.cs index 9c31c172ab..b68627c38c 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionChangeDocType.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionChangeDocType.cs @@ -83,6 +83,9 @@ namespace Umbraco.Web._Legacy.Actions return true; } } + + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionCopy.cs b/src/Umbraco.Web/_Legacy/Actions/ActionCopy.cs index a489f1d280..5addcec99f 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionCopy.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionCopy.cs @@ -83,6 +83,9 @@ namespace Umbraco.Web._Legacy.Actions return true; } } + + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionCreateBlueprintFromContent.cs b/src/Umbraco.Web/_Legacy/Actions/ActionCreateBlueprintFromContent.cs index e00de39aea..0d028c35b4 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionCreateBlueprintFromContent.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionCreateBlueprintFromContent.cs @@ -20,6 +20,7 @@ namespace Umbraco.Web._Legacy.Actions public string Alias { get; private set; } public string JsFunctionName { get; private set; } public string JsSource { get; private set; } + public bool OpensDialog => true; public ActionCreateBlueprintFromContent() { diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionDelete.cs b/src/Umbraco.Web/_Legacy/Actions/ActionDelete.cs index 09ce4d8602..53f7822d47 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionDelete.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionDelete.cs @@ -77,6 +77,9 @@ namespace Umbraco.Web._Legacy.Actions return true; } } + + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionEmptyTranscan.cs b/src/Umbraco.Web/_Legacy/Actions/ActionEmptyTranscan.cs index 7f8dd6b03c..f0da5323b9 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionEmptyTranscan.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionEmptyTranscan.cs @@ -73,6 +73,8 @@ namespace Umbraco.Web._Legacy.Actions } } + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionExport.cs b/src/Umbraco.Web/_Legacy/Actions/ActionExport.cs index df78026ea0..56b98c02f2 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionExport.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionExport.cs @@ -71,6 +71,8 @@ namespace Umbraco.Web._Legacy.Actions } } + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionImport.cs b/src/Umbraco.Web/_Legacy/Actions/ActionImport.cs index 42947cf36e..52f163ee6b 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionImport.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionImport.cs @@ -72,6 +72,8 @@ } } + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionMove.cs b/src/Umbraco.Web/_Legacy/Actions/ActionMove.cs index 80aff5736a..81d1803679 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionMove.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionMove.cs @@ -83,6 +83,9 @@ namespace Umbraco.Web._Legacy.Actions return true; } } + + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionNew.cs b/src/Umbraco.Web/_Legacy/Actions/ActionNew.cs index 72e863e38b..ef1b61efc5 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionNew.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionNew.cs @@ -70,6 +70,8 @@ namespace Umbraco.Web._Legacy.Actions } } + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionNotify.cs b/src/Umbraco.Web/_Legacy/Actions/ActionNotify.cs index ef281eecbe..fd6bc3d61a 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionNotify.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionNotify.cs @@ -76,6 +76,9 @@ namespace Umbraco.Web._Legacy.Actions return false; } } + + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionNull.cs b/src/Umbraco.Web/_Legacy/Actions/ActionNull.cs index 78c5175fb6..3344560c3f 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionNull.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionNull.cs @@ -51,6 +51,8 @@ get { return string.Empty; } } + public bool OpensDialog => false; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionPackage.cs b/src/Umbraco.Web/_Legacy/Actions/ActionPackage.cs index 832e691b48..fa17b87073 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionPackage.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionPackage.cs @@ -75,6 +75,8 @@ namespace Umbraco.Web._Legacy.Actions } } + public bool OpensDialog => false; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionPackageCreate.cs b/src/Umbraco.Web/_Legacy/Actions/ActionPackageCreate.cs index f0ccb03d8e..fdec43e810 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionPackageCreate.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionPackageCreate.cs @@ -75,6 +75,8 @@ namespace Umbraco.Web._Legacy.Actions } } + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionProtect.cs b/src/Umbraco.Web/_Legacy/Actions/ActionProtect.cs index 357dfe89a4..65e9d7128e 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionProtect.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionProtect.cs @@ -83,6 +83,9 @@ namespace Umbraco.Web._Legacy.Actions return true; } } + + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionPublish.cs b/src/Umbraco.Web/_Legacy/Actions/ActionPublish.cs index 6b54873c43..70c7735572 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionPublish.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionPublish.cs @@ -77,6 +77,9 @@ namespace Umbraco.Web._Legacy.Actions return true; } } + + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionRePublish.cs b/src/Umbraco.Web/_Legacy/Actions/ActionRePublish.cs index b78af779e4..312ae80825 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionRePublish.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionRePublish.cs @@ -74,6 +74,9 @@ namespace Umbraco.Web._Legacy.Actions return false; } } + + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionRefresh.cs b/src/Umbraco.Web/_Legacy/Actions/ActionRefresh.cs index 07133b4030..0abf4fcac5 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionRefresh.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionRefresh.cs @@ -81,6 +81,9 @@ namespace Umbraco.Web._Legacy.Actions return false; } } + + public bool OpensDialog => false; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionRestore.cs b/src/Umbraco.Web/_Legacy/Actions/ActionRestore.cs index da70eb1409..2a2baac070 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionRestore.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionRestore.cs @@ -27,6 +27,8 @@ public bool CanBePermissionAssigned => false; + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionRights.cs b/src/Umbraco.Web/_Legacy/Actions/ActionRights.cs index e1ee74e61c..beb3b06ddf 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionRights.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionRights.cs @@ -83,6 +83,9 @@ namespace Umbraco.Web._Legacy.Actions return true; } } + + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionRollback.cs b/src/Umbraco.Web/_Legacy/Actions/ActionRollback.cs index 59044666f7..3179dc9fb5 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionRollback.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionRollback.cs @@ -82,6 +82,9 @@ namespace Umbraco.Web._Legacy.Actions return true; } } + + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionSort.cs b/src/Umbraco.Web/_Legacy/Actions/ActionSort.cs index b813dcbc8c..48f6b8d1e9 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionSort.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionSort.cs @@ -83,6 +83,9 @@ namespace Umbraco.Web._Legacy.Actions return true; } } + + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionToPublish.cs b/src/Umbraco.Web/_Legacy/Actions/ActionToPublish.cs index ff471bc198..a04a24f4a3 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionToPublish.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionToPublish.cs @@ -78,6 +78,9 @@ namespace Umbraco.Web._Legacy.Actions return true; } } + + public bool OpensDialog => false; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionTranslate.cs b/src/Umbraco.Web/_Legacy/Actions/ActionTranslate.cs index 0cc5120fd0..157fd827a6 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionTranslate.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionTranslate.cs @@ -77,6 +77,8 @@ namespace Umbraco.Web._Legacy.Actions } } + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionUnPublish.cs b/src/Umbraco.Web/_Legacy/Actions/ActionUnPublish.cs index a61b805859..11225add1d 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionUnPublish.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionUnPublish.cs @@ -25,6 +25,8 @@ namespace Umbraco.Web._Legacy.Actions public string Icon => "circle-dotted"; public bool ShowInNotifier => false; public bool CanBePermissionAssigned => true; + public bool OpensDialog => false; + } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ActionUpdate.cs b/src/Umbraco.Web/_Legacy/Actions/ActionUpdate.cs index 15458e83ad..5621d505a9 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ActionUpdate.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ActionUpdate.cs @@ -77,6 +77,9 @@ namespace Umbraco.Web._Legacy.Actions return true; } } + + public bool OpensDialog => false; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/ContextMenuSeperator.cs b/src/Umbraco.Web/_Legacy/Actions/ContextMenuSeperator.cs index 2c66932a04..45a1d0e1c5 100644 --- a/src/Umbraco.Web/_Legacy/Actions/ContextMenuSeperator.cs +++ b/src/Umbraco.Web/_Legacy/Actions/ContextMenuSeperator.cs @@ -46,6 +46,8 @@ get { return false; } } + public bool OpensDialog => false; + #endregion } } diff --git a/src/Umbraco.Web/_Legacy/Actions/IAction.cs b/src/Umbraco.Web/_Legacy/Actions/IAction.cs index 410a407517..48a752e7da 100644 --- a/src/Umbraco.Web/_Legacy/Actions/IAction.cs +++ b/src/Umbraco.Web/_Legacy/Actions/IAction.cs @@ -14,5 +14,9 @@ namespace Umbraco.Web._Legacy.Actions /// A path to a supporting JavaScript file for the IAction. A script tag will be rendered out with the reference to the JavaScript file. ///
    string JsSource { get; } + /// + /// Whether or not the action opens a dialog when invoked + /// + bool OpensDialog { get; } } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/TreeMenu/ActionDeleteRelationType.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/TreeMenu/ActionDeleteRelationType.cs index cf39b17e55..5526a3d9a3 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/TreeMenu/ActionDeleteRelationType.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/TreeMenu/ActionDeleteRelationType.cs @@ -78,6 +78,8 @@ namespace umbraco.cms.presentation.developer.RelationTypes.TreeMenu get { return "javascript:actionDeleteRelationType(UmbClientMgr.mainTree().getActionNode().nodeId,UmbClientMgr.mainTree().getActionNode().nodeName);"; } } + public bool OpensDialog => true; + #endregion } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/TreeMenu/ActionNewRelationType.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/TreeMenu/ActionNewRelationType.cs index 6018539983..cb776d5246 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/TreeMenu/ActionNewRelationType.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/TreeMenu/ActionNewRelationType.cs @@ -78,6 +78,8 @@ namespace umbraco.cms.presentation.developer.RelationTypes.TreeMenu get { return "javascript:actionNewRelationType();"; } } + public bool OpensDialog => true; + #endregion } }