diff --git a/src/Umbraco.Web.UI.Client/lib/umbraco/LegacyUmbClientMgr.js b/src/Umbraco.Web.UI.Client/lib/umbraco/LegacyUmbClientMgr.js
index 06d6c11c71..db02a1de4a 100644
--- a/src/Umbraco.Web.UI.Client/lib/umbraco/LegacyUmbClientMgr.js
+++ b/src/Umbraco.Web.UI.Client/lib/umbraco/LegacyUmbClientMgr.js
@@ -361,11 +361,29 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
rootScope : function(){
return getRootScope();
},
-
- reloadLocation: function() {
- var injector = getRootInjector();
- var $route = injector.get("$route");
- $route.reload();
+
+ /**
+ This will reload the content frame based on it's current route, if pathToMatch is specified it will only reload it if the current
+ location matches the path
+ */
+ reloadLocation: function(pathToMatch) {
+
+ var injector = getRootInjector();
+ var doChange = true;
+ if (pathToMatch) {
+ var $location = injector.get("$location");
+ var path = $location.path();
+ if (path != pathToMatch) {
+ doChange = false;
+ }
+ }
+
+ if (doChange) {
+ var $route = injector.get("$route");
+ $route.reload();
+ var $rootScope = injector.get("$rootScope");
+ $rootScope.$apply();
+ }
},
closeModalWindow: function(rVal) {
diff --git a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoClientManager.js b/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoClientManager.js
index 88f385eac3..ec76e8f8f6 100644
--- a/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoClientManager.js
+++ b/src/Umbraco.Web.UI/umbraco_client/Application/UmbracoClientManager.js
@@ -172,9 +172,9 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
},
- reloadLocation: function () {
+ reloadLocation: function (pathToMatch) {
if (this.mainWindow().UmbClientMgr) {
- this.mainWindow().UmbClientMgr.reloadLocation();
+ this.mainWindow().UmbClientMgr.reloadLocation(pathToMatch);
}
},
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs
index 34ff19907e..b28e40163b 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/rollBack.aspx.cs
@@ -3,6 +3,7 @@ using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
+using System.Linq;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
@@ -117,36 +118,23 @@ namespace umbraco.presentation.dialogs
if (!IsPostBack) {
allVersions.Items.Add(new ListItem(ui.Text("rollback", "selectVersion")+ "...", ""));
- foreach (DocumentVersionList dl in currentDoc.GetVersions()) {
+
+ foreach (DocumentVersionList dl in currentDoc.GetVersions())
+ {
+ //we don't need to show the current version
+ if (dl.Version == currentDoc.Version)
+ continue;
+
allVersions.Items.Add(new ListItem(dl.Text + " (" + ui.Text("content", "createDate") + ": " + dl.Date.ToShortDateString() + " " + dl.Date.ToShortTimeString() + ")", dl.Version.ToString()));
}
Button1.Text = ui.Text("actions", "rollback");
}
}
-
- #region Web Form Designer generated code
- override protected void OnInit(EventArgs e)
- {
- //
- // CODEGEN: This call is required by the ASP.NET Web Form Designer.
- //
- InitializeComponent();
- base.OnInit(e);
- }
-
- ///
" + ui.Text("closeThisWindow") + "";
diffPanel.Visible = false;
pl_buttons.Visible = false;
+
+ ClientTools.ReloadLocationIfMatched(string.Format("/content/content/edit/{0}", d.Id));
}
}
}
diff --git a/src/umbraco.businesslogic/BasePages/ClientTools.cs b/src/umbraco.businesslogic/BasePages/ClientTools.cs
index 47c7890fc8..4b27e888ab 100644
--- a/src/umbraco.businesslogic/BasePages/ClientTools.cs
+++ b/src/umbraco.businesslogic/BasePages/ClientTools.cs
@@ -52,7 +52,8 @@ namespace umbraco.BasePages
public static string ReloadContentFrameUrlIfPathLoaded(string url) {
return string.Format(ClientMgrScript + ".reloadContentFrameUrlIfPathLoaded('{0}');", url);
}
- public static string ReloadLocation { get { return string.Format(ClientMgrScript + ".reloadLocation();"); } }
+ public static string ReloadLocation { get { return ClientMgrScript + ".reloadLocation();"; } }
+ public static string ReloadLocationIfMatched { get { return ClientMgrScript + ".reloadLocation('{0}');"; } }
public static string ChildNodeCreated = GetMainTree + ".childNodeCreated();";
public static string SyncTree { get { return GetMainTree + ".syncTree('{0}', {1});"; } }
public static string ClearTreeCache { get { return GetMainTree + ".clearTreeCache();"; } }
@@ -277,21 +278,33 @@ namespace umbraco.BasePages
RegisterClientScript(string.Format(Scripts.ReloadActionNode, (!reselect).ToString().ToLower(), (!reloadChildren).ToString().ToLower()));
return this;
}
-
- ///