list-plugin.js revision 27d03bec5e86257829ba6abd01f608e6fdf63a28
/**
* Provides a plugin, which adds support for a scroll indicator to ScrollView instances
*
* @module scrollview-list
*/
SCROLLVIEW = 'scrollview',
CONTENT_BOX = "contentBox",
RENDERED = 'rendered',
RENDER_UI = 'renderUI',
HOST = "host";
/**
* ScrollView plugin that adds class names to immediate descendant "<li>" to
* allow for easier styling through CSS
*
* @class ScrollViewList
* @namespace Plugin
* @extends Plugin.Base
* @constructor
*/
function ListPlugin() {
}
/**
* The identity of the plugin
*
* @property NAME
* @type String
* @default 'pluginList'
* @static
*/
/**
* The namespace on which the plugin will reside.
*
* @property NS
* @type String
* @default 'list'
* @static
*/
/**
* The default attribute configuration for the plugin
*
* @property ATTRS
* @type Object
* @static
*/
ListPlugin.ATTRS = {
/**
* Specifies whether the list elements (the immediate <ul>'s and the immediate <li>'s inside those <ul>'s) have class names attached to them or not
*
* @attribute isAttached
* @type boolean
* @deprecated No real use for this attribute on the public API
*/
isAttached: {
value:false,
}
};
/**
* Designated initializer
*
* @method initializer
*/
initializer: function() {
},
_addClassesToList: function() {
if (!this.get('isAttached')) {
if (cb.hasChildNodes()) {
//get all direct descendants of the UL's that are directly under the content box.
//go through the UL's and add the class
});
//go through LI's and add the class
});
this.set('isAttached', true);
// We need to call this again, since sv-list
// relies on the "-vert" class, to apply padding.
// [ 1st syncUI pass applies -vert, 2nd pass re-calcs dims ]
}
}
}
});