diff --git a/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js b/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js index a73264b0f0..93e67ce874 100644 --- a/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js +++ b/src/Umbraco.Web.UI.Client/src/common/resources/content.resource.js @@ -86,11 +86,11 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) { /** * @ngdoc method - * @name umbraco.resources.contentResource#sort + * @name umbraco.resources.contentResource#move * @methodOf umbraco.resources.contentResource * * @description - * Sorts all children below a given parent node id, based on a collection of node-ids + * Moves a node underneath a new parentId * * ##usage *
@@ -98,7 +98,7 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) {
          *    .then(function() {
          *        alert("node was moved");
          *    }, function(err){
-         *      alert("node didnt move:" + err); 
+         *      alert("node didnt move:" + err.data.Message); 
          *    });
          * 
* @param {Object} args arguments object @@ -127,6 +127,49 @@ function contentResource($q, $http, umbDataFormatter, umbRequestHelper) { 'Failed to move content'); }, + /** + * @ngdoc method + * @name umbraco.resources.contentResource#copy + * @methodOf umbraco.resources.contentResource + * + * @description + * Copies a node underneath a new parentId + * + * ##usage + *
+         * contentResource.copy({ parentId: 1244, id: 123 })
+         *    .then(function() {
+         *        alert("node was copied");
+         *    }, function(err){
+         *      alert("node wasnt copy:" + err.data.Message); 
+         *    });
+         * 
+ * @param {Object} args arguments object + * @param {Int} args.idd the ID of the node to copy + * @param {Int} args.parentId the ID of the parent node to copy to + * @returns {Promise} resourcePromise object. + * + */ + copy: function (args) { + if (!args) { + throw "args cannot be null"; + } + if (!args.parentId) { + throw "args.parentId cannot be null"; + } + if (!args.id) { + throw "args.id cannot be null"; + } + + return umbRequestHelper.resourcePromise( + $http.post(umbRequestHelper.getApiUrl("contentApiBaseUrl", "PostCopy"), + { + parentId: args.parentId, + id: args.id + }), + 'Failed to copy content'); + }, + /** * @ngdoc method * @name umbraco.resources.contentResource#emptyRecycleBin diff --git a/src/Umbraco.Web.UI.Client/src/less/hacks.less b/src/Umbraco.Web.UI.Client/src/less/hacks.less index 1f83c0f686..5b6f0328ed 100644 --- a/src/Umbraco.Web.UI.Client/src/less/hacks.less +++ b/src/Umbraco.Web.UI.Client/src/less/hacks.less @@ -16,8 +16,9 @@ .umbracoDialog .umb-dialog-body .umb-pane{margin-left: 20px; margin-right: 20px; margin-top: 20px;} .umbracoDialog form{height: 100%;} -/*ensures dialogs doesnt have side-by-side labels */ -.umbracoDialog .controls-row, .umb-modal .controls-row{margin-left: 0px !important;} +/*ensures dialogs doesnt have side-by-side labels*/ +.umbracoDialog .controls-row, +.umb-modal .controls-row{margin-left: 0px !important;} .controls-row img { max-width: none; @@ -84,16 +85,4 @@ iframe, .content-column-body { .legacy-custom-file{ width: 16px; height: 16px; margin-right: 11px; display: inline-block; background-position: center center; -} - -/* TINYMCE OVERRIDES */ -.mce-tinymce{border: 1px solid @grayLight !important; } -.mce-panel{background: @grayLighter !important; border-color: @grayLight !important;} -.mce-btn-group, .mce-btn{border: none !important; background: none !important;} -.mce-ico{font-size: 12px !important; color: @blackLight !important;} -/* Special case to support helviticons for the tiny mce button controls */ -.mce-ico.mce-i-custom[class^="icon-"], -.mce-ico.mce-i-custom[class*=" icon-"] { - font-family: icomoon; - font-size:16px !important; } \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/less/modals.less b/src/Umbraco.Web.UI.Client/src/less/modals.less index 4f22006a00..a51c89c6cc 100644 --- a/src/Umbraco.Web.UI.Client/src/less/modals.less +++ b/src/Umbraco.Web.UI.Client/src/less/modals.less @@ -5,7 +5,6 @@ .umb-modalcolumn { background: white; border-left: #f6f6f6 1px solid; - white-space: nowrap } .umb-modalcolumn-header { @@ -13,10 +12,12 @@ border-bottom: 1px solid @grayLight; height: 79px; padding: 20px 20px 0px 20px; + white-space: nowrap } .umb-modalcolumn-header h1{ margin: 0; + white-space: nowrap; font-size: @fontSizeLarge; font-weight: 400; padding-top: 10px !important; @@ -83,7 +84,7 @@ right: 0px; bottom: 90px; } -.umb-dialog-body .umb-pane{margin-top: 0;} +.umb-dialog-body .umb-pane{margin-top: 15px;} .umb-dialog-footer{ border-top: #efefef 1px solid; 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 ece90a861a..e856a3855e 100644 --- a/src/Umbraco.Web.UI.Client/src/less/property-editors.less +++ b/src/Umbraco.Web.UI.Client/src/less/property-editors.less @@ -22,6 +22,21 @@ .umb-contentpicker li a:hover .hover-show{display: inline-block;} +// +// RTE +// -------------------------------------------------- +.mce-tinymce{border: 1px solid @grayLight !important; } +.mce-panel{background: @grayLighter !important; border-color: @grayLight !important;} +.mce-btn-group, .mce-btn{border: none !important; background: none !important;} +.mce-ico{font-size: 12px !important; color: @blackLight !important;} +/* Special case to support helviticons for the tiny mce button controls */ +.mce-ico.mce-i-custom[class^="icon-"], +.mce-ico.mce-i-custom[class*=" icon-"] { + font-family: icomoon; + font-size:16px !important; +} + + // // Color picker // -------------------------------------------------- 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 305790a59d..4861499cf6 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 @@ -12,7 +12,6 @@ angular.module("umbraco").controller("Umbraco.Dialogs.ContentPickerController", if(dialogOptions && dialogOptions.multipicker){ var c = $(args.event.target.parentElement); - if(!args.node.selected){ args.node.selected = true; c.find("i.umb-tree-icon").hide() @@ -23,13 +22,6 @@ angular.module("umbraco").controller("Umbraco.Dialogs.ContentPickerController", c.find("i.umb-tree-icon").show(); } -/* - $(args.event.target.parentElement) - .find("i.umb-tree-icon") - .hide() - .after("class", "icon umb-tree-icon sprTree icon-check blue"); - */ - $scope.select(args.node); }else{ diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.copy.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.copy.controller.js new file mode 100644 index 0000000000..a6b43b8169 --- /dev/null +++ b/src/Umbraco.Web.UI.Client/src/views/content/content.copy.controller.js @@ -0,0 +1,38 @@ +angular.module("umbraco") + .controller("Umbraco.Editors.Content.CopyController", + function ($scope, eventsService, contentResource, $log) { + var dialogOptions = $scope.$parent.dialogOptions; + + $scope.dialogTreeEventHandler = $({}); + var node = dialogOptions.currentNode; + + $scope.dialogTreeEventHandler.bind("treeNodeSelect", function(ev, args){ + args.event.preventDefault(); + args.event.stopPropagation(); + + eventsService.publish("Umbraco.Editors.Content.CopyController.Select", args).then(function(args){ + var c = $(args.event.target.parentElement); + if($scope.selectedEl){ + $scope.selectedEl.find(".temporary").remove(); + $scope.selectedEl.find("i.umb-tree-icon").show(); + } + + c.find("i.umb-tree-icon").hide() + .after(""); + + $scope.target = args.node; + $scope.selectedEl = c; + }); + }); + + $scope.copy = function(){ + contentResource.copy({parentId: $scope.target.id, id: node.id}) + .then(function(){ + $scope.error = false; + $scope.success = true; + },function(err){ + $scope.success = false; + $scope.error = err; + }); + }; +}); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.move.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.move.controller.js index 93d67ff3cc..7ba022353d 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/content.move.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/content.move.controller.js @@ -10,15 +10,29 @@ angular.module("umbraco").controller("Umbraco.Editors.Content.MoveController", args.event.preventDefault(); args.event.stopPropagation(); - eventsService.publish("Umbraco.Content.MoveController.Select", args).then(function(args){ - - contentResource.move({parentId: args.node.id, id:node.id}) - .then(function(){ - alert("moved"); - },function(err){ - alert(err); - }); - }); + eventsService.publish("Umbraco.Editors.Content.MoveController.Select", args).then(function(args){ + var c = $(args.event.target.parentElement); + if($scope.selectedEl){ + $scope.selectedEl.find(".temporary").remove(); + $scope.selectedEl.find("i.umb-tree-icon").show(); + } + c.find("i.umb-tree-icon").hide() + .after(""); + + $scope.target = args.node; + $scope.selectedEl = c; + }); }); + + $scope.move = function(){ + contentResource.move({parentId: $scope.target.id, id: node.id}) + .then(function(){ + $scope.error = false; + $scope.success = true; + },function(err){ + $scope.success = false; + $scope.error = err; + }); + }; }); \ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/content/copy.html b/src/Umbraco.Web.UI.Client/src/views/content/copy.html index 7fae836a73..b0ed707a5c 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/copy.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/copy.html @@ -1 +1,38 @@ - \ No newline at end of file +
+
+
+ +

+ Choose where to copy {{currentNode.name}} to in the tree struture below +

+ +
+

{{error.errorMsg}}

+

{{error.data.Message}}

+
+ +
+

{{currentNode.name}} was copy underneath + {{target.name}}

+ + +
+ +
+ + +
+
+
+ + + +
\ No newline at end of file diff --git a/src/Umbraco.Web.UI.Client/src/views/content/move.html b/src/Umbraco.Web.UI.Client/src/views/content/move.html index f8509cb70d..2a288bcde8 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/move.html +++ b/src/Umbraco.Web.UI.Client/src/views/content/move.html @@ -1,19 +1,38 @@ -
+
+
-

Choose where to move {{currentNode.name}} to in the tree struture below

+

+ Choose where to move {{currentNode.name}} to in the tree struture below +

- - +
+

{{error.errorMsg}}

+

{{error.data.Message}}

+
+ +
+

{{currentNode.name}} was moved underneath + {{target.name}}

+ + +
+ +
+ + +
- \ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/dialogs/notifications.aspx b/src/Umbraco.Web.UI/umbraco/dialogs/notifications.aspx index 34e586dcac..cd97ec267f 100644 --- a/src/Umbraco.Web.UI/umbraco/dialogs/notifications.aspx +++ b/src/Umbraco.Web.UI/umbraco/dialogs/notifications.aspx @@ -2,23 +2,17 @@ Inherits="umbraco.dialogs.notifications" %> <%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - - +
+ + - - - - - -
-<%= umbraco.ui.Text("or") %>  <%=umbraco.ui.Text("cancel")%> -
+
+
+
\ No newline at end of file diff --git a/src/Umbraco.Web.UI/umbraco/dialogs/protectPage.aspx b/src/Umbraco.Web.UI/umbraco/dialogs/protectPage.aspx index 19edd39dfc..e833a9ac99 100644 --- a/src/Umbraco.Web.UI/umbraco/dialogs/protectPage.aspx +++ b/src/Umbraco.Web.UI/umbraco/dialogs/protectPage.aspx @@ -75,24 +75,30 @@ + +
+ + -
-

<%= umbraco.ui.Text("publicAccess", "paSimple", base.getUser())%>

-

<%= umbraco.ui.Text("publicAccess", "paSimpleHelp", base.getUser())%>

-
-
+
+

<%= umbraco.ui.Text("publicAccess", "paSimple", base.getUser())%>

+

<%= umbraco.ui.Text("publicAccess", "paSimpleHelp", base.getUser())%>

+
+ +
-
-

<%= umbraco.ui.Text("publicAccess", "paAdvanced", base.getUser())%>

-

<%= umbraco.ui.Text("publicAccess", "paAdvancedHelp", base.getUser())%>

+ +
+

<%= umbraco.ui.Text("publicAccess", "paAdvanced", base.getUser())%>

+

<%= umbraco.ui.Text("publicAccess", "paAdvancedHelp", base.getUser())%>

@@ -102,9 +108,12 @@

-

-   <%= umbraco.ui.Text("or") %>  <%=umbraco.ui.Text("cancel")%> -

+
+ + @@ -150,11 +159,14 @@
-

- - -   <%= umbraco.ui.Text("or") %>  <%=umbraco.ui.Text("cancel")%> -

+
+ + +
diff --git a/src/Umbraco.Web/Trees/ContentTreeController.cs b/src/Umbraco.Web/Trees/ContentTreeController.cs index adde3610ef..ffa35655e1 100644 --- a/src/Umbraco.Web/Trees/ContentTreeController.cs +++ b/src/Umbraco.Web/Trees/ContentTreeController.cs @@ -107,7 +107,7 @@ namespace Umbraco.Web.Trees //these two are the standard items menu.AddMenuItem(); - menu.AddMenuItem(); + menu.AddMenuItem(true).ConvertLegacyMenuItem(null, "content", "content"); //filter the standard items FilterUserAllowedMenuItems(menu, nodeActions); @@ -175,7 +175,7 @@ namespace Umbraco.Web.Trees //need to ensure some of these are converted to the legacy system - until we upgrade them all to be angularized. menu.AddMenuItem(true); - menu.AddMenuItem().ConvertLegacyMenuItem(item, "content", "content"); + menu.AddMenuItem(); menu.AddMenuItem(true).ConvertLegacyMenuItem(item, "content", "content"); diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx index 34e586dcac..cd97ec267f 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx @@ -2,23 +2,17 @@ Inherits="umbraco.dialogs.notifications" %> <%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %> - - - - +
+ + - - - - - -
-<%= umbraco.ui.Text("or") %>  <%=umbraco.ui.Text("cancel")%> -
+
+
+
\ No newline at end of file diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs index a527f157a0..97dc8d84d3 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.cs @@ -55,6 +55,7 @@ namespace umbraco.dialogs c.Checked = true; uicontrols.PropertyPanel pp = new umbraco.uicontrols.PropertyPanel(); + pp.CssClass = "inline"; pp.Text = ui.Text("actions", a.Alias); pp.Controls.Add(c); @@ -92,11 +93,14 @@ namespace umbraco.dialogs getUser().resetNotificationCache(); base.getUser().initNotifications(); - - feedback.Text = ui.Text("notifications") + " " + ui.Text("ok") + "

" + ui.Text("closeThisWindow") + ""; + var feedback = new umbraco.uicontrols.Feedback(); + feedback.Text = ui.Text("notifications") + " " + ui.Text("ok") + "

" + ui.Text("closeThisWindow") + ""; feedback.type = umbraco.uicontrols.Feedback.feedbacktype.success; - pane_form.Visible = false; + pane_form.Controls.Clear(); + pane_form.Controls.Add(feedback); + + //pane_form.Visible = false; pl_buttons.Visible = false; } } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.designer.cs index 15ce3d33b1..7ab5c11751 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.designer.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/notifications.aspx.designer.cs @@ -1,10 +1,9 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ @@ -13,15 +12,6 @@ namespace umbraco.dialogs { public partial class notifications { - ///

- /// feedback control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::umbraco.uicontrols.Feedback feedback; - /// /// pane_form control. /// @@ -38,7 +28,7 @@ namespace umbraco.dialogs { /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Panel pl_buttons; + protected global::System.Web.UI.HtmlControls.HtmlGenericControl pl_buttons; /// /// Button1 control. diff --git a/src/umbraco.controls/feedback.cs b/src/umbraco.controls/feedback.cs index df1e54036f..b9fb2e56ee 100644 --- a/src/umbraco.controls/feedback.cs +++ b/src/umbraco.controls/feedback.cs @@ -46,7 +46,7 @@ namespace umbraco.uicontrols { styleString += key + ":" + this.Style[key] + ";"; } - writer.WriteLine("

"); + writer.WriteLine("

"); writer.WriteLine(_text); writer.WriteLine("

"); }