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.data.Message}}
+{{currentNode.name}} was copy underneath + {{target.name}}
+ + +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.data.Message}}
+{{currentNode.name}} was moved underneath + {{target.name}}
+ + +<%= umbraco.ui.Text("publicAccess", "paSimpleHelp", base.getUser())%>
-<%= umbraco.ui.Text("publicAccess", "paSimpleHelp", base.getUser())%>
+<%= umbraco.ui.Text("publicAccess", "paAdvancedHelp", base.getUser())%>
+ +<%= umbraco.ui.Text("publicAccess", "paAdvancedHelp", base.getUser())%>
@@ -102,9 +108,12 @@
-
-
" + 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 @@
//------------------------------------------------------------------------------
// ");
+ writer.WriteLine(" ");
writer.WriteLine(_text);
writer.WriteLine("