af_get |
./arrange_fields.module |
This is a helper function which will let me attempt to access
indexes in an array which might not exist WITHOUT setting off
a PHP Notice message in Drupal. A little kludgy? Perhaps, but
I feel that it makes the code much more readable.
For example,… |
4 |
|
arrange_fields_add_arrange_css_js |
./arrange_fields.module |
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. |
4 |
|
arrange_fields_add_draggable_wrappers |
./arrange_fields.module |
In this function, we are going to add div's around elements we wish to make
draggable on the page. The jQuery can then grab onto those divs to make
them draggable. |
1 |
|
arrange_fields_add_form_css_js |
./arrange_fields.module |
This function simply adds the CSS and JS files we need when on the node/edit page.
I have to do it this way (and set this function in an #after_build on the form)
in order to make sure this still gets called, even if the form fails validation. |
|
1 |
arrange_fields_display_form |
./arrange_fields.module |
This function will display a form and let us arrange its fields.
It is designed to work with Drupal's content types (not Webform or
programmer-designed forms). |
|
1 |
arrange_fields_display_main |
./arrange_fields.module |
This is the "main menu" for arrange_fields. Simply displays a list of
content types or webforms the user may arrange the fields of. |
|
1 |
arrange_fields_display_otherform |
./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. |
|
1 |
arrange_fields_display_webform |
./arrange_fields.module |
Similar function as arrange_fields_display_form,
but this is specifically for webforms (with the webform module). |
|
1 |
arrange_fields_editing_field_submit |
./arrange_fields.module |
This function is called after we perform our normal submission when
editing a field's properties in a popup. It's only purpose is
to override the redirect to send the user to our "close popup" page,
which lets the user close the… |
|
1 |
arrange_fields_enable |
./arrange_fields.install |
Implementation of hook_enable. Since clearing the cache seems to correct
so many bugs with this module, I am going to do it on enable. This hopefully
will cut down on the initial bugs some users experience. |
|
|
arrange_fields_export_form |
./arrange_fields.module |
This function simply provides textareas for the user to copy/paste from
which will allow them to export the arrangement of their forms.
It does not really need to use the form API, since there is no submission,
but I am doing this to make it easier to… |
|
1 |
arrange_fields_form_alter |
./arrange_fields.module |
Implementation of hook_form_alter(). |
|
|
arrange_fields_get_form_fields |
./arrange_fields.module |
This function uses recursion to go through an array (presumably $form).
It will return back an array of references to fields which we might
want to place wrappers around. |
1 |
|
arrange_fields_get_included_module_files |
./arrange_fields.module |
This function is used to tell the user what module include files have been loaded
on the current page, in an effort to help them figure out which to enter as include files
on the Arrange Fields settings page. |
1 |
|
arrange_fields_import_form |
./arrange_fields.module |
We will use this form to let users paste in definitions for form arrangements
which they got from the "export" screen. |
|
1 |
arrange_fields_import_form_submit |
./arrange_fields.module |
This function will handle the actual importing of arrange fields definitions. |
|
|
arrange_fields_init |
./arrange_fields.module |
hook_init() |
|
|
arrange_fields_install |
./arrange_fields.install |
Implementation of hook_install. All we really need from this is to make sure
that the module's weight is higher than other's, or else all kinds of problems
will happen when we go to do hook_form_alter. |
|
|
arrange_fields_menu |
./arrange_fields.module |
Implementation of hook_menu() |
|
|
arrange_fields_page_alter |
./arrange_fields.module |
|
|
|
arrange_fields_permission |
./arrange_fields.module |
|
|
|
arrange_fields_popup_close_window |
./arrange_fields.module |
After the popup_edit_field has been submitted, the user comes to this page,
which simply instructs them to click a button which will make the opener page
save itself. This is necessary, or the changes the user made in the popup
will not be reflected… |
|
1 |
arrange_fields_popup_edit_field |
./arrange_fields.module |
This function, which is meant to be displayed in the popup, will just take
the default drupal field's edit form (or the webform field edit form)
and display it for us. This is to make it more
convienent for the user, so they do not have to go to… |
|
1 |
arrange_fields_position_form |
./arrange_fields.module |
This is the form which we will use to store the position data for the fields. |
|
3 |
arrange_fields_position_form_submit |
./arrange_fields.module |
We will save the position data into a variable using variable_set. |
|
|
arrange_fields_position_form_validate |
./arrange_fields.module |
The primary purpose of this validator is to find out of the user is trying
to reset the form (and restore the form to its orignal state). |
|
|
arrange_fields_pre_render |
./arrange_fields.module |
This function is called before the elements are displayed on screen.
The main thing we wish to do here is move the contents of
#af_prefix and #af_suffix into the real #prefix and #suffix fields. |
|
1 |
arrange_fields_render_dialogs |
./arrange_fields.module |
Renders the divs which will be used as the jquery dialogs, displayed using
jQuery's .dialog() function. |
3 |
|
arrange_fields_settings_form |
./arrange_fields.module |
This function returns a form which we will use to configure
the arrange_fields module. It is called
from menu item: admin/settings/arrange-fields/settings |
|
1 |
arrange_fields_unconvert_unsafe_chars |
./arrange_fields.module |
Mirror of the javascript function in arrange_fields_dialog.js,
this will convert our custom codes for unsafe characters back to
what they started off as. |
1 |
|
arrange_fields_update_6100 |
./arrange_fields.install |
The main thing we want to do here is up the weight to a higher number. Before
now, the weight was set to 50. But, in order for this module to work with vertical
tabs (whose weight is 300), the weight needs to be higher. |
|
|