diff --git a/ctools_ajax_sample/ctools_ajax_sample.module b/ctools_ajax_sample/ctools_ajax_sample.module index f715ad7..cb4fe83 100644 --- a/ctools_ajax_sample/ctools_ajax_sample.module +++ b/ctools_ajax_sample/ctools_ajax_sample.module @@ -14,10 +14,10 @@ */ function ctools_ajax_sample_menu() { $items['ctools_ajax_sample'] = array( - 'title' => 'Chaos Tools AJAX Demo', - 'page callback' => 'ctools_ajax_sample_page', - 'access callback' => TRUE, - 'type' => MENU_NORMAL_ITEM, + 'title' => 'Chaos Tools AJAX Demo', + 'page callback' => 'ctools_ajax_sample_page', + 'access callback' => TRUE, + 'type' => MENU_NORMAL_ITEM, ); $items['ctools_ajax_sample/simple_form'] = array( 'title' => 'Simple Form', @@ -26,39 +26,39 @@ function ctools_ajax_sample_menu() { 'type' => MENU_CALLBACK, ); $items['ctools_ajax_sample/%ctools_js/hello'] = array( - 'title' => 'Hello World', - 'page callback' => 'ctools_ajax_sample_hello', - 'page arguments' => array(1), - 'access callback' => TRUE, - 'type' => MENU_CALLBACK, + 'title' => 'Hello World', + 'page callback' => 'ctools_ajax_sample_hello', + 'page arguments' => array(1), + 'access callback' => TRUE, + 'type' => MENU_CALLBACK, ); $items['ctools_ajax_sample/%ctools_js/tablenix/%'] = array( - 'title' => 'Hello World', - 'page callback' => 'ctools_ajax_sample_tablenix', - 'page arguments' => array(1, 3), - 'access callback' => TRUE, - 'type' => MENU_CALLBACK, + 'title' => 'Hello World', + 'page callback' => 'ctools_ajax_sample_tablenix', + 'page arguments' => array(1, 3), + 'access callback' => TRUE, + 'type' => MENU_CALLBACK, ); $items['ctools_ajax_sample/%ctools_js/login'] = array( - 'title' => 'Login', - 'page callback' => 'ctools_ajax_sample_login', - 'page arguments' => array(1), - 'access callback' => TRUE, - 'type' => MENU_CALLBACK, + 'title' => 'Login', + 'page callback' => 'ctools_ajax_sample_login', + 'page arguments' => array(1), + 'access callback' => TRUE, + 'type' => MENU_CALLBACK, ); $items['ctools_ajax_sample/%ctools_js/animal'] = array( - 'title' => 'Animal', - 'page callback' => 'ctools_ajax_sample_animal', - 'page arguments' => array(1), - 'access callback' => TRUE, - 'type' => MENU_CALLBACK, + 'title' => 'Animal', + 'page callback' => 'ctools_ajax_sample_animal', + 'page arguments' => array(1), + 'access callback' => TRUE, + 'type' => MENU_CALLBACK, ); $items['ctools_ajax_sample/%ctools_js/login/%'] = array( - 'title' => 'Post-Login Action', - 'page callback' => 'ctools_ajax_sample_login_success', - 'page arguments' => array(1, 3), - 'access callback' => TRUE, - 'type' => MENU_CALLBACK, + 'title' => 'Post-Login Action', + 'page callback' => 'ctools_ajax_sample_login_success', + 'page arguments' => array(1, 3), + 'access callback' => TRUE, + 'type' => MENU_CALLBACK, ); $items['ctools_ajax_sample/jumped'] = array( 'title' => 'Successful Jumping', @@ -165,11 +165,11 @@ function ctools_ajax_sample_page() { 'width' => 300, 'zIndex' => 1000, ), - 'modalSize' => array( - 'type' => 'scale', - 'width' => 0.8, - 'height' => 0.8, - ), + 'modalSize' => array( + 'type' => 'scale', + 'width' => 0.8, + 'height' => 0.8, + ), ), ); diff --git a/js/modal.js b/js/modal.js index abdf9d0..1bac047 100644 --- a/js/modal.js +++ b/js/modal.js @@ -363,7 +363,7 @@ $modalContent.trigger('loadStop'); return; } - + if ($('#modalContent').length == 0) { ctoolsModal.show(ctoolsModal.getSettings(ajax.element)); @@ -457,10 +457,10 @@ }); if (ctoolsModal.currentSettings.modalSize.type == 'scale') { - options.width = $(window).width() * ctoolsModal.currentSettings.modalSize.width; - options.height = $(window).height() * ctoolsModal.currentSettings.modalSize.height; + options.width = $(window).width() * ctoolsModal.currentSettings.modalSize.width; + options.height = $(window).height() * ctoolsModal.currentSettings.modalSize.height; } - + // Remove leftover buttons. $modalContent.bind('load', function () { $(this).dialog('option', 'buttons', null); @@ -471,14 +471,13 @@ }); // Trigger a global event to allow scripts to bind events to the dialog. $(window).trigger('modalBeforeCreate', [$modalContent, options]); - + $modalContent.dialog(options); $(window).trigger('modalAfterCreate', [$modalContent, options]); ctoolsModal.modal = $modalContent; return; } - // If our animation isn't set, make it just show/pop if (!animation) { animation = 'show';