Class: CallLog

Apps.Contacts.CallLog

new Apps.Contacts.CallLog()

Call Log Manager

Version:
  • 0.1.0
Author:

Extends

Requires

  • module:phoneFormat.js
  • module:moment.min.js

Members

static Apps.Contacts.CallLog.Requires array.<filePath>

Async static files loading:

  • Support file formats is css, js and html.
  • The path name must be in all lowercase letters.
  • Available paths of html files are located:

    win, body, header, contents, modules, menu, toolbar, apps, device, notify

See:

inherited $action jQueryObject

Action Menu

inherited $app jQueryObject

inherited $share jQueryObject

A action of content share

inherited $sidebar jQueryObject

inherited $tools jQueryObject

inherited AUTHOR string

avatars object

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

dataStarted boolean

groups object

last object

lastAddedDateEl jQueryObject

inherited name string

inherited NOTE string

inherited opened boolean

queue array

tabs array.<tabName>

A class name of selected the default tab

types array.<models>

inherited usim number

Link to 'usim' property of Mobizen.Device#agent

constant VERSION string

Type Definitions

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.

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

Application tab interface

Methods

actions(action, $el, event)

Name Type Description
action string
$el jQueryObject optional
event DOMEvent
Listens to Events:

addCallLog(item, $context, async)

Name Type Description
item object
$context jQueryObject
async boolean

addCallLogs(items, logType)

Name Type Description
items array
logType string

addDBItem(item){Promise}

Name Type Description
item object
Returns:
Type Description
Promise

Disable all action during the progressing

channel($el, changed)

Name Type Description
$el jQueryObject

selected item in sidebar

changed boolean

if false is same tab selected

Listens to Events:

count(type, count)

Name Type Description
type string
count number

inherited data($el){object}

Get data from dom-storage.

Name Type Description
$el jQueryObject

selected item

Returns:
Type Description
object dom storage data

inherited dialToDevice(phoneNumber)

Name Type Description
phoneNumber number

inherited disable(state, type){boolean}

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

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.

empty(counts)

Name Type Description
counts object

{all: 38, incoming: 3, missed: 21, outgoing: 14}

getAvatarSrc(contactName, contactNumber)

Name Type Description
contactName string
contactNumber string
See:

getCount(){Promise}

Returns:
Type Description
Promise

getGroup(type, id){Promise}

Name Type Description
type string
id string
Returns:
Type Description
Promise

getGroups(type){Promise}

Name Type Description
type string
Returns:
Type Description
Promise
Name Type Description
type string

indexAvatar(item)

Name Type Description
item object

indexing(nosync)

Name Type Description
nosync boolean

insert(data, async)

Notification call this function as async

Name Type Description
data object

{date: 1407310143502, duration: 13, id: 1081, name: "Daniel Moon", newType: 1, number: "01068063530", numberlabel: "", numbertype: "2", type: 2}

async boolean

true

inherited listeners(type){array}

Name Type Description
type string

type of event

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

loadAvatar(avatar, success)

Name Type Description
avatar object
success boolean
Name Type Description
$focused jQueryObject optional
event DOMEvent
Listens to Events:

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.

virtual onclose()

Listens to Events:
Name Type Description
data object
Listens to Events:
Name Type Description
type object
Listens to Events:

onopen(focus)

Name Type Description
focus boolean optional
Listens to Events:

onstart(data)

Name Type Description
data object
Listens to Events:

parseLog(data){object}

parse socket data for DB indexing, insert

Name Type Description
data object
Returns:
Type Description
object parsed item

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);

removeCallLog(id, $context)

Name Type Description
id string
$context jQueryObject

removeDBItem(id){Promise}

Name Type Description
id string
Returns:
Type Description
Promise
Name Type Description
type string

renderCall(callLog)

Name Type Description
callLog object

selectable(event, $el)

Name Type Description
event DOMEvent
$el jQueryObject
Listens to Events:

inherited self(){boolean}

Get activate state of app.

Returns:
Type Description
boolean current app name matched

inherited setAvatar($el, size, src)

Name Type Description
$el jQueryObject
size number
src string
See:

inherited sitting($el){number}

Get position by viewport element.

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

stopRenderQueue()

inherited storage(key, val){object}

Store and Read data of local storage.

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

template(type, data)

Name Type Description
type string
data object

tools($items)

Name Type Description
$items jQueryObject

inherited transfer(action, files)

Transfer data each channels.

Name Type Description
action string

type of action

files array.<files>

inherited 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.

updateAvatarQueue()

updateRelativeTime(type)

Name Type Description
type string

updateRenderQueue()

inherited viewConctacts(data, type)

Name Type Description
data string
type string

inner capitalize(str){string}

Name Type Description
str string
Returns:
Type Description
string capitalized

inner extend(destination, source){object}

Object Extend.

Name Type Description
destination object

A destination object.

source object optional

A source object.

Returns:
Type Description
object Extended object.

inner getCountryFromLocale(locale){string}

Name Type Description
locale string
Returns:
Type Description
string locale string

inner getDuration(time){number}

Name Type Description
time number
Returns:
Type Description
number formated time

inner getLocale(locale){string}

Name Type Description
locale string
Returns:
Type Description
string locale string

inner getLogType(logTypeId){string}

Name Type Description
logTypeId number
Returns:
Type Description
string log type

inner getLogTypeId(typeid){number}

Name Type Description
typeid number
Returns:
Type Description
number enum

inner getNumberType(numberTypeId){string}

Name Type Description
numberTypeId number
Returns:
Type Description
string key

inner groupId2Date(groupId){number}

Name Type Description
groupId number
Returns:
Type Description
number datetime

Events

inherited before-select․sidebar

do on sidebar or subsidebar click process before

Type:
Name Type Description
isSubSidebar boolean

if true is subsidbar clicked

do on app close

Type:

inherited close․action

Type:

inherited close․sub․action

on action menu close

Type:
Type:
Name Type Description
event DOMEvent
data object

Focus item if you need call manually

Type:
Type:
Type:

on action menu open

Type:
Type:
Type:

Updating grid if you need call manually

Type:

Updating table header if you need call manually

Type:

Updating scrollsize if you need call manually

Type:
Type:

inherited scroll․content

Type:
Name Type Description
event DOMEvent

inherited scroll․sidebar

Type:
Name Type Description
event DOMEvent

inherited scroll․sub․sidebar

Type:
Name Type Description
event DOMEvent

inherited select․action

do on select of action menu

Type:
Name Type Description
action string
$el jQueryObject
event DOMEvent

inherited select․sidebar

do on sidebar click

Type:
Name Type Description
$el jQueryObject

selected item in sidebar

changed boolean

if false is same tab selected

inherited select․sub․sidebar

do on subsidebar click

Type:
Name Type Description
$el jQueryObject

A event for the scheduled job tasks

Type:

on toggle dropbox panel

Type:
Name Type Description
isOpen boolean

true if open the panel otherwise close...

do on empty space

Type:
Name Type Description
$el jQueryObject
event DOMEvent
comments powered by Disqus