more jslint goodness

git-svn-id: http://google-refine.googlecode.com/svn/trunk@433 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Stefano Mazzocchi 2010-04-09 01:14:33 +00:00
parent 16a2600a49
commit cc2209074b
3 changed files with 12 additions and 12 deletions

View File

@ -78,7 +78,7 @@ function renderProjects(data) {
data: { "project" : project.id }, data: { "project" : project.id },
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data && typeof data['code'] != 'undefined' && data.code == "ok") { if (data && typeof data.code != 'undefined' && data.code == "ok") {
window.location.reload(); window.location.reload();
} }
} }
@ -121,8 +121,8 @@ function isThereNewRelease() {
var latestRevision = GridworksReleases.releases[0].revision; var latestRevision = GridworksReleases.releases[0].revision;
var thisRev = parseInt(revision_pattern.exec(thisRevision)[1]); var thisRev = parseInt(revision_pattern.exec(thisRevision)[1],10);
var latestRev = parseInt(revision_pattern.exec(GridworksReleases.releases[0].revision)[1]); var latestRev = parseInt(revision_pattern.exec(GridworksReleases.releases[0].revision)[1],10);
return latestRev > thisRev; return latestRev > thisRev;
} }

View File

@ -14,7 +14,7 @@ function onLoad() {
var params = URL.getParameters(); var params = URL.getParameters();
if ("project" in params) { if ("project" in params) {
theProject = { theProject = {
id: parseInt(params.project) id: parseInt(params.project,10)
}; };
var uiState = {}; var uiState = {};
@ -143,10 +143,10 @@ Gridworks.createUpdateFunction = function(options, onFinallyDone) {
pushFunction(function(onDone) { pushFunction(function(onDone) {
ui.historyWidget.update(onDone); ui.historyWidget.update(onDone);
}); });
if (options["everythingChanged"] || options["modelsChanged"] || options["columnStatsChanged"]) { if (options.everythingChanged || options.modelsChanged || options.columnStatsChanged) {
pushFunction(Gridworks.reinitializeProjectData); pushFunction(Gridworks.reinitializeProjectData);
} }
if (options["everythingChanged"] || options["modelsChanged"] || options["rowsChanged"] || options["rowMetadataChanged"] || options["cellsChanged"] || options["engineChanged"]) { if (options.everythingChanged || options.modelsChanged || options.rowsChanged || options.rowMetadataChanged || options.cellsChanged || options.engineChanged) {
pushFunction(function(onDone) { pushFunction(function(onDone) {
ui.dataTableView.update(onDone); ui.dataTableView.update(onDone);
}); });
@ -211,7 +211,7 @@ Gridworks.postProcess = function(command, params, body, updateOptions, callbacks
if (o.code == "error") { if (o.code == "error") {
if ("onError" in callbacks) { if ("onError" in callbacks) {
try { try {
callbacks["onError"](o); callbacks.onError(o);
} catch (e) { } catch (e) {
Gridworks.reportException(e); Gridworks.reportException(e);
} }
@ -219,14 +219,14 @@ Gridworks.postProcess = function(command, params, body, updateOptions, callbacks
} else { } else {
if ("onDone" in callbacks) { if ("onDone" in callbacks) {
try { try {
callbacks["onDone"](o); callbacks.onDone(o);
} catch (e) { } catch (e) {
Gridworks.reportException(e); Gridworks.reportException(e);
} }
} }
if (o.code == "ok") { if (o.code == "ok") {
Gridworks.update(updateOptions, callbacks["onFinallyDone"]); Gridworks.update(updateOptions, callbacks.onFinallyDone);
if ("historyEntry" in o) { if ("historyEntry" in o) {
ui.processWidget.showUndo(o.historyEntry); ui.processWidget.showUndo(o.historyEntry);
@ -234,12 +234,12 @@ Gridworks.postProcess = function(command, params, body, updateOptions, callbacks
} else if (o.code == "pending") { } else if (o.code == "pending") {
if ("onPending" in callbacks) { if ("onPending" in callbacks) {
try { try {
callbacks["onPending"](o); callbacks.onPending(o);
} catch (e) { } catch (e) {
Gridworks.reportException(e); Gridworks.reportException(e);
} }
} }
ui.processWidget.update(updateOptions, callbacks["onFinallyDone"]); ui.processWidget.update(updateOptions, callbacks.onFinallyDone);
} }
} }
} }

View File

@ -36,7 +36,7 @@ MenuSystem.dismissUntil = function(level) {
for (var i = MenuSystem._layers.length - 1; i >= level; i--) { for (var i = MenuSystem._layers.length - 1; i >= level; i--) {
var layer = MenuSystem._layers[i]; var layer = MenuSystem._layers[i];
layer.elmt.remove(); layer.elmt.remove();
layer["onDismiss"](); layer.onDismiss();
} }
MenuSystem._layers = MenuSystem._layers.slice(0, level); MenuSystem._layers = MenuSystem._layers.slice(0, level);
}; };