Commit 9cb53fce authored by merlinofchaos's avatar merlinofchaos

Some URL fixes; not sure why it was working at all, before.

parent ddf08198
......@@ -260,7 +260,6 @@ function views_ui_add_display_form(&$form_state, $view) {
* Submit handler to add a display to a view.
*/
function views_ui_add_display_form_submit($form, &$form_state) {
dsm('form submitted');
$plugin = $form_state['values']['display'];
$form_state['id'] = $form_state['view']->add_display($plugin);
views_ui_cache_set($form_state['view']);
......
......@@ -88,7 +88,7 @@ function views_ajax_form($form_id) {
$output = theme('status_messages');
$output .= drupal_render_form($form_id, $form);
$title = empty($form['#title']) ? '' : $form['#title'];
$url = empty($form['#url']) ? $_GET['q'] : $form['#url'];
$url = empty($form['#url']) ? url($_GET['q'], array('absolute' => TRUE)) : $form['#url'];
views_ajax_render($output, $title, $url);
}
......
......@@ -52,7 +52,7 @@ Drupal.Views.Ajax.ajaxResponse = function(data) {
$('form', ajax_area).unbind('submit'); // be safe here.
$('form', ajax_area).submit(function() {
$(this).ajaxSubmit({
url: url,
url: data.url,
data: '',
type: 'POST',
success: Drupal.Views.Ajax.ajaxResponse,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment