Skip to content
Snippets Groups Projects
Commit d618b8c2 authored by Earl Miles's avatar Earl Miles
Browse files

#358660 by jpetso: Typo fixes

parent f0b98e47
No related branches found
No related tags found
No related merge requests found
......@@ -1204,11 +1204,9 @@ function delegator_administer_break_lock(&$form_state, $task_name) {
list($task_id, $subtask_id) = delegator_get_task_id($task_name);
$form_state['task_name'] = $task_name;
$form_state['key'] = $task_id . ':' . $subtask_id;
ctools_include('object-cache');
$lock = ctools_object_cache_test('delegator_handlers', $form_state['key']);
$lock = ctools_object_cache_test('delegator_handlers', $form_state['task_name']);
$form = array();
// @todo put task title here, but also needs subtask support.
......@@ -1237,7 +1235,7 @@ function delegator_administer_break_lock(&$form_state, $task_name) {
* Submit handler to break_lock a view.
*/
function delegator_administer_break_lock_submit(&$form, &$form_state) {
ctools_object_cache_clear_all('delegator_handlers', $form_state['key']);
ctools_object_cache_clear_all('delegator_handlers', $form_state['task_name']);
drupal_set_message(t('The lock has been broken and you may now edit this task.'));
$form_state['redirect'] = 'admin/build/delegator/' . $form_state['task_name'];
}
......
......@@ -3,7 +3,7 @@ Documentation about the Chaos Tools plugin system:
Currently some scribbled notes to provide a framework for fleshing this out.
ctools_load_include('plugins');
ctools_include('plugins');
hook_ctools_plugin_plugintype
......
......@@ -269,7 +269,7 @@ function ctools_process_form($form_id, &$form, &$form_state) {
/**
* The original version of drupal_validate_form does not have an override for
* the static check to only validate a form id once. Unfortunately, we need
* to be able to overridet his.
* to be able to override this.
*/
function ctools_validate_form($form_id, $form, &$form_state) {
static $validated_forms = array();
......
......@@ -55,7 +55,7 @@ function ctools_modal_add_js() {
));
drupal_add_js($settings, 'setting');
drupal_add_js('/misc/jquery.form.js');
drupal_add_js('misc/jquery.form.js');
ctools_add_js('dimensions');
ctools_add_js('mc');
ctools_add_js('ajax-responder');
......@@ -131,6 +131,15 @@ function ctools_modal_text_button($text, $dest, $alt, $class = '') {
* Wrap a form so that we can use it properly with AJAX. Essentially if the
* form wishes to render, it automatically does that, otherwise it returns
* so we can see submission results.
*
* @return
* The output of the form, if it was rendered. If $form_state['ajax']
* is set, this will use ctools_modal_form_render so it will be
* a $command object suitable for ctools_ajax_render already.
*
* The return will be NULL if the form was successfully submitted unless
* you specifically set re_render = TRUE. If ajax is set the
* form will never be redirected.
*/
function ctools_modal_form_wrapper($form_id, &$form_state) {
ctools_include('form');
......@@ -162,3 +171,15 @@ function ctools_modal_form_render($form_state, $output) {
return array(ctools_modal_command_display($title, $output));
}
/**
* Perform a simple modal render and immediately exit.
*
* This is primarily used for error displays, since usually modals will
* contain forms.
*/
function ctools_modal_render($title, $output) {
$commands = array();
$commands[] = ctools_modal_command_display($title, $output);
ctools_ajax_render($commands);
}
......@@ -119,9 +119,11 @@ Drupal.CTools.AJAX.commands = {
},
changed: function(data) {
$(data.selector).addClass('changed');
if (data.star) {
$(data.selector).find(data.star).append(' <span class="star">*</span> ');
if (!$(data.selector).hasClass('changed')) {
$(data.selector).addClass('changed');
if (data.star) {
$(data.selector).find(data.star).append(' <span class="star">*</span> ');
}
}
},
......
......@@ -112,6 +112,7 @@ Drupal.CTools.Modal.submitAjaxForm = function() {
});
return false;
}
/**
* Bind links that will open modals to the appropriate function.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment