Class Index | File Index

Classes


Class Simplicite.UI


Defined in: ui.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
UI toolkit (requires jQuery with $j alias).
Field Summary
Field Attributes Field Name and Description
<static>  
Simplicite.UI.popupActive
Is a popup active ?
Method Summary
Method Attributes Method Name and Description
<static>  
Simplicite.UI.alert(msg, callback)
Displays simple alert dialog popup.
<static>  
Simplicite.UI.area(target, spec)
Add a new simple area to target
<static>  
Simplicite.UI.areaChart(target, spec)
Area bar chart using JQPlot
<static>  
Simplicite.UI.barChart(target, spec)
Bar chart using JQPlot
<static>  
Simplicite.UI.button(spec)
Returns a new button.
<static>  
Simplicite.UI.contextualpopup(spec)
<static>  
Simplicite.UI.dialog(msg, buttonSpecs)
Displays dialog popup.
<static>  
Simplicite.UI.div(spec)
Returns a new div.
<static>  
Simplicite.UI.errorPopup(err, callback)
Displays error popup.
<static>  
Simplicite.UI.form(spec)
Returns a new form.
<static>  
Simplicite.UI.gadget(target, spec)
Add a new gadget to target
<static>  
Simplicite.UI.getErrorMessage(err)
Get plain error message from error or exception.
<static>  
Simplicite.UI.hideLoading(spec)
Hide loading mask.
<static>  
Simplicite.UI.icon(name)
<static>  
Simplicite.UI.iframe(url)
Returns a new iframe.
<static>  
Simplicite.UI.image(name)
<static>  
Simplicite.UI.imageButton(spec)
Returns a new image button.
<static>  
Simplicite.UI.infoPopup(msg, callback)
Displays information popup.
<static>  
Simplicite.UI.lineChart(target, spec)
Line chart using JQPlot
<static>  
Simplicite.UI.news(n)
Return a news block
<static>  
Simplicite.UI.newWindow(url)
<static>  
Simplicite.UI.okCancelDialog(msg, okCallback, cancelCallback)
Displays OK/CANCEL dialog popup.
<static>  
Simplicite.UI.okDialog(msg, callback)
Displays simple dialog popup.
<static>  
Simplicite.UI.pieChart(target, spec)
Pie chart using JQPlot
<static>  
Simplicite.UI.popup(spec)
Returns and display a modal popup.
<static>  
Simplicite.UI.popupWindow(spec)
<static>  
Simplicite.UI.showLoading(spec)
Show loading mask.
<static>  
Simplicite.UI.socialPost(spec)
Returns a new social post bloc
<static>  
Simplicite.UI.stackAreaChart(target, spec)
Stack area bar chart using JQPlot
<static>  
Simplicite.UI.stackBarChart(target, spec)
Stack bar chart using JQPlot
<static>  
Simplicite.UI.T(code)
Returns text for specified code (if no text is found code is returned).
<static>  
Simplicite.UI.tabs(target, specs)
Add new tabs to target
<static>  
Simplicite.UI.ticker(target, delay)
Creates a new rotating ticker in designated target
<static>  
Simplicite.UI.toast(spec)
Show a toast message (hidden after specified delay).
<static>  
Simplicite.UI.warningPopup(msg, callback)
Displays warning popup.
<static>  
Simplicite.UI.yesNoCancelDialog(msg, yesCallback, noCallback, cancelCallback)
Displays YES/NO/CANCEL dialog popup.
<static>  
Simplicite.UI.yesNoDialog(msg, yesCallback, noCallback)
Displays YES/NO dialog popup.
Class Detail
Simplicite.UI()
UI toolkit (requires jQuery with $j alias).
Field Detail
<static> Simplicite.UI.popupActive
Is a popup active ?
Method Detail
<static> Simplicite.UI.alert(msg, callback)
Displays simple alert dialog popup.
Parameters:
msg
Message (can be simple message or a text code or a text code:message)
callback
Callback called when the OK button is clicked

<static> Simplicite.UI.area(target, spec)
Add a new simple area to target
Parameters:
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

<static> Simplicite.UI.areaChart(target, spec)
Area bar chart using JQPlot
Parameters:
target
Target DOM ID or element
spec
Specifications:
  • values: Values
  • names: Names
  • labels: Labels
  • options: Chart options

<static> Simplicite.UI.barChart(target, spec)
Bar chart using JQPlot
Parameters:
target
Target DOM ID or element
spec
Specifications:
  • values: Values
  • names: Names
  • labels: Labels
  • options: Chart options

<static> Simplicite.UI.button(spec)
Returns a new button.
Parameters:
spec
Specification:
  • id: DOM ID
  • label: Label
  • click: Click handler
  • color: Color (red, green, blue, orange, purple)
  • style: CSS styles

<static> Simplicite.UI.contextualpopup(spec)
Parameters:
spec

<static> Simplicite.UI.dialog(msg, buttonSpecs)
Displays dialog popup.
Parameters:
msg
Warning message
buttonSpecs
Array of button specifications (cf. button() function)

<static> Simplicite.UI.div(spec)
Returns a new div.
Parameters:
spec
Specification:
  • id: DOM ID
  • name: Optional name
  • width: Width in px
  • height: Height in px
  • style: CSS styles

<static> Simplicite.UI.errorPopup(err, callback)
Displays error popup.
Parameters:
err
Error (can be a message or an exception)
callback
Callback

<static> Simplicite.UI.form(spec)
Returns a new form.
Parameters:
spec
Specification:
  • id: DOM ID
  • action: Form action URL
  • method: Form method
  • multipart: Multipart form ?
  • submit: Submit handler (overrides default submit)
  • style: CSS styles

<static> Simplicite.UI.gadget(target, spec)
Add a new gadget to target
Parameters:
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

<static> Simplicite.UI.getErrorMessage(err)
Get plain error message from error or exception.
Parameters:
err
Error message or exception

<static> Simplicite.UI.hideLoading(spec)
Hide loading mask.
Parameters:
spec
Specification:
  • callback: Callback

<static> Simplicite.UI.icon(name)
Parameters:
name

<static> Simplicite.UI.iframe(url)
Returns a new iframe.
Parameters:
url
Source URL

<static> Simplicite.UI.image(name)
Parameters:
name

<static> Simplicite.UI.imageButton(spec)
Returns a new image button.
Parameters:
spec
Specification:
  • id: DOM ID
  • src: Image source
  • label: Label set as alt text and title
  • click: Click handler
  • style: CSS styles

<static> Simplicite.UI.infoPopup(msg, callback)
Displays information popup.
Parameters:
msg
Information message
callback
Callback

<static> Simplicite.UI.lineChart(target, spec)
Line chart using JQPlot
Parameters:
target
Target DOM ID or element
spec
Specifications:
  • values: Values
  • names: Names
  • labels: Labels
  • options: Chart options

<static> Simplicite.UI.news(n)
Return a news block
Parameters:
n
news

<static> Simplicite.UI.newWindow(url)
Parameters:
url

<static> Simplicite.UI.okCancelDialog(msg, okCallback, cancelCallback)
Displays OK/CANCEL dialog popup.
Parameters:
msg
Message
okCallback
Callback called if the OK button is clicked
cancelCallback
Callback called if the CANCEL button is clicked

<static> Simplicite.UI.okDialog(msg, callback)
Displays simple dialog popup.
Parameters:
msg
Message
callback
Callback called when the OK button is clicked

<static> Simplicite.UI.pieChart(target, spec)
Pie chart using JQPlot
Parameters:
target
Target DOM ID or element
spec
Specifications:
  • values: Values
  • labels: Labels
  • options: Chart options

<static> Simplicite.UI.popup(spec)
Returns and display a modal popup.
Sample usage:
popup({ width: 300, height: 200, beforeClose: function() { console.log("Popup closing..."); return true; }).append("

Hello world

");
Parameters:
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

<static> Simplicite.UI.popupWindow(spec)
Parameters:
spec

<static> Simplicite.UI.showLoading(spec)
Show loading mask.
Parameters:
spec
Specification:
  • message: Message (mandatory)
  • anim: Add animated gif (defaults to true) ?
  • target: Target element (defaults to document body)
  • callback: Callback

<static> Simplicite.UI.socialPost(spec)
Returns a new social post bloc
Parameters:
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

<static> Simplicite.UI.stackAreaChart(target, spec)
Stack area bar chart using JQPlot
Parameters:
target
Target DOM ID or element
spec
Specifications:
  • values: Values
  • names: Names
  • labels: Labels
  • options: Chart options

<static> Simplicite.UI.stackBarChart(target, spec)
Stack bar chart using JQPlot
Parameters:
target
Target DOM ID or element
spec
Specifications:
  • values: Values
  • names: Names
  • labels: Labels
  • options: Chart options

<static> Simplicite.UI.T(code)
Returns text for specified code (if no text is found code is returned).
Parameters:
code
Text code

<static> Simplicite.UI.tabs(target, specs)
Add new tabs to target
Parameters:
target
Target DOM ID or element
specs
Specifications, each one for one tab:
  • id: DOM ID
  • label: Tab label
  • content: Tab content
  • changeEffect Change tab effect : "slide" or "fade"
  • change Change tab handler
  • width: Width in px
  • height: Height in px
  • style: CSS styles

<static> Simplicite.UI.ticker(target, delay)
Creates a new rotating ticker in designated target
Parameters:
target
Target element
delay
Rotation delay in milliseconds

<static> Simplicite.UI.toast(spec)
Show a toast message (hidden after specified delay).
Parameters:
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)

<static> Simplicite.UI.warningPopup(msg, callback)
Displays warning popup.
Parameters:
msg
Warning message
callback
Callback

<static> Simplicite.UI.yesNoCancelDialog(msg, yesCallback, noCallback, cancelCallback)
Displays YES/NO/CANCEL dialog popup.
Parameters:
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

<static> Simplicite.UI.yesNoDialog(msg, yesCallback, noCallback)
Displays YES/NO dialog popup.
Parameters:
msg
Message
yesCallback
Callback called if the YES button is clicked
noCallback
Callback called if the NO button is clicked

Documentation generated by JsDoc Toolkit 2.3.2 on Tue Apr 10 2018 13:30:59 GMT+0200 (CEST)