aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Angular.js2
-rw-r--r--src/ControlBar.js5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/Angular.js b/src/Angular.js
index f06562da..a055ce1d 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -270,7 +270,7 @@ function exposeMethods(obj, methods){
function wireAngular(element, config) {
var widgetFactory = new WidgetFactory(config['server'], config['database']);
var binder = new Binder(element[0], widgetFactory, datastore, config['location'], config);
- var controlBar = new ControlBar(element.find('body'), config['server']);
+ var controlBar = new ControlBar(element.find('body'), config['server'], config['database']);
var onUpdate = function(){binder.updateView();};
var server = config['database'] =="$MEMORY" ?
new FrameServer(window) :
diff --git a/src/ControlBar.js b/src/ControlBar.js
index 73be74db..685beeb2 100644
--- a/src/ControlBar.js
+++ b/src/ControlBar.js
@@ -1,6 +1,7 @@
-function ControlBar(document, serverUrl) {
+function ControlBar(document, serverUrl, database) {
this._document = document;
this.serverUrl = serverUrl;
+ this.database = database;
this._window = window;
this.callbacks = [];
};
@@ -26,7 +27,7 @@ ControlBar.prototype = {
login: function (loginSubmitFn) {
this.callbacks.push(loginSubmitFn);
if (this.callbacks.length == 1) {
- this.doTemplate("/user_session/new.mini?return_url=" + encodeURIComponent(this.urlWithoutAnchor()));
+ this.doTemplate("/user_session/new.mini?database="+encodeURIComponent(this.database)+"&return_url=" + encodeURIComponent(this.urlWithoutAnchor()));
}
},