diff --git a/build/Build.bat b/build/Build.bat index 7e6e418b26..0b30dc6a2e 100644 --- a/build/Build.bat +++ b/build/Build.bat @@ -47,19 +47,6 @@ ECHO Performing MSBuild and producing Umbraco binaries zip files ECHO Setting node_modules folder to hidden to prevent VS13 from crashing on it while loading the websites project attrib +h ..\src\Umbraco.Web.UI.Client\node_modules -ECHO Adding dummy files to include in the NuGet package so that empty folders actually get created -SET dummytext=This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. -ECHO %dummytext% > .\_BuildOutput\WebApp\App_Code\dummy.txt -ECHO %dummytext% > .\_BuildOutput\WebApp\App_Data\dummy.txt -ECHO %dummytext% > .\_BuildOutput\WebApp\App_Plugins\dummy.txt -ECHO %dummytext% > .\_BuildOutput\WebApp\css\dummy.txt -ECHO %dummytext% > .\_BuildOutput\WebApp\masterpages\dummy.txt -ECHO %dummytext% > .\_BuildOutput\WebApp\media\dummy.txt -ECHO %dummytext% > .\_BuildOutput\WebApp\scripts\dummy.txt -ECHO %dummytext% > .\_BuildOutput\WebApp\usercontrols\dummy.txt -ECHO %dummytext% > .\_BuildOutput\WebApp\Views\Partials\dummy.txt -ECHO %dummytext% > .\_BuildOutput\WebApp\Views\MacroPartials\dummy.txt - ECHO Adding Web.config transform files to the NuGet package REN .\_BuildOutput\WebApp\MacroScripts\Web.config Web.config.transform REN .\_BuildOutput\WebApp\Views\Web.config Web.config.transform diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec index a184b79d5d..1c035a4ffc 100644 --- a/build/NuSpecs/UmbracoCms.nuspec +++ b/build/NuSpecs/UmbracoCms.nuspec @@ -20,14 +20,8 @@ - - - - - - + - @@ -35,7 +29,7 @@ - + diff --git a/build/NuSpecs/tools/Readme.txt b/build/NuSpecs/tools/Readme.txt index d5121fe521..f020e1b70d 100644 --- a/build/NuSpecs/tools/Readme.txt +++ b/build/NuSpecs/tools/Readme.txt @@ -1,3 +1,4 @@ + _ _ __ __ ____ _____ _____ ____ | | | | \/ | _ \| __ \ /\ / ____/ __ \ | | | | \ / | |_) | |__) | / \ | | | | | | diff --git a/src/Umbraco.Web.UI.Client/bower.json b/src/Umbraco.Web.UI.Client/bower.json index 19e458cdbf..4f7a01e20e 100644 --- a/src/Umbraco.Web.UI.Client/bower.json +++ b/src/Umbraco.Web.UI.Client/bower.json @@ -34,7 +34,7 @@ "": "underscore-min.{js,map}" }, "jquery": { - "": "dist/jquery.min.{js,map}" + "": "jquery.min.{js,map}" }, "jquery-file-upload": { "": "**/jquery.{fileupload,fileupload-process,fileupload-angular,fileupload-image}.js" 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 18cfa77acd..e7a9712418 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 @@ -137,6 +137,32 @@ angular.module("umbraco.directives") }, 400); }); + + // pin toolbar to top of screen if we have focus and it scrolls off the screen + var pinToolbar = function () { + + var _toolbar = $(editor.editorContainer).find(".mce-toolbar"); + var toolbarHeight = _toolbar.height(); + + var _tinyMce = $(editor.editorContainer); + var tinyMceRect = _tinyMce[0].getBoundingClientRect(); + var tinyMceTop = tinyMceRect.top; + var tinyMceBottom = tinyMceRect.bottom; + + if (tinyMceTop < 100 && (tinyMceBottom > (100 + toolbarHeight))) { + _toolbar + .css("visibility", "visible") + .css("position", "fixed") + .css("top", "100px") + .css("margin-top", "0"); + } else { + _toolbar + .css("visibility", "visible") + .css("position", "absolute") + .css("top", "auto") + .css("margin-top", (-toolbarHeight - 2) + "px"); + } + }; //when we leave the editor (maybe) editor.on('blur', function (e) { @@ -152,6 +178,7 @@ angular.module("umbraco.directives") } _toolbar.css("visibility", "hidden"); + $('.umb-panel-body').off('scroll', pinToolbar); }); }); @@ -159,17 +186,12 @@ angular.module("umbraco.directives") editor.on('focus', function (e) { angularHelper.safeApply(scope, function () { - var _toolbar = $(editor.editorContainer) - .find(".mce-toolbar"); - if(scope.onFocus){ scope.onFocus(); } - var toolbarHeight = -_toolbar.height() - 2; - _toolbar - .css("visibility", "visible") - .css("margin-top", toolbarHeight + "px"); + pinToolbar(); + $('.umb-panel-body').on('scroll', pinToolbar); }); }); @@ -177,17 +199,12 @@ angular.module("umbraco.directives") editor.on('click', function (e) { angularHelper.safeApply(scope, function () { - var _toolbar = $(editor.editorContainer) - .find(".mce-toolbar"); - if(scope.onClick){ scope.onClick(); } - var toolbarHeight = -_toolbar.height() - 2; - _toolbar - .css("visibility", "visible") - .css("margin-top", toolbarHeight + "px"); + pinToolbar(); + $('.umb-panel-body').on('scroll', pinToolbar); }); }); diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/imaging/umbimagefolder.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/imaging/umbimagefolder.directive.js index baf533fa4c..10f4663588 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/imaging/umbimagefolder.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/imaging/umbimagefolder.directive.js @@ -4,7 +4,7 @@ * @restrict E * @function **/ -function umbImageFolder($rootScope, assetsService, $timeout, $log, umbRequestHelper, mediaResource, imageHelper) { +function umbImageFolder($rootScope, assetsService, $timeout, $log, umbRequestHelper, mediaResource, imageHelper, notificationsService) { return { restrict: 'E', replace: true, @@ -53,10 +53,9 @@ function umbImageFolder($rootScope, assetsService, $timeout, $log, umbRequestHel scope.images = data.items; }); } - - //when one is finished - scope.$on('fileuploaddone', function(e, data) { - scope.$apply(function() { + + function checkComplete(e, data) { + scope.$apply(function () { //remove the amount of files complete //NOTE: function is here instead of in the loop otherwise jshint blows up function findFile(file) { return file === data.files[i]; } @@ -66,13 +65,13 @@ function umbImageFolder($rootScope, assetsService, $timeout, $log, umbRequestHel } //when none are left resync everything - var remaining = _.filter(scope.files, function(file) { return file.completed !== true; }); + var remaining = _.filter(scope.files, function (file) { return file.completed !== true; }); if (remaining.length === 0) { scope.progress = 100; //just the ui transition isn't too abrupt, just wait a little here - $timeout(function() { + $timeout(function () { scope.progress = 0; scope.files = []; scope.uploading = false; @@ -88,7 +87,11 @@ function umbImageFolder($rootScope, assetsService, $timeout, $log, umbRequestHel } }); - + } + + //when one is finished + scope.$on('fileuploaddone', function(e, data) { + checkComplete(e, data); }); //This handler gives us access to the file 'preview', this is the only handler that makes this available for whatever reason @@ -100,6 +103,21 @@ function umbImageFolder($rootScope, assetsService, $timeout, $log, umbRequestHel }); }); + //This is a bit of a hack to check for server errors, currently if there's a non + //known server error we will tell them to check the logs, otherwise we'll specifically + //check for the file size error which can only be done with dodgy string checking + scope.$on('fileuploadfail', function (e, data) { + if (data.jqXHR.status === 500 && data.jqXHR.responseText.indexOf("Maximum request length exceeded") >= 0) { + notificationsService.error(data.errorThrown, "The image file size was too big, check with your site administrator to adjust the maximum size allowed"); + + } + else { + notificationsService.error(data.errorThrown, data.jqXHR.statusText); + } + + checkComplete(e, data); + }); + //This executes prior to the whole processing which we can use to get the UI going faster, //this also gives us the start callback to invoke to kick of the whole thing scope.$on('fileuploadadd', function(e, data) { diff --git a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js index 48254d0292..382c80c3e2 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/umbrequesthelper.service.js @@ -221,8 +221,14 @@ function umbRequestHelper($http, $q, umbDataFormatter, angularHelper, dialogServ //when there's a 500 (unhandled) error show a YSOD overlay if debugging is enabled. if (status >= 500 && status < 600) { - //show a ysod dialog - if (Umbraco.Sys.ServerVariables["isDebuggingEnabled"] === true) { + //This is a bit of a hack to check if the error is due to a file being uploaded that is too large, + // we have to just check for the existence of a string value but currently that is the best way to + // do this since it's very hacky/difficult to catch this on the server + if (data.indexOf("Maximum request length exceeded") >= 0) { + notificationsService.error("Server error", "The image file size was too big, check with your site administrator to adjust the maximum size allowed"); + } + else if (Umbraco.Sys.ServerVariables["isDebuggingEnabled"] === true) { + //show a ysod dialog dialogService.ysodDialog({ errorMsg: 'An error occurred', data: data diff --git a/src/Umbraco.Web.UI.Client/src/less/panel.less b/src/Umbraco.Web.UI.Client/src/less/panel.less index d9766e6f67..7fc2d061ea 100644 --- a/src/Umbraco.Web.UI.Client/src/less/panel.less +++ b/src/Umbraco.Web.UI.Client/src/less/panel.less @@ -160,8 +160,7 @@ border-top: 1px solid @grayLighter; padding: 10px 0 10px 0; - - margin-bottom: 17px; + position: fixed; bottom: 0px; left: 100px; diff --git a/src/Umbraco.Web.UI.Client/src/less/tree.less b/src/Umbraco.Web.UI.Client/src/less/tree.less index f6de10a0c6..b26778ef26 100644 --- a/src/Umbraco.Web.UI.Client/src/less/tree.less +++ b/src/Umbraco.Web.UI.Client/src/less/tree.less @@ -266,6 +266,10 @@ div.not-allowed > i.icon,div.not-allowed > a{ cursor: not-allowed; } +// override small icon color +.umb-tree li.current > div:before { + color: @blueLight; +} div.is-container:before{ content:"\e04e"; font-family: 'icomoon'; diff --git a/src/Umbraco.Web.UI.Client/src/less/variables.less b/src/Umbraco.Web.UI.Client/src/less/variables.less index 47b10a79b7..ec73e62c0c 100644 --- a/src/Umbraco.Web.UI.Client/src/less/variables.less +++ b/src/Umbraco.Web.UI.Client/src/less/variables.less @@ -23,6 +23,7 @@ // ------------------------- @blue: #2e8aea; @blueDark: #0064cd; +@blueLight: #add8e6; @green: #46a546; @red: #9d261d; @yellow: #ffc40d; diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js index e4cb4e380d..f802173a25 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js @@ -509,8 +509,11 @@ angular.module("umbraco") if(area.grid > 0){ var currentArea = row.areas[areaIndex]; - area.config = currentArea.config; - area.styles = currentArea.styles; + + if (currentArea) { + area.config = currentArea.config; + area.styles = currentArea.styles; + } //copy over existing controls into the new areas if(row.areas.length > areaIndex && row.areas[areaIndex].controls){ diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index dbcac1a893..cc91eac23e 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -891,6 +891,7 @@ + diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadPackager.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadPackager.cs index 534b952cdd..5df6cc6f2a 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadPackager.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadPackager.cs @@ -93,7 +93,7 @@ namespace umbraco /// The tree. public override void Render(ref XmlTree tree) { - string[,] items = { { "BrowseRepository.aspx", "Install from repository" }, { "CreatePackage.aspx", "Createdjjj Packages" }, { "installedPackages.aspx", "Installedjj packages" }, { "StarterKits.aspx", "Starter kit" }, { "installer.aspx", "Install local package" } }; + string[,] items = { { "BrowseRepository.aspx", "Install from repository" }, { "CreatePackage.aspx", "Created Packages" }, { "installedPackages.aspx", "Installed packages" }, { "StarterKits.aspx", "Starter kit" }, { "installer.aspx", "Install local package" } }; for (int i = 0; i <= items.GetUpperBound(0); i++) diff --git a/src/umbraco.cms/businesslogic/Dictionary.cs b/src/umbraco.cms/businesslogic/Dictionary.cs index 0d34da4615..94e5854243 100644 --- a/src/umbraco.cms/businesslogic/Dictionary.cs +++ b/src/umbraco.cms/businesslogic/Dictionary.cs @@ -69,6 +69,7 @@ namespace umbraco.cms.businesslogic { throw new ArgumentException("No key " + key + " exists in dictionary"); } + var item = DictionaryItems[key]; } public DictionaryItem(Guid id)