Commit 2cf7d159 authored by Marcel Rieger's avatar Marcel Rieger
Browse files

Make initial extension configurable via workspace_action in vispa.ini.sample.

parent bf54378d
......@@ -55,6 +55,9 @@ password_url = http://localhost:4282/vispa/password
# enable guets logins without providing any information
enable_guest_login = False
# default workspace action, i.e. a vispa.callbacks channel
workspace_action = openFileBrowser
[websockets]
enabled = False
......
......@@ -135,7 +135,8 @@ class RootController(AbstractController):
"alter_workspaces": alter_workspaces,
"log_level" : client_log_level,
"use_feedback" : use_feedback,
"is_guest" : cherrypy.session.get("is_guest", False)
"is_guest" : cherrypy.session.get("is_guest", False),
"workspace_action": vispa.config.get("web", "workspace_action", "")
}
data.update(preferences)
......
......@@ -821,10 +821,8 @@ var Workspace = Emitter.extend({
callback(null);
// open examples or a file browser
if (vispa.callbacks.getListeners("showExamples").length) {
vispa.callbacks.emit("showExamples", self.getId());
} else {
vispa.callbacks.emit("openFileBrowser", self.getId());
if (vispa.workspaces.varData.workspaceAction) {
vispa.callbacks.emit(vispa.workspaces.varData.workspaceAction, self.getId());
}
});
};
......
......@@ -167,6 +167,9 @@
});
vispa.start();
// store the workspace action
vispa.workspaces.varData.workspaceAction = "${workspace_action}";
if (initErrors.length) {
var msg = "<ul>";
msg += initErrors.map(function(err) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment