Dev environment : closure compiler + jshint update

Fixed error raised by closure compiler
Added es3 option to jshint (detect trailing commas)
Added curly option to jshint (missing curly braces for if/for blocks)
Removed trailing whitespaces (not enforced through jshint though)
This commit is contained in:
Julian Descottes
2013-09-28 23:52:51 +02:00
parent b254c582b9
commit ca427e0853
26 changed files with 136 additions and 129 deletions

View File

@@ -1,11 +1,11 @@
(function () {
var ns = $.namespace("pskl.service");
ns.HistoryService = function (piskelController) {
this.piskelController = piskelController;
this.piskelController = piskelController;
};
ns.HistoryService.prototype.init = function () {
$.subscribe(Events.TOOL_RELEASED, this.saveState.bind(this));
$.subscribe(Events.UNDO, this.undo.bind(this));
$.subscribe(Events.REDO, this.redo.bind(this));

View File

@@ -5,14 +5,14 @@
};
ns.ImageUploadService.prototype.init = function () {
// service interface
// service interface
};
/**
* Upload a base64 image data to distant service. If successful, will call provided callback with the image URL as first argument;
* @param {String} imageData base64 image data (such as the return value of canvas.toDataUrl())
* @param {Function} cbSuccess success callback. 1st argument will be the uploaded image URL
* @param {Function} cbError error callback
* @param {Function} cbError error callback
*/
ns.ImageUploadService.prototype.upload = function (imageData, cbSuccess, cbError) {
var xhr = new XMLHttpRequest();
@@ -21,7 +21,7 @@
xhr.open('POST', this.serviceUrl_, true);
xhr.onload = function (e) {
if (this.status == 200) {
var imageUrl = "http://screenletstore.appspot.com/img/" + this.responseText;
var imageUrl = "http://screenletstore.appspot.com/img/" + this.responseText;
cbSuccess(imageUrl);
} else {
cbError();
@@ -30,5 +30,5 @@
xhr.send(formData);
};
})();