Changeset 2810
- Timestamp:
- 11/12/07 06:08:28 (11 months ago)
- Files:
-
- 1 modified
-
Trunk/core/js/Import.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Trunk/core/js/Import.js
r2502 r2810 126 126 if(context.status !== true) 127 127 displayMessage("Error in importTiddlers.onGetWorkspaceList: " + context.statusText); 128 wizard.setValue("context",context); 129 var workspace = wizard.getValue("feedWorkspace"); 130 if(!workspace && context.workspaces.length==1) 131 workspace = context.workspaces[0].title; 132 if(workspace) { 133 //# if there is only one workspace, then open it directly 134 var ret = context.adaptor.openWorkspace(workspace,context,wizard,config.macros.importTiddlers.onOpenWorkspace); 135 if(ret !== true) 136 displayMessage(ret); 137 wizard.setValue("workspace",workspace); 138 wizard.setButtons([{caption: config.macros.importTiddlers.cancelLabel, tooltip: config.macros.importTiddlers.cancelPrompt, onClick: config.macros.importTiddlers.onCancel}],config.macros.importTiddlers.statusOpenWorkspace); 139 return; 140 } 128 141 wizard.addStep(config.macros.importTiddlers.step2Title,config.macros.importTiddlers.step2Html); 129 142 var s = wizard.getElement("selWorkspace"); … … 143 156 } 144 157 } 145 var workspace = wizard.getValue("feedWorkspace");146 158 if(workspace) { 147 159 t = wizard.getElement("txtWorkspace"); 148 160 t.value = workspace; 149 161 } 150 wizard.setValue("context",context);151 162 wizard.setButtons([{caption: config.macros.importTiddlers.openLabel, tooltip: config.macros.importTiddlers.openPrompt, onClick: config.macros.importTiddlers.onChooseWorkspace}]); 152 163 };
