ux.js

Function Library

 

Topic

Method

absl

absl(bsl-object,callback,options[]) a bsl wrapper

aget

aget(url, callback, options={}) A wrapper for ux.ajax (GET)

ajax

ajax(url, callback, options={}) A Wrapper for ux.ajax POST

apost

apost(url, data, callback, options={}) A wrapper for ux.ajax (POST)

appTitleMenu

appTitleMenu(action,id,title,callback) Manipulate the app menu dropdown entries

autocomplete

autocomplete(id, url, options) Add auto-complete functionality to any input box.

click

click(ID, func) A wrapper for the listen function

dgrid

Create table from Data or BSL call

dialog

dialog(title, content, options, onclose) A modal dialog box

focus

focus(fs, f) set focus with rules

formatNumber

formatNumber(Number,CountOfDecimals,UseGrouping)  

Convet Number to local string fomrat with defined decimal places

getElement

getElement(ID) search an element by Id or Name

listen

listen(eventName, ID, func)

loading

loading(display) Show a loading mask to avoid the user click on any control

saveAll

saveAll(url, data, callback, options={}) Send data to the backend and block the app in the meanwhile. It switch the "Save" button to "Saving" also.

set

set(idName, status, options) Provide a visual feedback to the input controls

tabs

tabs(id, action, params=null) Add functionality to ui.tabs

toJson

toJson(string,boolean quoted) convert string to JSON String (convert  ' to '')

 

Date Tiem Functions

Topic

Method

getDate()

return company Date/Time as Date object

getToday(Separator,Date)

return date as string in local format

getTime(Separator,Time)

GetTime(json date astring): return time as local string

jsonDate2local

jsonDate2local(d) convert JSON Date to local date string

jsonDateTime2local

jsonDateTime2local(d) convert Json DateTime String to local date time string

min2time

min2time(Minutes) return string in format "x Days hh:mm"

sec2time

sec2tome(Seconds) return string in format "x Days hh:mm:ss"