You are here

function arrange_fields_add_arrange_css_js in Arrange Fields 6

Same name and namespace in other branches
  1. 7 arrange_fields.module \arrange_fields_add_arrange_css_js()

Meant to be called by the display_form functions, this will make sure the necessary module inc's are loaded, and the required js and css files are added for the actual arranging of fields.

3 calls to arrange_fields_add_arrange_css_js()
arrange_fields_display_form in ./arrange_fields.module
This function displays the arrangement form, where the user will be able to actually drag and drop to arrange fields. In it, we actually load the form which they are arranging, but we will be saving our data to our own form.
arrange_fields_display_otherform in ./arrange_fields.module
Similar function as arrange_fields_display_form, but this is specifically for other, more generic forms on the system. For example, user_register, or custom forms which a developer has written.
arrange_fields_display_webform in ./arrange_fields.module
Similar function as arrange_fields_display_form, but this is specifically for webforms (with the webform module).

File

./arrange_fields.module, line 1232

Code

function arrange_fields_add_arrange_css_js() {
  module_load_include('inc', 'node', 'node.pages');
  jquery_ui_add(array(
    'ui.draggable',
    'ui.dialog',
    'ui.resizable',
  ));
  drupal_add_js(drupal_get_path("module", "arrange_fields") . "/js/arrange_fields_node_edit.js");

  // must be included first.
  drupal_add_js(drupal_get_path("module", "arrange_fields") . "/js/arrange_fields.js");
  drupal_add_js(drupal_get_path("module", "arrange_fields") . "/js/arrange_fields_dialog.js");
  drupal_add_css(drupal_get_path("module", "arrange_fields") . "/css/arrange_fields.css");
}