Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c6671f7f8e | |||
| 44c966bd44 |
+2
-10
@@ -1,7 +1,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
function ContentNodeInfoDirective($timeout, logResource, eventsService, userService, localizationService, dateHelper, editorService, redirectUrlsResource, overlayService, entityResource) {
|
||||
function ContentNodeInfoDirective($timeout, logResource, eventsService, userService, localizationService, dateHelper, editorService, redirectUrlsResource, overlayService) {
|
||||
|
||||
function link(scope) {
|
||||
|
||||
@@ -16,12 +16,8 @@
|
||||
scope.disableTemplates = Umbraco.Sys.ServerVariables.features.disabledFeatures.disableTemplates;
|
||||
scope.allowChangeDocumentType = false;
|
||||
scope.allowChangeTemplate = false;
|
||||
scope.allTemplates = [];
|
||||
|
||||
function onInit() {
|
||||
entityResource.getAll("Template").then(function (templates) {
|
||||
scope.allTemplates = templates;
|
||||
});
|
||||
|
||||
// set currentVariant
|
||||
scope.currentVariant = _.find(scope.node.variants, (v) => v.active);
|
||||
@@ -162,12 +158,8 @@
|
||||
}
|
||||
|
||||
scope.openTemplate = function () {
|
||||
var template = _.findWhere(scope.allTemplates, {alias: scope.node.template})
|
||||
if (!template) {
|
||||
return;
|
||||
}
|
||||
var templateEditor = {
|
||||
id: template.id,
|
||||
id: scope.node.templateId,
|
||||
submit: function (model) {
|
||||
editorService.close();
|
||||
},
|
||||
|
||||
+2
-19
@@ -1,7 +1,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
function EditorContentHeader(serverValidationManager, localizationService, editorState) {
|
||||
function EditorContentHeader(serverValidationManager) {
|
||||
|
||||
function link(scope, el, attr, ctrl) {
|
||||
|
||||
@@ -13,24 +13,7 @@
|
||||
if (!scope.serverValidationAliasField) {
|
||||
scope.serverValidationAliasField = "Alias";
|
||||
}
|
||||
|
||||
scope.isNew = scope.content.state == "NotCreated";
|
||||
|
||||
localizationService.localizeMany([
|
||||
scope.isNew ? "placeholders_a11yCreateItem" : "placeholders_a11yEdit",
|
||||
"placeholders_a11yName"]
|
||||
).then(function (data) {
|
||||
scope.a11yMessage = data[0];
|
||||
scope.a11yName = data[1];
|
||||
if (!scope.isNew) {
|
||||
scope.a11yMessage += " " + scope.content.name;
|
||||
|
||||
} else {
|
||||
var name = editorState.current.contentTypeName;
|
||||
scope.a11yMessage += " " + name;
|
||||
scope.a11yName = name + " " + scope.a11yName;
|
||||
}
|
||||
});
|
||||
|
||||
scope.vm = {};
|
||||
scope.vm.dropdownOpen = false;
|
||||
scope.vm.currentVariant = "";
|
||||
|
||||
+3
-1
@@ -16,7 +16,9 @@
|
||||
editor.moveRight = true;
|
||||
editor.level = 0;
|
||||
editor.styleIndex = 0;
|
||||
|
||||
|
||||
editor.infinityMode = true;
|
||||
|
||||
// push the new editor to the dom
|
||||
scope.editors.push(editor);
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@ angular.module("umbraco.directives")
|
||||
|
||||
// TODO: A lot of the code below should be shared between the grid rte and the normal rte
|
||||
|
||||
scope.isLoading = true;
|
||||
|
||||
var promises = [];
|
||||
|
||||
//To id the html textarea we need to use the datetime ticks because we can have multiple rte's per a single property alias
|
||||
@@ -91,6 +93,10 @@ angular.module("umbraco.directives")
|
||||
//custom initialization for this editor within the grid
|
||||
editor.on('init', function (e) {
|
||||
|
||||
// Used this init event - as opposed to property init_instance_callback
|
||||
// to turn off the loader
|
||||
scope.isLoading = false;
|
||||
|
||||
//force overflow to hidden to prevent no needed scroll
|
||||
editor.getBody().style.overflow = "hidden";
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ function entityResource($q, $http, umbRequestHelper) {
|
||||
* ##usage
|
||||
* <pre>
|
||||
* //get media by id
|
||||
* entityResource.getById(0, "Media")
|
||||
* entityResource.getEntityById(0, "Media")
|
||||
* .then(function(ent) {
|
||||
* var myDoc = ent;
|
||||
* alert('its here!');
|
||||
@@ -204,7 +204,7 @@ function entityResource($q, $http, umbRequestHelper) {
|
||||
* ##usage
|
||||
* <pre>
|
||||
* //Get templates for ids
|
||||
* entityResource.getByIds( [1234,2526,28262], "Template")
|
||||
* entityResource.getEntitiesByIds( [1234,2526,28262], "Template")
|
||||
* .then(function(templateArray) {
|
||||
* var myDoc = contentArray;
|
||||
* alert('they are here!');
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
z-index: @zIndexEditor;
|
||||
}
|
||||
|
||||
.umb-editor--infiniteMode {
|
||||
.umb-editor--infinityMode {
|
||||
transform: none;
|
||||
will-change: transform;
|
||||
transition: transform 400ms ease-in-out;
|
||||
|
||||
+1
-1
@@ -268,7 +268,7 @@ angular.module("umbraco")
|
||||
|
||||
// also make sure the node is not trashed
|
||||
if (nodePath.indexOf($scope.startNodeId.toString()) !== -1 && node.trashed === false) {
|
||||
$scope.gotoFolder({ id: $scope.lastOpenedNode, name: "Media", icon: "icon-folder", path: node.path });
|
||||
$scope.gotoFolder({ id: $scope.lastOpenedNode, name: "Media", icon: "icon-folder" });
|
||||
return true;
|
||||
} else {
|
||||
$scope.gotoFolder({ id: $scope.startNodeId, name: "Media", icon: "icon-folder" });
|
||||
|
||||
+16
-22
@@ -11,30 +11,24 @@
|
||||
<div class="flex items-center" style="flex: 1;">
|
||||
|
||||
<div id="nameField" class="umb-editor-header__name-and-description" style="flex: 1 1 auto;">
|
||||
<div>
|
||||
<p tabindex="0" class="sr-only">
|
||||
{{a11yMessage}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="umb-editor-header__name-wrapper">
|
||||
<label for="headerName" class="sr-only">{{a11yName}}</label>
|
||||
<ng-form name="headerNameForm">
|
||||
<input data-element="editor-name-field"
|
||||
type="text"
|
||||
class="umb-editor-header__name-input"
|
||||
localize="placeholder"
|
||||
placeholder="@placeholders_entername"
|
||||
name="headerName"
|
||||
id="headerName"
|
||||
ng-model="name"
|
||||
ng-class="{'name-is-empty': $parent.name===null || $parent.name===''}"
|
||||
ng-disabled="nameDisabled"
|
||||
umb-auto-focus
|
||||
val-server-field="{{serverValidationNameField}}"
|
||||
required
|
||||
aria-required="true"
|
||||
aria-invalid="{{contentForm.headerNameForm.headerName.$invalid ? true : false}}"
|
||||
autocomplete="off" maxlength="255" />
|
||||
<input
|
||||
data-element="editor-name-field"
|
||||
type="text"
|
||||
class="umb-editor-header__name-input"
|
||||
localize="placeholder"
|
||||
placeholder="@placeholders_entername"
|
||||
name="headerName"
|
||||
ng-model="name"
|
||||
ng-class="{'name-is-empty': $parent.name===null || $parent.name===''}"
|
||||
ng-disabled="nameDisabled"
|
||||
umb-auto-focus
|
||||
val-server-field="{{serverValidationNameField}}"
|
||||
required
|
||||
aria-required="true"
|
||||
aria-invalid="{{contentForm.headerNameForm.headerName.$invalid ? true : false}}"
|
||||
autocomplete="off" maxlength="255" />
|
||||
</ng-form>
|
||||
|
||||
<a ng-if="content.variants.length > 0 && hideChangeVariant !== true" class="umb-variant-switcher__toggle" href="" ng-click="vm.dropdownOpen = !vm.dropdownOpen" ng-class="{'--error': vm.errorsOnOtherVariants}">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
ng-class="{'umb-editor--small': model.size === 'small',
|
||||
'umb-editor--animating': model.animating,
|
||||
'--notInFront': model.inFront !== true,
|
||||
'umb-editor--infiniteMode': model.infiniteMode,
|
||||
'umb-editor--infinityMode': model.infinityMode,
|
||||
'moveRight': model.moveRight,
|
||||
'umb-editor--n0': model.styleIndex === 0,
|
||||
'umb-editor--n1': model.styleIndex === 1,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<div class="umb-rte"
|
||||
id="{{textAreaHtmlId}}">
|
||||
<div>
|
||||
<umb-load-indicator ng-if="isLoading"></umb-load-indicator>
|
||||
<div class="umb-rte" id="{{textAreaHtmlId}}" ng-style="{ visibility : isLoading ? 'hidden' : 'visible' }"></div>
|
||||
</div>
|
||||
|
||||
@@ -24,7 +24,7 @@ function ContentEditController($scope, $routeParams, contentResource) {
|
||||
$scope.page = $routeParams.page;
|
||||
$scope.isNew = infiniteMode ? $scope.model.create : $routeParams.create;
|
||||
//load the default culture selected in the main tree if any
|
||||
$scope.culture = $routeParams.cculture ? $routeParams.cculture : $routeParams.mculture;
|
||||
$scope.culture = $routeParams.cculture ? $routeParams.cculture : ($routeParams.mculture === "true");
|
||||
|
||||
//Bind to $routeUpdate which will execute anytime a location changes but the route is not triggered.
|
||||
//This is so we can listen to changes on the cculture parameter since that will not cause a route change
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
//TODO: What is this file? Is it used?? I don't think so
|
||||
var uSkyGridConfig = [
|
||||
{
|
||||
|
||||
|
||||
+1
-1
@@ -229,7 +229,7 @@ angular.module('umbraco').controller("Umbraco.PropertyEditors.MediaPickerControl
|
||||
|
||||
|
||||
$scope.sortableOptions = {
|
||||
disabled: !multiPicker,
|
||||
disabled: !$scope.isMultiPicker,
|
||||
items: "li:not(.add-wrapper)",
|
||||
cancel: ".unsortable",
|
||||
update: function (e, ui) {
|
||||
|
||||
-14
@@ -15,10 +15,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
$scope.canAdd = function () {
|
||||
return !$scope.model.docTypes || !$scope.model.value || $scope.model.value.length < $scope.model.docTypes.length;
|
||||
}
|
||||
|
||||
$scope.remove = function (index) {
|
||||
$scope.model.value.splice(index, 1);
|
||||
}
|
||||
@@ -61,20 +57,10 @@
|
||||
|
||||
ncResources.getContentTypes().then(function (docTypes) {
|
||||
$scope.model.docTypes = docTypes;
|
||||
|
||||
// Count doctype name occurrences
|
||||
var docTypeNameOccurrences = _.countBy(docTypes, 'name');
|
||||
|
||||
// Populate document type tab dictionary
|
||||
// And append alias to name if multiple doctypes have the same name
|
||||
docTypes.forEach(function (value) {
|
||||
$scope.docTypeTabs[value.alias] = value.tabs;
|
||||
|
||||
value.displayName = value.name;
|
||||
|
||||
if (docTypeNameOccurrences[value.name] > 1) {
|
||||
value.displayName += " (" + value.alias + ")";
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
+5
-5
@@ -23,7 +23,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<select id="{{model.alias}}_doctype_select"
|
||||
ng-options="dt.alias as dt.displayName for dt in selectableDocTypesFor(config) | orderBy: 'name'"
|
||||
ng-options="dt.alias as dt.name for dt in selectableDocTypesFor(config) | orderBy: 'name'"
|
||||
ng-model="config.ncAlias" required></select>
|
||||
</td>
|
||||
<td>
|
||||
@@ -35,17 +35,17 @@
|
||||
<input type="text" ng-model="config.nameTemplate" />
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-danger" ng-click="remove($index)">
|
||||
<a class="btn btn-danger" ng-click="remove($index)">
|
||||
<localize key="general_delete">Delete</localize>
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div>
|
||||
<button type="button" class="btn" ng-click="add()" ng-disabled="!canAdd()">
|
||||
<a class="btn" ng-click="add()">
|
||||
<localize key="general_add">Add</localize>
|
||||
</button>
|
||||
</a>
|
||||
<i class="icon icon-help-alt medium umb-nested-content__help-icon" ng-click="showHelpText = !showHelpText"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -57,7 +57,10 @@ angular.module("umbraco")
|
||||
var baseLineConfigObj = {
|
||||
maxImageSize: editorConfig.maxImageSize,
|
||||
width: width,
|
||||
height: height
|
||||
height: height,
|
||||
init_instance_callback: function(editor){
|
||||
$scope.isLoading = false;
|
||||
}
|
||||
};
|
||||
|
||||
angular.extend(baseLineConfigObj, standardConfig);
|
||||
@@ -84,9 +87,6 @@ angular.module("umbraco")
|
||||
$timeout(function () {
|
||||
tinymce.DOM.events.domLoaded = true;
|
||||
tinymce.init(baseLineConfigObj);
|
||||
|
||||
$scope.isLoading = false;
|
||||
|
||||
}, 200);
|
||||
}
|
||||
|
||||
|
||||
@@ -527,9 +527,6 @@
|
||||
<key alias="anchor">#value or ?key=value</key>
|
||||
<key alias="enterAlias">Enter alias...</key>
|
||||
<key alias="generatingAlias">Generating alias...</key>
|
||||
<key alias="a11yCreateItem">Create item</key>
|
||||
<key alias="a11yEdit">Edit</key>
|
||||
<key alias="a11yName">Name</key>
|
||||
</area>
|
||||
<area alias="editcontenttype">
|
||||
<key alias="createListView" version="7.2">Create custom list view</key>
|
||||
|
||||
@@ -530,9 +530,6 @@
|
||||
<key alias="anchor">#value or ?key=value</key>
|
||||
<key alias="enterAlias">Enter alias...</key>
|
||||
<key alias="generatingAlias">Generating alias...</key>
|
||||
<key alias="a11yCreateItem">Create item</key>
|
||||
<key alias="a11yEdit">Edit</key>
|
||||
<key alias="a11yName">Name</key>
|
||||
</area>
|
||||
<area alias="editcontenttype">
|
||||
<key alias="createListView" version="7.2">Create custom list view</key>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Persistence.Repositories;
|
||||
using Umbraco.Core.Services;
|
||||
|
||||
namespace Umbraco.Web.Cache
|
||||
@@ -9,13 +8,11 @@ namespace Umbraco.Web.Cache
|
||||
public sealed class TemplateCacheRefresher : CacheRefresherBase<TemplateCacheRefresher>
|
||||
{
|
||||
private readonly IdkMap _idkMap;
|
||||
private readonly IContentTypeCommonRepository _contentTypeCommonRepository;
|
||||
|
||||
public TemplateCacheRefresher(AppCaches appCaches, IdkMap idkMap, IContentTypeCommonRepository contentTypeCommonRepository)
|
||||
public TemplateCacheRefresher(AppCaches appCaches, IdkMap idkMap)
|
||||
: base(appCaches)
|
||||
{
|
||||
_idkMap = idkMap;
|
||||
_contentTypeCommonRepository = contentTypeCommonRepository;
|
||||
}
|
||||
|
||||
#region Define
|
||||
@@ -48,7 +45,6 @@ namespace Umbraco.Web.Cache
|
||||
// it has an associated template.
|
||||
ClearAllIsolatedCacheByEntityType<IContent>();
|
||||
ClearAllIsolatedCacheByEntityType<IContentType>();
|
||||
_contentTypeCommonRepository.ClearCache();
|
||||
|
||||
base.Remove(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user