Class: Apps

Apps

Document a namespace object of Apps.

global new Apps(service, name)

A Base Class of Apps

Name Type Description
service Mobizen(Service)

service object

name string

app name

Author:

Extends

Requires

Classes

Backups
Contacts
Documents
Files
FindDevice
Help
Media
Meeting
Messages
Packets
Settings
TouchBot
Console
ContactEditor
Cursor
PhotoViewer
PlayList
Tab

Members

$action jQueryObject

Action Menu

$app jQueryObject

$share jQueryObject

A action of content share

$sidebar jQueryObject

$tools jQueryObject

AUTHOR string

CHANGES ?array.<{type: string, ver: string, msg: string}>

name string

NOTE string

opened boolean

tabs ?array.<tabName>

VERSION string

Type Definitions

alias

static Apps.I18n(source, data, pre){string}

Internationalization Translater

Name Type Description
source string

resource key or template

data object optional

resource object

pre boolean optional

stopping deep search

Returns:
Type Description
string translateed string
Example
i18n('&lt;a href="{link}">{text}&lt;/a>', {
  link: "https://mobizen.com",
  text: "mobizen.com"
});
//=> &lt;a href="https://mobizen.com">mobizen.com&lt;/a>

static Apps.Inherits(ctor, superCtor, proto)

Class Inherits

Name Type Description
ctor Constructor

constructor

superCtor Constructor

super constructor

proto Prototype optional

constructor.prototype

static Apps.Presentation Apps.Presentation

Namespace of Presentation

Properties:
Name Type Description
Client Apps.Presentation~Client

A Class of Presentation Client

Host Apps.Presentation~Host

A Class of Presentation Host

Pointer Apps.Presentation~Pointer

A Class of Presentation Pointer

WebRTC Apps.Presentation~WebRTC

A Class of Presentation WebRTC

Shared elements

Properties:
Name Type Argument Description
win jQueryObject

$(window)

doc jQueryObject

$(document)

body jQueryObject

$(document.body)

header jQueryObject

$('#header')

contents jQueryObject

$('#contents')

modules jQueryObject

$('#modules')

focused jQueryObject <nullable>

null of focused element

db Apps#db

Application DB controller

Properties:
Name Type Description
data Mobizen.Apps.DB.Models.<modelName>

Connected to data channel database

local Mobizen.Apps.DB.Models.<modelName>

Connected to local channel database

loaded boolean

true if initialized DB

accept boolean

true if this app has the DB

reset function

Drop database table and then call this.db.setup automatically.

setup function

Create new database table with extend additional methods for db query and then excute callback function.

Properties:
Name Type Description
pattern Mobizen.I18n.pattern

A regular expression pattern of template

search Mobizen.I18n.search

find resource

engine Mobizen.I18n.engine

replaced string

locale string

locale string

const object

constant resources

Instance of Service

Properties:
Name Type Description
apps Mobizen.Apps

Accessible Mobizen/Apps API

device Mobizen.Device

Accessible Mobizen/Device API

socket Mobizen.Socket

Accessible Mobizen/Socket API

tools Mobizen.Tools

Accessible Mobizen/Tools API

tab Apps~Tab

Application tab interface

Generic User Interfaces

Properties:
Name Type Description
dialog Mobizen.UI~Dialog

Dialog Interfaces

overlay Mobizen.UI~Overlay

Overlay controller

panel Mobizen.UI~Panel

A deep(forward/backward) controller of panel

shortcut Mobizen.UI~Shortcut

Keyboard shortcut API

Methods

Disable all action during the progressing

data($el){object}

Get data from dom-storage.

Name Type Description
$el jQueryObject

selected item

Returns:
Type Description
object dom storage data

disable(state, type){boolean}

Name Type Description
state boolean optional
type string optional
Returns:
Type Description
boolean state of disabled

draggable($el)

Enabling drag and drop if you need

Name Type Description
$el jQueryObject

draggable item

inherited emit(type){boolean}

Execute each of the listeners in order with the supplied arguments.

Name Type Description
type string

type of event

Returns:
Type Description
boolean true if event had listeners, false otherwise.

inherited listeners(type){array}

Name Type Description
type string

type of event

Returns:
Type Description
array array of listeners for the specified event.

inherited off(type, listener){Mobizen.Event}

Remove a listener from the listener array for the specified event. Caution: changes array indices in the listener array behind the listener.

Calling .off() with no arguments removes all handlers attached to the elements. if use one argument those of the specified event. It's not a good idea to remove listeners that were added elsewhere in the code, especially when it's on an emitter that you didn't create (e.g. sockets or file streams).

Name Type Description
type string optional

type of event

listener function optional

callback

Throws:
Will throw an error if the listener argument is not a function.
Returns:
Type Description
Mobizen.Event emitter, so calls can be chained.

inherited on(type, listener){Mobizen.Event}

Adds a listener to the end of the listeners array for the specified event. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of event and listener will result in the listener being added multiple times.

Name Type Description
type string

type of event

listener function

callback

Throws:
Will throw an error if the listener argument is not a function.
Returns:
Type Description
Mobizen.Event emitter, so calls can be chained.

inherited once(type, listener){Mobizen.Event}

Adds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed.

Name Type Description
type string

type of event

listener function

callback

Throws:
Will throw an error if the listener argument is not a function.
Returns:
Type Description
Mobizen.Event emitter, so calls can be chained.

inherited pipe(dest, always){Mobizen.Event}

This method pulls all the data out of a readable stream, and writes it to the supplied destination, automatically managing the flow so that the destination is not overwhelmed by a fast readable stream.

Name Type Description
dest Mobizen.Event

destination

always boolean optional
Returns:
Type Description
Mobizen.Event dest emitter, so calls can be chained.
Example
A.pipe(B).pipe(C);

self(){boolean}

Get activate state of app.

Returns:
Type Description
boolean current app name matched

sitting($el){number}

Get position by viewport element.

Name Type Description
$el jQueryObject
Returns:
Type Description
number position offset -1 or 0 or 1

storage(key, val){object}

Store and Read data of local storage.

Name Type Description
key string
val *
Returns:
Type Description
object excuted result

transfer(action, files)

Transfer data each channels.

Name Type Description
action string

type of action

files array.<files>

unique($focused){object}

An filter for unique item.

Name Type Description
$focused jQueryObject

selected item

Returns:
Type Description
object unique dom storage datas

inherited virtual unpipe(dest){Mobizen.Event}

This method will remove the hooks set up for a previous pipe() call. If the destination is not specified, then all pipes are removed. If the destination is specified, but no pipe is set up for it, then this is a no-op.

Name Type Description
dest Mobizen.Event

destination

Returns:
Type Description
Mobizen.Event dest emitter, so calls can be chained.

inner accept(val){object}

Name Type Description
val *
Returns:
Type Description
object cloned object

inner capitalize(str){string}

Name Type Description
str string
Returns:
Type Description
string capitalized

inner draghelper()

inner escape(str){string}

Name Type Description
str string
Returns:
Type Description
string escaped string of jquery selector

inner oncancelfile()

Listens to Events:

inner onchangeuploadinput()

Observe upload input change

inner onclickapp(event)

Unselect items

Name Type Description
event DOMEvent
Fires:

inner onclickmousedowntab(event)

Action menus

Name Type Description
event DOMEvent

inner onclicksidebar(event)

Change channels

Name Type Description
event DOMEvent
Fires:

inner onclicksubsidebar()

Filter Contents

Fires:

inner onclicktools(event)

Actions of tools

Name Type Description
event DOMEvent
Fires:

inner onclose()

Listens to Events:

inner onclosesubaction()

Listens to Events:

inner ondatafile(data, message)

Name Type Description
data object
message string
Listens to Events:

inner ondragend()

Fires:

inner ondragstart()

Fires:

inner ondrop(event, files)

Name Type Description
event DOMEvent
files array.<File>
Listens to Events:

inner onerrorfile(data)

Name Type Description
data object
Listens to Events:

inner onmouseenteraction()

Display a sub menu

inner onmouseupaction(event)

Execute actions

Name Type Description
event DOMEvent
Fires:

inner onopen()

Listens to Events:

inner onopened()

Listens to Events:

inner onscrollcontent(event)

Content scroll

Name Type Description
event DOMEvent
Fires:

inner onscrollsidebar(event)

Sidebar scroll

Name Type Description
event DOMEvent
Fires:

inner onscrollsubsidebar()

Sub sidebar scroll

Fires:

inner onshareappsdata(item)

Name Type Description
item object
Listens to Events:

inner onshareappsend()

Fires:
Listens to Events:

inner onshortcutexec()

Events of execute special keys

inner onshortcutnav()

Events of keyboard navigation

inner ontogglePanel(open)

Name Type Description
open boolean
Listens to Events:

inner returnFalse(e){boolean}

Name Type Description
e DOMEvent
Returns:
Type Description
boolean false

inner term(item){boolean}

Name Type Description
item *
Returns:
Type Description
boolean passed

Events

before-select․sidebar

do on sidebar or subsidebar click process before

Type:
Name Type Description
isSubSidebar boolean

if true is subsidbar clicked

Listeners of This Event:

close

do on app close

Type:
Listeners of This Event:

close․action

Type:

close․sub․action

on action menu close

Type:
Listeners of This Event:
Type:
Name Type Description
event DOMEvent
data object
Listeners of This Event:

focus․item

Focus item if you need call manually

Type:
Type:
Listeners of This Event:

opened

Type:
Listeners of This Event:

open․action

on action menu open

Type:
Listeners of This Event:

progress․end

Type:
Listeners of This Event:

progress․start

Type:
Listeners of This Event:

redraw․grid

Updating grid if you need call manually

Type:
Listeners of This Event:

redraw․header

Updating table header if you need call manually

Type:
Listeners of This Event:

redraw․scroll

Updating scrollsize if you need call manually

Type:
Listeners of This Event:
Type:
Listeners of This Event:

scroll․content

Type:
Name Type Description
event DOMEvent
Listeners of This Event:

scroll․sidebar

Type:
Name Type Description
event DOMEvent

scroll․sub․sidebar

Type:
Name Type Description
event DOMEvent

select․action

do on select of action menu

Type:
Name Type Description
action string
$el jQueryObject
event DOMEvent
Listeners of This Event:

select․sidebar

do on sidebar click

Type:
Name Type Description
$el jQueryObject

selected item in sidebar

changed boolean

if false is same tab selected

Listeners of This Event:

select․sub․sidebar

do on subsidebar click

Type:
Name Type Description
$el jQueryObject
Listeners of This Event:

tasks

A event for the scheduled job tasks

Type:
Listeners of This Event:

toggle․panel

on toggle dropbox panel

Type:
Name Type Description
isOpen boolean

true if open the panel otherwise close...

Listeners of This Event:

do on empty space

Type:
Name Type Description
$el jQueryObject
event DOMEvent
Listeners of This Event:
comments powered by Disqus