e44a7e37b6
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@151 b3834d28-1941-0410-a4f8-b48e95affb8f
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
if(!dojo._hasResource["dojox.data.demos.widgets.PicasaViewList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
|
|
dojo._hasResource["dojox.data.demos.widgets.PicasaViewList"] = true;
|
|
dojo.provide("dojox.data.demos.widgets.PicasaViewList");
|
|
dojo.require("dijit._Templated");
|
|
dojo.require("dijit._Widget");
|
|
dojo.require("dojox.data.demos.widgets.PicasaView");
|
|
|
|
dojo.declare("dojox.data.demos.widgets.PicasaViewList", [dijit._Widget, dijit._Templated], {
|
|
//Simple demo widget that is just a list of PicasaView Widgets.
|
|
|
|
templateString:"<div dojoAttachPoint=\"list\"></div>\n\n",
|
|
|
|
//Attach points for reference.
|
|
listNode: null,
|
|
|
|
postCreate: function(){
|
|
this.fViewWidgets = [];
|
|
},
|
|
|
|
clearList: function(){
|
|
while(this.list.firstChild){
|
|
this.list.removeChild(this.list.firstChild);
|
|
}
|
|
for(var i = 0; i < this.fViewWidgets.length; i++){
|
|
this.fViewWidgets[i].destroy();
|
|
}
|
|
this.fViewWidgets = [];
|
|
},
|
|
|
|
addView: function(viewData){
|
|
var newView = new dojox.data.demos.widgets.PicasaView(viewData);
|
|
this.fViewWidgets.push(newView);
|
|
this.list.appendChild(newView.domNode);
|
|
}
|
|
});
|
|
|
|
}
|