forked from Jibo-Revival-Group/JiboOs
91 lines
3.0 KiB
JavaScript
91 lines
3.0 KiB
JavaScript
/**
|
|
* Contact button, extends MenuButton to handle specifics required for contacts
|
|
*
|
|
* @class ContactButton
|
|
* @extends jibo.face.views.MenuButton
|
|
* @memberof jibo.face.views
|
|
*/
|
|
|
|
/**
|
|
* The default class identifier.
|
|
* MenuButton uses variants, so this should be defined specifically at
|
|
* Generally used to register the class.
|
|
* @name jibo.face.views.ContactButton.DEFAULT_TYPE
|
|
* @type {String}
|
|
* @readOnly
|
|
*/
|
|
|
|
/**
|
|
* Loop member associated with button.
|
|
* @method jibo.face.views.ContactButton#looper
|
|
* @returns {jibo.kb.loop.UserNode} Loop member associated with button.
|
|
* @readOnly
|
|
*/
|
|
|
|
/**
|
|
* Looper member associated with button.
|
|
* @name jibo.face.views.ContactButton#_looper
|
|
* @type {jibo.kb.loop.UserNode}
|
|
* @private
|
|
*/
|
|
|
|
/**
|
|
* Create a ContactButton from a configuration Object derived from JSON.
|
|
* @method jibo.face.views.ContactButton#createFromConfig
|
|
* @param {Object} configData Object derived from JSON, must be a specific format refer to examples.
|
|
* @returns {jibo.face.views.ContactButton} The ContactButton created from the given configuration.
|
|
*/
|
|
|
|
/**
|
|
* Create and add a button asset descriptor that corresponds with the type value.
|
|
* If `type` is provided as a parameter, it is applied to the internal type variable.
|
|
* Add an asset descriptor for the looper's photo, if defined.
|
|
* @method jibo.face.views.ContactButton#applyButtonType
|
|
* @param {String} [type] If definfed, applied to [MenuButton#_type]{@link jibo.face.views.MenuButton#_type},
|
|
* which is then used to determine which timeline assets to use for the button.
|
|
*/
|
|
|
|
/**
|
|
* FOR OVERRIDE ONLY. DO NOT CALL.
|
|
*
|
|
* Destroy.
|
|
* @method jibo.face.views.ContactButton#destroy
|
|
*/
|
|
|
|
/**
|
|
* Keep reference to looper Object and use to define variables.
|
|
* @method jibo.face.views.ContactButton#assignLooper
|
|
* @param {jibo.kb.loop.UserNode} looper Reference to Looper.
|
|
*/
|
|
|
|
/**
|
|
* FOR OVERRIDE ONLY. DO NOT CALL.
|
|
*
|
|
* Set up the timeline asset associated with the button.
|
|
* @method jibo.face.views.ContactButton#setupTimeline
|
|
* @param assets {any} Assets associated with the button.
|
|
* @protected
|
|
*/
|
|
|
|
/**
|
|
* FOR OVERRIDE ONLY. DO NOT CALL.
|
|
*
|
|
* Handler for toggleDown-transition executed in {@link jibo.face.views.StandardButton#down}
|
|
* @method jibo.face.views.ContactButton#toggleDownTransition
|
|
* @protected
|
|
*/
|
|
|
|
/**
|
|
* Handler for click touch input.
|
|
* If `willToggle` is `true`, toggle the check mark on each click.
|
|
* @method jibo.face.views.ContactButton#click
|
|
* @protected
|
|
*/
|
|
|
|
/**
|
|
* Show or hide the button's checkmark according to its state.
|
|
* @method jibo.face.views.ContactButton#animateToggleState
|
|
* @param {Boolean} [isToggled = false] State the button needs to be animated into
|
|
* @param {Boolean} [shouldAnimate = true] Flag determining if check mark should animate.
|
|
* @private
|
|
*/ |