//-- //-- ImportTiddlers macro //-- config.macros.importTiddlers.handler = function(place,macroName,params,wikifier,paramString,tiddler) { if(readOnly) { createTiddlyElement(place,"div",null,"marked",this.readOnlyWarning); return; } var w = new Wizard(); w.createWizard(place,this.wizardTitle); this.restart(w); }; config.macros.importTiddlers.onCancel = function(e) { var wizard = new Wizard(this); wizard.clear(); config.macros.importTiddlers.restart(wizard); return false; }; config.macros.importTiddlers.onClose = function(e) { backstage.hidePanel(); return false; }; config.macros.importTiddlers.restart = function(wizard) { var me = config.macros.importTiddlers; wizard.addStep(this.step1Title,this.step1Html); var t,s = wizard.getElement("selTypes"); for(t in config.adaptors) { var e = createTiddlyElement(s,"option",null,null,config.adaptors[t].serverLabel || t); e.value = t; } if(config.defaultAdaptor) s.value = config.defaultAdaptor; s = wizard.getElement("selFeeds"); var feeds = this.getFeeds(); for(t in feeds) { e = createTiddlyElement(s,"option",null,null,t); e.value = t; } wizard.setValue("feeds",feeds); s.onchange = me.onFeedChange; var fileInput = wizard.getElement("txtBrowse"); fileInput.onchange = me.onBrowseChange; fileInput.onkeyup = me.onBrowseChange; wizard.setButtons([{caption: this.openLabel, tooltip: this.openPrompt, onClick: me.onOpen}]); wizard.formElem.action = "javascript:;"; wizard.formElem.onsubmit = function() { if(!this.txtPath || this.txtPath.value.length) //# check for manually entered path in first step this.lastChild.firstChild.onclick(); }; }; config.macros.importTiddlers.getFeeds = function() { var feeds = {}; var t,tagged = store.getTaggedTiddlers("systemServer","title"); for(t=0; t 0) { if(!confirm(me.confirmOverwriteText.format([overwrite.join(", ")]))) return false; } wizard.addStep(me.step4Title.format([rowNames.length]),me.step4Html); for(t=0; t