Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Allow custom preview URLs through hidden fields

Useful e.g. to force non-SSL previews via absolute links,
even if the CMS is loaded on an SSL host.
  • Loading branch information...
commit bbfa54c81690adb3c831019f042d39c96c755ce9 1 parent 2bd9852
@chillu chillu authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 admin/javascript/LeftAndMain.Preview.js
View
6 admin/javascript/LeftAndMain.Preview.js
@@ -67,7 +67,7 @@
if(this.is('.is-collapsed')) return;
// var url = ui.xmlhttp.getResponseHeader('x-frontend-url');
- var url = $('.cms-edit-form').find(':input[name=StageURLSegment]').val();
+ var url = $('.cms-edit-form').find(':input[name=PreviewURL],:input[name=StageURLSegment]').val();
if(url) {
this.loadUrl(url);
this.unblock();
@@ -286,7 +286,7 @@
onclick: function(e) {
e.preventDefault();
- var preview = $('.cms-preview'), url = $('.cms-edit-form').find(':input[name=StageURLSegment]').val();
+ var preview = $('.cms-preview'), url = $('.cms-edit-form').find(':input[name=PreviewURL],:input[name=StageURLSegment]').val();
if(url) {
preview.loadUrl(url);
preview.unblock();
@@ -295,4 +295,4 @@
}
});
});
-}(jQuery));
+}(jQuery));
Please sign in to comment.
Something went wrong with that request. Please try again.