diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/API.js | 2 | ||||
| -rw-r--r-- | src/Angular.js | 5 | ||||
| -rw-r--r-- | src/ControlBar.js | 8 |
3 files changed, 9 insertions, 6 deletions
@@ -319,5 +319,7 @@ defineApi('Object', [angularGlobal, angularCollection, angularObject], ['keys', 'values']); defineApi('String', [angularGlobal, angularString], []); defineApi('Date', [angularGlobal, angularDate], []); +//IE bug +angular['Date']['toString'] = angularDate['toString']; defineApi('Function', [angularGlobal, angularCollection, angularFunction], ['bind', 'bindAll', 'delay', 'defer', 'wrap', 'compose']); diff --git a/src/Angular.js b/src/Angular.js index b208d0ec..ce25423c 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -20,7 +20,8 @@ if (typeof Node == 'undefined') { function noop() {} if (!window['console']) window['console']={'log':noop, 'error':noop}; -var consoleNode, jQuery, msie, +var consoleNode, msie, + jQuery = window['jQuery'] || window['$'], // weirdness to make IE happy foreach = _.each, extend = _.extend, angular = window['angular'] || (window['angular'] = {}), @@ -270,7 +271,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 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())); } }, |
