From 249015a0e9adc515ca6826e17c00b08202719de1 Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 11:02:40 +0200 Subject: [PATCH 01/16] Remove non-working doctype add link --- src/Umbraco.Web.UI.Client/src/views/content/create.html | 4 ++-- src/Umbraco.Web.UI.Client/src/views/media/create.html | 4 ++-- .../src/views/media/media.create.controller.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) 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/media/create.html b/src/Umbraco.Web.UI.Client/src/views/media/create.html index 5048af043a..bd526ebc14 100644 --- a/src/Umbraco.Web.UI.Client/src/views/media/create.html +++ b/src/Umbraco.Web.UI.Client/src/views/media/create.html @@ -17,7 +17,7 @@ - + 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); }); } From 08e21e36a6127217c89ac521d88cb77738c3ffef Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 11:03:01 +0200 Subject: [PATCH 02/16] minor styling updates --- .../src/common/services/util.service.js | 3 ++ src/Umbraco.Web.UI.Client/src/less/hacks.less | 2 +- src/Umbraco.Web.UI.Client/src/less/main.less | 33 +---------------- .../src/less/property-editors.less | 36 +++++++++++++++++++ src/Umbraco.Web.UI.Client/src/less/tree.less | 25 ------------- 5 files changed, 41 insertions(+), 58 deletions(-) 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/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/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 { From 1db94711f5807a61d68c1b718b11b5d753eac9e9 Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 11:21:10 +0200 Subject: [PATCH 03/16] tree icons updated --- .../umbraco.presentation/umbraco/Trees/loadLanguages.cs | 4 ++-- .../umbraco.presentation/umbraco/Trees/loadMediaTypes.cs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadLanguages.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadLanguages.cs index bbbad92f5a..7dd10e3755 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadLanguages.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadLanguages.cs @@ -61,8 +61,8 @@ function openDictionary() { xNode.NodeID = l.id.ToString(); //"language_" + l.id.ToString(); xNode.Text = l.FriendlyName; xNode.Action = "javascript:openLanguage(" + l.id + ");"; - xNode.Icon = "settingLanguage.gif"; - xNode.OpenIcon = "settingLanguage.gif"; + xNode.Icon = "icon-flag-alt"; + xNode.OpenIcon = "icon-flag-alt"; OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty); if (xNode != null) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMediaTypes.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMediaTypes.cs index 1f58cee995..da2d9a40ba 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMediaTypes.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadMediaTypes.cs @@ -52,10 +52,11 @@ function openMediaType(id) { xNode.NodeID = mediaType.Id.ToString(CultureInfo.InvariantCulture); xNode.Text = mediaType.Name; xNode.Action = string.Format("javascript:openMediaType({0});", mediaType.Id); - xNode.Icon = "settingDataType.gif"; - xNode.OpenIcon = "settingDataType.gif"; + xNode.Icon = "icon-item-arrangement"; + xNode.OpenIcon = "icon-item-arrangement"; xNode.Source = GetTreeServiceUrl(mediaType.Id); xNode.HasChildren = hasChildren; + if (hasChildren) { xNode.Icon = "settingMasterDataType.gif"; From ba838e893e5226f7ef9097820d298cf788fa123c Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 11:21:33 +0200 Subject: [PATCH 04/16] Polished nodetype dialog windows --- .../umbraco/create/nodeType.ascx | 44 +++++++++++-------- .../umbraco/create/nodeType.ascx.cs | 3 +- .../umbraco/create/nodeType.ascx.designer.cs | 13 +++++- .../umbraco/create/xslt.ascx | 8 ++-- 4 files changed, 42 insertions(+), 26 deletions(-) diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/nodeType.ascx b/src/Umbraco.Web/umbraco.presentation/umbraco/create/nodeType.ascx index 751d88770d..bb498c0f0f 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/nodeType.ascx +++ b/src/Umbraco.Web/umbraco.presentation/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/umbraco.presentation/umbraco/create/nodeType.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/nodeType.ascx.cs index ca89fdbb4a..ba73303dfb 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/nodeType.ascx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create/nodeType.ascx.cs @@ -23,12 +23,13 @@ namespace umbraco.cms.presentation.create.controls protected void Page_Load(object sender, System.EventArgs e) { sbmt.Text = ui.Text("create"); + pp_name.Text = ui.Text("name"); + if (!IsPostBack) { string nodeId = umbraco.helper.Request("nodeId"); if (String.IsNullOrEmpty(nodeId) || nodeId == "init") { - masterType.Attributes.Add("style", "width: 350px;"); masterType.Items.Add(new ListItem(ui.Text("none") + "...", "0")); foreach (cms.businesslogic.web.DocumentType dt in cms.businesslogic.web.DocumentType.GetAllAsList()) { diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/nodeType.ascx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/nodeType.ascx.designer.cs index 6fc02106f5..58a30d39aa 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/nodeType.ascx.designer.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create/nodeType.ascx.designer.cs @@ -31,13 +31,13 @@ namespace umbraco.cms.presentation.create.controls { protected global::System.Web.UI.WebControls.Literal masterTypePreDefined; /// - /// RequiredFieldValidator1 control. + /// pp_name control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; + protected global::umbraco.uicontrols.PropertyPanel pp_name; /// /// rename control. @@ -48,6 +48,15 @@ namespace umbraco.cms.presentation.create.controls { /// protected global::System.Web.UI.WebControls.TextBox rename; + /// + /// RequiredFieldValidator1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; + /// /// createTemplate control. /// diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/xslt.ascx b/src/Umbraco.Web/umbraco.presentation/umbraco/create/xslt.ascx index ffd1c9e07c..e3c6735fda 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/xslt.ascx +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/create/xslt.ascx @@ -2,13 +2,13 @@ <%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - + + * - + - + Clean From 812ed78cd972b5f062dfb0597a587cbbdd0a61eb Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 11:21:56 +0200 Subject: [PATCH 05/16] made mediatype editor async --- src/Umbraco.Web.UI/umbraco/settings/EditMediaType.aspx | 1 + .../umbraco/settings/EditDictionaryItem.aspx.cs | 1 + .../umbraco.presentation/umbraco/settings/EditMediaType.aspx | 1 + .../umbraco/settings/EditMediaType.aspx.designer.cs | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) 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/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs index d68117de12..b6165ac86c 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditDictionaryItem.aspx.cs @@ -39,6 +39,7 @@ namespace umbraco.settings uicontrols.Pane p = new uicontrols.Pane(); var save = Panel1.Menu.NewButton(); + save.Text = ui.Text("save"); save.Click += save_Click; save.ToolTip = ui.Text("save"); save.ID = "save"; diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditMediaType.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditMediaType.aspx index 28a6efe773..ab35ae3a63 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditMediaType.aspx +++ b/src/Umbraco.Web/umbraco.presentation/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/umbraco.presentation/umbraco/settings/EditMediaType.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditMediaType.aspx.designer.cs index e120177439..3bf60caa2c 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditMediaType.aspx.designer.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/settings/EditMediaType.aspx.designer.cs @@ -19,6 +19,6 @@ namespace umbraco.cms.presentation.settings { /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::umbraco.controls.ContentTypeControlNew ContentTypeControlNew1; + protected global::System.Web.UI.UserControl ContentTypeControlNew1; } } From 10b58fbd29817713a6db2ccc06bf67a7bcd3bf79 Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 11:22:26 +0200 Subject: [PATCH 06/16] Adds drag drop to media dashboard --- .../dashboard/dashboard.tabs.controller.js | 57 ++++++++++++++++++- .../dashboard/media/mediafolderbrowser.html | 21 ++++++- 2 files changed, 73 insertions(+), 5 deletions(-) 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 74149da018..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 @@ -21,8 +21,61 @@ function startupLatestEditsController($scope) { } angular.module("umbraco").controller("Umbraco.Dashboard.StartupLatestEditsController", startupLatestEditsController); -function MediaFolderBrowserDashboardController($scope) { - +function MediaFolderBrowserDashboardController($rootScope, $scope, assetsService, $routeParams, $timeout, $element, $location, umbRequestHelper, mediaResource, imageHelper) { + var dialogOptions = $scope.$parent.dialogOptions; + + $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/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 From c4984bffc7ef3a54e86f08cb4f6925901449d3bb Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 11:22:39 +0200 Subject: [PATCH 07/16] Nodetype create dialog --- .../umbraco/create/nodeType.ascx | 44 +++++++++++-------- 1 file changed, 25 insertions(+), 19 deletions(-) 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 From 23822a97efa94c386c03540943003a5a62585ee0 Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 11:23:03 +0200 Subject: [PATCH 08/16] fixes dialog legacy redirects --- .../Application/UmbracoClientManager.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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) { From dcb08250abd8d242fa53e3f743f1a2ec2e6a03c6 Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 11:23:38 +0200 Subject: [PATCH 09/16] Minor search visual tweaks --- build/Build.bat | 2 +- .../Configuration/UmbracoVersion.cs | 2 +- .../src/views/directives/umb-navigation.html | 30 +++++++++++++------ src/Umbraco.Web/Editors/EntityController.cs | 3 ++ src/Umbraco.Web/UmbracoContext.cs | 4 +-- 5 files changed, 28 insertions(+), 13 deletions(-) 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/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.Web.UI.Client/src/views/directives/umb-navigation.html b/src/Umbraco.Web.UI.Client/src/views/directives/umb-navigation.html index 8314ce4557..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 @@ -54,16 +54,28 @@
-
Search results
-
diff --git a/src/Umbraco.Web/Editors/EntityController.cs b/src/Umbraco.Web/Editors/EntityController.cs index 73208928ef..63782c4c55 100644 --- a/src/Umbraco.Web/Editors/EntityController.cs +++ b/src/Umbraco.Web/Editors/EntityController.cs @@ -36,6 +36,9 @@ namespace Umbraco.Web.Editors [HttpGet] public IEnumerable Search([FromUri] string query, UmbracoEntityTypes type) { + if (string.IsNullOrEmpty(query)) + return null; + switch (type) { case UmbracoEntityTypes.Document: diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs index f479cc3ac6..35896c9358 100644 --- a/src/Umbraco.Web/UmbracoContext.cs +++ b/src/Umbraco.Web/UmbracoContext.cs @@ -412,8 +412,8 @@ namespace Umbraco.Web return //StateHelper.Cookies.Preview.HasValue // has preview cookie HttpContext.Request.HasPreviewCookie() - && UmbracoUser != null // has user - && currentUrl.StartsWith(IOHelper.ResolveUrl(SystemDirectories.Umbraco)) == false; // is not in admin UI + && currentUrl.StartsWith(IOHelper.ResolveUrl(SystemDirectories.Umbraco)) == false + && UmbracoUser != null; // has user } private HttpRequestBase GetRequestFromContext() From 0c8a7f3466b573bacfff2b15050537afae9d4115 Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 11:35:59 +0200 Subject: [PATCH 10/16] Updates missing dashboard paths --- .../config/Dashboard.Release.config | 24 ++++++++----------- src/Umbraco.Web.UI/config/Dashboard.config | 6 ++--- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/Umbraco.Web.UI/config/Dashboard.Release.config b/src/Umbraco.Web.UI/config/Dashboard.Release.config index 0689c584d5..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,7 +91,7 @@
- +
member @@ -102,14 +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 5eef4294e3..b8cbbe0838 100644 --- a/src/Umbraco.Web.UI/config/Dashboard.config +++ b/src/Umbraco.Web.UI/config/Dashboard.config @@ -69,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 From 962bab088cff0311ab55f3878bfe7b0680617260 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Fri, 27 Sep 2013 12:00:36 +0200 Subject: [PATCH 11/16] Update nuspec files to get the correct dependencies with the correct versions --- build/NuSpecs/UmbracoCms.Core.nuspec | 105 ++++++++++++++------------- build/NuSpecs/UmbracoCms.nuspec | 4 +- 2 files changed, 55 insertions(+), 54 deletions(-) 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 From 540a28ea8b5a9753abe35e742c1f8dca8ef3e0ea Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 12:23:12 +0200 Subject: [PATCH 12/16] Fixes image upload extensions filters out disallowed converts images to mediaType=image everything else type = file --- src/Umbraco.Web/Editors/MediaController.cs | 23 +++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web/Editors/MediaController.cs b/src/Umbraco.Web/Editors/MediaController.cs index 8d1dd5c3c6..eff8106d31 100644 --- a/src/Umbraco.Web/Editors/MediaController.cs +++ b/src/Umbraco.Web/Editors/MediaController.cs @@ -29,6 +29,7 @@ using Umbraco.Web.WebApi.Filters; using umbraco; using umbraco.BusinessLogic.Actions; using Constants = Umbraco.Core.Constants; +using Umbraco.Core.Configuration; namespace Umbraco.Web.Editors { @@ -347,16 +348,24 @@ namespace Umbraco.Web.Editors foreach (var file in result.FileData) { var fileName = file.Headers.ContentDisposition.FileName.Trim(new[] { '\"' }); + var ext = fileName.Substring(fileName.LastIndexOf('.')+1).ToLower(); - var mediaService = ApplicationContext.Services.MediaService; - var f = mediaService.CreateMedia(fileName, parentId, Constants.Conventions.MediaTypes.Image); - - using (var fs = System.IO.File.OpenRead(file.LocalFileName)) + if (!UmbracoConfig.For.UmbracoSettings().Content.DisallowedUploadFiles.Contains(ext)) { - f.SetValue(Constants.Conventions.Media.File, fileName, fs); - } + var mediaType = Constants.Conventions.MediaTypes.File; - mediaService.Save(f); + if (UmbracoConfig.For.UmbracoSettings().Content.ImageFileTypes.Contains(ext)) + mediaType = Constants.Conventions.MediaTypes.Image; + + var mediaService = ApplicationContext.Services.MediaService; + var f = mediaService.CreateMedia(fileName, parentId, mediaType); + using (var fs = System.IO.File.OpenRead(file.LocalFileName)) + { + f.SetValue(Constants.Conventions.Media.File, fileName, fs); + } + + mediaService.Save(f); + } //now we can remove the temp file System.IO.File.Delete(file.LocalFileName); From f74b9f9071b5d3af15bbc8b28695a99b896f7371 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Fri, 27 Sep 2013 13:35:52 +0200 Subject: [PATCH 13/16] Renaming columns in SQL CE is a bit more elaborate.. --- .../Upgrades/TargetVersionSeven/AlterCmsMacroPropertyTable.cs | 3 ++- .../Upgrades/TargetVersionSeven/ChangeControlIdColumn.cs | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) 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() From f0692329b689675cee8550dad9b3a6755c5bd510 Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 13:36:59 +0200 Subject: [PATCH 14/16] Moved contentpicker button to bottom --- .../common/dialogs/contentpicker.controller.js | 1 - .../views/common/dialogs/contentpicker.html | 18 +++++++++--------- .../src/views/common/dialogs/treepicker.html | 18 +++++++++--------- 3 files changed, 18 insertions(+), 19 deletions(-) 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/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 From 840047335a43d40e85ef6d12d79e858e72cb94d3 Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 13:48:06 +0200 Subject: [PATCH 15/16] removes folder.gif references --- .../config/trees.Release.config | 58 +++++++++---------- .../umbraco/Trees/loadPackages.cs | 10 +--- .../umbraco/Trees/loadScripts.cs | 4 +- 3 files changed, 32 insertions(+), 40 deletions(-) diff --git a/src/Umbraco.Web.UI/config/trees.Release.config b/src/Umbraco.Web.UI/config/trees.Release.config index e263be1c66..67bb821825 100644 --- a/src/Umbraco.Web.UI/config/trees.Release.config +++ b/src/Umbraco.Web.UI/config/trees.Release.config @@ -2,50 +2,50 @@ - - + + - - + + - + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - + + + - - - + + + - - + + + iconClosed=".icon-folder" iconOpen=".icon-folder" sortOrder="10" />--> \ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadPackages.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadPackages.cs index 2b4e95b846..9fa426669b 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadPackages.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadPackages.cs @@ -135,15 +135,6 @@ namespace umbraco xNode.OpenIcon = "icon-folder"; xNode.NodeType = "packagesCategory" + cat.Id; tree.Add(xNode); - /* - XmlElement catElement = Tree.CreateElement("tree"); - catElement.SetAttribute("text", cat.Text); - //catElement.SetAttribute("menu", ""); - catElement.SetAttribute("icon", "folder.gif"); - catElement.SetAttribute("openIcon", "folder_o.gif"); - catElement.SetAttribute("nodeType", "packagesCategory" + cat.Id); - catElement.SetAttribute("action", "javascript:openPackageCategory('BrowseRepository.aspx?category=" + cat.Id + "&repoGuid=" + currentRepo.Guid + "');"); - root.AppendChild(catElement);*/ } } break; @@ -172,6 +163,7 @@ namespace umbraco set { m_app = value; } } + void ITree.Render(ref XmlDocument Tree) { m_packageType = HttpContext.Current.Request.QueryString["packageType"]; diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadScripts.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadScripts.cs index e5df6d330f..605ca14946 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadScripts.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadScripts.cs @@ -32,7 +32,7 @@ using Umbraco.Core; namespace umbraco { - [Tree(Constants.Applications.Settings, "scripts", "Scripts", "folder.gif", "folder_o.gif", sortOrder: 2)] + [Tree(Constants.Applications.Settings, "scripts", "Scripts", "icon-folder", "icon-folder", sortOrder: 2)] public class loadScripts : FileSystemTree { public loadScripts(string application) : base(application) { } @@ -76,7 +76,7 @@ namespace umbraco { xNode.Action = xNode.Action.Replace("openFile", "openScriptEditor"); xNode.Icon = "icon-code"; - xNode.OpenIcon = "icon.code"; + xNode.OpenIcon = "icon-code"; } From f456e5b83e330bb10eda14780d648188aa7412c8 Mon Sep 17 00:00:00 2001 From: perploug Date: Fri, 27 Sep 2013 14:21:06 +0200 Subject: [PATCH 16/16] One last icon class update in tree.config --- .../config/trees.Release.config | 58 ++++++++-------- src/Umbraco.Web.UI/config/trees.config | 67 +++++++++++-------- 2 files changed, 67 insertions(+), 58 deletions(-) diff --git a/src/Umbraco.Web.UI/config/trees.Release.config b/src/Umbraco.Web.UI/config/trees.Release.config index 67bb821825..83d4d5ad1e 100644 --- a/src/Umbraco.Web.UI/config/trees.Release.config +++ b/src/Umbraco.Web.UI/config/trees.Release.config @@ -2,50 +2,50 @@ - - + + - - + + - + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - - + + + - - - + + + - - + + + 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