Make it possible to add ellipsis on actions that invokes dialogs by means of OpensDialog on IAction
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
<div class='umb-modalcolumn-body'>
|
||||
<ul class="umb-actions">
|
||||
<li data-element="action-{{action.alias}}" ng-click="executeMenuItem(action)" class="umb-action" ng-class="{sep:action.seperator}" ng-repeat="action in menuActions">
|
||||
<li data-element="action-{{action.alias}}" ng-click="executeMenuItem(action)" class="umb-action" ng-class="{sep:action.seperator, '-opens-dialog': action.opensDialog}" ng-repeat="action in menuActions">
|
||||
<a class="umb-action-link" prevent-default>
|
||||
<i class="icon icon-{{action.cssclass}}"></i>
|
||||
<span class="menu-label">{{action.name}}</span>
|
||||
@@ -13,4 +13,4 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,8 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
get { return ""; }
|
||||
}
|
||||
|
||||
public bool OpensDialog => false;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -77,6 +77,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +73,8 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +71,8 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,8 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
get { return string.Empty; }
|
||||
}
|
||||
|
||||
public bool OpensDialog => false;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,8 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => false;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,8 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => false;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
public bool CanBePermissionAssigned => false;
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,6 +82,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,6 +83,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +78,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => false;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,8 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => false;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,9 @@ namespace Umbraco.Web._Legacy.Actions
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public bool OpensDialog => false;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public bool OpensDialog => false;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
/// </summary>
|
||||
string JsSource { get; }
|
||||
/// <summary>
|
||||
/// Whether or not the action opens a dialog when invoked
|
||||
/// </summary>
|
||||
bool OpensDialog { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +78,8 @@ namespace umbraco.cms.presentation.developer.RelationTypes.TreeMenu
|
||||
get { return "javascript:actionNewRelationType();"; }
|
||||
}
|
||||
|
||||
public bool OpensDialog => true;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user