diff options
| author | Misko Hevery | 2010-01-09 15:02:43 -0800 |
|---|---|---|
| committer | Misko Hevery | 2010-01-09 15:02:43 -0800 |
| commit | 9b9a0dadcce82ae42ac09ad396d647739af20a06 (patch) | |
| tree | 854d162ac442509d12b17d7ed5123d7d43850f1e /src/ControlBar.js | |
| parent | 88eca572fdc7f68a7f384b612052c49de00df433 (diff) | |
| download | angular.js-9b9a0dadcce82ae42ac09ad396d647739af20a06.tar.bz2 | |
removed nglr namespace
Diffstat (limited to 'src/ControlBar.js')
| -rw-r--r-- | src/ControlBar.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ControlBar.js b/src/ControlBar.js index 3e1f0b57..b66a1464 100644 --- a/src/ControlBar.js +++ b/src/ControlBar.js @@ -1,16 +1,16 @@ // Copyright (C) 2008,2009 BRAT Tech LLC -nglr.ControlBar = function (document, serverUrl) { +ControlBar = function (document, serverUrl) { this.document = document; this.serverUrl = serverUrl; this.window = window; this.callbacks = []; }; -nglr.ControlBar.prototype.bind = function () { +ControlBar.prototype.bind = function () { }; -nglr.ControlBar.HTML = +ControlBar.HTML = '<div>' + '<div class="ui-widget-overlay"></div>' + '<div id="ng-login" ng-non-bindable="true">' + @@ -18,25 +18,25 @@ nglr.ControlBar.HTML = '</div>' + '</div>'; -nglr.ControlBar.prototype.login = function (loginSubmitFn) { +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())); } }; -nglr.ControlBar.prototype.logout = function (loginSubmitFn) { +ControlBar.prototype.logout = function (loginSubmitFn) { this.callbacks.push(loginSubmitFn); if (this.callbacks.length == 1) { this.doTemplate("/user_session/do_destroy.mini"); } }; -nglr.ControlBar.prototype.urlWithoutAnchor = function (path) { +ControlBar.prototype.urlWithoutAnchor = function (path) { return this.window.location.href.split("#")[0]; }; -nglr.ControlBar.prototype.doTemplate = function (path) { +ControlBar.prototype.doTemplate = function (path) { var self = this; var id = new Date().getTime(); var url = this.urlWithoutAnchor(); @@ -49,7 +49,7 @@ nglr.ControlBar.prototype.doTemplate = function (path) { resizable: false, modal:true, title: 'Authentication: <a href="http://www.getangular.com"><tt><angular/></tt></a>' }); - nglr["_iframe_notify_" + id] = function() { + callbacks["_iframe_notify_" + id] = function() { loginView.dialog("destroy"); loginView.remove(); jQuery.each(self.callbacks, function(i, callback){ @@ -59,13 +59,13 @@ nglr.ControlBar.prototype.doTemplate = function (path) { }; }; -nglr.ControlBar.FORBIDEN = +ControlBar.FORBIDEN = '<div ng-non-bindable="true" title="Permission Error:">' + 'Sorry, you do not have permission for this!'+ '</div>'; -nglr.ControlBar.prototype.notAuthorized = function () { +ControlBar.prototype.notAuthorized = function () { if (this.forbidenView) return; - this.forbidenView = jQuery(nglr.ControlBar.FORBIDEN); + this.forbidenView = jQuery(ControlBar.FORBIDEN); this.forbidenView.dialog({bgiframe:true, height:70, modal:true}); }; |
