function delta_ahah in Delta 6
Same name and namespace in other branches
- 7 delta.module \delta_ahah()
1 string reference to 'delta_ahah'
- delta_menu in ./delta.module
- Implementation of hook_menu().
File
- ./delta.module, line 800
- The Delta Theme API is an advanced manipulation of the Theme Settings API
to allow for customization/configuration of theme settings based on
node types, context, or groups of paths.
Code
function delta_ahah() {
$form_state = array(
'storage' => NULL,
'submitted' => FALSE,
);
$form_build_id = $_POST['form_build_id'];
$form = form_get_cache($form_build_id, $form_state);
$args = $form['#parameters'];
$form_id = array_shift($args);
$form['#post'] = $_POST;
$form['#redirect'] = FALSE;
$form['#programmed'] = FALSE;
$form_state['post'] = $_POST;
drupal_process_form($form_id, $form, $form_state);
$form = drupal_rebuild_form($form_id, $form_state, $args, $form_build_id);
$changed_elements = $form['delta_override']['tst'];
$javascript = drupal_add_js(NULL, NULL, 'header');
drupal_json(array(
'status' => TRUE,
'data' => theme('status_messages') . drupal_render($changed_elements),
'settings' => call_user_func_array('array_merge_recursive', $javascript['setting']),
));
}