APIs

Show:
Defined in: _libs\Lib.js:1

Lib is a general library of additional utilities and helper commands used in StudioLite

Constructor

Lib

() Object

Defined in _libs\Lib.js:1

Returns:

Object:

instantiated Lib

Methods

addBackboneCollectionSave

()

Defined in _libs\Lib.js:39

Add to backbone collection save option

addBackboneViewOptions

()

Defined in _libs\Lib.js:24

Add the now deprecated Backbone > View > Options so we can pass as args to new views

base64Decode

(
  • UNKNOWN
)
String

Defined in _libs\Lib.js:759

base64Decode

Parameters:

  • UNKNOWN String

Returns:

String:

base64Encode

(
  • UNKNOWN
)
String

Defined in _libs\Lib.js:748

base64Encode

Parameters:

  • UNKNOWN String

Returns:

String:

capitaliseFirst

(
  • string
)
String

Defined in _libs\Lib.js:705

Capitilize first letter

Parameters:

  • string String

Returns:

String:

string

cleanChar

(
  • value
)
String

Defined in _libs\Lib.js:275

Simplify a string to basic character set

Parameters:

  • value String

Returns:

String:

cleaned string

cleanProbCharacters

(
  • i_string
  • i_restriction
)
String

Defined in _libs\Lib.js:770

Remove characters that a problemtaic to app / js

Parameters:

  • i_string String
  • i_restriction Number

Returns:

String:

string

colorToDecimal

(
  • color
)
Number

Defined in _libs\Lib.js:675

Smart convert color (many) to decinal

Parameters:

  • color String

Returns:

Number:

decimal

colorToHex

(
  • color
)
String

Defined in _libs\Lib.js:689

Smart convert color (many) to hex

Parameters:

  • color String

Returns:

String:

hex

decimalToHex

(
  • d
)
String

Defined in _libs\Lib.js:628

Decimal to hex converter

Parameters:

  • d Number

Returns:

String:

hex

foreceBrowserCompatability

()

Defined in _libs\Lib.js:124

Force browser compatability

function

(
  • i_name
)
String

Defined in _libs\Lib.js:605

Get specific param name from URL

Parameters:

  • i_name String

Returns:

String:

getComment

(
  • str
)
String

Defined in _libs\Lib.js:307

Get DOM comment string

Parameters:

  • str String

Returns:

String:

string of comment if retrieved

getEpochTime

() Number

Defined in _libs\Lib.js:617

Returns Epoch base time

Returns:

Number:

getThemeColor

(
  • color
)

Defined in _libs\Lib.js:798

Get current selection theme color

Parameters:

  • color String

hexToDecimal

(
  • h
)
Number

Defined in _libs\Lib.js:640

Hex to decimal converter

Parameters:

  • h String

Returns:

Number:

decimal

inDevMode

() Boolean

Defined in _libs\Lib.js:61

In dev mode

Returns:

Boolean:

initUserAgent

()

Defined in _libs\Lib.js:206

Set user agent / browser version

isEmpty

(
  • i_string
)
Boolean

Defined in _libs\Lib.js:111

Returns this model's attributes as...

Parameters:

  • i_string String

Returns:

Boolean:

isMobile

() Boolean

Defined in _libs\Lib.js:100

Is running platform a mobile device

Returns:

Boolean:

loadCss

(
  • i_url
)

Defined in _libs\Lib.js:87

Load non primary CSS

Parameters:

  • i_url String

log

(
  • msg
)

Defined in _libs\Lib.js:14

Output formatted string to console and omit error on old browsers...

Parameters:

  • msg String

logErrors

()

Defined in _libs\Lib.js:74

log errors in distribution mode

padZeros

(
  • n
  • width
  • z
)
Number

Defined in _libs\Lib.js:734

Pad zeros

Parameters:

  • n Number

    value

  • width Number

    pre-pad width

  • z Number

    negative as in '-'

Returns:

Number:

zero padded string

parseToFloatDouble

(
  • i_value
)
Number

Defined in _libs\Lib.js:563

Convert number or string to float with double precision

Parameters:

  • i_value Object

Returns:

Number:

parseXml

(
  • xml
)
Object

Defined in _libs\Lib.js:327

Convert an XML data format to a DOM enabled data structure

Parameters:

  • xml XML

    data to parse

Returns:

Object:

xml data structure

promptOnExit

()

Defined in _libs\Lib.js:49

Prompt on application exit

remoteFileExits

(
  • url
)
Boolean

Defined in _libs\Lib.js:588

Check if a remote file exists

Parameters:

  • url String

Returns:

Boolean:

rgbToHex

(
  • rgb
)
String

Defined in _libs\Lib.js:651

RGB color to hex converter

Parameters:

  • rgb Number

Returns:

String:

hex

selectionSwitcher

()

Defined in _libs\Lib.js:809

Enable selection switcher via jquery plugin usage: $('#element').disableSelection() or$('#element').enableSelection()

setIntervalTimes

(
  • i_func
  • i_sleep
  • i_timesRun
)

Defined in _libs\Lib.js:715

Run a function n number of times with sleep in between

Parameters:

  • i_func Function
  • i_sleep Number
  • i_timesRun Number

uniqueArray

(
  • i_array
)
Number

Defined in _libs\Lib.js:573

Returns the total unique members of an array

Parameters:

  • i_array Array

Returns:

Number:

total unique members

validateEmail

(
  • emailAddress
)
Boolean

Defined in _libs\Lib.js:190

Validate email address format using regexp

Parameters:

  • emailAddress String

Returns:

Boolean:

xml2json

(
  • o
  • internal
)
Object

Defined in _libs\Lib.js:517

Convert a json data format to xml

Parameters:

  • o JSON
  • internal Object

Returns:

Object:

xml data structure

xml2json

(
  • xml
  • internal
)
Object

Defined in _libs\Lib.js:360

Convert an XML data format to json

Parameters:

  • xml XML
  • internal Object

Returns:

Object:

json data structure