From a5c446441fee005975a82885771e8d931e7a4e7a Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Sun, 24 Jan 2010 19:12:01 -0800 Subject: fix closure compiler incompatibilities --- src/Angular.js | 4 ++-- src/ControlBar.js | 23 +++++++++++------------ src/Users.js | 6 +++--- src/Widgets.js | 48 +++++++++++++++++++++++++----------------------- 4 files changed, 41 insertions(+), 40 deletions(-) (limited to 'src') diff --git a/src/Angular.js b/src/Angular.js index cadef4d0..bfbe8ee9 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -269,10 +269,10 @@ 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']); var onUpdate = function(){binder.updateView();}; var server = config['database'] =="$MEMORY" ? - new FrameServer(this.window) : + new FrameServer(window) : new Server(config['server'], jQuery['getScript']); server = new VisualServer(server, new Status(jQuery(element.body)), onUpdate); var users = new Users(server, controlBar); diff --git a/src/ControlBar.js b/src/ControlBar.js index a50b8854..6fe5b42d 100644 --- a/src/ControlBar.js +++ b/src/ControlBar.js @@ -1,7 +1,7 @@ function ControlBar(document, serverUrl) { - this.document = document; + this._document = document; this.serverUrl = serverUrl; - this.window = window; + this._window = window; this.callbacks = []; }; @@ -39,25 +39,24 @@ ControlBar.prototype = { }, urlWithoutAnchor: function (path) { - return this.window.location.href.split("#")[0]; + return this._window['location']['href'].split("#")[0]; }, doTemplate: function (path) { var self = this; var id = new Date().getTime(); - var url = this.urlWithoutAnchor(); - url += "#$iframe_notify=" + id; + var url = this.urlWithoutAnchor() + "#$iframe_notify=" + id; var iframeHeight = 330; var loginView = jQuery('