new UI
UI toolkit (requires jQuery with $j alias).
- Source:
- ui.js, line 14
Members
-
<static> popupActive
-
Is a popup active ?
- Source:
- ui.js, line 156
Methods
-
<static> alert
-
Displays simple alert dialog popup.
Parameters:
Name Type Description msg
Message (can be simple message or a text code or a text code:message) callback
Callback called when the OK button is clicked - Source:
- ui.js, line 338
-
<static> area
-
Add a new simple area to target
Parameters:
Name Type Description target
Target DOM ID or element spec
Specification: - id: DOM ID
- label: Area label
- content: Area content
- expandable Expandable (false by default) ?
- expanded Expanded by default (true by default) ?
- expandEffect Expand effect : "slide" or "fade"
- toggle Toggle handler
- width: Width in px
- height: Height in px
- style: CSS styles
- Source:
- ui.js, line 539
-
<static> areaChart
-
Area bar chart using JQPlot
Parameters:
Name Type Description target
Target DOM ID or element spec
Specifications: - values: Values
- names: Names
- labels: Labels
- options: Chart options
- Source:
- ui.js, line 820
-
<static> barChart
-
Bar chart using JQPlot
Parameters:
Name Type Description target
Target DOM ID or element spec
Specifications: - values: Values
- names: Names
- labels: Labels
- options: Chart options
- Source:
- ui.js, line 782
-
<static> button
-
Returns a new button.
Parameters:
Name Type Description spec
Specification: - id: DOM ID
- label: Label
- click: Click handler
- color: Color (red, green, blue, orange, purple)
- style: CSS styles
- Source:
- ui.js, line 83
-
<static> dialog
-
Displays dialog popup.
Parameters:
Name Type Description msg
Warning message buttonSpecs
Array of button specifications (cf. button() function) - Source:
- ui.js, line 304
-
<static> div
-
Returns a new div.
Parameters:
Name Type Description spec
Specification: - id: DOM ID
- name: Optional name
- width: Width in px
- height: Height in px
- style: CSS styles
- Source:
- ui.js, line 64
-
<static> errorPopup
-
Displays error popup.
Parameters:
Name Type Description err
Error (can be a message or an exception) callback
Callback - Source:
- ui.js, line 293
-
<static> form
-
Returns a new form.
Parameters:
Name Type Description spec
Specification: - id: DOM ID
- action: Form action URL
- method: Form method
- multipart: Multipart form ?
- submit: Submit handler (overrides default submit)
- style: CSS styles
- Source:
- ui.js, line 131
-
<static> gadget
-
Add a new gadget to target
Parameters:
Name Type Description target
Target DOM ID or element spec
Specification: - id: DOM ID
- label: Gadget label
- content: Gadget content
- expandable Expandable (false by default) ?
- expanded Expanded by default (true by default) ?
- expandEffect Expand effect : "slide" or "fade"
- toggle Toggle handler
- layout Gadget layout (e.g. "modern")
- width: Width in px
- height: Height in px
- style: CSS styles
- Source:
- ui.js, line 562
-
<static> getErrorMessage
-
Get plain error message from error or exception.
Parameters:
Name Type Description err
Error message or exception - Source:
- ui.js, line 273
-
<static> hideLoading
-
Hide loading mask.
Parameters:
Name Type Description spec
Specification: - callback: Callback
- Source:
- ui.js, line 431
-
<static> iframe
-
Returns a new iframe.
Parameters:
Name Type Description url
Source URL - Source:
- ui.js, line 149
-
<static> imageButton
-
Returns a new image button.
Parameters:
Name Type Description spec
Specification: - id: DOM ID
- src: Image source
- label: Label set as alt text and title
- click: Click handler
- style: CSS styles
- Source:
- ui.js, line 108
-
<static> infoPopup
-
Displays information popup.
Parameters:
Name Type Description msg
Information message callback
Callback - Source:
- ui.js, line 254
-
<static> lineChart
-
Line chart using JQPlot
Parameters:
Name Type Description target
Target DOM ID or element spec
Specifications: - values: Values
- names: Names
- labels: Labels
- options: Chart options
- Source:
- ui.js, line 763
-
<static> news
-
Return a news block
Parameters:
Name Type Description n
news - Source:
- ui.js, line 901
-
<static> okCancelDialog
-
Displays OK/CANCEL dialog popup.
Parameters:
Name Type Description msg
Message okCallback
Callback called if the OK button is clicked cancelCallback
Callback called if the CANCEL button is clicked - Source:
- ui.js, line 353
-
<static> okDialog
-
Displays simple dialog popup.
Parameters:
Name Type Description msg
Message callback
Callback called when the OK button is clicked - Source:
- ui.js, line 327
-
<static> pieChart
-
Pie chart using JQPlot
Parameters:
Name Type Description target
Target DOM ID or element spec
Specifications: - values: Values
- labels: Labels
- options: Chart options
- Source:
- ui.js, line 710
-
<static> popup
-
Returns and display a modal popup.
Parameters:
Name Type Description spec
Specification: - name: Popup name (ui_popup default)
- content: Popup content
- url: URL content (in an IFRAME)
- afterOpen After open handler
- closeable: Closeable ?
- beforeClose Before close handler (must return false to prevent popup closing)
- afterClose After close handler
- margin: Margin in px around the popup (not compatible with width and heigth)
- width: Width in px (not compatible with margin)
- height: Height in px (not compatible with margin)
- target: Target element (defaults to document body)
- style: CSS styles
- Source:
- ui.js, line 179
Example
popup({ width: 300, height: 200, beforeClose: function() { console.log("Popup closing..."); return true; }).append("
Hello world
"); -
<static> showLoading
-
Show loading mask.
Parameters:
Name Type Description spec
Specification: - message: Message (mandatory)
- anim: Add animated gif (defaults to true) ?
- target: Target element (defaults to document body)
- callback: Callback
- Source:
- ui.js, line 404
-
<static> socialPost
-
Returns a new social post bloc
Parameters:
Name Type Description spec
Specifications: - id: DOM ID
- date: Post date
- message: Post message (if undefined a form for new post is generated)
- about: Post reference
- followersOnly: Followers only post ?
- pictureURL: Picture URL
- userName: User full name
- userLogin: User login
- userID: User ID
- messagePlaceholder: New post form message textarea placeholder
- buttonLabel: New post form button label
- post: New post form handler
- Source:
- ui.js, line 865
-
<static> stackAreaChart
-
Stack area bar chart using JQPlot
Parameters:
Name Type Description target
Target DOM ID or element spec
Specifications: - values: Values
- names: Names
- labels: Labels
- options: Chart options
- Source:
- ui.js, line 839
-
<static> stackBarChart
-
Stack bar chart using JQPlot
Parameters:
Name Type Description target
Target DOM ID or element spec
Specifications: - values: Values
- names: Names
- labels: Labels
- options: Chart options
- Source:
- ui.js, line 801
-
<static> staticMap
-
Static Google® map image
Parameters:
Name Type Description p
parameters: - coordinates: geographical coordinates <latitude>;<longitude>
- latitude: latitude (unless coordinates is set)
- longitude: longitude (unless coordinates is set)
- zoom: zoom (defaults to 15)
- width: width (defaults to 300)
- height: height (defaults to 200)
- id: ID (optional)
- Source:
- ui.js, line 985
-
<static> T
-
Returns text for specified code (if no text is found code is returned).
Parameters:
Name Type Description code
Text code - Source:
- ui.js, line 21
-
<static> tabs
-
Add new tabs to target
Parameters:
Name Type Description target
Target DOM ID or element specs
Specifications, each one for one tab: - id: Tab DOM ID
- label: Tab html label
- title: Tab title as tip
- icon: Tab image icon URL
- content: Tab content
- effect: Change tab effect : "slide" or "fade"
- activate: Change tab handler(spec)
- closeable: true to allow the user to remove the tab
- close: Close tab handler(spec, fn to call if closing is permitted)
- style: CSS styles
- Source:
- ui.js, line 597
-
<static> ticker
-
Creates a new rotating ticker in designated target
Parameters:
Name Type Description target
Target element delay
Rotation delay in milliseconds - Source:
- ui.js, line 919
-
<static> toast
-
Show a toast message (hidden after specified delay).
Parameters:
Name Type Description spec
Specification: - message: Message (mandatory)
- delay: Hide delay (default is 1.5s)
- callback: Callback called after toast message is closed
- target: Target element (defaults to document body)
- Source:
- ui.js, line 450
-
<static> warningPopup
-
Displays warning popup.
Parameters:
Name Type Description msg
Warning message callback
Callback - Source:
- ui.js, line 264
-
<static> yesNoCancelDialog
-
Displays YES/NO/CANCEL dialog popup.
Parameters:
Name Type Description msg
Message yesCallback
Callback called if the YES button is clicked noCallback
Callback called if the NO button is clicked cancelCallback
Callback called the CANCEL button is clicked - Source:
- ui.js, line 384
-
<static> yesNoDialog
-
Displays YES/NO dialog popup.
Parameters:
Name Type Description msg
Message yesCallback
Callback called if the YES button is clicked noCallback
Callback called if the NO button is clicked - Source:
- ui.js, line 368