fix closure compiler issues

This commit is contained in:
Misko Hevery 2010-01-24 19:33:04 -08:00
parent a5c446441f
commit 0f42fa2930
3 changed files with 6 additions and 8 deletions

View file

@ -153,7 +153,7 @@ Scope.prototype = {
}, },
markInvalid: function(widget) { markInvalid: function(widget) {
this.state.$invalidWidgets.push(widget); this.state['$invalidWidgets'].push(widget);
}, },
watch: function(declaration) { watch: function(declaration) {

View file

@ -13,14 +13,13 @@ Server.prototype = {
request: function(method, url, request, callback) { request: function(method, url, request, callback) {
var requestId = this.uuid + (this.nextId++); var requestId = this.uuid + (this.nextId++);
var payload = this.base64url(toJson({'u':url, 'm':method, 'p':request}));
var totalPockets = Math.ceil(payload.length / this.maxSize);
var baseUrl = this.url + "/$/" + requestId + "/" + totalPockets + "/";
angularCallbacks[requestId] = function(response) { angularCallbacks[requestId] = function(response) {
delete angularCallbacks[requestId]; delete angularCallbacks[requestId];
callback(200, response); callback(200, response);
}; };
var payload = {'u':url, 'm':method, 'p':request};
payload = this.base64url(toJson(payload));
var totalPockets = Math.ceil(payload.length / this.maxSize);
var baseUrl = this.url + "/$/" + requestId + "/" + totalPockets + "/";
for ( var pocketNo = 0; pocketNo < totalPockets; pocketNo++) { for ( var pocketNo = 0; pocketNo < totalPockets; pocketNo++) {
var pocket = payload.substr(pocketNo * this.maxSize, this.maxSize); var pocket = payload.substr(pocketNo * this.maxSize, this.maxSize);
this.getScript(baseUrl + (pocketNo+1) + "?h=" + pocket, noop); this.getScript(baseUrl + (pocketNo+1) + "?h=" + pocket, noop);

View file

@ -93,7 +93,7 @@ angularCallbacks['flashEvent'] = function(id, event, args) {
var jobject = jQuery(object); var jobject = jQuery(object);
var controller = jobject.data("controller"); var controller = jobject.data("controller");
FileController.prototype[event].apply(controller, args); FileController.prototype[event].apply(controller, args);
jobject.scope().get('$updateView')(); _.defer(jobject.scope().get('$updateView'));
}; };
FileController.template = function(id) { FileController.template = function(id) {
@ -129,7 +129,6 @@ extend(FileController.prototype, {
this.value = value; this.value = value;
this.updateModel(scope); this.updateModel(scope);
this.value = null; this.value = null;
scope.get('$binder').updateView();
}, },
'select': function(name, size, type) { 'select': function(name, size, type) {
this.name = name; this.name = name;