diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/grid/grid.rte.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/grid/grid.rte.directive.js index fd617a497e..18cfa77acd 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/grid/grid.rte.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/grid/grid.rte.directive.js @@ -65,6 +65,9 @@ angular.module("umbraco.directives") r.inline = "span"; r.classes = rule.selector.substring(1); }else if (rule.selector[0] === "#") { + //Even though this will render in the style drop down, it will not actually be applied + // to the elements, don't think TinyMCE even supports this and it doesn't really make much sense + // since only one element can have one id. r.inline = "span"; r.attributes = { id: rule.selector.substring(1) }; }else { diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/stylesheet.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/stylesheet.resource.js index f5eab4e902..36f2b4c591 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/stylesheet.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/stylesheet.resource.js @@ -36,36 +36,7 @@ function stylesheetResource($q, $http, umbRequestHelper) { "stylesheetApiBaseUrl", "GetAll")), 'Failed to retrieve stylesheets '); - }, - - /** - * @ngdoc method - * @name umbraco.resources.stylesheetResource#getRules - * @methodOf umbraco.resources.stylesheetResource - * - * @description - * Returns all defined child rules for a stylesheet with a given ID - * - * ##usage - *
- * stylesheetResource.getRules(2345)
- * .then(function(rules) {
- * alert('its here!');
- * });
- *
- *
- * @returns {Promise} resourcePromise object containing the rules.
- *
- */
- getRules: function (id) {
- return umbRequestHelper.resourcePromise(
- $http.get(
- umbRequestHelper.getApiUrl(
- "stylesheetApiBaseUrl",
- "GetRules",
- [{ id: id }])),
- 'Failed to retrieve stylesheets ');
- },
+ },
/**
* @ngdoc method
diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
index 9d755d7d3f..83c6c3e013 100644
--- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
+++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/contentpicker/contentpicker.controller.js
@@ -175,8 +175,11 @@ function contentPickerController($scope, dialogService, entityResource, editorSt
return d.id == id;
});
- entity.icon = iconHelper.convertFromLegacyIcon(entity.icon);
- $scope.renderModel.push({ name: entity.name, id: entity.id, icon: entity.icon });
+ if (entity) {
+ entity.icon = iconHelper.convertFromLegacyIcon(entity.icon);
+ $scope.renderModel.push({ name: entity.name, id: entity.id, icon: entity.icon });
+ }
+
});
diff --git a/src/Umbraco.Web/Editors/StylesheetController.cs b/src/Umbraco.Web/Editors/StylesheetController.cs
index 119d959263..d40f6f2290 100644
--- a/src/Umbraco.Web/Editors/StylesheetController.cs
+++ b/src/Umbraco.Web/Editors/StylesheetController.cs
@@ -11,6 +11,7 @@ using System.Web.Http;
using System.Web.Services.Description;
using Newtonsoft.Json.Linq;
using umbraco.cms.businesslogic.web;
+using Umbraco.Core;
using Umbraco.Core.IO;
using Umbraco.Web.Models.ContentEditing;
using Umbraco.Web.Mvc;
@@ -31,23 +32,13 @@ namespace Umbraco.Web.Editors
.Select(x =>
new Stylesheet() {
Name = x.Alias,
- Id = x.Id,
Path = x.VirtualPath
});
}
-
- //public IEnumerable