Merge branch 'v8/contrib' into v8/dev
This commit is contained in:
@@ -23,7 +23,6 @@ function runUnitTestServer() {
|
||||
autoWatch: true,
|
||||
port: 9999,
|
||||
singleRun: false,
|
||||
browsers: ['ChromeDebugging'],
|
||||
keepalive: true
|
||||
})
|
||||
.start();
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
* ===========
|
||||
* This is now using Gulp 4, each child task is now a child function in its own corresponding file.
|
||||
*
|
||||
* To add a new task, simply add a new task file to gulp/tasks folder, add a require statement below to include the one or more methods
|
||||
* To add a new task, simply add a new task file to gulp/tasks folder, add a require statement below to include the one or more methods
|
||||
* and then add the exports command to add the new item into the task menu.
|
||||
*/
|
||||
|
||||
const { src, dest, series, parallel, lastRun } = require('gulp');
|
||||
const { series, parallel } = require('gulp');
|
||||
|
||||
const config = require('./gulp/config');
|
||||
const { setDevelopmentMode, setTestMode } = require('./gulp/modes');
|
||||
@@ -28,9 +28,9 @@ config.compile.current = config.compile.build;
|
||||
// These Exports are the new way of defining Tasks in Gulp 4.x
|
||||
// ***********************************************************
|
||||
exports.build = series(parallel(dependencies, js, less, views), testUnit);
|
||||
exports.dev = series(setDevelopmentMode, parallel(dependencies, js, less, views), watchTask);
|
||||
exports.dev = series(setDevelopmentMode, parallel(dependencies, js, less, views), runUnitTestServer, watchTask);
|
||||
exports.watch = series(watchTask);
|
||||
//
|
||||
//
|
||||
exports.runTests = series(setTestMode, series(js, testUnit));
|
||||
exports.runUnit = series(setTestMode, series(js, runUnitTestServer), watchTask);
|
||||
exports.testE2e = series(setTestMode, parallel(testE2e));
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
'use strict';
|
||||
|
||||
function ContentEditController($rootScope, $scope, $routeParams, $q, $window,
|
||||
appState, contentResource, entityResource, navigationService, notificationsService,
|
||||
appState, contentResource, entityResource, navigationService, notificationsService, contentAppHelper,
|
||||
serverValidationManager, contentEditingHelper, localizationService, formHelper, umbRequestHelper,
|
||||
editorState, $http, eventsService, overlayService, $location, localStorageService, treeService,
|
||||
$exceptionHandler) {
|
||||
@@ -282,7 +282,7 @@
|
||||
$scope.page.saveButtonStyle = content.trashed || content.isElement || isBlueprint ? "primary" : "info";
|
||||
// only create the save/publish/preview buttons if the
|
||||
// content app is "Conent"
|
||||
if ($scope.activeApp && $scope.activeApp.alias !== "umbContent" && $scope.activeApp.alias !== "umbInfo" && $scope.activeApp.alias !== "umbListView") {
|
||||
if ($scope.activeApp && !contentAppHelper.isContentBasedApp($scope.activeApp)) {
|
||||
$scope.defaultButton = null;
|
||||
$scope.subButtons = null;
|
||||
$scope.page.showSaveButton = false;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
controller: umbVariantContentController
|
||||
};
|
||||
|
||||
function umbVariantContentController($scope) {
|
||||
function umbVariantContentController($scope, contentAppHelper) {
|
||||
|
||||
var unsubscribe = [];
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
function onAppChanged(activeApp) {
|
||||
|
||||
// disable the name field if the active content app is not "Content" or "Info"
|
||||
vm.nameDisabled = (activeApp && activeApp.alias !== "umbContent" && activeApp.alias !== "umbInfo" && activeApp.alias !== "umbListView");
|
||||
vm.nameDisabled = (activeApp && !contentAppHelper.isContentBasedApp(activeApp));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
/**
|
||||
* @ngdoc service
|
||||
* @name umbraco.services.contentAppHelper
|
||||
* @description A helper service for content app related functions.
|
||||
**/
|
||||
function contentAppHelper() {
|
||||
|
||||
var service = {};
|
||||
|
||||
/**
|
||||
* Default known content based apps.
|
||||
*/
|
||||
service.CONTENT_BASED_APPS = [ "umbContent", "umbInfo", "umbListView" ];
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name umbraco.services.contentAppHelper#isContentBasedApp
|
||||
* @methodOf umbraco.services.contentAppHelper
|
||||
*
|
||||
* @param {object} app A content app to check
|
||||
*
|
||||
* @description
|
||||
* Determines whether the supplied content app is a known content based app
|
||||
*
|
||||
*/
|
||||
service.isContentBasedApp = function (app) {
|
||||
return service.CONTENT_BASED_APPS.indexOf(app.alias) !== -1;
|
||||
}
|
||||
|
||||
return service;
|
||||
|
||||
}
|
||||
|
||||
angular.module('umbraco.services').factory('contentAppHelper', contentAppHelper);
|
||||
@@ -135,7 +135,7 @@ function treeService($q, treeResource, iconHelper, notificationsService, eventsS
|
||||
if (treeNode.iconIsClass === undefined || treeNode.iconIsClass) {
|
||||
var converted = iconHelper.convertFromLegacyTreeNodeIcon(treeNode);
|
||||
treeNode.cssClass = standardCssClass + " " + converted;
|
||||
if (converted.startsWith('.')) {
|
||||
if (converted && converted.startsWith('.')) {
|
||||
//its legacy so add some width/height
|
||||
treeNode.style = "height:16px;width:16px;";
|
||||
}
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
|
||||
.umb-node-preview__icon {
|
||||
display: flex;
|
||||
width: 25px;
|
||||
min-height: 25px;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div>
|
||||
<ng-form name="tabbedContentForm">
|
||||
<div class="umb-group-panel" retrive-dom-element="registerPropertyGroup(element[0], attributes.appAnchor)" data-app-anchor="{{group.id}}" data-element="group-{{group.alias}}" ng-repeat="group in content.tabs track by group.label">
|
||||
<div class="umb-group-panel" retrive-dom-element="registerPropertyGroup(element[0], attributes.appAnchor)" data-app-anchor="{{group.id}}" data-element="group-{{group.alias}}" ng-repeat="group in content.tabs track by group.id">
|
||||
|
||||
<div class="umb-group-panel__header">
|
||||
<div id="group-{{group.id}}">{{ group.label }}</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<ng-form name="elementTypeContentForm">
|
||||
<div class="umb-group-panel"
|
||||
data-element="group-{{group.alias}}"
|
||||
ng-repeat="group in vm.model.variants[0].tabs track by group.label">
|
||||
ng-repeat="group in vm.model.variants[0].tabs track by group.id">
|
||||
|
||||
<div class="umb-group-panel__header">
|
||||
<div id="group-{{group.id}}">{{ group.label }}</div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="umb-package-details">
|
||||
<div class="umb-package-details__main-content">
|
||||
|
||||
<umb-box data-element="node-info-membership" ng-repeat="group in node.tabs| filter: {properties:{view:'readonlyvalue'}} track by group.label">
|
||||
<umb-box data-element="node-info-membership" ng-repeat="group in node.tabs| filter: {properties:{view:'readonlyvalue'}} track by group.id">
|
||||
|
||||
<div class="umb-group-panel__header">
|
||||
<div>{{ group.label }}</div>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
</label>
|
||||
|
||||
<umb-property-actions actions="vm.propertyActions"></umb-property-actions>
|
||||
<umb-property-actions ng-if="!vm.showInherit" actions="vm.propertyActions"></umb-property-actions>
|
||||
|
||||
<small class="control-description" ng-if="vm.property.description" ng-bind-html="vm.property.description | preserveNewLineInHtml"></small>
|
||||
</div>
|
||||
|
||||
@@ -1,85 +1,75 @@
|
||||
<div class="umb-node-preview" ng-class="{'umb-node-preview--sortable': sortable, 'umb-node-preview--unpublished': published === false }">
|
||||
<div class="flex"> <!-- div keeps icon and nodename from wrapping -->
|
||||
<umb-icon ng-if="icon" icon="{{icon}}" class="umb-node-preview__icon {{icon}}"></umb-icon>
|
||||
<umb-icon ng-if="icon" icon="{{icon}}" class="umb-node-preview__icon"></umb-icon>
|
||||
|
||||
<div class="umb-node-preview__content">
|
||||
|
||||
<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-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">
|
||||
<span>
|
||||
<span class="bold"><localize key="general_rights">Permissions</localize>:</span>
|
||||
<span ng-repeat="permission in permissions" class="umb-user-group-preview__permission">{{ permission.name }}</span>
|
||||
<span ng-repeat="permission in permissions" class="umb-user-group-preview__permission">{{permission.name}}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="umb-node-preview__actions">
|
||||
<!-- If editUrl has a value we render a link otherwise a button-->
|
||||
<a
|
||||
class="umb-node-preview__action"
|
||||
title="Edit {{name}}"
|
||||
ng-href="{{editUrl}}"
|
||||
ng-if="allowEdit && editUrl"
|
||||
ng-click="onEdit()"
|
||||
>
|
||||
|
||||
<!-- If editUrl has a value we render a link otherwise a button -->
|
||||
<a class="umb-node-preview__action"
|
||||
title="Edit {{name}}"
|
||||
ng-href="{{editUrl}}"
|
||||
ng-if="allowEdit && editUrl"
|
||||
ng-click="onEdit()">
|
||||
<localize key="general_edit">Edit</localize>
|
||||
<span class="sr-only">{{name}}</span>
|
||||
</a>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="umb-node-preview__action"
|
||||
title="Edit {{name}}"
|
||||
ng-if="allowEdit && !editUrl"
|
||||
ng-click="onEdit()"
|
||||
>
|
||||
<button type="button"
|
||||
class="umb-node-preview__action"
|
||||
title="Edit {{name}}"
|
||||
ng-if="allowEdit && !editUrl"
|
||||
ng-click="onEdit()">
|
||||
<localize key="general_edit">Edit</localize>
|
||||
<span class="sr-only">{{name}}...</span>
|
||||
</button>
|
||||
|
||||
<!-- If openUrl has a value we render a link otherwise a button-->
|
||||
<a
|
||||
class="umb-node-preview__action"
|
||||
title="Open {{name}}"
|
||||
ng-href="{{openUrl}}"
|
||||
ng-if="allowOpen && openUrl"
|
||||
ng-click="onOpen()"
|
||||
>
|
||||
<!-- If openUrl has a value we render a link otherwise a button -->
|
||||
<a class="umb-node-preview__action"
|
||||
title="Open {{name}}"
|
||||
ng-href="{{openUrl}}"
|
||||
ng-if="allowOpen && openUrl"
|
||||
ng-click="onOpen()">
|
||||
<localize key="general_open">Open</localize>
|
||||
<span class="sr-only">{{name}}</span>
|
||||
</a>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="umb-node-preview__action"
|
||||
title="Open {{name}}"
|
||||
ng-if="allowOpen && !openUrl"
|
||||
ng-click="onOpen()"
|
||||
>
|
||||
<button type="button"
|
||||
class="umb-node-preview__action"
|
||||
title="Open {{name}}"
|
||||
ng-if="allowOpen && !openUrl"
|
||||
ng-click="onOpen()">
|
||||
<localize key="general_open">Open</localize>
|
||||
<span class="sr-only">{{name}}...</span>
|
||||
</button>
|
||||
|
||||
<!-- If removeUrl has a value we render a link otherwise a button-->
|
||||
<a
|
||||
class="umb-node-preview__action umb-node-preview__action--red"
|
||||
title="Remove {{name}}"
|
||||
ng-href="{{removeUrl}}"
|
||||
ng-if="allowRemove && removeUrl"
|
||||
ng-click="onRemove()"
|
||||
>
|
||||
<!-- If removeUrl has a value we render a link otherwise a button -->
|
||||
<a class="umb-node-preview__action umb-node-preview__action--red"
|
||||
title="Remove {{name}}"
|
||||
ng-href="{{removeUrl}}"
|
||||
ng-if="allowRemove && removeUrl"
|
||||
ng-click="onRemove()">
|
||||
<localize key="general_remove">Remove</localize>
|
||||
<span class="sr-only">{{name}}</span>
|
||||
</a>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="umb-node-preview__action umb-node-preview__action--red"
|
||||
title="Remove {{name}}"
|
||||
ng-if="allowRemove && !removeUrl"
|
||||
ng-click="onRemove()"
|
||||
>
|
||||
<button type="button"
|
||||
class="umb-node-preview__action umb-node-preview__action--red"
|
||||
title="Remove {{name}}"
|
||||
ng-if="allowRemove && !removeUrl"
|
||||
ng-click="onRemove()">
|
||||
<localize key="general_remove">Remove</localize>
|
||||
<span class="sr-only">{{name}}</span>
|
||||
</button>
|
||||
|
||||
@@ -12,7 +12,7 @@ function DictionaryCreateController($scope, $location, dictionaryResource, navig
|
||||
|
||||
vm.itemKey = "";
|
||||
vm.createItem = createItem;
|
||||
|
||||
$scope.$emit("$changeTitle", "");
|
||||
function createItem() {
|
||||
|
||||
if (formHelper.submitForm({ scope: $scope, formCtrl: $scope.createDictionaryForm })) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="form-horizontal" ng-controller="Umbraco.Editors.Media.Apps.ContentController as vm">
|
||||
<div class="umb-group-panel" data-element="group-{{group.alias}}" ng-repeat="group in content.tabs | filter: { hide : '!' + true } track by group.label">
|
||||
<div class="umb-group-panel" data-element="group-{{group.alias}}" ng-repeat="group in content.tabs | filter: { hide : '!' + true } track by group.id">
|
||||
|
||||
<div class="umb-group-panel__header">
|
||||
<div>{{ group.label }}</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="form-horizontal" ng-controller="Umbraco.Editors.Member.Apps.ContentController as vm">
|
||||
|
||||
<div class="umb-group-panel" ng-repeat="group in content.tabs track by group.label">
|
||||
<div class="umb-group-panel" ng-repeat="group in content.tabs track by group.id">
|
||||
|
||||
<div class="umb-group-panel__header">
|
||||
<div>{{ group.label }}</div>
|
||||
|
||||
@@ -17,20 +17,20 @@
|
||||
|
||||
<li ng-repeat="template in model.value.templates" class="clearfix">
|
||||
|
||||
<div ng-click="vm.configureTemplate(template)" class="preview-rows layout">
|
||||
<button type="button" ng-click="vm.configureTemplate(template)" class="btn-reset preview-rows layout">
|
||||
|
||||
<div class="preview-row">
|
||||
<div class="preview-col"
|
||||
<span class="preview-row">
|
||||
<span class="preview-col"
|
||||
ng-class="{last:$last}"
|
||||
ng-repeat="section in template.sections | filter: vm.zeroWidthFilter"
|
||||
ng-style="{width: vm.percentage(section.grid) + '%', height: '60px', 'max-width': '100%'}">
|
||||
<div class="preview-cell"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="preview-cell"></span>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<div>
|
||||
{{template.name}} <br />
|
||||
<p>{{template.name}}</p>
|
||||
<button type="button" class="btn btn-small btn-link" ng-click="vm.deleteTemplate($index)">
|
||||
<i class="icon-delete red" aria-hidden="true"></i>
|
||||
<localize key="general_delete">Delete</localize>
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
<button type="button" class="btn btn-small btn-info" ng-click="vm.configureTemplate()">
|
||||
<i class="icon-add" aria-hidden="true"></i>
|
||||
<localize key="grid_addGridLayout" />
|
||||
<localize key="grid_addGridLayout">Add Grid Layout</localize>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -64,23 +64,23 @@
|
||||
|
||||
<li ng-repeat="layout in model.value.layouts" class="clearfix">
|
||||
|
||||
<div ng-click="vm.configureLayout(layout)" class="preview-rows columns">
|
||||
<button type="button" ng-click="vm.configureLayout(layout)" class="btn-reset preview-rows columns">
|
||||
|
||||
<div class="preview-row">
|
||||
<div class="preview-col"
|
||||
<span class="preview-row">
|
||||
<span class="preview-col"
|
||||
ng-class="{last:$last}"
|
||||
ng-repeat="area in layout.areas | filter: vm.zeroWidthFilter"
|
||||
ng-style="{width: vm.percentage(area.grid) + '%', 'max-width': '100%'}">
|
||||
|
||||
<div class="preview-cell">
|
||||
<p ng-show="area.maxItems > 0">{{area.maxItems}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="preview-cell">
|
||||
<span ng-show="area.maxItems > 0">{{area.maxItems}}</span>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<div>
|
||||
{{layout.label || layout.name}}<br />
|
||||
<p>{{layout.label || layout.name}}</p>
|
||||
<button type="button" class="btn btn-small btn-link" ng-click="vm.deleteLayout(layout, $index, $event)">
|
||||
<i class="icon-delete red" aria-hidden="true"></i>
|
||||
<localize key="general_delete">Delete</localize>
|
||||
@@ -126,7 +126,7 @@
|
||||
</ul>
|
||||
|
||||
<ul class="unstyled list-icons">
|
||||
<li>
|
||||
<li>
|
||||
<button type="button" ng-click="vm.editConfig()" class="btn-link">
|
||||
<i class="icon icon-settings-alt-2 turquoise" aria-hidden="true"></i>
|
||||
<localize key="general_edit">Edit</localize>
|
||||
@@ -155,7 +155,7 @@
|
||||
</ul>
|
||||
|
||||
<ul class="unstyled list-icons">
|
||||
<li>
|
||||
<li>
|
||||
<button type="button" ng-click="vm.editStyles()" class="btn-link">
|
||||
<i class="icon icon-settings-alt-2 turquoise" aria-hidden="true"></i>
|
||||
<localize key="general_edit">Edit</localize>
|
||||
|
||||
@@ -4,17 +4,24 @@ function iconPreValsController($scope, editorService) {
|
||||
$scope.model.value = "icon-list";
|
||||
}
|
||||
|
||||
let valueArray = $scope.model.value.split(' ');
|
||||
$scope.icon = valueArray[0];
|
||||
$scope.color = valueArray[1];
|
||||
|
||||
$scope.openIconPicker = function () {
|
||||
var iconPicker = {
|
||||
icon: $scope.model.value.split(' ')[0],
|
||||
color: $scope.model.value.split(' ')[1],
|
||||
icon: $scope.icon,
|
||||
color: $scope.color,
|
||||
submit: function (model) {
|
||||
if (model.icon) {
|
||||
if (model.color) {
|
||||
$scope.model.value = model.icon + " " + model.color;
|
||||
$scope.color = model.color;
|
||||
} else {
|
||||
$scope.model.value = model.icon;
|
||||
}
|
||||
}
|
||||
|
||||
$scope.icon = model.icon;
|
||||
$scope.iconForm.$setDirty();
|
||||
}
|
||||
editorService.close();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<div ng-controller="Umbraco.PrevalueEditors.IconPickerController">
|
||||
<ng-form data-element="editor-icon" name="iconForm">
|
||||
<div class="umb-panel-header-icon" ng-if="!hideIcon" ng-click="openIconPicker()" ng-class="{'-placeholder': model.value==='' || model.value===null}"
|
||||
<button type="button" class="btn-reset umb-panel-header-icon" ng-if="!hideIcon" ng-click="openIconPicker()" ng-class="{'-placeholder': model.value==='' || model.value===null}"
|
||||
title="{{model.value}}">
|
||||
<i class="icon {{model.value}}" aria-hidden="true" ng-if="model.value!=='' && model.value!==null"></i>
|
||||
<div class="umb-panel-header-icon-text" ng-if="model.value==='' || model.value===null">
|
||||
<localize key="settings_addIcon"></localize>
|
||||
</div>
|
||||
</div>
|
||||
<umb-icon icon="{{icon}}" class="{{color}}" ng-if="model.value !== '' && model.value !== null"></umb-icon>
|
||||
<span class="umb-panel-header-icon-text" ng-if="model.value === '' || model.value === null">
|
||||
<localize key="settings_addIcon">Add icon</localize>
|
||||
</span>
|
||||
</button>
|
||||
</ng-form>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user