JavaScript framework using Prototype (http://www.prototypejs.org), Scriptaculous (http://script.aculo.us), and JS.Class (http://jsclass.jcoglan.com).
| DLSupportJS | JavaScript framework using Prototype (http://www.prototypejs.org), Scriptaculous (http://script.aculo.us), and JS.Class (http://jsclass.jcoglan.com). |
| Author | Duc Tri Le <cmsmadesimple---at---email.tiger-inc.com> |
| License | This class is released under the GNU General Public License. |
| Variables | |
| UploadFileOptions | (object) An object containing a uploaded file options. |
| Functions | |
| HideLoadingImage | Hide the loading image if it is currently visible. |
| HideOverlay | Hide the overlay div if it is currently visible. |
| PageLoading | Show the loading image when this method is called and hide it when the body “onload” event is triggered. |
| ShowLoadingImage | Show the loading image. |
| ShowOverlay | Create and show the overlay div if it is currently hidden. |
| UploadComplete | This method is called after an upload has been completed. |
| UploadFile | Submit the provided form whose sole purpose is to upload files. |
HideLoadingImage: function()
Hide the loading image if it is currently visible.
| options | (object) An object containing various options used in the execution of this method. Refer to the method HideOverlay for more information on some of these options. Defaults to an empty object. |
The structure of the options parameter, if given, should look like the following:
Object (
finish: {
(function) The function that should be run after the overlay
is hidden. Defaults to an empty function.
},
keep_overlay: {
(boolean) Whether or not the overlay div should be kept
visible. Defaults to false.
},
remove: {
(boolean) Whether or not the overlay div should be removed
from the DOM structure as well. Defaults to false.
},
duration: {
(int) Refer to the "duration" attribute of the parameter
"options" from the method HideOverlay.
},
remove_overlay: {
(boolean) Refer to the "remove" attribute of the parameter
"options" from the method HideOverlay.
}
)(boolean) Returns true if successful, false, otherwise.
HideOverlay: function()
Hide the overlay div if it is currently visible.
| 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 (
duration: {
(int) The time, in seconds, of how long the effect should
last. Defaults to 1.
},
finish: {
(function) The function that should be run after the overlay
is hidden. Defaults to an empty function.
},
remove: {
(boolean) Whether or not the overlay div should be removed
from the DOM structure as well. Defaults to false.
}
)(boolean) Returns true if successful, false, otherwise.
PageLoading: function()
Show the loading image when this method is called and hide it when the body “onload” event is triggered.
| options | (object) An object containing various options used in the execution of this method. Refer to the methods HideLoadingImage, HideOverlay, ShowOverlay, and ShowLoadingImage for more information on some of these attributes. Defaults to an empty object. |
The structure of the options parameter, if given, should look like the following:
Object (
wait_time: {
(int) The time, in seconds, to wait before the loading image
is hidden. Defaults to 0.
},
color: {
(string) Refer to the "color" attribute of the parameter
"options" from the method ShowLoadingImage.
},
loading_finish: {
(function) Refer to the "finish" attribute of the parameter
"options" from the method ShowLoadingImage.
},
opacity: {
(int) Refer to the "opacity" attribute of the parameter
"options" from the method ShowOverlay.
},
overlay_color: {
(string) Refer to the "color" attribute of the parameter
"options" from the method ShowOverlay.
},
duration: {
(int) Refer to the "duration" attribute of the parameter
"options" from the method HideOverlay.
},
hiding_finish: {
(function) Refer to the "finish" attribute of the parameter
"options" from the method HideLoadingImage.
},
remove: {
(boolean) Refer to the "remove" attribute of the parameter
"options" from the method HideLoadingImage.
}
remove_overlay: {
(boolean) Refer to the "remove" attribute of the parameter
"options" from the method HideOverlay.
}
)(boolean) This method will always return true.
ShowLoadingImage: function()
Show the loading image.
| options | (object) An object containing various options used in the execution of this method. Refer to the method ShowOverlay for more information on some of the attributes. Defaults to an empty object. |
The structure of the options parameter, if given, should look like the following:
Object (
color: {
(string) The color of the loading image. The following are
the supported values: "black", "blue", "brown", "gold",
"gray", "green", "navy", "orange", "purple", "red", "white",
and "yellow". Defaults to "red".
},
finish: {
(function) The function that should be run after the loading
image is showned. Defaults to an empty function.
},
duration: {
(int) Refer to the "duration" attribute of the parameter
"options" from the method ShowOverlay.
},
opacity: {
(int) Refer to the "opacity" attribute of the parameter
"options" from the method ShowOverlay.
},
overlay_color: {
(string) Refer to the "color" attribute of the parameter
"options" from the method ShowOverlay.
}
)(boolean) The method always returns true.
ShowOverlay: function()
Create and show the overlay div if it is currently hidden.
| 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 (
color: {
(string) The background color of the overlay. Defaults to
"#FFFFFF".
},
duration: {
(int) The time, in seconds, of how long the effect should
last. Defaults to 1.
},
finish: {
(function) The function that should be run after the overlay
is showned. Defaults to an empty function.
},
opacity: {
(int) The opacity percentage for the overlay. This value
should be between 0 & 100. Defaults to 75.
}
)(boolean) The method will always return true.
UploadFile: function( form )
Submit the provided form whose sole purpose is to upload files.
| form | (mixed) Either the ID of the form or the DOM element for the form itself that will be uploading the file. |
| options | (object) An object containing various options used by this method. Refer to the method HideLoadingImage, HideOverlay, ShowLoadingImage, and ShowOverlay for more information on some of the attributes. Defaults to an empty object. |
The structure of the options parameter, if given, should look like the following:
Object (
finish: {
(function) The function to run once the upload is complete.
Defaults to an empty function.
},
hide_loading_image: {
(boolean) Whether or not the function HideLoadingImage
should be called. Defaults to true.
}
keep_overlay: {
(boolean) Refer to the "keep_overlay" attribute of the
parameter "options" from the method HideLoadingImage.
},
remove: {
(boolean) Refer to the "remove" attribute of the parameter
"options" from the method HideLoadingImage.
},
hiding_duration: {
(int) Refer to the "duration" attribute of the parameter
"options" from the method HideOverlay.
},
remove_overlay: {
(boolean) Refer to the "remove" attribute of the parameter
"options" from the method HideOverlay.
},
color: {
(string) Refer to the "color" attribute of the parameter
"options" from the method ShowLoadingImage.
},
loading_duration: {
(int) Refer to the "duration" attribute of the parameter
"options" from the method ShowOverlay.
},
opacity: {
(int) Refer to the "opacity" attribute of the parameter
"options" from the method ShowOverlay.
},
overlay_color: {
(string) Refer to the "color" attribute of the parameter
"options" from the method ShowOverlay.
},
)(boolean) This method will always return true.
Hide the loading image if it is currently visible.
HideLoadingImage: function()
Hide the overlay div if it is currently visible.
HideOverlay: function()
Show the loading image when this method is called and hide it when the body “onload” event is triggered.
PageLoading: function()
Show the loading image.
ShowLoadingImage: function()
Create and show the overlay div if it is currently hidden.
ShowOverlay: function()
This method is called after an upload has been completed.
UploadComplete: function( data )
Submit the provided form whose sole purpose is to upload files.
UploadFile: function( form )