DLSupportJS.CleanAdmin

Sub class of DLSupportJS providing support for the clean admin.

Summary
DLSupportJS.CleanAdminSub class of DLSupportJS providing support for the clean admin.
Functions
AlertErrorAlert an error message.
InitializeInitialize the script.
OpenPageOpen up a new page.
ServerResponseProcess the server response.
SetActionSet the action for the form of the given button.
SubmitFormSubmit a form.
UpdatePageUpdate a page.

Functions

AlertError

AlertError: function(type)

Alert an error message.

Parameters

type(string) The type of error to alert.  Possible values are type are: freeform ~ The message to be alerted will be whatever is the value of the message attribute of the parameter optionsinvalid_data ~ The alerted message will let the user know that the response from the server results in an invalid data.  openlink ~ The alerted message will let the user know that the requested page could not be reached.  submitform ~ The alerted message will let the user know the form could not be submitted.
options(object) An object containing various options used in the execution of this method.  Defaults to an empty object.

The structure of the options parameter, if given, should look like the following:

Object(
    message: {
        (string) The message to be alerted to the user. Defaults to
        an empty string.
    }
)

Returns

(boolean) This method will always return true.

Initialize

Initialize: function()

Initialize the script.

OpenPage

OpenPage: function(href,
is_menu)

Open up a new page.

Parameters

href(string) The URL of the page to open.
is_menu(boolean) Whether or not the link is a menu link

ServerResponse

ServerResponse: function(transport)

Process the server response.

Parameters

transport(object) The AJAX transport.

SetAction

SetAction: function(button)

Set the action for the form of the given button.

Parameters

button(mixed) Either the ID of the button or the DOM element for the button itself.

Returns

(boolean) This method will always return true.

SubmitForm

SubmitForm: function(form)

Submit a form.

Parameters

form(object) The form object.

Returns

(boolean) This method will always return false.

UpdatePage

UpdatePage: function(content)

Update a page.

Parameters

content(string) The HTML of the page.
JavaScript framework using Prototype (http://www.prototypejs.org), Scriptaculous (http://script.aculo.us), and JS.Class (http://jsclass.jcoglan.com).
AlertError: function(type)
Alert an error message.
Initialize: function()
Initialize the script.
OpenPage: function(href,
is_menu)
Open up a new page.
ServerResponse: function(transport)
Process the server response.
SetAction: function(button)
Set the action for the form of the given button.
SubmitForm: function(form)
Submit a form.
UpdatePage: function(content)
Update a page.