diff options
Diffstat (limited to 'src/ControlBar.js')
| -rw-r--r-- | src/ControlBar.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ControlBar.js b/src/ControlBar.js index 6fe5b42d..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 = []; }; @@ -13,13 +14,12 @@ ControlBar.HTML = '</div>' + '</div>'; + ControlBar.FORBIDEN = '<div ng-non-bindable="true" title="Permission Error:">' + 'Sorry, you do not have permission for this!'+ '</div>'; - - ControlBar.prototype = { bind: function () { }, @@ -27,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())); } }, |
