Permalink
Browse files

BUGFIX: prevent refreshing the history panel when reloading versions

  • Loading branch information...
1 parent e17b4a1 commit 28dff0107a4bd38d3c7798cefd2c7cbe9a16e977 @wilr wilr committed Dec 17, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 javascript/CMSPageHistoryController.js
@@ -49,7 +49,10 @@
* Handle coupling to admin url
*/
onsubmit: function(e, d) {
+ e.preventDefault();
+
var id, self = this;
+
id = this.find(':input[name=ID]').val();
if(!id) return false;
@@ -59,6 +62,7 @@
metadata = this.metadata({type: 'class'});
compare = (this.find(":input[name=CompareMode]").is(":checked"));
selected = this.find("table input[type=checkbox]").filter(":checked");
+
if(compare) {
if(selected.length != 2) return false;
@@ -72,7 +76,7 @@
button = this.find(':submit[name=action_doShowVersion]');
url = ss.i18n.sprintf(metadata['link-tmpl-show'], id,to);
}
-
+
$('.cms-container').loadPanel(url, '', {selector: '.cms-edit-form'});
}
});

0 comments on commit 28dff01

Please sign in to comment.