Merge remote-tracking branch 'origin/v8/dev' into v8/feature/block-editor-list

# Conflicts:
#	src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
This commit is contained in:
Niels Lyngsø
2020-05-29 11:04:13 +02:00
21 changed files with 209 additions and 57 deletions

View File

@@ -32,6 +32,7 @@
@param {boolean} required Set the checkbox to be required.
@param {callback} onChange Callback when the value of the checkbox change by interaction.
@param {string} cssClass Set a css class modifier
@param {boolean} disableDirtyCheck Disable checking if the model is dirty
**/
@@ -84,7 +85,8 @@
required: "<",
onChange: "&?",
cssClass: "@?",
iconClass: "@?"
iconClass: "@?",
disableDirtyCheck: "=?"
}
};

View File

@@ -16,10 +16,15 @@ angular.module("umbraco.directives")
replace: true,
templateUrl: 'views/components/property/umb-property.html',
link: function (scope) {
userService.getCurrentUser().then(function (u) {
var isAdmin = u.userGroups.indexOf('admin') !== -1;
scope.propertyAlias = (Umbraco.Sys.ServerVariables.isDebuggingEnabled === true || isAdmin) ? scope.property.alias : null;
});
scope.controlLabelTitle = null;
if(Umbraco.Sys.ServerVariables.isDebuggingEnabled) {
userService.getCurrentUser().then(function (u) {
if(u.allowedSections.indexOf("settings") !== -1 ? true : false) {
scope.controlLabelTitle = scope.property.alias;
}
});
}
},
//Define a controller for this directive to expose APIs to other directives
controller: function ($scope) {

View File

@@ -102,10 +102,15 @@
if (!scope.editLabelKey) {
scope.editLabelKey = "general_edit";
}
userService.getCurrentUser().then(function (u) {
var isAdmin = u.userGroups.indexOf('admin') !== -1;
scope.alias = (Umbraco.Sys.ServerVariables.isDebuggingEnabled === true || isAdmin) ? scope.alias : null;
});
scope.nodeNameTitle = null;
if(Umbraco.Sys.ServerVariables.isDebuggingEnabled) {
userService.getCurrentUser().then(function (u) {
if (u.allowedSections.indexOf("settings") !== -1 ? true : false) {
scope.nodeNameTitle = scope.alias;
}
});
}
}
var directive = {

View File

@@ -239,6 +239,7 @@
@import "dashboards/umbraco-forms.less";
@import "dashboards/examine-management.less";
@import "dashboards/healthcheck.less";
@import "dashboards/content-templates.less";
@import "dashboards/nucache.less";
@import "typeahead.less";

View File

@@ -18,6 +18,8 @@ label.umb-form-check--checkbox{
}
.umb-form-check__info {
margin-left:20px;
position: relative;
top: 3px;
}

View File

@@ -0,0 +1,22 @@
.content-templates-dashboard{
p{
line-height: 1.6em;
margin-bottom: 30px;
&:last-child{
margin-bottom: 0;
}
}
ul{
margin-bottom: 15px;
}
li{
margin-bottom: 5px;
&:last-child{
margin-bottom: 0;
}
}
}

View File

@@ -863,11 +863,11 @@
.bootstrap-datetimepicker-widget .picker-switch .btn{ background: none; border: none;}
.umb-datepicker .input-append .add-on{cursor: pointer;}
.umb-datepicker .input-append .on-top {
border: 0 none;
position: absolute;
margin-left: -31px;
margin-top: 1px;
display: inline-block;
height: 22px;
padding: 5px 6px 3px 6px;
font-size: @baseFontSize;
font-weight: normal;

View File

@@ -15,7 +15,14 @@
<umb-dropdown-item class="umb-action" ng-class="{'sep':action.separatorm, '-opens-dialog': action.opensDialog}" ng-repeat="action in actions">
<button type="button" ng-click="executeMenuItem(action)">
<i class="icon icon-{{action.cssclass}}" aria-hidden="true"></i>
<span class="menu-label">{{action.name}}</span>
<!-- Render the text that will be visually displayed -->
<span class="menu-label" aria-hidden="true">{{action.name}}</span>
<!-- Render the textDescription from the language files if it's attached to the action object-->
<span class="sr-only" ng-if="action.textDescription">
<localize key="visuallyHiddenTexts_{{action.alias}}Description" tokens="[currentNode.name]"></localize>
</span>
<!-- Otherwise render a combination of the nodename and the currentNode name-->
<span class="sr-only" ng-if="!action.textDescription">{{action.name}} {{currentNode.name}}</span>
</button>
</umb-dropdown-item>
</umb-dropdown>

View File

@@ -1,7 +1,7 @@
<label class="checkbox umb-form-check umb-form-check--checkbox {{vm.cssClass}}" ng-class="{ 'umb-form-check--disabled': vm.disabled }">
<div class="umb-form-check__symbol">
<input type="checkbox"
<input ng-if="vm.disableDirtyCheck"
type="checkbox"
id="{{vm.inputId}}"
name="{{vm.name}}"
value="{{vm.value}}"
@@ -10,7 +10,20 @@
ng-model="vm.model"
ng-disabled="vm.disabled"
ng-required="vm.required"
ng-change="vm.change()"/>
ng-change="vm.change()"
no-dirty-check />
<input ng-if="!vm.disableDirtyCheck"
type="checkbox"
id="{{vm.inputId}}"
name="{{vm.name}}"
value="{{vm.value}}"
class="umb-form-check__input"
val-server-field="{{vm.serverValidationField}}"
ng-model="vm.model"
ng-disabled="vm.disabled"
ng-required="vm.required"
ng-change="vm.change()"/>
<span class="umb-form-check__state" aria-hidden="true">
<span class="umb-form-check__check">

View File

@@ -11,7 +11,7 @@
<localize key="contentTypeEditor_inheritedFrom"></localize> {{inheritsFrom}}
</small>
<label class="control-label" for="{{property.alias}}" ng-attr-title="{{propertyAlias}}">
<label class="control-label" for="{{property.alias}}" ng-attr-title="{{controlLabelTitle}}">
{{property.label}}

View File

@@ -3,7 +3,7 @@
<i ng-if="icon" class="umb-node-preview__icon {{ icon }}" aria-hidden="true"></i>
<div class="umb-node-preview__content">
<div class="umb-node-preview__name" ng-attr-title="{{alias}}">{{ name }}</div>
<div class="umb-node-preview__name" ng-attr-title="{{nodeNameTitle}}">{{ name }}</div>
<div class="umb-node-preview__description" ng-if="description">{{ description }}</div>
<div class="umb-user-group-preview__permissions" ng-if="permissions">

View File

@@ -12,21 +12,32 @@
<umb-editor-container>
<umb-box>
<umb-box-content>
<h3>What are Content Templates?</h3>
<p style="line-height: 1.6em; margin-bottom: 30px;">Content Templates are pre-defined content that can be selected when creating a new content node.</p>
<umb-box-content class="content-templates-dashboard">
<h3>
<localize key="contentTemplatesDashboard_whatHeadline">What are Content Templates?</localize>
</h3>
<p>
<localise key="contentTemplatesDashboard_whatDescription">Content Templates are pre-defined content that can be selected when creating a new content node.</localize>
</p>
<h4 class="bold">How do I create a Content Template?</h4>
<p style="line-height: 1.6em;">There are two ways to create a Content Template:</p>
<ul style="margin-bottom: 15px;">
<li style="margin-bottom: 5px;">Right-click a content node and select "Create Content Template" to create a new Content Template.</li>
<li>Right-click the Content Templates tree in the Settings section and select the Document Type you want to create a Content Template for.</li>
</ul>
<p style="line-height: 1.6em; margin-bottom: 30px;">Once given a name, editors can start using the Content Template as a foundation for their new page.</p>
<h4 class="bold">
<localize key="contentTemplatesDashboard_createHeadline">How do I create a Content Template?</localize>
</h4>
<localize key="contentTemplatesDashboard_createDescription">
<p>There are two ways to create a Content Template:</p>
<ul>
<li>Right-click a content node and select "Create Content Template" to create a new Content Template.</li>
<li>Right-click the Content Templates tree in the Settings section and select the Document Type you want to create a Content Template for.</li>
</ul>
<p>Once given a name, editors can start using the Content Template as a foundation for their new page.</p>
</localize>
<h4 class="bold">How do I manage Content Templates</h4>
<p style="line-height: 1.6em;">You can edit and delete Content Templates from the "Content Templates" tree in the Settings section. Just expand the Document Type which the
Content Template is based on and click it to edit or delete it.</p>
<h4 class="bold">
<localize key="contentTemplatesDashboard_manageHeadline">How do I manage Content Templates?</localize>
</h4>
<p>
<localize key="contentTemplatesDashboard_manageDescription">You can edit and delete Content Templates from the "Content Templates" tree in the Settings section. Just expand the Document Type which the Content Template is based on and click it to edit or delete it.</localize>
</p>
</umb-box-content>
</umb-box>

View File

@@ -20,10 +20,11 @@
ng-required="model.validation.mandatory"
val-server="value"
class="datepickerinput">
<span class="on-top" ng-click="clearDate()" ng-show="hasDatetimePickerValue === true || datePickerForm.datepicker.$error.pickerError === true">
<i class="icon-delete"></i>
</span>
<span class="add-on">
<button type="button" class="on-top" ng-click="clearDate()" ng-show="hasDatetimePickerValue === true || datePickerForm.datepicker.$error.pickerError === true">
<i class="icon-delete" aria-hidden="true"></i>
<span class="sr-only"><localize key="content_removeDate">Clear date</localize></span>
</button>
<span class="add-on" aria-hidden="true">
<i class="icon-calendar"></i>
</span>
</div>