You are here

function draggableviews_view_draggabletable_form_ajax in DraggableViews 7

Same name and namespace in other branches
  1. 7.2 draggableviews.module \draggableviews_view_draggabletable_form_ajax()

Ajax submit handler

1 string reference to 'draggableviews_view_draggabletable_form_ajax'
draggableviews_view_draggabletable_form in ./draggableviews.module
Build the form

File

./draggableviews.module, line 187
Draggableviews module provides a style plugin for views. With this plugin rows become draggable and can be organized in complex structures.

Code

function draggableviews_view_draggabletable_form_ajax($form, $form_state) {

  // Find the form element
  $form_element = "form:has(input[name=form_build_id][value='{$form['form_build_id']['#value']}'])";

  // remove warning and asterisk
  return array(
    '#type' => 'ajax',
    '#commands' => array(
      ajax_command_remove("{$form_element} div.tabledrag-changed-warning, {$form_element} span.tabledrag-changed"),
    ),
  );
}