//-- //-- Wizard support //-- function Wizard(elem) { if(elem) { this.formElem = findRelated(elem,"wizard","className"); this.bodyElem = findRelated(this.formElem.firstChild,"wizardBody","className","nextSibling"); this.footElem = findRelated(this.formElem.firstChild,"wizardFooter","className","nextSibling"); } else { this.formElem = null; this.bodyElem = null; this.footElem = null; } } Wizard.prototype.setValue = function(name,value) { jQuery(this.formElem).data(name, value); }; Wizard.prototype.getValue = function(name) { return this.formElem ? jQuery(this.formElem).data(name) : null; }; Wizard.prototype.createWizard = function(place,title) { this.formElem = createTiddlyElement(place,"form",null,"wizard"); createTiddlyElement(this.formElem,"h1",null,null,title); this.bodyElem = createTiddlyElement(this.formElem,"div",null,"wizardBody"); this.footElem = createTiddlyElement(this.formElem,"div",null,"wizardFooter"); return this.formElem; }; Wizard.prototype.clear = function() { jQuery(this.bodyElem).empty(); }; Wizard.prototype.setButtons = function(buttonInfo,status) { jQuery(this.footElem).empty(); var t; for(t=0; t