new UI
UI toolkit (requires jQuery with $j alias).
- Source:
- ui.js, line 15
Members
-
<static> popupActive
-
Is a popup active ?
- Source:
- ui.js, line 157
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 341
-
<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 542
-
<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 823
-
<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 785
-
<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 84
-
<static> dialog
-
Displays dialog popup.
Parameters:
Name Type Description msg
Warning message buttonSpecs
Array of button specifications (cf. button() function) - Source:
- ui.js, line 305
-
<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 65
-
<static> errorPopup
-
Displays error popup.
Parameters:
Name Type Description err
Error (can be a message or an exception) callback
Callback - Source:
- ui.js, line 294
-
<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 132
-
<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 565
-
<static> getErrorMessage
-
Get plain error message from error or exception.
Parameters:
Name Type Description err
Error message or exception - Source:
- ui.js, line 274
-
<static> hideLoading
-
Hide loading mask.
Parameters:
Name Type Description spec
Specification: - callback: Callback
- Source:
- ui.js, line 434
-
<static> iframe
-
Returns a new iframe.
Parameters:
Name Type Description url
Source URL - Source:
- ui.js, line 150
-
<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 109
-
<static> infoPopup
-
Displays information popup.
Parameters:
Name Type Description msg
Information message callback
Callback - Source:
- ui.js, line 255
-
<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 766
-
<static> news
-
Return a news block
Parameters:
Name Type Description n
news - Source:
- ui.js, line 904
-
<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 356
-
<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 330
-
<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 713
-
<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, min value is 20)
- 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 180
Example
Simplicite.UI.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 407
-
<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 868
-
<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 842
-
<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 804
-
<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 988
-
<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 22
-
<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 600
-
<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 922
-
<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 453
-
<static> warningPopup
-
Displays warning popup.
Parameters:
Name Type Description msg
Warning message callback
Callback - Source:
- ui.js, line 265
-
<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 387
-
<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 371