The images list will generate all HTML and Script code to add an interactive list of image.


You can add event on image selection, and add an "Add Image" button to more interaction

How to Initialize the Image List ?


The initialization of the Image List is an one step process, just call the function Init of the class with its three arguments (see bellow for more details).


Class Details


Functions:


       Initialization & Main Functions

Name

Arguments

Return

Description

Init

  • String: ID - HMTL ID defining the position in the DOM of the viewer
  • String: Name - Define the name of the ImageList all ImageList component will be defined by this name (this is to avoid mixing if you use different ImageList, so be sure to use different name for each viewer).
  • Function: Callback - Callback function.

VOID

This function Initialized every part of the viewer: HMTL, CSS, Data, Events, etc...

It will be generated in the defined ID and all HTML IDs used for this viewer will start by the name defined in arguments


This system use the Util: LoadCheck module and to be Called, Use callback arguments to compensate the asynchronous loading.

Open

  • None

VOID

Use this function to open the list.

AddImages

  • String or String[]: Images - URL of image(s) to add.
  • Function: AICallback - Function called when all images are loaded

VOID

This function add images to the Image List and wait for them to load, use AICallback to add some action only after images are all loaded.



Setters Functions

Name

Arguments

Return

Description

SetBorder

  • String: Type - CSS border type.
  • Integer: Size - Border size (only in px).
  • String: Color - String that define the color.

VOID

This function will add a border to the image list window.

SetBackgroundColor

  • String: Color - String that define the color.

VOID

Use this function to change the background color.

AddClickCallback

  • Function: Func - Function called.
  • Class: Args - Arguments to pass with function

VOID

This function will add a callback function for when the user click on an image.

AddNewCallback

  • Function: Func - Function called.
  • Class: Args - Arguments to pass with function

VOID

This function will add a callback function for when the user click on the new image button.


If this function is not used it will call the HTML Open file

SetCloseButton

  • Function: SCBCallback - Function called when button Images are loaded.

VOID

Call this function to add the close button

SetNewButton

  • Function: SNBCallback - Function called when some required modules are Called.

VOID

Call this function to add the new button





Private Details



All private details are usable but its recommended to not use any of those. It might modify the proper functioning of the class.


Variables (Members):


Name

Type

Default Value

Description

basedId

String

undefined

HTML Id of the viewer parent.

name

String

undefined

Name of this Image list.

id

String

undefined

Global HMTL Id of the viewer (# + name).

newDirFunc

Function

null

It hold the callback function when user press the new button

newDirArgs

Class

null

It hold the arguments used by newDirFunc()

selectedFunc

Function

null

It hold the callback function when user press an image.

selectedArgs

Class

null

It hold the arguments used by selectedFunc()



Functions:

Initialization & Main Functions

Name

Arguments

Return

Description

UpdateImages

  • None

VOID

Reset all images and place them properly.



Util Functions

Name

Arguments

Return

Description

GetClose

  • None

JQuery DOM Object

Get close button JQuery DOM Object.

GetNew

  • None

JQuery DOM Object

Get new button JQuery DOM Object.

GetList

  • None

JQuery DOM Object

Get list JQuery DOM Object.

GetImageDiv

  • String: Name - Name of the image you want to select.

JQuery DOM Object

Get get main Div of the selected image.

GetImageImg

  • String: Name - Name of the image you want to select.

JQuery DOM Object

Get get main img of the selected image.




Compatibility



LANGUAGE CLASS: Not compatible.

Created with the Personal Edition of HelpNDoc: Free Web Help generator