jQuery.telligent.evolution.ui.components.feature
UI Component which handles presentation of feature behavior for content. Transforms the output from $core_v2_ui.Feature()
, which is a <span class="ui-feature"></span>
stub. The default implementation uses the evolutionFeature plugin. Overrides can be provided at the theme level to present features differently.
Options
Data made available to instances of the component:
contenttypeid
: (string) Content Type Id Guidcontentid
: (string) Content Id Guidtypeid
: (string) Feature Type Id Guidvalue
: (string) If the content is featured or not by the accessing user (true
orfalse
)contenttypename
: (string) Type name for this content
Example
A barebones UI component override which would result in rendering a read-only message of 'Featured? Yes/No' for a given call to $core_v2_ui.Feature()
.
$.telligent.evolution.ui.components.feature = {
setup: function() {
},
add: function(elm, options) {
$(elm).html('Featured? ' + (options.value == 'true' ? 'Yes' : 'No'));
console.log('ContentId: ' + options.contentid);
console.log('ContentTypeId: ' + options.contenttypeid);
console.log('TypeId: ' + options.typeid);
console.log('PanelUrl: ' + options.panelurl);
console.log('Value: ' + options.value);
console.log('ContentTypeName: ' + options.contenttypename);
}
}
Default Implementation
For reference purposes or as the basis for an override:
$.telligent.evolution.ui.components.feature = {
setup: function() {
},
add: function(elm, options) {
elm.empty();
var config = {
contentId: options.contentid,
contentTypeId: options.contenttypeid,
typeId: options.typeid,
panelUrl: options.panelurl,
initialState: options.value == 'true',
contentTypeName: options.contenttypename,
onClick: function(panelUrl, complete) {