From 1b9afc961bc2df8485d0785db8880e482cc15a09 Mon Sep 17 00:00:00 2001 From: Vincent Baaij Date: Thu, 25 Jun 2015 17:35:15 +0200 Subject: [PATCH 01/39] Fix for #U4-6171 Continuous Deployment from Visual Studio Online to Azure Websites not working as expected --- build/NuSpecs/build/UmbracoCms.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/NuSpecs/build/UmbracoCms.targets b/build/NuSpecs/build/UmbracoCms.targets index 024d8af7ad25..589cae02777f 100644 --- a/build/NuSpecs/build/UmbracoCms.targets +++ b/build/NuSpecs/build/UmbracoCms.targets @@ -1,13 +1,13 @@  - + $(MSBuildThisFileDirectory)..\UmbracoFiles\ - + From 7abbfbcfcc0cbe73ae022e9df479c4103d8490cf Mon Sep 17 00:00:00 2001 From: m_stodd Date: Fri, 18 Sep 2015 02:13:12 -0500 Subject: [PATCH 02/39] Setting UMB_CONTEXT with Domain "FALSE" Running Umbraco on localhost, Chrome does not handle received 'Set Cookie's with no domain. "FALSE" works as noted here: http://stackoverflow.com/questions/1134290/cookies-on-localhost-with-explicit-domain --- src/Umbraco.Web/Security/Identity/GetUserSecondsMiddleWare.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Security/Identity/GetUserSecondsMiddleWare.cs b/src/Umbraco.Web/Security/Identity/GetUserSecondsMiddleWare.cs index d909ff76e26a..f9b9fc0ca6e6 100644 --- a/src/Umbraco.Web/Security/Identity/GetUserSecondsMiddleWare.cs +++ b/src/Umbraco.Web/Security/Identity/GetUserSecondsMiddleWare.cs @@ -83,7 +83,7 @@ public override async Task Invoke(IOwinContext context) var cookieOptions = new CookieOptions { Path = "/", - Domain = _authOptions.CookieDomain, + Domain = _authOptions.CookieDomain ?? "FALSE", Expires = DateTime.Now.AddMinutes(_authOptions.LoginTimeoutMinutes), HttpOnly = true, Secure = _authOptions.CookieSecure == CookieSecureOption.Always From 22b8d41aeebb25c35a773dc3249e137a3709d7bf Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 15 Oct 2015 19:08:53 +0200 Subject: [PATCH 03/39] U4-5963 There should be no external request dependencies - updates nonodes, removes the font references that is never used, replaces the open sans font-reference with the one that we already have locally and uses it. --- .../src/assets/css/nonodes.style.min.css | 16 ++++++++++++++++ src/Umbraco.Web.UI/config/splashes/noNodes.aspx | 7 ------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/assets/css/nonodes.style.min.css b/src/Umbraco.Web.UI.Client/src/assets/css/nonodes.style.min.css index 68cc761e96de..5299a59c7ee6 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/css/nonodes.style.min.css +++ b/src/Umbraco.Web.UI.Client/src/assets/css/nonodes.style.min.css @@ -1 +1,17 @@ +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 400; + src: url('../fonts/opensans/OpenSans-Regular-webfont.eot'); + src: local('Open Sans'), local('OpenSans'), url('../fonts/opensans/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/opensans/OpenSans-Regular-webfont.ttf') format('truetype'), url('../fonts/opensans/OpenSans-Regular-webfont.svg#open_sansregular') format('svg'); +} + +@font-face { + font-family: 'Open Sans'; + font-style: normal; + font-weight: 600; + src: url('../fonts/opensans/OpenSans-Semibold-webfont.eot'); + src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url('../fonts/opensans/OpenSans-Semibold-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/opensans/OpenSans-Semibold-webfont.ttf') format('truetype'), url('../fonts/opensans/OpenSans-Semibold-webfont.svg#open_sanssemibold') format('svg'); +} + abbr,address,article,aside,audio,b,blockquote,body,canvas,caption,cite,code,dd,del,details,dfn,div,dl,dt,em,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,p,pre,q,samp,section,small,span,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,ul,var,video{margin:0;padding:0;outline:0;border:0;background:0 0;vertical-align:baseline;font-size:100%}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}nav ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}a{margin:0;padding:0;background:0 0;vertical-align:baseline;font-size:100%}ins{background-color:#ff9;color:#000;text-decoration:none}mark{background-color:#ff9;color:#000;font-weight:700;font-style:italic}del{text-decoration:line-through}abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help}table{border-spacing:0;border-collapse:collapse}hr{display:block;margin:1em 0;padding:0;height:1px;border:0;border-top:1px solid #ccc}input,select{vertical-align:middle}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,:after,:before{box-sizing:border-box}body,html{height:100%;width:100%;color:#fff;font-family:'Open Sans',sans-serif;font-weight:400;font-size:.9375em;line-height:1.5}h1{font-size:1.7em;margin:40px auto 10px;font-weight:700}h2{font-size:1.35em;margin:0 auto .4em;font-weight:700}h3{font-size:1em;font-weight:400;font-style:italic}p{font-size:1em;line-height:1.6}p+a{margin-top:1rem;display:inline-block}a,a:active,a:visited{text-decoration:none}.cta{margin:4.5em auto 1.5em;padding-bottom:4.5em}.button,.button:visited{padding:.9375em 1.875em;border-radius:.1em;font-weight:600;font-size:1.2em;background:#2e99f4;color:#fff;display:inline-block;border:none;transition:all 200ms ease-in-out}.button:hover,.button:visited:hover{border-bottom:none;background:#0c80e3}section{background:url(../img/nonodesbg.jpg) center center/cover;height:100%;width:100%;display:table;padding:3em 1.75em}section a,section a:focus,section a:visited{color:#46a5f5;font-size:1.1625em;border-bottom:1px solid transparent;transition:border-bottom 100ms ease-in-out}section a:focus:hover,section a:hover,section a:visited:hover{border-bottom:1px solid}section:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.17);background:linear-gradient(45deg,rgba(85,98,112,.1) 10%,rgba(255,107,107,.1) 95%);z-index:0}section article{display:table-cell;vertical-align:middle;margin:0 auto;text-align:center;position:relative;z-index:100}section article>div{max-width:60em;margin:0 auto}section .logo{background:url(../img/logo.png) no-repeat;width:91px;height:91px;margin:0 auto}section .row{overflow:hidden}section .row .col{text-align:left;width:100%}section .row .col:nth-child(2){margin-top:3em}@media screen and (min-width:48em){body,html{font-size:1em}h1{font-size:2.5em;margin:70px auto 0;letter-spacing:.5px}h2{font-size:1.4375em;margin:0 auto 1em}h3{font-size:1.2em}a{font-size:1.1rem;font-weight:600}p+a{margin-top:3rem}.cta{margin:7.5em auto 2.5em;border-bottom:1px solid rgba(255,255,255,.5);padding-bottom:7.5em}section{padding:0 15px}section .row .col{float:left;width:50%;padding-right:5%;display:inline-block}section .row .col:nth-child(2){padding-right:0;padding-left:5%;margin-top:0}.button{font-size:1.1625em}} \ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/splashes/noNodes.aspx b/src/Umbraco.Web.UI/config/splashes/noNodes.aspx index 625ee5a6532a..5e7f289d2f87 100644 --- a/src/Umbraco.Web.UI/config/splashes/noNodes.aspx +++ b/src/Umbraco.Web.UI/config/splashes/noNodes.aspx @@ -16,15 +16,8 @@ - - - - - From c2627f3a2a38bfd65b70de9e8af61e382c3152c4 Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 15 Oct 2015 19:17:47 +0200 Subject: [PATCH 04/39] removes strange parse feed method, what the heck is this? it isn't used so its removed --- .../src/common/services/xmlhelper.service.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/xmlhelper.service.js b/src/Umbraco.Web.UI.Client/src/common/services/xmlhelper.service.js index 03f1f6cbbe92..a8562c833e0d 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/xmlhelper.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/xmlhelper.service.js @@ -372,9 +372,6 @@ function xmlhelper($http) { fromJson: function (json) { var xml = x2js.json2xml_str(json); return xml; - }, - parseFeed: function (url) { - return $http.jsonp('//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=50&callback=JSON_CALLBACK&q=' + encodeURIComponent(url)); } }; } From 99e7f84f79da6abcd41a98273278d6448f88cc2e Mon Sep 17 00:00:00 2001 From: Shannon Date: Fri, 16 Oct 2015 13:36:10 +0200 Subject: [PATCH 05/39] Moves EnableCanvasDesigner to HtmlHelperRenderExtensions because it's for rendering html, obsoletes the old ones and fixes up the canvasdesigner to use the correct umbraco paths instead of hard coded absolute paths. --- src/Umbraco.Web/GridTemplateExtensions.cs | 10 +-- src/Umbraco.Web/HtmlHelperRenderExtensions.cs | 71 +++++++++++++++++-- src/Umbraco.Web/UmbracoHelper.cs | 59 +++++++-------- 3 files changed, 99 insertions(+), 41 deletions(-) diff --git a/src/Umbraco.Web/GridTemplateExtensions.cs b/src/Umbraco.Web/GridTemplateExtensions.cs index ca75552e513b..cf267897d46a 100644 --- a/src/Umbraco.Web/GridTemplateExtensions.cs +++ b/src/Umbraco.Web/GridTemplateExtensions.cs @@ -87,7 +87,7 @@ public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem, Html } - //[Obsolete("This should not be used, GetGridHtml methods accepting HtmlHelper as a parameter or GetGridHtml extensions on HtmlHelper should be used instead")] + [Obsolete("This should not be used, GetGridHtml methods accepting HtmlHelper as a parameter or GetGridHtml extensions on HtmlHelper should be used instead")] public static MvcHtmlString GetGridHtml(this IPublishedProperty property, string framework = "bootstrap3") { var asString = property.Value as string; @@ -97,13 +97,13 @@ public static MvcHtmlString GetGridHtml(this IPublishedProperty property, string return htmlHelper.GetGridHtml(property, framework); } - //[Obsolete("This should not be used, GetGridHtml methods accepting HtmlHelper as a parameter or GetGridHtml extensions on HtmlHelper should be used instead")] + [Obsolete("This should not be used, GetGridHtml methods accepting HtmlHelper as a parameter or GetGridHtml extensions on HtmlHelper should be used instead")] public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem) { return GetGridHtml(contentItem, "bodyText", "bootstrap3"); } - //[Obsolete("This should not be used, GetGridHtml methods accepting HtmlHelper as a parameter or GetGridHtml extensions on HtmlHelper should be used instead")] + [Obsolete("This should not be used, GetGridHtml methods accepting HtmlHelper as a parameter or GetGridHtml extensions on HtmlHelper should be used instead")] public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem, string propertyAlias) { Mandate.ParameterNotNullOrEmpty(propertyAlias, "propertyAlias"); @@ -111,7 +111,7 @@ public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem, stri return GetGridHtml(contentItem, propertyAlias, "bootstrap3"); } - //[Obsolete("This should not be used, GetGridHtml methods accepting HtmlHelper as a parameter or GetGridHtml extensions on HtmlHelper should be used instead")] + [Obsolete("This should not be used, GetGridHtml methods accepting HtmlHelper as a parameter or GetGridHtml extensions on HtmlHelper should be used instead")] public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem, string propertyAlias, string framework) { Mandate.ParameterNotNullOrEmpty(propertyAlias, "propertyAlias"); @@ -127,7 +127,7 @@ public static MvcHtmlString GetGridHtml(this IPublishedContent contentItem, stri return htmlHelper.GetGridHtml(contentItem, propertyAlias, framework); } - //[Obsolete("This shouldn't need to be used but because the obsolete extension methods above don't have access to the current HtmlHelper, we need to create a fake one, unfortunately however this will not pertain the current views viewdata, tempdata or model state so should not be used")] + [Obsolete("This shouldn't need to be used but because the obsolete extension methods above don't have access to the current HtmlHelper, we need to create a fake one, unfortunately however this will not pertain the current views viewdata, tempdata or model state so should not be used")] private static HtmlHelper CreateHtmlHelper(object model) { var cc = new ControllerContext diff --git a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs index 7ae519a44b62..918bf7284493 100644 --- a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs +++ b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs @@ -756,8 +756,7 @@ private static MvcForm RenderForm(this HtmlHelper htmlHelper, } #endregion - - + #region Wrap public static HtmlTagWrapper Wrap(this HtmlHelper html, string tag, string innerText, params IHtmlTagWrapper[] children) @@ -823,7 +822,71 @@ public static HtmlTagWrapper Wrap(this HtmlHelper html, bool visible, string tag return item; } - #endregion + #endregion + + #region canvasdesigner + + public static IHtmlString EnableCanvasDesigner(this HtmlHelper html, + UrlHelper url, + UmbracoContext umbCtx) + { + return html.EnableCanvasDesigner(url, umbCtx, string.Empty, string.Empty); + } + + public static IHtmlString EnableCanvasDesigner(this HtmlHelper html, + UrlHelper url, + UmbracoContext umbCtx, string canvasdesignerConfigPath) + { + return html.EnableCanvasDesigner(url, umbCtx, canvasdesignerConfigPath, string.Empty); + } + + public static IHtmlString EnableCanvasDesigner(this HtmlHelper html, + UrlHelper url, + UmbracoContext umbCtx, string canvasdesignerConfigPath, string canvasdesignerPalettesPath) + { + + var umbracoPath = url.Content(SystemDirectories.Umbraco); + + string previewLink = @"" + + @"" + + @"" + + @"" + + @""; + + string noPreviewLinks = @""; + + // Get page value + int pageId = umbCtx.PublishedContentRequest.UmbracoPage.PageID; + string[] path = umbCtx.PublishedContentRequest.UmbracoPage.SplitPath; + string result = string.Empty; + string cssPath = CanvasDesignerUtility.GetStylesheetPath(path, false); + + if (umbCtx.InPreviewMode) + { + canvasdesignerConfigPath = string.IsNullOrEmpty(canvasdesignerConfigPath) == false + ? canvasdesignerConfigPath + : string.Format("{0}/js/canvasdesigner.config.js", umbracoPath); + canvasdesignerPalettesPath = string.IsNullOrEmpty(canvasdesignerPalettesPath) == false + ? canvasdesignerPalettesPath + : string.Format("{0}/js/canvasdesigner.palettes.js", umbracoPath); + + if (string.IsNullOrEmpty(cssPath) == false) + result = string.Format(noPreviewLinks, cssPath) + Environment.NewLine; + + result = result + string.Format(previewLink, umbracoPath, canvasdesignerConfigPath, canvasdesignerPalettesPath, pageId); + } + else + { + // Get css path for current page + if (string.IsNullOrEmpty(cssPath) == false) + result = string.Format(noPreviewLinks, cssPath); + } + + return new HtmlString(result); + + } + + #endregion - } + } } diff --git a/src/Umbraco.Web/UmbracoHelper.cs b/src/Umbraco.Web/UmbracoHelper.cs index 35797a4432e4..6d5e33b239e2 100644 --- a/src/Umbraco.Web/UmbracoHelper.cs +++ b/src/Umbraco.Web/UmbracoHelper.cs @@ -14,6 +14,9 @@ using Umbraco.Web.Routing; using Umbraco.Web.Security; using System.Collections.Generic; +using System.IO; +using System.Web.Mvc; +using System.Web.Routing; using Umbraco.Core.Cache; namespace Umbraco.Web @@ -1170,52 +1173,44 @@ public string GetPreValueAsString(int id) #region canvasdesigner - public HtmlString EnableCanvasDesigner() + [Obsolete("Use EnableCanvasDesigner on the HtmlHelper extensions instead")] + public IHtmlString EnableCanvasDesigner() { return EnableCanvasDesigner(string.Empty, string.Empty); } - public HtmlString EnableCanvasDesigner(string canvasdesignerConfigPath) + [Obsolete("Use EnableCanvasDesigner on the HtmlHelper extensions instead")] + public IHtmlString EnableCanvasDesigner(string canvasdesignerConfigPath) { return EnableCanvasDesigner(canvasdesignerConfigPath, string.Empty); } - public HtmlString EnableCanvasDesigner(string canvasdesignerConfigPath, string canvasdesignerPalettesPath) + [Obsolete("Use EnableCanvasDesigner on the HtmlHelper extensions instead")] + public IHtmlString EnableCanvasDesigner(string canvasdesignerConfigPath, string canvasdesignerPalettesPath) { + var html = CreateHtmlHelper(""); + var urlHelper = new UrlHelper(UmbracoContext.HttpContext.Request.RequestContext); + return html.EnableCanvasDesigner(urlHelper, UmbracoContext, canvasdesignerConfigPath, canvasdesignerPalettesPath); + } - string previewLink = @"" + - @"" + - @"" + - @"" + - @""; - - string noPreviewLinks = @""; - - // Get page value - int pageId = UmbracoContext.PublishedContentRequest.UmbracoPage.PageID; - string[] path = UmbracoContext.PublishedContentRequest.UmbracoPage.SplitPath; - string result = string.Empty; - string cssPath = CanvasDesignerUtility.GetStylesheetPath(path, false); - - if (UmbracoContext.Current.InPreviewMode) + [Obsolete("This shouldn't need to be used but because the obsolete extension methods above don't have access to the current HtmlHelper, we need to create a fake one, unfortunately however this will not pertain the current views viewdata, tempdata or model state so should not be used")] + private HtmlHelper CreateHtmlHelper(object model) + { + var cc = new ControllerContext { - canvasdesignerConfigPath = !string.IsNullOrEmpty(canvasdesignerConfigPath) ? canvasdesignerConfigPath : "/umbraco/js/canvasdesigner.config.js"; - canvasdesignerPalettesPath = !string.IsNullOrEmpty(canvasdesignerPalettesPath) ? canvasdesignerPalettesPath : "/umbraco/js/canvasdesigner.palettes.js"; - - if (!string.IsNullOrEmpty(cssPath)) - result = string.Format(noPreviewLinks, cssPath) + Environment.NewLine; + RequestContext = UmbracoContext.HttpContext.Request.RequestContext + }; + var viewContext = new ViewContext(cc, new FakeView(), new ViewDataDictionary(model), new TempDataDictionary(), new StringWriter()); + var htmlHelper = new HtmlHelper(viewContext, new ViewPage()); + return htmlHelper; + } - result = result + string.Format(previewLink, canvasdesignerConfigPath, canvasdesignerPalettesPath, pageId); - } - else + [Obsolete("This shouldn't need to be used but because the obsolete extension methods above don't have access to the current HtmlHelper, we need to create a fake one, unfortunately however this will not pertain the current views viewdata, tempdata or model state so should not be used")] + private class FakeView : IView + { + public void Render(ViewContext viewContext, TextWriter writer) { - // Get css path for current page - if (!string.IsNullOrEmpty(cssPath)) - result = string.Format(noPreviewLinks, cssPath); } - - return new HtmlString(result); - } #endregion From 40cd07f3f47194fabd1bbdf5fbafcc7c63ffa51c Mon Sep 17 00:00:00 2001 From: Shannon Date: Fri, 16 Oct 2015 13:36:30 +0200 Subject: [PATCH 06/39] removes wide setting from canvas designer since it does not exist. --- .../src/canvasdesigner/config/canvasdesigner.config.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.config.js b/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.config.js index 699cd353a7ce..54a27cc41518 100644 --- a/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.config.js +++ b/src/Umbraco.Web.UI.Client/src/canvasdesigner/config/canvasdesigner.config.js @@ -9,11 +9,6 @@ var canvasdesignerConfig = { schema: "body", selector: "body", editors: [ - { - type: "wide", - category: "Dimension", - name: "Layout" - }, { type: "background", category: "Color", From b2f0a9f23d7019508df0b74500a4272f7f01e624 Mon Sep 17 00:00:00 2001 From: "TOXIC\\Tobbe" Date: Fri, 16 Oct 2015 14:07:19 +0200 Subject: [PATCH 07/39] Hoover a property in backend to get its alias --- .../src/views/directives/umb-property.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/directives/umb-property.html b/src/Umbraco.Web.UI.Client/src/views/directives/umb-property.html index 16432bc1c403..c6fddded8ce5 100644 --- a/src/Umbraco.Web.UI.Client/src/views/directives/umb-property.html +++ b/src/Umbraco.Web.UI.Client/src/views/directives/umb-property.html @@ -5,7 +5,7 @@
-