| Package: | CQ |
| Class: | Ext |
| Extends: | Object |
| Clientlib: | cq.widgets |
| Method | Defined By | |
|---|---|---|
addBehaviors( Object obj ) : void Applies event listeners to elements by selectors when the document is ready.
The event name is specified with an @...
Applies event listeners to elements by selectors when the document is ready.
The event name is specified with an @ suffix.
Parameters:
|
Ext | |
apply( Object obj, Object config, Object defaults ) : Object Copies all the properties of config to obj.
Copies all the properties of config to obj.
Parameters:
|
Ext | |
clean( Array/NodeList arr ) : Array Creates a copy of the passed Array with falsy values removed.
Creates a copy of the passed Array with falsy values removed.
Parameters:
|
Ext | |
copyTo( Object dest, Object source, Array/String names ) : Object Copies a set of named properties fom the source object to the destination object.
example:ImageComponent = CQ.Ext.ext...
Copies a set of named properties fom the source object to the destination object.
example:
Parameters:
|
Ext | |
create( Object config, Constructor defaultType ) : CQ.Ext.Component Shorthand for CQ.Ext.ComponentMgr.create
Creates a new Component from the specified config object using the
config ob...
Shorthand for CQ.Ext.ComponentMgr.create
Creates a new Component from the specified config object using the
config object's xtype to determine the class to instantiate.
Parameters:
|
Ext | |
decode( String json, [Boolean safe] ) : Object Shorthand for CQ.Ext.util.JSON.decode
Shorthand for CQ.Ext.util.JSON.decode
Parameters:
|
Ext | |
defer( Function fn, [Object scope], [Array args], [Boolean/Number appendArgs] ) : Function Shorthand for CQ.Ext.util.Functions.createDelegate
Shorthand for CQ.Ext.util.Functions.createDelegate
Parameters:
|
Ext | |
destroy( Mixed arg1, [Mixed arg2], [Mixed etc...] ) : void Attempts to destroy any objects passed to it by removing all event listeners, removing them from the
DOM (if applicab...
Attempts to destroy any objects passed to it by removing all event listeners, removing them from the
DOM (if applicable) and calling their destroy functions (if available). This method is primarily
intended for arguments of type CQ.Ext.Element and CQ.Ext.Component, but any subclass of
CQ.Ext.util.Observable can be passed in. Any number of elements and/or components can be
passed into this function in a single call as separate arguments.
Parameters:
|
Ext | |
destroyMembers( Object o, Mixed arg1, Mixed etc... ) : void Attempts to destroy and then remove a set of named properties of the passed object.
Attempts to destroy and then remove a set of named properties of the passed object.
Parameters:
|
Ext | |
|
emptyFn() : void A reusable empty function
A reusable empty function
Parameters:
|
Ext | |
encode( Mixed o ) : String Shorthand for CQ.Ext.util.JSON.encode
Shorthand for CQ.Ext.util.JSON.encode
Parameters:
|
Ext | |
escapeRe( String str ) : String Escapes the passed string for use in a regular expression
Escapes the passed string for use in a regular expression
Parameters:
|
Ext | |
flatten( Array arr ) : Array Recursively flattens into 1-d Array. Injects Arrays inline.
Recursively flattens into 1-d Array. Injects Arrays inline.
Parameters:
|
Ext | |
fly( String/HTMLElement el, [String named] ) : Element Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to t...
Gets the globally shared flyweight Element, with the passed node as the active element. Do not store a reference to this element - the dom node can be overwritten by other code. Shorthand of CQ.Ext.Element.fly Use this to make one-time references to DOM elements which are not going to be accessed again either by application code, or by Ext's classes. If accessing an element which will be processed regularly, then CQ.Ext.get will be more appropriate to take advantage of the caching provided by the CQ.Ext.Element class.
Parameters:
|
Ext | |
get( Mixed el ) : Element Retrieves CQ.Ext.Element objects.
This method does not retrieve Components. This method
retrieves CQ.Ext.Element obje...
Retrieves CQ.Ext.Element objects.
This method does not retrieve Components. This method retrieves CQ.Ext.Element objects which encapsulate DOM elements. To retrieve a Component by its ID, use CQ.Ext.ComponentMgr.get. Uses simple caching to consistently return the same object. Automatically fixes if an object was recreated with the same id via AJAX or DOM. Shorthand of CQ.Ext.Element.get
Parameters:
|
Ext | |
getCmp( String id ) : CQ.Ext.Component
This is shorthand reference to CQ.Ext.ComponentMgr.get.
Looks up an existing Component by id
Parameters:
|
Ext | |
|
getDoc() : CQ.Ext.Element Returns the current HTML document object as an CQ.Ext.Element.
Returns the current HTML document object as an CQ.Ext.Element.
Parameters:
|
Ext | |
getScrollBarWidth( [Boolean force] ) : Number Utility method for getting the width of the browser scrollbar. This can differ depending on
operating system settings...
Utility method for getting the width of the browser scrollbar. This can differ depending on
operating system settings, such as the theme or font size.
Parameters:
|
Ext | |
invoke( Array|NodeList arr, String methodName, ...* args ) : Array Invokes a method on each item in an Array.
// Example:
CQ.Ext.invoke(CQ.Ext.query("p"), "getAttribute", "id");
// [el...
Invokes a method on each item in an Array.
Parameters:
|
Ext | |
max( Array|NodeList arr, [Function comp] ) : Object Returns the maximum value in the Array
Returns the maximum value in the Array
Parameters:
|
Ext | |
mean( Array arr ) : Number Calculates the mean of the Array
Calculates the mean of the Array
Parameters:
|
Ext | |
min( Array|NodeList arr, [Function comp] ) : Object Returns the minimum value in the Array.
Returns the minimum value in the Array.
Parameters:
|
Ext | |
num( Mixed value, Number defaultValue ) : Number Utility method for validating that a value is numeric, returning the specified default value if it is not.
Utility method for validating that a value is numeric, returning the specified default value if it is not.
Parameters:
|
Ext | |
onLoad( Function fn, Object scope, boolean override ) : void Fires when the window is loaded. Shorthand of CQ.Ext.EventManager.onWindowLoaded.
Fires when the window is loaded. Shorthand of CQ.Ext.EventManager.onWindowLoaded.
Parameters:
|
Ext | |
onReady( Function fn, [Object scope], [boolean options] ) : void Adds a listener to be notified when the document is ready (before onload and before images are loaded). Shorthand of ...
Adds a listener to be notified when the document is ready (before onload and before images are loaded). Shorthand of CQ.Ext.EventManager.onDocumentReady.
Parameters:
|
Ext | |
partition( Array|NodeList arr, [Function truth] ) : Array Partitions the set into two sets: a true set and a false set.
Example:
Example2:
// Example 1:
CQ.Ext.partition([true...
Partitions the set into two sets: a true set and a false set.
Example:
Example2:
Parameters:
|
Ext | |
pluck( Array|NodeList arr, String prop ) : Array Plucks the value of a property from each item in the Array
// Example:
CQ.Ext.pluck(CQ.Ext.query("p"), "className"); ...
Plucks the value of a property from each item in the Array
Parameters:
|
Ext | |
preg( String ptype, Constructor cls ) : void Shorthand for CQ.Ext.ComponentMgr.registerPlugin
Shorthand for CQ.Ext.ComponentMgr.registerPlugin
Parameters:
|
Ext | |
query( String path, [Node root] ) : Array Selects an array of DOM nodes by CSS/XPath selector. Shorthand of CQ.Ext.DomQuery.select
Selects an array of DOM nodes by CSS/XPath selector. Shorthand of CQ.Ext.DomQuery.select
Parameters:
|
Ext | |
reg( String xtype, Constructor cls ) : void Shorthand for CQ.Ext.ComponentMgr.registerType
Shorthand for CQ.Ext.ComponentMgr.registerType
Parameters:
|
Ext | |
select( String/Array selector, [HTMLElement/String root] ) : CompositeElementLite/CompositeElement Selects elements based on the passed CSS selector to enable Element methods
to be applied to many related elements in...
Selects elements based on the passed CSS selector to enable Element methods
to be applied to many related elements in one statement through the returned CompositeElement or
CompositeElementLite object.
Parameters:
|
Ext | |
sum( Array arr ) : Number Calculates the sum of the Array
Calculates the sum of the Array
Parameters:
|
Ext | |
type( Mixed object ) : String Returns the type of object that is passed in. If the object passed in is null or undefined it
return false otherwise ...
Returns the type of object that is passed in. If the object passed in is null or undefined it
return false otherwise it returns one of the following values:
Parameters:
|
Ext | |
unique( Array arr ) : Array Creates a copy of the passed Array, filtered to contain only unique values.
Creates a copy of the passed Array, filtered to contain only unique values.
Parameters:
|
Ext | |
value( Mixed value, Mixed defaultValue, [Boolean allowBlank] ) : Mixed Utility method for returning a default value if the passed value is empty.
The value is deemed to be empty if it is
n...
Utility method for returning a default value if the passed value is empty. The value is deemed to be empty if it is
Parameters:
|
Ext | |
zip( Arrays|NodeLists arr, [Function zipper] ) : Array Zips N sets together.
// Example 1:
CQ.Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]]
// Example 2:
CQ.Ext.zip(
...
Zips N sets together.
Parameters:
|
Ext | |