diff --git a/.gitignore b/.gitignore index 8a6d0b9ca0..128694603c 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ src/Umbraco.Tests/App_Data/* src/Umbraco.Web.UI/[Mm]edia/* src/Umbraco.Web.UI/[Mm]aster[Pp]ages/* src/Umbraco.Web.UI/[Mm]acro[Ss]cripts/* +!src/Umbraco.Web.UI/[Mm]acro[Ss]cripts/[Ww]eb.[Cc]onfig src/Umbraco.Web.UI/[Xx]slt/* src/Umbraco.Web.UI/[Ii]mages/* src/Umbraco.Web.UI/[Ss]cripts/* diff --git a/README.md b/README.md index 1dd74a5cf6..91065214ad 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ Umbraco CMS =========== +##Note: Building version 7 from source## +If you're interested in using the source code and building version 7, make sure to read the [Belle ReadMe file](src/Umbraco.Web.UI.Client/README.md). Note that you can always [download a nightly build](http://nightly.umbraco.org/umbraco%207.0.0/) so you don't have to build the code yourself. + ## Watch a five minute introduction video ## [![ScreenShot](http://umbraco.com/images/whatisumbraco.png)](http://umbraco.org/help-and-support/video-tutorials/getting-started/what-is-umbraco) diff --git a/build/Build.bat b/build/Build.bat index ff11f0e7ab..27af8026d9 100644 --- a/build/Build.bat +++ b/build/Build.bat @@ -1,6 +1,6 @@ @ECHO OFF SET release=7.0.0 -SET comment= +SET comment=alpha SET version=%release% IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%) diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec index 009b47b89b..4bf105df18 100644 --- a/build/NuSpecs/UmbracoCms.Core.nuspec +++ b/build/NuSpecs/UmbracoCms.Core.nuspec @@ -1,8 +1,8 @@ - + UmbracoCms.Core - 6.1.2 + 7.0.0 Umbraco Cms Core Binaries Morten Christensen Umbraco HQ @@ -14,57 +14,58 @@ Contains the core assemblies needed to run Umbraco Cms en-US umbraco - + - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec index e84ebc8e2e..07ef412ce5 100644 --- a/build/NuSpecs/UmbracoCms.nuspec +++ b/build/NuSpecs/UmbracoCms.nuspec @@ -1,8 +1,8 @@ - + UmbracoCms - 6.1.2 + 7.0.0 Umbraco Cms Morten Christensen Umbraco HQ diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs index e15e365ba4..3e3564f38f 100644 --- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs @@ -23,7 +23,7 @@ namespace Umbraco.Core.Configuration /// Gets the version comment (like beta or RC). /// /// The version comment. - public static string CurrentComment { get { return ""; } } + public static string CurrentComment { get { return "alpha"; } } // Get the version of the umbraco.dll by looking at a class in that dll // Had to do it like this due to medium trust issues, see: http://haacked.com/archive/2010/11/04/assembly-location-and-medium-trust.aspx diff --git a/src/Umbraco.Core/Models/DataTypeDefinition.cs b/src/Umbraco.Core/Models/DataTypeDefinition.cs index 943bb134d9..6f7fac6db7 100644 --- a/src/Umbraco.Core/Models/DataTypeDefinition.cs +++ b/src/Umbraco.Core/Models/DataTypeDefinition.cs @@ -191,10 +191,14 @@ namespace Umbraco.Core.Models /// Id of the DataType control /// [DataMember] - [Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead")] + [Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead. This method will return a generated GUID for any property editor alias not explicitly mapped to a legacy ID")] public Guid ControlId { - get { return LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(_propertyEditorAlias, true).Value; } + get + { + return LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias( + _propertyEditorAlias, LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.GenerateId).Value; + } set { var alias = LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(value, true); diff --git a/src/Umbraco.Core/Models/PropertyType.cs b/src/Umbraco.Core/Models/PropertyType.cs index c5a703df67..c1526a9ffb 100644 --- a/src/Umbraco.Core/Models/PropertyType.cs +++ b/src/Umbraco.Core/Models/PropertyType.cs @@ -141,10 +141,14 @@ namespace Umbraco.Core.Models /// Gets of Sets the Id of the DataType control /// /// This is the Id of the actual DataType control - [Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead")] + [Obsolete("Property editor's are defined by a string alias from version 7 onwards, use the PropertyEditorAlias property instead. This method will return a generated GUID for any property editor alias not explicitly mapped to a legacy ID")] public Guid DataTypeId { - get { return LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias(_propertyEditorAlias, true).Value; } + get + { + return LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias( + _propertyEditorAlias, LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.GenerateId).Value; + } set { var alias = LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(value, true); diff --git a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/AlterCmsMacroPropertyTable.cs b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/AlterCmsMacroPropertyTable.cs index c93b095e69..77613dbd0d 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/AlterCmsMacroPropertyTable.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/AlterCmsMacroPropertyTable.cs @@ -23,8 +23,9 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven //change the type (keep the data) Alter.Table("cmsMacroProperty").AlterColumn("macroPropertyType").AsString(255); //rename the column + Alter.Table("cmsMacroProperty").AddColumn("editorAlias").AsString(255).NotNullable().WithDefaultValue(""); Rename.Column("macroPropertyType").OnTable("cmsMacroProperty").To("editorAlias"); - + Delete.Column("macroPropertyType").FromTable("cmsMacroProperty"); } public override void Down() diff --git a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/ChangeControlIdColumn.cs b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/ChangeControlIdColumn.cs index e2b3632622..c84d3f9d9f 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/ChangeControlIdColumn.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/ChangeControlIdColumn.cs @@ -12,7 +12,10 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven public override void Up() { Alter.Table("cmsDataType").AlterColumn("controlId").AsString(255); + Alter.Table("cmsDataType").AddColumn("propertyEditorAlias").AsString(255).NotNullable().WithDefaultValue(""); Rename.Column("controlId").OnTable("cmsDataType").To("propertyEditorAlias"); + + Delete.Column("controlId").FromTable("cmsDataType"); } public override void Down() diff --git a/src/Umbraco.Core/PropertyEditors/BackwardsCompatibleData.cs b/src/Umbraco.Core/PropertyEditors/BackwardsCompatibleData.cs new file mode 100644 index 0000000000..38726e4a49 --- /dev/null +++ b/src/Umbraco.Core/PropertyEditors/BackwardsCompatibleData.cs @@ -0,0 +1,42 @@ +using System; +using System.Xml; +using umbraco.interfaces; + +namespace Umbraco.Core.PropertyEditors +{ + + /// + /// This is used purelty to attempt to maintain some backwards compatibility with new property editors that don't have a + /// legacy property editor predecessor when developers are using the legacy APIs + /// + internal class BackwardsCompatibleData : IData + { + public int PropertyId { set; get; } + + public object Value { get; set; } + + + public XmlNode ToXMl(XmlDocument data) + { + //TODO: We need to get the xml property value converters in place, then this method will need to call in to that converter to + // get the xml, for now we're just creating a CDATA section with the raw value. + + var sValue = Value != null ? Value.ToString() : String.Empty; + return data.CreateCDataSection(sValue); + + } + + public void MakeNew(int PropertyId) + { + //DO nothing + } + + public void Delete() + { + throw new NotSupportedException( + typeof(IData) + + " is a legacy object and is not supported by runtime generated " + + " instances to maintain backwards compatibility with the legacy APIs. Consider upgrading your code to use the new Services APIs."); + } + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/PropertyEditors/BackwardsCompatibleDataType.cs b/src/Umbraco.Core/PropertyEditors/BackwardsCompatibleDataType.cs new file mode 100644 index 0000000000..0bee6322b3 --- /dev/null +++ b/src/Umbraco.Core/PropertyEditors/BackwardsCompatibleDataType.cs @@ -0,0 +1,62 @@ +using System; +using umbraco.interfaces; + +namespace Umbraco.Core.PropertyEditors +{ + + /// + /// This is used purelty to attempt to maintain some backwards compatibility with new property editors that don't have a + /// legacy property editor predecessor when developers are using the legacy APIs + /// + internal class BackwardsCompatibleDataType : IDataType + { + public Guid Id { get; private set; } + public string DataTypeName { get; private set; } + public IData Data { get; private set; } + public int DataTypeDefinitionId { get; set; } + + /// + /// Creates a runtime instance + /// + /// + /// + /// + /// + internal static BackwardsCompatibleDataType Create(string propEdAlias, Guid legacyId, int dataTypeDefId) + { + var dt = new BackwardsCompatibleDataType + { + Id = legacyId, + DataTypeName = propEdAlias, + DataTypeDefinitionId = dataTypeDefId, + Data = new BackwardsCompatibleData() + }; + + return dt; + } + + public IDataEditor DataEditor + { + get + { + throw new NotSupportedException( + typeof(IDataEditor) + + " is a legacy object and is not supported by runtime generated " + + typeof(IDataType) + + " instances to maintain backwards compatibility with the legacy APIs. Consider upgrading your code to use the new Services APIs."); + } + } + public IDataPrevalue PrevalueEditor + { + get + { + throw new NotSupportedException( + typeof(IDataPrevalue) + + " is a legacy object and is not supported by runtime generated " + + typeof(IDataType) + + " instances to maintain backwards compatibility with the legacy APIs. Consider upgrading your code to use the new Services APIs."); + } + } + + } +} \ No newline at end of file diff --git a/src/Umbraco.Core/PropertyEditors/LegacyPropertyEditorIdToAliasConverter.cs b/src/Umbraco.Core/PropertyEditors/LegacyPropertyEditorIdToAliasConverter.cs index e36b86b94c..53a4365244 100644 --- a/src/Umbraco.Core/PropertyEditors/LegacyPropertyEditorIdToAliasConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/LegacyPropertyEditorIdToAliasConverter.cs @@ -3,6 +3,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Data; using System.Linq; +using Umbraco.Core.Logging; namespace Umbraco.Core.PropertyEditors { @@ -14,6 +15,14 @@ namespace Umbraco.Core.PropertyEditors /// public static class LegacyPropertyEditorIdToAliasConverter { + + public enum NotFoundLegacyIdResponseBehavior + { + ThrowException, + ReturnNull, + GenerateId + } + /// /// The map consists of a key which is always the GUID (lowercase, no hyphens + alias (trimmed)) /// @@ -55,18 +64,27 @@ namespace Umbraco.Core.PropertyEditors /// Gets a legacy Id based on the alias /// /// - /// if set to true will throw an exception if the map isn't found + /// /// Returns the legacy GUID of a property editor if found, otherwise returns null - public static Guid? GetLegacyIdFromAlias(string alias, bool throwIfNotFound = false) + public static Guid? GetLegacyIdFromAlias(string alias, NotFoundLegacyIdResponseBehavior notFoundBehavior) { var found = _map.FirstOrDefault(x => x.Value.Item2 == alias); if (found.Equals(default(KeyValuePair>))) { - if (throwIfNotFound) + switch (notFoundBehavior) { - throw new ObjectNotFoundException("Could not find a map for a property editor with an alias of " + alias + ". Consider using the new business logic APIs instead of the old obsoleted ones."); + case NotFoundLegacyIdResponseBehavior.ThrowException: + throw new ObjectNotFoundException("Could not find a map for a property editor with an alias of " + alias + ". Consider using the new business logic APIs instead of the old obsoleted ones."); + case NotFoundLegacyIdResponseBehavior.ReturnNull: + return null; + case NotFoundLegacyIdResponseBehavior.GenerateId: + var generated = alias.EncodeAsGuid(); + CreateMap(generated, alias); + + LogHelper.Warn(typeof(LegacyPropertyEditorIdToAliasConverter), "A legacy GUID id was generated for property editor " + alias + ". This occurs when the legacy APIs are used and done to attempt to maintain backwards compatibility. Consider upgrading all code to use the new Services APIs instead to avoid any potential issues."); + + return generated; } - return null; } return found.Value.Item1; } diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 4373ba587d..bed09dda05 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -437,6 +437,8 @@ + + diff --git a/src/Umbraco.Tests/PropertyEditors/LegacyPropertyEditorIdToAliasConverterTests.cs b/src/Umbraco.Tests/PropertyEditors/LegacyPropertyEditorIdToAliasConverterTests.cs index d82ce6a259..f27b201005 100644 --- a/src/Umbraco.Tests/PropertyEditors/LegacyPropertyEditorIdToAliasConverterTests.cs +++ b/src/Umbraco.Tests/PropertyEditors/LegacyPropertyEditorIdToAliasConverterTests.cs @@ -28,7 +28,11 @@ namespace Umbraco.Tests.PropertyEditors var id = Guid.NewGuid(); LegacyPropertyEditorIdToAliasConverter.CreateMap(id, "test"); - Assert.AreEqual(id, LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias("test", true)); + Assert.AreEqual( + id, + LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias( + "test", + LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.ThrowException)); } [Test] @@ -37,7 +41,22 @@ namespace Umbraco.Tests.PropertyEditors var id = Guid.NewGuid(); LegacyPropertyEditorIdToAliasConverter.CreateMap(id, "test"); - Assert.AreEqual("test", LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId(id, true)); + Assert.AreEqual( + "test", + LegacyPropertyEditorIdToAliasConverter.GetAliasFromLegacyId( + id, + true)); + } + + [Test] + public void Can_Generate_Id_From_Missing_Alias() + { + var gen1 = LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias("Donotfindthisone", LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.GenerateId); + var gen2 = LegacyPropertyEditorIdToAliasConverter.GetLegacyIdFromAlias("Donotfindthisone", LegacyPropertyEditorIdToAliasConverter.NotFoundLegacyIdResponseBehavior.GenerateId); + + Assert.IsNotNull(gen1); + Assert.IsNotNull(gen2); + Assert.AreEqual(gen1, gen2); } [Test] diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/editors/umbcontentname.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/editors/umbcontentname.directive.js new file mode 100644 index 0000000000..5ccfeb047b --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/editors/umbcontentname.directive.js @@ -0,0 +1,46 @@ +/** +* @ngdoc directive +* @name umbraco.directives.directive:umbContentName +* @restrict E +* @function +* @description +* Used by editors that require naming an entity. Shows a textbox/headline with a required validator within it's own form. +**/ +angular.module("umbraco.directives") + .directive('umbContentName', function ($timeout) { + return { + require: "ngModel", + restrict: 'E', + replace: true, + templateUrl: 'views/directives/umb-content-name.html', + scope: { + placeholder: '@placeholder', + model: '=ngModel' + }, + link: function(scope, element, attrs, ngModel) { + + ngModel.$render = function(){ + $timeout(function(){ + if(scope.model === ""){ + scope.goEdit(); + } + }, 100); + }; + + scope.goEdit = function(){ + scope.editMode = true; + $timeout(function(){ + element.find("input").focus(); + }, 100); + }; + + scope.exitEdit = function(){ + scope.editMode = false; + + if(scope.model === ""){ + scope.model = "Empty..."; + } + }; + } + }; + }); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/localize.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/localize.directive.js new file mode 100644 index 0000000000..70c412465b --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/directives/localize.directive.js @@ -0,0 +1,20 @@ +angular.module("umbraco.directives") +.directive('localize', function ($log, localizationService) { + return { + restrict: 'E', + scope:{ + key: '@' + }, + replace: true, + link: function (scope, element, attrs) { + var key = scope.key; + if(key[0] === '#') + { + key = key.slice(1); + } + + var value = localizationService.getLocalizedString(key); + element.html(value); + } + }; +}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/umbcontentname.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/umbcontentname.directive.js deleted file mode 100644 index 3245950795..0000000000 --- a/src/Umbraco.Web.UI.Client/src/common/directives/umbcontentname.directive.js +++ /dev/null @@ -1,50 +0,0 @@ -/** -* @ngdoc directive -* @name umbraco.directives.directive:umbContentName -* @restrict E -* @function -* @description -* Used by editors that require naming an entity. Shows a textbox/headline with a required validator within it's own form. -**/ -angular.module("umbraco.directives") - .directive('umbContentName', function ($timeout) { - return { - require: "ngModel", - restrict: 'E', - replace: true, - templateUrl: 'views/directives/umb-content-name.html', - scope: { - placeholder: '@placeholder', - model: '=ngModel' - }, - link: function(scope, element, attrs, modelCtrl) { - - var input = $(element).find('input'); - var h1 = $(element).find('h1'); - input.hide(); - - - input.on("blur", function () { - //Don't hide the input field if there is no value in it - var val = input.val() || "empty"; - input.hide(); - - h1.text(val); - h1.show(); - }); - - - h1.on("click", function () { - h1.hide(); - input.show().focus(); - }); - - $timeout(function(){ - if(!scope.model){ - h1.hide(); - input.show().focus(); - } - }, 500); - } - }; - }); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js index ed4a539cba..9aa0d39040 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/entity.resource.js @@ -206,18 +206,19 @@ function entityResource($q, $http, umbRequestHelper) { * @methodOf umbraco.resources.entityResource * * @description - * Gets an array of entities, given a lucene query + * Gets an array of entities, given a lucene query and a type * * ##usage *
-         * entityResource.search("news")
+         * entityResource.search("news", "Media")
          *    .then(function(mediaArray) {
          *        var myDoc = mediaArray; 
          *        alert('they are here!');
          *    });
          * 
* - * @param {String} Query search query + * @param {String} Query search query + * @param {String} Type type of conten to search * @returns {Promise} resourcePromise object containing the entity array. * */ @@ -227,7 +228,7 @@ function entityResource($q, $http, umbRequestHelper) { $http.get( umbRequestHelper.getApiUrl( "entityApiBaseUrl", - "SearchMedia", + "Search", [{ query: query }, {type: type}])), 'Failed to retreive entity data for query ' + query); } diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/log.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/log.resource.js new file mode 100644 index 0000000000..69d8914e82 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/resources/log.resource.js @@ -0,0 +1,107 @@ +/** + * @ngdoc service + * @name umbraco.resources.logResource + * @description Retrives log history from umbraco + * + * + **/ +function logResource($q, $http, umbRequestHelper) { + + //the factory object returned + return { + + /** + * @ngdoc method + * @name umbraco.resources.userResource#getEntityLog + * @methodOf umbraco.resources.logResource + * + * @description + * Gets the log history for a give entity id + * + * ##usage + *
+         * logResource.getEntityLog(1234)
+         *    .then(function(log) {
+         *        alert('its here!');
+         *    });
+         * 
+ * + * @param {Int} id id of entity to return log history + * @returns {Promise} resourcePromise object containing the log. + * + */ + getEntityLog: function (id) { + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "logApiBaseUrl", + "GetEntityLog", + [{ id: id }])), + 'Failed to retreive user data for id ' + id); + }, + + /** + * @ngdoc method + * @name umbraco.resources.userResource#getUserLog + * @methodOf umbraco.resources.logResource + * + * @description + * Gets the current users' log history for a given type of log entry + * + * ##usage + *
+         * logResource.getUserLog("save", new Date())
+         *    .then(function(log) {
+         *        alert('its here!');
+         *    });
+         * 
+ * + * @param {String} type logtype to query for + * @param {DateTime} since query the log back to this date, by defalt 7 days ago + * @returns {Promise} resourcePromise object containing the log. + * + */ + getUserLog: function (type, since) { + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "logApiBaseUrl", + "GetCurrentUserLog", + [{ logtype: type, sinceDate: since }])), + 'Failed to retreive user data for id ' + id); + }, + + /** + * @ngdoc method + * @name umbraco.resources.userResource#getLog + * @methodOf umbraco.resources.logResource + * + * @description + * Gets the log history for a given type of log entry + * + * ##usage + *
+         * logResource.getLog("save", new Date())
+         *    .then(function(log) {
+         *        alert('its here!');
+         *    });
+         * 
+ * + * @param {String} type logtype to query for + * @param {DateTime} since query the log back to this date, by defalt 7 days ago + * @returns {Promise} resourcePromise object containing the log. + * + */ + getLog: function (type, since) { + return umbRequestHelper.resourcePromise( + $http.get( + umbRequestHelper.getApiUrl( + "logApiBaseUrl", + "GetLog", + [{ logtype: type, sinceDate: since }])), + 'Failed to retreive user data for id ' + id); + } + }; +} + +angular.module('umbraco.resources').factory('logResource', logResource); diff --git a/src/Umbraco.Web.UI.Client/src/common/services/localization.service.js b/src/Umbraco.Web.UI.Client/src/common/services/localization.service.js new file mode 100644 index 0000000000..b7b7b99b98 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/common/services/localization.service.js @@ -0,0 +1,84 @@ +angular.module('umbraco.services') +.factory('localizationService', function ($http, $q, $rootScope, $window, $filter, userService) { + var localize = { + // use the $window service to get the language of the user's browser + language: userService.getCurrentUser().locale, + // array to hold the localized resource string entries + dictionary:[], + // location of the resource file + url: "js/language.aspx", + // flag to indicate if the service hs loaded the resource file + resourceFileLoaded:false, + + // success handler for all server communication + successCallback:function (data) { + // store the returned array in the dictionary + localize.dictionary = data; + // set the flag that the resource are loaded + localize.resourceFileLoaded = true; + // broadcast that the file has been loaded + $rootScope.$broadcast('localizeResourcesUpdates'); + }, + + // allows setting of language on the fly + setLanguage: function(value) { + localize.language = value; + localize.initLocalizedResources(); + }, + + // allows setting of resource url on the fly + setUrl: function(value) { + localize.url = value; + localize.initLocalizedResources(); + }, + + // builds the url for locating the resource file + buildUrl: function() { + return '/i18n/resources-locale_' + localize.language + '.js'; + }, + + // loads the language resource file from the server + initLocalizedResources:function () { + var deferred = $q.defer(); + // build the url to retrieve the localized resource file + $http({ method:"GET", url:localize.url, cache:false }) + .then(function(response){ + localize.resourceFileLoaded = true; + localize.dictionary = response.data; + + $rootScope.$broadcast('localizeResourcesUpdates'); + + return deferred.resolve(localize.dictionary); + }, function(err){ + return deferred.reject("Something broke"); + }); + return deferred.promise; + }, + + // checks the dictionary for a localized resource string + getLocalizedString: function(value) { + if(localize.resourceFileLoaded){ + return _lookup(value); + }else{ + localize.initLocalizedResources().then(function(dic){ + return _lookup(value); + }); + } + }, + _lookup: function(value){ + var entry = localize.dictionary[value]; + if(entry){ + return entry; + } + return "[" + value + "]"; + } + + + }; + + // force the load of the resource file + localize.initLocalizedResources(); + + // return the local instance when called + return localize; + }); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/common/services/search.service.js b/src/Umbraco.Web.UI.Client/src/common/services/search.service.js index 2d74477de3..4f92417612 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/search.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/search.service.js @@ -1,39 +1,48 @@ angular.module('umbraco.services') -.factory('searchService', function () { +.factory('searchService', function ($q, $log, entityResource) { + var m = {results: []}; return { - search: function(term, section){ - return [ - { - section: "settings", - tree: "documentTypes", - matches:[ - { name: "News archive", path:"/News Archive", id: 1234, icon: "icon-list-alt", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 }, - { name: "Meta Data", path:"/Seo/Meta Data", id: 1234, icon: "icon-list-alt", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 }, - { name: "Dooo", path:"/Woop/dee/dooo", id: 1234, icon: "icon-list-alt red", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 } - - ] - }, - - { - section: "content", - tree: "content", - matches:[ - { name: "News", path:"/archive/news", id: 1234, icon: "icon-file", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 }, - { name: "Data types", path:"/Something/About/Data-Types", id: 1234, icon: "icon-file", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 }, - { name: "Dooo", path:"/Woop/dee/dooo", id: 1234, icon: "icon-file", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 } - ] - }, + results: m, + search: function(term){ + m.results.length = 0; - { - section: "developer", - tree: "macros", - matches:[ - { name: "Navigation", path:"/Macros/Navigation.xslt", id: 1234, icon: "icon-cogs", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 }, - { name: "List of stuff", path:"/Macros/Navigation.xslt", id: 1234, icon: "icon-cogs", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 }, - { name: "Something else", path:"/Macros/Navigation.xslt",id: 1234, icon: "icon-cogs", view: section + "/edit/" + 1234, children: [], expanded: false, level: 1 } - ] - } - ]; + var deferred = $q.defer(); + var i = 0; + + entityResource.search(term, "Document").then(function(data){ + $log.log(data); + + m.results.push({ + icon: "icon-document", + editor: "content/content/edit/", + matches: data + }); + i++; + + //deferred.notify(results); + + + if(i === 2){ + deferred.resolve(m); + } + }); + + entityResource.search(term, "Media").then(function(data){ + $log.log(data); + + m.results.push({ + icon: "icon-picture", + editor: "media/media/edit/", + matches: data + }); + i++; + + if(i === 2){ + deferred.resolve(m); + } + }); + + return deferred.promise; }, setCurrent: function(sectionAlias){ diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js index 13fe18e6a9..8616220008 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tinymce.service.js @@ -47,7 +47,7 @@ function tinyMceService(dialogService, $log, imageHelper, assetsService, $timeou */ createMediaPicker: function (editor, $scope) { editor.addButton('umbmediapicker', { - icon: 'media', + icon: 'custom icon-picture', tooltip: 'Media Picker', onclick: function () { dialogService.mediaPicker({ @@ -82,38 +82,6 @@ function tinyMceService(dialogService, $log, imageHelper, assetsService, $timeou }); }, - /** - * @ngdoc method - * @name umbraco.services.tinyMceService#createIconPicker - * @methodOf umbraco.services.tinyMceService - * - * @description - * Creates the umbrco insert icon tinymce plugin - * - * @param {Object} editor the TinyMCE editor instance - * @param {Object} $scope the current controller scope - */ - createIconPicker: function (editor, $scope) { - editor.addButton('umbiconpicker', { - icon: 'media', - tooltip: 'Icon Picker', - onclick: function () { - dialogService.open({ - show: true, template: "views/common/dialogs/iconpicker.html", scope: $scope, callback: function (c) { - - var data = { - style: 'font-size: 60px' - }; - - var i = editor.dom.createHTML('i', data); - tinyMCE.activeEditor.dom.addClass(i, c); - editor.insertContent(i); - } - }); - } - }); - }, - /** * @ngdoc method * @name umbraco.services.tinyMceService#createUmbracoMacro diff --git a/src/Umbraco.Web.UI.Client/src/common/services/util.service.js b/src/Umbraco.Web.UI.Client/src/common/services/util.service.js index 21e81d1ac3..baaa96e81c 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/util.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/util.service.js @@ -323,6 +323,9 @@ function iconHelper($q) { { oldIcon: ".sprTreeUserType", newIcon: "" }, */ + { oldIcon: "folder.png", newIcon: "icon-folder" }, + { oldIcon: "mediaphoto.gif", newIcon: "icon-picture" }, + { oldIcon: "mediafile.gif", newIcon: "icon-document" }, { oldIcon: ".sprTreeDeveloperCacheItem", newIcon: "icon-box" }, { oldIcon: ".sprTreeDeveloperCacheTypes", newIcon: "icon-box" }, diff --git a/src/Umbraco.Web.UI.Client/src/less/forms.less b/src/Umbraco.Web.UI.Client/src/less/forms.less index e74c0ddc20..b5396efc13 100644 --- a/src/Umbraco.Web.UI.Client/src/less/forms.less +++ b/src/Umbraco.Web.UI.Client/src/less/forms.less @@ -22,6 +22,11 @@ label.control-label { padding-top: 8px !important; } +.umb-status-label{ + color: @gray !important; + } + + .controls-row label{padding: 0px 10px 0px 10px; vertical-align: center} diff --git a/src/Umbraco.Web.UI.Client/src/less/grid.less b/src/Umbraco.Web.UI.Client/src/less/grid.less index 31d48f0b1b..dc2c1b5345 100644 --- a/src/Umbraco.Web.UI.Client/src/less/grid.less +++ b/src/Umbraco.Web.UI.Client/src/less/grid.less @@ -5,6 +5,7 @@ html, body { height: 100%; + overflow: hidden; } body { diff --git a/src/Umbraco.Web.UI.Client/src/less/hacks.less b/src/Umbraco.Web.UI.Client/src/less/hacks.less index 9cd96ccca4..3b1efd81ba 100644 --- a/src/Umbraco.Web.UI.Client/src/less/hacks.less +++ b/src/Umbraco.Web.UI.Client/src/less/hacks.less @@ -37,7 +37,7 @@ iframe, .content-column-body { border: none; } -/* ng-cloak support with requirejs */ +/* ng-cloak support with lazyloading */ [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak { display: none; } diff --git a/src/Umbraco.Web.UI.Client/src/less/main.less b/src/Umbraco.Web.UI.Client/src/less/main.less index 91f1d0c25c..7b823d407c 100644 --- a/src/Umbraco.Web.UI.Client/src/less/main.less +++ b/src/Umbraco.Web.UI.Client/src/less/main.less @@ -54,38 +54,7 @@ div.umb-codeeditor .umb-btn-toolbar { background: #f7f7f7 } -/* FILE UPLOAD*/ -.umb-fileupload .preview { - border-radius: 5px; - border: 1px solid #a0a0a0; - padding: 3px; - background: #efefef; - float: left; - margin-right: 30px; - margin-bottom: 30px -} -.umb-fileupload ul { - list-style: none; - vertical-align: middle; - margin-bottom: 0px -} -.umb-fileupload label { - vertical-align: middle; - padding-left: 7px; - font-weight: normal -} -.umb-fileupload .preview-file { - color: #666; - height: 45px; - width: 55px; - text-align: center; - text-transform: uppercase; - font-size: 10px; - padding-top: 27px -} -.umb-fileupload input { - font-size: 12px -} + /* MISC FORM ELEMENTS */ diff --git a/src/Umbraco.Web.UI.Client/src/less/panel.less b/src/Umbraco.Web.UI.Client/src/less/panel.less index e5187da1c6..bb3ead2808 100644 --- a/src/Umbraco.Web.UI.Client/src/less/panel.less +++ b/src/Umbraco.Web.UI.Client/src/less/panel.less @@ -21,8 +21,8 @@ top: 101px; left: 0px; right: 0px; - bottom: 20px; - position: relative; + bottom: 0px; + position: absolute; clear: both; } .umb-panel-body.no-header { @@ -63,16 +63,7 @@ h1.headline{height: 40px; padding: 30px 0 0 20px;} margin: -2px 0 0 0; } -.umb-headline-editor-wrapper input{ - display: none; - font-size: @fontSizeMedium -} - -.umb-headline-editor-wrapper h1.umb-headline-editor:hover, .umb-headline-editor-wrapper input { - border-bottom: 1px dashed @grayLight; -} - -.umb-headline-editor-wrapper input:focus { +.umb-headline-editor-wrapper input { background: none; border: none; width: auto; diff --git a/src/Umbraco.Web.UI.Client/src/less/property-editors.less b/src/Umbraco.Web.UI.Client/src/less/property-editors.less index 3b48484c10..ece90a861a 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -198,3 +198,39 @@ ul.color-picker li a { overflow: hidden; display: block; } + + + // + // File upload + // -------------------------------------------------- + .umb-fileupload .preview { + border-radius: 5px; + border: 1px solid #a0a0a0; + padding: 3px; + background: #efefef; + float: left; + margin-right: 30px; + margin-bottom: 30px + } + .umb-fileupload ul { + list-style: none; + vertical-align: middle; + margin-bottom: 0px + } + .umb-fileupload label { + vertical-align: middle; + padding-left: 7px; + font-weight: normal + } + .umb-fileupload .preview-file { + color: #666; + height: 45px; + width: 55px; + text-align: center; + text-transform: uppercase; + font-size: 10px; + padding-top: 27px + } + .umb-fileupload input { + font-size: 12px + } \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/tree.less b/src/Umbraco.Web.UI.Client/src/less/tree.less index 3111c5a944..750960407b 100644 --- a/src/Umbraco.Web.UI.Client/src/less/tree.less +++ b/src/Umbraco.Web.UI.Client/src/less/tree.less @@ -7,7 +7,6 @@ width: auto; display: block } - .umb-item-list li { display: block; width: auto; @@ -424,30 +423,6 @@ height:1px; } - -// Search -// ------------------------- -/* -.umb-search-field { - font-size: 12px; - width: 235px; - border-radius: 0 !important; - border-color: #f5f5f5; - padding: 5px 7px !important; - background: url(../img/applicationIcons/search.png) no-repeat 225px 8px #fff; - margin: 27px 20px 20px 20px; -} -*/ -#search-results h5 { - margin: 0px 0px 7px 20px; -} -#search-results ul { - list-style: none; - margin: 0px; - padding: 0px; - border-bottom: 1px solid #efefef -} - body.touch .umb-tree .icon{font-size: 17px;} body.touch .umb-tree ins{font-size: 14px; visibility: visible; padding: 7px;} body.touch .umb-tree li div { diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/contentpicker.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/contentpicker.controller.js index 06176cd6c0..305790a59d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/contentpicker.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/contentpicker.controller.js @@ -8,7 +8,6 @@ angular.module("umbraco").controller("Umbraco.Dialogs.ContentPickerController", args.event.preventDefault(); args.event.stopPropagation(); - eventsService.publish("Umbraco.Dialogs.ContentPickerController.Select", args).then(function(args){ if(dialogOptions && dialogOptions.multipicker){ diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/contentpicker.html b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/contentpicker.html index 75e9cf8a97..ebe9151b4f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/contentpicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/contentpicker.html @@ -1,13 +1,5 @@
-
-
-
- -
-
-
- -
+
+ +
\ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/mediapicker.html b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/mediapicker.html index bef16e2b72..d2d2113ad0 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/mediapicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/mediapicker.html @@ -42,7 +42,7 @@ data-file-upload="options" data-file-upload-progress="" data-ng-class="{'fileupl ng-show="showFolderInput" ng-model="newFolderName" ng-keyup="submitFolder($event)" - ng-blur="showFolderInput = false"> + on-blur="showFolderInput = false">
diff --git a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/treepicker.html b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/treepicker.html index bf61c6eeb8..01120accf8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/dialogs/treepicker.html +++ b/src/Umbraco.Web.UI.Client/src/views/common/dialogs/treepicker.html @@ -1,13 +1,5 @@
-
-
-
- -
-
-
- -
+
+ +
\ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/common/search.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/search.controller.js index 00fce48af6..162398e26f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/search.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/search.controller.js @@ -8,21 +8,21 @@ * */ function SearchController($scope, searchService, $log, navigationService) { + + var currentTerm = ""; + navigationService.ui.search = searchService.results; + $scope.deActivateSearch = function () { currentTerm = ""; }; $scope.performSearch = function (term) { if (term != undefined && term != currentTerm) { - if (term.length > 3) { navigationService.ui.selectedSearchResult = -1; navigationService.showSearch(); currentTerm = term; - navigationService.ui.searchResults = searchService.search(term, navigationService.currentSection); - } else { - navigationService.ui.searchResults = []; - } + searchService.search(term); } }; diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js index 8d04c4531c..3b8d9da4ba 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js @@ -6,7 +6,7 @@ * @description * The controller for the content editor */ -function ContentEditController($scope, $routeParams, contentResource, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, editorContextService) { +function ContentEditController($scope, $routeParams, $q, $timeout, $window, contentResource, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, editorContextService) { //initialize the file manager fileManager.clearFiles(); @@ -39,6 +39,8 @@ function ContentEditController($scope, $routeParams, contentResource, notificati //TODO: Need to figure out a way to share the saving and event broadcasting with all editors! $scope.saveAndPublish = function () { + + $scope.setStatus("Publishing..."); $scope.$broadcast("saving", { scope: $scope }); var currentForm = angularHelper.getRequiredCurrentForm($scope); @@ -68,7 +70,28 @@ function ContentEditController($scope, $routeParams, contentResource, notificati }); }; + $scope.preview = function(content){ + if(!content.id){ + $scope.save().then(function(data){ + $window.open('dialogs/preview.aspx?id='+data.id,'umbpreview'); + }); + }else{ + $window.open('dialogs/preview.aspx?id='+content.id,'umbpreview'); + } + }; + + $scope.setStatus = function(status){ + //add localization + $scope.status = status; + $timeout(function(){ + $scope.status = undefined; + }, 2500); + }; + $scope.save = function () { + var deferred = $q.defer(); + + $scope.setStatus("Saving..."); $scope.$broadcast("saving", { scope: $scope }); var currentForm = angularHelper.getRequiredCurrentForm($scope); @@ -86,6 +109,8 @@ function ContentEditController($scope, $routeParams, contentResource, notificati newContent: data, rebindCallback: contentEditingHelper.reBindChangedProperties($scope.content, data) }); + + deferred.resolve(data); }, function (err) { contentEditingHelper.handleSaveError({ @@ -93,7 +118,11 @@ function ContentEditController($scope, $routeParams, contentResource, notificati allNewProps: contentEditingHelper.getAllProps(err.data), allOrigProps: contentEditingHelper.getAllProps($scope.content) }); + + deferred.reject(err); }); + + return deferred.promise; }; } diff --git a/src/Umbraco.Web.UI.Client/src/views/content/create.html b/src/Umbraco.Web.UI.Client/src/views/content/create.html index 9ee6ec320f..2a0415a33a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/create.html @@ -17,7 +17,7 @@ - +
diff --git a/src/Umbraco.Web.UI.Client/src/views/content/edit.html b/src/Umbraco.Web.UI.Client/src/views/content/edit.html index 18cdfebb66..e7d120a9d5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/edit.html @@ -3,7 +3,6 @@ ng-show="loaded" ng-submit="save()"> -
@@ -13,13 +12,18 @@
+
-
- Preview page - data-hotkey="ctrl+s">Preview page +
+
+ +
+ Publish @@ -38,7 +42,6 @@ -
-
diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/dashboard.tabs.controller.js b/src/Umbraco.Web.UI.Client/src/views/dashboard/dashboard.tabs.controller.js index 09f0d64a82..3983777263 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/dashboard.tabs.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/dashboard.tabs.controller.js @@ -16,19 +16,66 @@ function startUpVideosDashboardController($scope, xmlhelper, $log, $http) { } angular.module("umbraco").controller("Umbraco.Dashboard.StartupVideosController", startUpVideosDashboardController); +function startupLatestEditsController($scope) { + +} +angular.module("umbraco").controller("Umbraco.Dashboard.StartupLatestEditsController", startupLatestEditsController); -function MediaFolderBrowserDashboardController($scope, xmlhelper, $log, userResource) { - //this is the model we will pass to the service - $scope.profile = {}; +function MediaFolderBrowserDashboardController($rootScope, $scope, assetsService, $routeParams, $timeout, $element, $location, umbRequestHelper, mediaResource, imageHelper) { + var dialogOptions = $scope.$parent.dialogOptions; - $scope.changePassword = function (p) { - userResource.changePassword(p.oldPassword, p.newPassword).then(function () { - $scope.passwordForm.$setValidity(true); - }, function () { - //this only happens if there is a wrong oldPassword sent along - $scope.passwordForm.oldpass.$setValidity("oldPassword", false); + $scope.filesUploading = []; + $scope.options = { + url: umbRequestHelper.getApiUrl("mediaApiBaseUrl", "PostAddFile"), + autoUpload: true, + disableImageResize: /Android(?!.*Chrome)|Opera/ + .test(window.navigator.userAgent), + previewMaxWidth: 200, + previewMaxHeight: 200, + previewCrop: true, + formData:{ + currentFolder: -1 + } + }; + + + $scope.loadChildren = function(){ + mediaResource.getChildren(-1) + .then(function(data) { + $scope.images = data.items; + }); + }; + + $scope.$on('fileuploadstop', function(event, files){ + $scope.loadChildren($scope.options.formData.currentFolder); + $scope.queue = []; + $scope.filesUploading = []; }); - } + + $scope.$on('fileuploadprocessalways', function(e,data) { + var i; + $scope.$apply(function() { + $scope.filesUploading.push(data.files[data.index]); + }); + }); + + // All these sit-ups are to add dropzone area and make sure it gets removed if dragging is aborted! + $scope.$on('fileuploaddragover', function(event, files) { + if (!$scope.dragClearTimeout) { + $scope.$apply(function() { + $scope.dropping = true; + }); + } else { + $timeout.cancel($scope.dragClearTimeout); + } + $scope.dragClearTimeout = $timeout(function () { + $scope.dropping = null; + $scope.dragClearTimeout = null; + }, 300); + }); + + //init load + $scope.loadChildren(); } angular.module("umbraco").controller("Umbraco.Dashboard.MediaFolderBrowserDashboardController", MediaFolderBrowserDashboardController); diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/default/StartupDashboardLastEdits.html b/src/Umbraco.Web.UI.Client/src/views/dashboard/default/StartupDashboardLastEdits.html new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Umbraco.Web.UI.Client/src/views/dashboard/media/mediafolderbrowser.html b/src/Umbraco.Web.UI.Client/src/views/dashboard/media/mediafolderbrowser.html index c4664280b0..f4e4499ae9 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dashboard/media/mediafolderbrowser.html +++ b/src/Umbraco.Web.UI.Client/src/views/dashboard/media/mediafolderbrowser.html @@ -1,3 +1,18 @@ -
- -
\ No newline at end of file +
+ + + + + + \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/umb-content-name.html b/src/Umbraco.Web.UI.Client/src/views/directives/umb-content-name.html index d98664bbf0..ccc96a99c3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/directives/umb-content-name.html +++ b/src/Umbraco.Web.UI.Client/src/views/directives/umb-content-name.html @@ -2,8 +2,15 @@ -

{{model}}

- {{model}} + + diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/umb-navigation.html b/src/Umbraco.Web.UI.Client/src/views/directives/umb-navigation.html index 7958387aef..2b9740d07e 100644 --- a/src/Umbraco.Web.UI.Client/src/views/directives/umb-navigation.html +++ b/src/Umbraco.Web.UI.Client/src/views/directives/umb-navigation.html @@ -43,7 +43,7 @@ @@ -54,18 +54,28 @@
-
Search results
-
diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/umb-tab-view.html b/src/Umbraco.Web.UI.Client/src/views/directives/umb-tab-view.html index 1ec66f37c0..157e02648d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/directives/umb-tab-view.html +++ b/src/Umbraco.Web.UI.Client/src/views/directives/umb-tab-view.html @@ -1,4 +1,4 @@ -
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/media/create.html b/src/Umbraco.Web.UI.Client/src/views/media/create.html index 668497eb7f..bd526ebc14 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/create.html @@ -1,4 +1,4 @@ -
+

Create a page under {{currentNode.name}}

@@ -17,7 +17,7 @@ - + diff --git a/src/Umbraco.Web.UI.Client/src/views/media/edit.html b/src/Umbraco.Web.UI.Client/src/views/media/edit.html index 20979c5495..d7857dcd16 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/edit.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/edit.html @@ -11,11 +11,12 @@
- -
- - +
+ +
+
+
diff --git a/src/Umbraco.Web.UI.Client/src/views/media/media.create.controller.js b/src/Umbraco.Web.UI.Client/src/views/media/media.create.controller.js index 6536a6d504..57ab8d9c5b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/media.create.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/media/media.create.controller.js @@ -9,7 +9,7 @@ function mediaCreateController($scope, $routeParams, mediaTypeResource, iconHelper) { mediaTypeResource.getAllowedTypes($scope.currentNode.id).then(function(data) { - $scope.allowedTypes = iconHelper.formatContentTypeThumbnails(data); + $scope.allowedTypes = iconHelper.formatContentTypeIcons(data); }); } diff --git a/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js index 121b172c32..d10da4d8bc 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/media/media.edit.controller.js @@ -6,7 +6,7 @@ * @description * The controller for the media editor */ -function mediaEditController($scope, $routeParams, mediaResource, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, editorContextService) { +function mediaEditController($scope, $routeParams, mediaResource, notificationsService, angularHelper, serverValidationManager, contentEditingHelper, fileManager, editorContextService, $timeout) { //initialize the file manager fileManager.clearFiles(); @@ -37,9 +37,19 @@ function mediaEditController($scope, $routeParams, mediaResource, notificationsS }); } - + + $scope.setStatus = function(status){ + //add localization + $scope.status = status; + $timeout(function(){ + $scope.status = undefined; + }, 2500); + }; + $scope.save = function () { + $scope.setStatus("Saving..."); + $scope.$broadcast("saving", { scope: $scope }); var currentForm = angularHelper.getRequiredCurrentForm($scope); diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js index 338d6adbdf..1cf64e286f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/rte/rte.controller.js @@ -81,9 +81,6 @@ angular.module("umbraco") //Create the insert media plugin tinyMceService.createMediaPicker(editor, $scope); - //Create the insert icon plugin - tinyMceService.createIconPicker(editor, $scope); - //Create the insert icon plugin tinyMceService.createInsertEmbeddedMedia(editor, $scope); diff --git a/src/Umbraco.Web.UI/MacroScripts/Web.config b/src/Umbraco.Web.UI/MacroScripts/Web.config new file mode 100644 index 0000000000..163957b32e --- /dev/null +++ b/src/Umbraco.Web.UI/MacroScripts/Web.config @@ -0,0 +1,57 @@ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Umbraco.Web.UI/config/Dashboard.Release.config b/src/Umbraco.Web.UI/config/Dashboard.Release.config index d393286ed8..433574958e 100644 --- a/src/Umbraco.Web.UI/config/Dashboard.Release.config +++ b/src/Umbraco.Web.UI/config/Dashboard.Release.config @@ -1,5 +1,6 @@  +
settings @@ -26,7 +27,11 @@ views/dashboard/developer/developerdashboardvideos.html + + /umbraco/dashboard/ExamineManagement.ascx +
+
media @@ -51,6 +56,7 @@
+
translator @@ -63,17 +69,17 @@ admin - views/dashboard/startupdashboardintro.html + views/dashboard/default/startupdashboardintro.html - views/dashboard/startupdashboardkits.html + views/dashboard/default/startupdashboardkits.html editor writer - views/dashboard/startupdashboardvideos.html + views/dashboard/default/startupdashboardvideos.html @@ -85,6 +91,7 @@
+
member @@ -101,13 +108,4 @@
- -
- - developer - - - /umbraco/dashboard/ExamineManagement.ascx - -
\ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/Dashboard.config b/src/Umbraco.Web.UI/config/Dashboard.config index 03c15552a6..b8cbbe0838 100644 --- a/src/Umbraco.Web.UI/config/Dashboard.config +++ b/src/Umbraco.Web.UI/config/Dashboard.config @@ -1,5 +1,6 @@  +
settings @@ -13,7 +14,7 @@
- +
developer @@ -26,7 +27,11 @@ views/dashboard/developer/developerdashboardvideos.html + + /umbraco/dashboard/ExamineManagement.ascx +
+
media @@ -51,6 +56,7 @@
+
translator @@ -63,13 +69,17 @@ admin - views/dashboard/startupdashboardintro.html + views/dashboard/default/startupdashboardintro.html - views/dashboard/startupdashboardkits.html - editorwriter + views/dashboard/default/startupdashboardkits.html + + editor + writer + + - views/dashboard/startupdashboardvideos.html + views/dashboard/default/startupdashboardvideos.html @@ -81,6 +91,7 @@
+
member @@ -97,17 +108,4 @@
- -
- - developer - - - /umbraco/dashboard/ExamineManagement.ascx - -
-<<<<<<< HEAD -======= - ->>>>>>> d689ad488c8ef902054b47389a65412edf59c4e7
\ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/trees.Release.config b/src/Umbraco.Web.UI/config/trees.Release.config index e263be1c66..83d4d5ad1e 100644 --- a/src/Umbraco.Web.UI/config/trees.Release.config +++ b/src/Umbraco.Web.UI/config/trees.Release.config @@ -3,49 +3,49 @@ - + - + - + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - + + + - - - + + + - - + + + iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="10" />--> \ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/trees.config b/src/Umbraco.Web.UI/config/trees.config index e18f473875..12556c44e3 100644 --- a/src/Umbraco.Web.UI/config/trees.config +++ b/src/Umbraco.Web.UI/config/trees.config @@ -1,42 +1,51 @@  + - - + + + - - + + + - + - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + + - - - + + + + - - - + + + + - - + + + + iconClosed="icon-folder" iconOpen="icon-folder" sortOrder="10" />--> + \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/create/nodeType.ascx b/src/Umbraco.Web.UI/umbraco/create/nodeType.ascx index 751d88770d..bb498c0f0f 100644 --- a/src/Umbraco.Web.UI/umbraco/create/nodeType.ascx +++ b/src/Umbraco.Web.UI/umbraco/create/nodeType.ascx @@ -1,24 +1,30 @@ <%@ Control Language="c#" AutoEventWireup="True" Codebehind="nodeType.ascx.cs" Inherits="umbraco.cms.presentation.create.controls.nodeType" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%> -

Master Document Type:
- - -

+<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> -
<%=umbraco.ui.Text("name")%>: - *
- -
+ + + + + + + + + * + -
- -
+ + + -
+ + + <%=umbraco.ui.Text("cancel")%> + + \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/dashboard/LatestEdits.ascx b/src/Umbraco.Web.UI/umbraco/dashboard/LatestEdits.ascx index 48ad25fec3..bf4758cbfe 100644 --- a/src/Umbraco.Web.UI/umbraco/dashboard/LatestEdits.ascx +++ b/src/Umbraco.Web.UI/umbraco/dashboard/LatestEdits.ascx @@ -1,14 +1,11 @@ <%@ Control Language="c#" AutoEventWireup="True" Codebehind="LatestEdits.ascx.cs" Inherits="dashboardUtilities.LatestEdits" %> <%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %> - - -
-

<%=umbraco.ui.Text("defaultdialogs", "lastEdited")%>

- Umbraco - - - <%# PrintNodeName(DataBinder.Eval(Container.DataItem, "NodeId"), DataBinder.Eval(Container.DataItem, "datestamp")) %> - - -
+

<%=umbraco.ui.Text("defaultdialogs", "lastEdited")%>

+ \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/members/EditMemberType.aspx b/src/Umbraco.Web.UI/umbraco/members/EditMemberType.aspx index eb9cc90070..3e274b567f 100644 --- a/src/Umbraco.Web.UI/umbraco/members/EditMemberType.aspx +++ b/src/Umbraco.Web.UI/umbraco/members/EditMemberType.aspx @@ -1,5 +1,4 @@ - -<%@ Page language="c#" MasterPageFile="../masterpages/umbracoPage.Master" Codebehind="EditMemberType.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.members.EditMemberType" %> +<%@ Page Async="true" language="c#" MasterPageFile="../masterpages/umbracoPage.Master" Codebehind="EditMemberType.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.members.EditMemberType" %> <%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> <%@ Register TagPrefix="uc1" TagName="ContentTypeControlNew" Src="../controls/ContentTypeControlNew.ascx" %> <%@ Register Namespace="umbraco" TagPrefix="umb" Assembly="umbraco" %> diff --git a/src/Umbraco.Web.UI/umbraco/settings/EditMediaType.aspx b/src/Umbraco.Web.UI/umbraco/settings/EditMediaType.aspx index 28a6efe773..ab35ae3a63 100644 --- a/src/Umbraco.Web.UI/umbraco/settings/EditMediaType.aspx +++ b/src/Umbraco.Web.UI/umbraco/settings/EditMediaType.aspx @@ -1,6 +1,7 @@ <%@ Register TagPrefix="cc2" Namespace="umbraco.uicontrols" Assembly="controls" %> <%@ Page Language="c#" CodeBehind="EditMediaType.aspx.cs" MasterPageFile="../masterpages/umbracoPage.Master" + Async="true" AsyncTimeOut="300" AutoEventWireup="True" Inherits="umbraco.cms.presentation.settings.EditMediaType" %> <%@ Register TagPrefix="uc1" TagName="ContentTypeControlNew" Src="../controls/ContentTypeControlNew.ascx" %> diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoClientManager.js b/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoClientManager.js index e19acea068..99f1e83ee0 100644 --- a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoClientManager.js +++ b/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoClientManager.js @@ -130,15 +130,16 @@ Umbraco.Sys.registerNamespace("Umbraco.Application"); } this._debug("contentFrame: parsed location: " + strLocation); - var self = this; - window.setTimeout(function() { - if (typeof self.mainWindow().right != "undefined") { - self.mainWindow().right.location.href = strLocation; - } - else { - self.mainWindow().location.href = strLocation; //set the current windows location if the right frame doesn't exist int he current context - } - }, 200); + + if (!this.mainWindow().UmbClientMgr) { + window.setTimeout(function() { + var self = this; + self.mainWindow().location.href = strLocation; + }, 200); + } + else { + this.mainWindow().UmbClientMgr.contentFrame(strLocation); + } } }, reloadContentFrameUrlIfPathLoaded: function (url) { diff --git a/src/Umbraco.Web.UI/web.Template.Debug.config b/src/Umbraco.Web.UI/web.Template.Debug.config index ff98d7e712..a43ba6a739 100644 --- a/src/Umbraco.Web.UI/web.Template.Debug.config +++ b/src/Umbraco.Web.UI/web.Template.Debug.config @@ -50,6 +50,7 @@ + - + @@ -75,8 +75,7 @@ - - +