Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed page preview when radiant is deployed to sub-directory #336

Closed
wants to merge 1 commit into from

3 participants

@gettalong

Just added missing relative_url_root statements where needed.

@gettalong gettalong Fixed page preview when radiant is deployed to sub-directory
Just added missing relative_url_root statements where needed.
5df38b2
@travisbot

This pull request fails (merged 5df38b2 into e7f88e2).

@jomz jomz closed this in 160f2ec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 16, 2012
  1. @gettalong

    Fixed page preview when radiant is deployed to sub-directory

    gettalong authored
    Just added missing relative_url_root statements where needed.
This page is out of date. Refresh to see the latest.
View
2  app/views/admin/pages/_fields.html.haml
@@ -60,7 +60,7 @@
= t('or')
= link_to t('cancel'), admin_pages_url
#preview_panel.fullcover.grey_out{:style => 'display: none;'}
- %iframe{:id => 'page-preview', :class => 'fullcover', :name => 'page-preview', :src => '/loading-iframe.html', :frameborder => 0, :scrolling => "auto"}
+ %iframe{:id => 'page-preview', :class => 'fullcover', :name => 'page-preview', :src => ActionController::Base.relative_url_root + '/loading-iframe.html', :frameborder => 0, :scrolling => "auto"}
.preview_tools
=submit_tag(t('buttons.save_changes'), :class => 'big save_changes')
=submit_tag(t('buttons.save_and_continue'), :class => 'big save_and_continue', :name => 'continue')
View
2  public/javascripts/admin/page_preview.js
@@ -31,7 +31,7 @@ document.observe('dom:loaded', function() {
preview_tools.style['opacity'] = 1
body.addClassName('clipped')
form.target = frame.id
- form.action = '/admin/preview'
+ form.action = relative_url_root + '/admin/preview'
form.submit()
} finally {
form.target = oldTarget
Something went wrong with that request. Please try again.