Class Banana.UiControl
Extends
Banana.Control.
- Methods borrowed from class Banana.Control:
- applyToChildren, bind, clear, createComponents, findControl, generateUniqueId, getControls, getDomEventTypes, getFirstUiControl, getId, getPage, getParent, getProxy, hasBind, invalidateDisplay, onPreInvalidateContents, onWindowResize, remove, render, setId, setPage, setParent, unbind, unload, updateDisplay
Defined in: UiControl.js.
Adds control to collection Normally you would add control prior to the render phase. If this is not the case and you need to instantly render the control. autoRender should be true
- Parameters:
- {mixed} Banana.Control
- or plain text
- {boolean} true
- when render should occur instantly
adds css style in object key value style.
- Parameters:
- {Object} css
- example {width:'100px',left:0};
Adds css class. this will be instantly applied to dom if rendered
- Parameters:
- {String} css
- name of css class
- Parameters:
- {String} key
- of the attribute
- Returns:
- {String} attribute by key
Composes attributes for usuage in html tags.
- Returns:
- {Object} of attributes
Computes widht,height and left right offsets
- Returns:
- {Object} of dimensions
returns html markup string of control + all child controls
- Parameters:
- markAsRendered
- Returns:
- {String}
return string representation of html attributes. used by renderer
- Returns:
- {String}
Retreives a saved state
- Parameters:
- {String} name
- of state
- Returns:
- {String}
- Returns:
- string tag name of control
overwrite this function to use your own tags. ie
removes css class. this will be instantly applied to dom
- Parameters:
- {String} css
- name of css class
Removes a saved state
- Parameters:
- {String} name
- of state
- Returns:
- {String}
sets attribute depending on the type of key we set prop or attr
see http://blog.jquery.com/ for more information
- Parameters:
- {String} key
- {String} value
- Returns:
- {this}
sets client id used to reference dom node. This method is auto called by the page
- Parameters:
- {String} cid
sets control enabled /disabled we basicly add a css class. so, make sure your css file contains this css classes TODO this is not nice, can it be done otherwise?
- Parameters:
- {boolean} e
- True when enabled
- {boolean} recursive
- Also enable/disable child controls
Saves key value in a cookie Note that saved states are always unique for a page.
- Parameters:
- {String} name
- of the state
- {String} value
- Returns:
- {this}
NOTE: use setCss() instead to directly apply it to dom
- Parameters:
- {String} style
- of this control. by css definitions
- Returns:
- {this}
makes control visible or invisible.
- Parameters:
- {boolean} v
- true when visible
- {String} speed
- animation speed of hiding/ showing
- {String} type
- of animation
- {Function} callback
- when finished
Switch the old Css class with a new one
- Parameters:
- {String} oldClass
- Old CSS class to replace
- {String} newClass
- New CSS class to add