diff --git a/src/Umbraco.Web.UI.Client/src/canvasdesigner.loader.js b/src/Umbraco.Web.UI.Client/src/canvasdesigner.loader.js index 3e4dfe7f54..db9a5fb23c 100644 --- a/src/Umbraco.Web.UI.Client/src/canvasdesigner.loader.js +++ b/src/Umbraco.Web.UI.Client/src/canvasdesigner.loader.js @@ -9,7 +9,7 @@ LazyLoad.js([ '/Umbraco/js/umbraco.security.js', '/Umbraco/ServerVariables', '/Umbraco/lib/spectrum/spectrum.js', - 'http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js', + 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js', '/umbraco/js/canvasdesigner.panel.js', ], function () { jQuery(document).ready(function () { diff --git a/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.controller.js b/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.controller.js index 127d5882dc..477d1e5f5b 100644 --- a/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.controller.js +++ b/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.controller.js @@ -180,7 +180,7 @@ var app = angular.module("Umbraco.canvasdesigner", ['colorpicker', 'ui.slider', // TODO: special init for font family picker if (item.type == "googlefontpicker" && item.values.fontFamily) { var variant = item.values.fontWeight != "" || item.values.fontStyle != "" ? ":" + item.values.fontWeight + item.values.fontStyle : ""; - var gimport = "@import url('http://fonts.googleapis.com/css?family=" + item.values.fontFamily + variant + "');"; + var gimport = "@import url('https://fonts.googleapis.com/css?family=" + item.values.fontFamily + variant + "');"; if ($.inArray(gimport, parameters) < 0) { parameters.splice(0, 0, gimport); } @@ -412,7 +412,7 @@ var app = angular.module("Umbraco.canvasdesigner", ['colorpicker', 'ui.slider', var webFontScriptLoaded = false; var loadGoogleFont = function (font) { if (!webFontScriptLoaded) { - $.getScript('http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js') + $.getScript('https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js') .done(function () { webFontScriptLoaded = true; // Recursively call once webfont script is available. diff --git a/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.front.js b/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.front.js index 38a0878ca8..042d3ed89a 100644 --- a/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.front.js +++ b/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.front.js @@ -19,7 +19,7 @@ var refreshLayout = function (parameters) { var webFontScriptLoaded = false; var getFont = function (font) { if (!webFontScriptLoaded) { - $.getScript('http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js') + $.getScript('https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js') .done(function () { webFontScriptLoaded = true; // Recursively call once webfont script is available. diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js index 506bba8990..634f6eb4ec 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/validation/valformmanager.directive.js @@ -70,7 +70,7 @@ function valFormManager(serverValidationManager, $rootScope, $log, $timeout, not //This handles the 'unsaved changes' dialog which is triggered when a route is attempting to be changed but // the form has pending changes - unsubscribe.push($rootScope.$on('$locationChangeStart', function(event, nextLocation, currentLocation) { + var locationEvent = $rootScope.$on('$locationChangeStart', function(event, nextLocation, currentLocation) { if (!formCtrl.$dirty || isSavingNewItem) { return; } @@ -93,7 +93,9 @@ function valFormManager(serverValidationManager, $rootScope, $log, $timeout, not eventsService.emit("valFormManager.pendingChanges", true); } - })); + }); + unsubscribe.push(locationEvent); + //Ensure to remove the event handler when this instance is destroyted scope.$on('$destroy', function() { for (var u in unsubscribe) { 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 01430ac2ec..f34d45be63 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -422,12 +422,11 @@ ul.color-picker li a { } .umb-photo-folder .umb-non-thumbnail span{ + position: absolute; display: block; margin: auto; - /*vertically aligns */ - position: static; - top: 50%; - transform: translateY(-50%); + width: 100%; + top: 20px; } .umb-photo-folder .selected{ diff --git a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/changepassword/changepassword.html b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/changepassword/changepassword.html index c224d04fae..c6c9bb115f 100644 --- a/src/Umbraco.Web.UI.Client/src/views/propertyeditors/changepassword/changepassword.html +++ b/src/Umbraco.Web.UI.Client/src/views/propertyeditors/changepassword/changepassword.html @@ -20,29 +20,32 @@ - + val-server="oldPassword" no-dirty-check + autocomplete="off"/> Required - + val-server="value" + ng-minlength="{{$parent.model.config.minPasswordLength}}" no-dirty-check + autocomplete="off" /> Required Minimum {{$parent.model.config.minPasswordLength}} characters - + val-compare="password" no-dirty-check + autocomplete="off" /> Passwords must match diff --git a/src/Umbraco.Web/Editors/BackOfficeController.cs b/src/Umbraco.Web/Editors/BackOfficeController.cs index 09611cde26..96b56f58ca 100644 --- a/src/Umbraco.Web/Editors/BackOfficeController.cs +++ b/src/Umbraco.Web/Editors/BackOfficeController.cs @@ -91,7 +91,7 @@ namespace Umbraco.Web.Editors [HttpGet] public JsonNetResult LocalizedText(string culture = null) { - var cultureInfo = culture == null + var cultureInfo = string.IsNullOrWhiteSpace(culture) //if the user is logged in, get their culture, otherwise default to 'en' ? User.Identity.IsAuthenticated ? Security.CurrentUser.GetUserCulture(Services.TextService) diff --git a/src/Umbraco.Web/UmbracoModule.cs b/src/Umbraco.Web/UmbracoModule.cs index 2f71717a41..e32fdc3a83 100644 --- a/src/Umbraco.Web/UmbracoModule.cs +++ b/src/Umbraco.Web/UmbracoModule.cs @@ -562,6 +562,19 @@ namespace Umbraco.Web var httpContext = ((HttpApplication)sender).Context; LogHelper.Debug("Begin request: {0}.", () => httpContext.Request.Url); BeginRequest(new HttpContextWrapper(httpContext)); + + //disable asp.net headers (security) + try + { + httpContext.Response.Headers.Remove("Server"); + //this doesn't normally work since IIS sets it but we'll keep it here anyways. + httpContext.Response.Headers.Remove("X-Powered-By"); + } + catch (PlatformNotSupportedException ex) + { + // can't remove headers this way on IIS6 or cassini. + } + }; app.PostResolveRequestCache += (sender, e) => @@ -584,21 +597,6 @@ namespace Umbraco.Web DisposeHttpContextItems(httpContext); }; - //disable asp.net headers (security) - app.PreSendRequestHeaders += (sender, args) => - { - var httpContext = ((HttpApplication)sender).Context; - try - { - httpContext.Response.Headers.Remove("Server"); - //this doesn't normally work since IIS sets it but we'll keep it here anyways. - httpContext.Response.Headers.Remove("X-Powered-By"); - } - catch (PlatformNotSupportedException ex) - { - // can't remove headers this way on IIS6 or cassini. - } - }; } public void Dispose() diff --git a/src/umbraco.cms/businesslogic/translation/Translation.cs b/src/umbraco.cms/businesslogic/translation/Translation.cs index 03348470e2..db9d4d4644 100644 --- a/src/umbraco.cms/businesslogic/translation/Translation.cs +++ b/src/umbraco.cms/businesslogic/translation/Translation.cs @@ -8,6 +8,7 @@ using umbraco.cms.businesslogic.language; using umbraco.cms.businesslogic.property; using umbraco.cms.businesslogic.task; using umbraco.cms.businesslogic.web; +using Umbraco.Core; using Umbraco.Core.IO; namespace umbraco.cms.businesslogic.translation @@ -96,10 +97,14 @@ namespace umbraco.cms.businesslogic.translation var props = d.GenericProperties; foreach (Property p in props) { - if (p.Value.GetType() == "".GetType()) + var asString = p.Value as string; + if (asString != null) { - if (p.Value.ToString().Trim() != "") - words += CountWordsInString(p.Value.ToString()); + var trimmed = asString.Trim(); + if (trimmed.IsNullOrWhiteSpace() == false) + { + words += CountWordsInString(trimmed); + } } }