" + ui.Text("closeThisWindow") + "";
+ //NOTE: We ONLY support Copy on content not media for some reason.
+
+ Services.ContentService.Copy((IContent)currContent, Request.GetItemAs("copyTo"), RelateDocuments.Checked, getUser().Id);
+
+ feedback.Text = ui.Text("moveOrCopy", "copyDone", nodes, getUser()) + "
" + ui.Text("closeThisWindow") + "";
feedback.type = uicontrols.Feedback.feedbacktype.success;
- ClientTools.CopyNode(currentNode.Id.ToString(), newNode.Path);
+
+ // refresh tree
+ ClientTools.CopyNode(currContent.Id.ToString(), parentContent.Path);
}
}
}
}
+ ///
+ /// JsInclude1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
+
+ ///
+ /// 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.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.Pane pane_form;
+
+ ///
+ /// JTree control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.controls.Tree.TreeControl JTree;
+
+ ///
+ /// pp_relate control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel pp_relate;
+
+ ///
+ /// RelateDocuments control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.CheckBox RelateDocuments;
+
+ ///
+ /// pane_form_notice control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.PlaceHolder pane_form_notice;
+
+ ///
+ /// pane_settings control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.Pane pane_settings;
+
+ ///
+ /// PropertyPanel1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::umbraco.uicontrols.PropertyPanel PropertyPanel1;
+
+ ///
+ /// masterType control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.ListBox masterType;
+
+ ///
+ /// rename control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ 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;
+
+ ///
+ /// panel_buttons control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel panel_buttons;
+
+ ///
+ /// ok control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button ok;
+
}
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.designer.cs
deleted file mode 100644
index f7c669d1ea..0000000000
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.designer.cs
+++ /dev/null
@@ -1,141 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace umbraco.dialogs {
-
-
- public partial class moveOrCopy {
-
- ///
- /// JsInclude1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
-
- ///
- /// 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.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.Pane pane_form;
-
- ///
- /// JTree control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.controls.Tree.TreeControl JTree;
-
- ///
- /// pp_relate control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel pp_relate;
-
- ///
- /// RelateDocuments control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.CheckBox RelateDocuments;
-
- ///
- /// pane_form_notice control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.PlaceHolder pane_form_notice;
-
- ///
- /// pane_settings control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.Pane pane_settings;
-
- ///
- /// PropertyPanel1 control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::umbraco.uicontrols.PropertyPanel PropertyPanel1;
-
- ///
- /// masterType control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.ListBox masterType;
-
- ///
- /// rename control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- 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;
-
- ///
- /// panel_buttons control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Panel panel_buttons;
-
- ///
- /// ok control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button ok;
- }
-}
diff --git a/src/umbraco.businesslogic/BasePages/BasePage.cs b/src/umbraco.businesslogic/BasePages/BasePage.cs
index 25a09f9b25..78b321fa46 100644
--- a/src/umbraco.businesslogic/BasePages/BasePage.cs
+++ b/src/umbraco.businesslogic/BasePages/BasePage.cs
@@ -7,6 +7,7 @@ using System.Web.Routing;
using System.Web.Security;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
+using Umbraco.Core.Services;
using umbraco.BusinessLogic;
using umbraco.DataLayer;
using Umbraco.Core;
@@ -53,6 +54,30 @@ namespace umbraco.BasePages
get { return umbraco.BusinessLogic.Application.SqlHelper; }
}
+ ///
+ /// Returns the current ApplicationContext
+ ///
+ public ApplicationContext ApplicationContext
+ {
+ get { return ApplicationContext.Current; }
+ }
+
+ ///
+ /// Returns a ServiceContext
+ ///
+ public ServiceContext Services
+ {
+ get { return ApplicationContext.Services; }
+ }
+
+ ///
+ /// Returns a DatabaseContext
+ ///
+ public DatabaseContext DatabaseContext
+ {
+ get { return ApplicationContext.DatabaseContext; }
+ }
+
///
/// Initializes a new instance of the class.
///