1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
define(["dojo/_base/declare", "dojo", "dijit/_WidgetBase",
"alfresco/core/Core", "dijit/_TemplatedMixin",
"dojo/text!./templates/Mere.html","dojo/dom", "dojo/dom-style",
"dojo/_base/fx", "alfresco/core/TemporalUtils",
"example/components/nodelist/ItemRow","dojo/_base/lang" ],
function(declare, dojo, WidgetBase, Core, TemplatedMixin, template,dom,
domStyle, baseFx, TemporalUtils, ItemRow, lang) {
return declare([ WidgetBase, Core, TemplatedMixin ], {
constructor : function example_ItemList__constructor(args) {
lang.mixin(this, args);
},
templateString : template,
cssRequirements : [ {cssFile : "./css/NodeList.css" } ],
i18nRequirements : [ {i18nFile : "./i18n/NodeList.properties"} ],
// A class to be applied to the root node in our
// template
baseClass : "NodeList",
buildRendering : function example_widgets_ItemList__buildRendering() {
this.inherited(arguments);
},
postCreate : function() {
this.initHeader();
this.initRows();
var mytable = dojo.byId("mytable");
//mytable.tablesorter();
this.inherited(arguments);
},
initHeader : function() {
var rowWidget = new ItemRow({rowType : "header"});
rowWidget.placeAt(this.listResults);
},
initRows : function() {
try{
for (var i = 0; i < this.items.length ; i++) {
var currentItem = this.items[i];
var dataWidget = {};
dataWidget.rowType = "item";
dataWidget.item = currentItem;
var rowWidget = new ItemRow(dataWidget);
rowWidget.placeAt(this.listResults);
}
} catch(e) {
console.log(e);
}
}
});
}); |
Partager