Merge branch 'temp8' of https://github.com/umbraco/Umbraco-CMS into temp8
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
<umb-toggle
|
||||
checked="vm.checked"
|
||||
disabled="vm.disabled"
|
||||
on-click="vm.toggle()"
|
||||
show-labels="true"
|
||||
label-on="Start"
|
||||
@@ -38,6 +39,7 @@
|
||||
|
||||
var vm = this;
|
||||
vm.checked = false;
|
||||
vm.disabled = false;
|
||||
|
||||
vm.toggle = toggle;
|
||||
|
||||
@@ -52,6 +54,7 @@
|
||||
</pre>
|
||||
|
||||
@param {boolean} checked Set to <code>true</code> or <code>false</code> to toggle the switch.
|
||||
@param {boolean} disabled Set to <code>true</code> or <code>false</code> to disable the switch.
|
||||
@param {callback} onClick The function which should be called when the toggle is clicked.
|
||||
@param {string=} showLabels Set to <code>true</code> or <code>false</code> to show a "On" or "Off" label next to the switch.
|
||||
@param {string=} labelOn Set a custom label for when the switched is turned on. It will default to "On".
|
||||
@@ -115,6 +118,7 @@
|
||||
templateUrl: 'views/components/buttons/umb-toggle.html',
|
||||
scope: {
|
||||
checked: "=",
|
||||
disabled: "=",
|
||||
onClick: "&",
|
||||
labelOn: "@?",
|
||||
labelOff: "@?",
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
|
||||
.umb-toggle__toggle {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
width: 48px;
|
||||
height: 24px;
|
||||
background: @gray-8;
|
||||
@@ -41,6 +42,11 @@
|
||||
background-color: @green;
|
||||
}
|
||||
|
||||
.umb-toggle--disabled .umb-toggle__toggle {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.umb-toggle--checked .umb-toggle__handler {
|
||||
transform: translate3d(24px, 0, 0) rotate(0);
|
||||
}
|
||||
@@ -63,7 +69,7 @@
|
||||
|
||||
.umb-toggle__icon {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
line-height: 1em;
|
||||
text-decoration: none;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
padding: 7px 0;
|
||||
}
|
||||
|
||||
.umb-permission--disabled {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.umb-permission:last-of-type {
|
||||
border-bottom: none;
|
||||
}
|
||||
@@ -25,6 +21,12 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.umb-permission--disabled .umb-permission__toggle,
|
||||
.umb-permission--disabled .umb-permission__content {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.umb-permission__description {
|
||||
font-size: 13px;
|
||||
color: @gray-4;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<button ng-click="click()" type="button" class="umb-toggle" ng-class="{'umb-toggle--checked': checked}">
|
||||
<button ng-click="click()" type="button" class="umb-toggle" ng-disabled="disabled" ng-class="{'umb-toggle--checked': checked, 'umb-toggle--disabled': disabled}">
|
||||
|
||||
<span ng-if="!labelPosition && showLabels === 'true' || labelPosition === 'left' && showLabels === 'true'">
|
||||
<span ng-if="!checked" class="umb-toggle__label umb-toggle__label--left">{{ displayLabelOff }}</span>
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
<div class="umb-permission" ng-click="vm.toggleDefault()" ng-class="{'umb-permission--disabled': vm.initIsDefault}">
|
||||
<umb-toggle
|
||||
class="umb-permission__toggle"
|
||||
checked="vm.language.isDefault">
|
||||
checked="vm.language.isDefault"
|
||||
disabled="vm.initIsDefault">
|
||||
</umb-toggle>
|
||||
<div class="umb-permission__content" >
|
||||
<div>{{vm.labels.defaultLanguage}}</div>
|
||||
|
||||
@@ -9,7 +9,6 @@ using System.Web.Http;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Composing;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi;
|
||||
|
||||
@@ -14,7 +14,6 @@ using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Services;
|
||||
using Current = Umbraco.Web.Composing.Current;
|
||||
using ApplicationTree = Umbraco.Core.Models.ApplicationTree;
|
||||
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
using System.Linq;
|
||||
using System.Net.Http.Formatting;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Entities;
|
||||
using Umbraco.Web.Actions;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
@@ -117,6 +115,5 @@ namespace Umbraco.Web.Trees
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,11 +9,9 @@ using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Entities;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
using Umbraco.Web.Composing;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using Umbraco.Web.Search;
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
|
||||
@@ -14,7 +14,6 @@ using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
using System.Globalization;
|
||||
using Umbraco.Core.Models.Entities;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
using Umbraco.Web.Composing;
|
||||
|
||||
|
||||
@@ -5,12 +5,9 @@ using System.Linq;
|
||||
using System.Net.Http.Formatting;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Entities;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
@@ -12,8 +12,6 @@ using Umbraco.Web.WebApi.Filters;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using Umbraco.Web.Search;
|
||||
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
@@ -91,7 +89,6 @@ namespace Umbraco.Web.Trees
|
||||
Constants.DataTypes.DefaultContentListView,
|
||||
Constants.DataTypes.DefaultMediaListView,
|
||||
Constants.DataTypes.DefaultMembersListView
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -3,9 +3,7 @@ using System.Linq;
|
||||
using System.Net.Http.Formatting;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Formatting;
|
||||
using System.Web;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Formatting;
|
||||
using System.Web.Http.Routing;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
|
||||
using Umbraco.Web.Composing;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
{
|
||||
@@ -78,6 +72,5 @@ namespace Umbraco.Web.Trees
|
||||
public ActionUrlMethod ActionMethod { get; private set; }
|
||||
public string DialogTitle { get; private set; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,11 @@
|
||||
using System.Linq;
|
||||
using System.Net.Http.Formatting;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Entities;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
@@ -70,7 +67,6 @@ namespace Umbraco.Web.Trees
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
||||
var macro = Services.MacroService.GetById(int.Parse(id));
|
||||
if (macro == null) return new MenuItemCollection();
|
||||
|
||||
|
||||
@@ -9,11 +9,9 @@ using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Entities;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
using Umbraco.Web.Composing;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using Umbraco.Web.Search;
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
|
||||
@@ -5,18 +5,14 @@ using System.Net.Http.Formatting;
|
||||
using AutoMapper;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Entities;
|
||||
using Umbraco.Core.Persistence.Querying;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
|
||||
using Umbraco.Web.Search;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
{
|
||||
[UmbracoTreeAuthorize(Constants.Trees.MediaTypes)]
|
||||
|
||||
@@ -14,7 +14,6 @@ using Umbraco.Web.Actions;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using Umbraco.Web.Search;
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
@@ -116,8 +115,6 @@ namespace Umbraco.Web.Trees
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
|
||||
@@ -188,7 +185,6 @@ namespace Umbraco.Web.Trees
|
||||
menu.Items.Add(new ExportMember(Services.TextService));
|
||||
}
|
||||
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http.Formatting;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
|
||||
using Umbraco.Web.Models.Trees;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Formatting;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
using umbraco;
|
||||
using umbraco.cms.businesslogic.packager;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
@@ -27,13 +24,11 @@ namespace Umbraco.Web.Trees
|
||||
protected override TreeNode CreateRootNode(FormDataCollection queryStrings)
|
||||
{
|
||||
var root = base.CreateRootNode(queryStrings);
|
||||
|
||||
root.RoutePath = $"{Constants.Applications.Packages}/{Constants.Trees.Packages}/overview";
|
||||
|
||||
root.Icon = "icon-box";
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
|
||||
{
|
||||
var nodes = new TreeNodeCollection();
|
||||
@@ -47,7 +42,8 @@ namespace Umbraco.Web.Trees
|
||||
.OrderBy(entity => entity.Data.Name)
|
||||
.Select(dt =>
|
||||
{
|
||||
var node = CreateTreeNode(dt.Data.Id.ToString(), id, queryStrings, dt.Data.Name, "icon-inbox", false,
|
||||
var node = CreateTreeNode(dt.Data.Id.ToString(), id, queryStrings, dt.Data.Name,
|
||||
"icon-inbox", false,
|
||||
$"/{queryStrings.GetValue<string>("application")}/framed/{Uri.EscapeDataString("developer/Packages/EditPackage.aspx?id=" + dt.Data.Id)}");
|
||||
return node;
|
||||
}));
|
||||
@@ -64,16 +60,12 @@ namespace Umbraco.Web.Trees
|
||||
createdPackages.Count > 0,
|
||||
string.Empty);
|
||||
|
||||
|
||||
|
||||
//TODO: This isn't the best way to ensure a noop process for clicking a node but it works for now.
|
||||
node.AdditionalData["jsClickCallback"] = "javascript:void(0);";
|
||||
|
||||
nodes.Add(node);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return nodes;
|
||||
}
|
||||
|
||||
@@ -85,12 +77,14 @@ namespace Umbraco.Web.Trees
|
||||
if (id == "-1")
|
||||
{
|
||||
menu.Items.Add<ActionNew>(Services.TextService, opensDialog: true)
|
||||
.ConvertLegacyMenuItem(null, Constants.Trees.Packages, queryStrings.GetValue<string>("application"));
|
||||
.ConvertLegacyMenuItem(null, Constants.Trees.Packages,
|
||||
queryStrings.GetValue<string>("application"));
|
||||
}
|
||||
else if (id == "created")
|
||||
{
|
||||
menu.Items.Add<ActionNew>(Services.TextService, opensDialog: true)
|
||||
.ConvertLegacyMenuItem(null, Constants.Trees.Packages, queryStrings.GetValue<string>("application"));
|
||||
.ConvertLegacyMenuItem(null, Constants.Trees.Packages,
|
||||
queryStrings.GetValue<string>("application"));
|
||||
|
||||
menu.Items.Add(new RefreshNode(Services.TextService, true));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using umbraco;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Web.Composing;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
|
||||
@@ -44,9 +44,10 @@ namespace Umbraco.Web.Trees
|
||||
if (id == Constants.System.Root.ToInvariantString())
|
||||
{
|
||||
nodes.AddRange(Services.RelationService.GetAllRelationTypes()
|
||||
.Select(rt => CreateTreeNode(rt.Id.ToString(), id, queryStrings, rt.Name,
|
||||
"icon-trafic", false)));
|
||||
.Select(rt => CreateTreeNode(rt.Id.ToString(), id, queryStrings, rt.Name,
|
||||
"icon-trafic", false)));
|
||||
}
|
||||
|
||||
return nodes;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Web.Composing;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
|
||||
@@ -5,16 +5,13 @@ using System.Linq;
|
||||
using System.Net.Http.Formatting;
|
||||
using AutoMapper;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Models.Entities;
|
||||
using Umbraco.Web.Actions;
|
||||
using Umbraco.Web.Models.ContentEditing;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.Search;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
|
||||
@@ -48,8 +48,6 @@ namespace Umbraco.Web.Trees
|
||||
IsSingleNodeTree = isSingleNodeTree;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public string ApplicationAlias { get; private set; }
|
||||
public string Alias { get; private set; }
|
||||
public string Title { get; private set; }
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Services;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
namespace Umbraco.Web.Trees
|
||||
{
|
||||
/// <summary>
|
||||
/// The base controller for all tree requests
|
||||
@@ -22,8 +18,8 @@ namespace Umbraco.Web.Trees
|
||||
/// </summary>
|
||||
public override string RootNodeDisplayName
|
||||
=> _rootNodeDisplayName
|
||||
?? (_rootNodeDisplayName = Services.ApplicationTreeService.GetByAlias(_attribute.Alias)
|
||||
?.GetRootNodeDisplayName(Services.TextService));
|
||||
?? (_rootNodeDisplayName = Services.ApplicationTreeService.GetByAlias(_attribute.Alias)
|
||||
?.GetRootNodeDisplayName(Services.TextService));
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current tree alias from the attribute assigned to it.
|
||||
|
||||
@@ -10,7 +10,6 @@ using Umbraco.Core.Models.Entities;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.WebApi;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
using Umbraco.Web.Search;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
{
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
using System.Linq;
|
||||
using System.Net.Http.Formatting;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using System.Net.Http.Formatting;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Web.Mvc;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
|
||||
using Constants = Umbraco.Core.Constants;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
|
||||
Reference in New Issue
Block a user