view.js

CandyChats are not dead yet.

Authors

Copyright

© 2011 Amiado Group AG.  All rights reserved.  © 2012-2014 Patrick Stadler & Michael Weibel.  All rights reserved.

Summary
view.js
Candy.ViewThe Candy View Class
Private Functions
_setupTranslationSet dictionary using jQuery.i18n plugin.
_registerObserversRegister observers.
_registerWindowHandlersRegister window focus / blur / resize handlers.
_initToolbarInitialize toolbar.
_delegateTooltipsDelegate mouseenter on tooltipified element to <Candy.View.Pane.Chat.Tooltip.show>.
Functions
initInitialize chat view (setup DOM, register handlers & observers)
getCurrentGet current container & roomJid in an object.
getOptionsGets options

Candy.View

The Candy View Class

Parameters

(Candy.View) selfitself
(jQuery) $jQuery
Summary
Private Functions
_setupTranslationSet dictionary using jQuery.i18n plugin.
_registerObserversRegister observers.
_registerWindowHandlersRegister window focus / blur / resize handlers.
_initToolbarInitialize toolbar.
_delegateTooltipsDelegate mouseenter on tooltipified element to <Candy.View.Pane.Chat.Tooltip.show>.
Functions
initInitialize chat view (setup DOM, register handlers & observers)
getCurrentGet current container & roomJid in an object.
getOptionsGets options

Private Functions

_setupTranslation

Set dictionary using jQuery.i18n plugin.

See: view/translation.js See: libs/jquery-i18n/jquery.i18n.js

Parameters

(String) languageLanguage identifier

_registerObservers

Register observers.  Candy core will now notify the View on changes.

_registerWindowHandlers

Register window focus / blur / resize handlers.

jQuery.focus()/.blur() <= 1.5.1 do not work for IE < 9.  Fortunately onfocusin/onfocusout will work for them.

_initToolbar

Initialize toolbar.

_delegateTooltips

Delegate mouseenter on tooltipified element to <Candy.View.Pane.Chat.Tooltip.show>.

Functions

init

self.init = function(container,
options)

Initialize chat view (setup DOM, register handlers & observers)

Parameters

(jQuery.element) containerContainer element of the whole chat view
(Object) optionsOptions: see _options field (value passed here gets extended by the default value in _options field)

getCurrent

self.getCurrent = function()

Get current container & roomJid in an object.

Returns

Object containing container & roomJid

getOptions

self.getOptions = function()

Gets options

Returns

Object

self.init = function(container,
options)
Initialize chat view (setup DOM, register handlers & observers)
self.getCurrent = function()
Get current container & roomJid in an object.
self.getOptions = function()
Gets options
Close