More error handling in file selection panel.
git-svn-id: http://google-refine.googlecode.com/svn/trunk@2241 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
02c58e2c56
commit
503cca6d3b
@ -1,7 +1,7 @@
|
||||
<div bind="wizardHeader" class="default-importing-wizard-header"><div class="grid-layout layout-tightest layout-full"><table><tr>
|
||||
<td width="1%"><button bind="startOverButton" class="button">« Start Over</button></td>
|
||||
<td width="98%">Select Files to Import</td>
|
||||
<td width="1%"><button bind="nextButton" class="button button-primary">Configure Parsing Opions »</button></td>
|
||||
<td width="1%"><button bind="nextButton" class="button button-primary">Configure Parsing Options »</button></td>
|
||||
</tr></table></div></div>
|
||||
|
||||
<div bind="controlPanel" class="default-importing-file-selection-control-panel">
|
||||
|
@ -280,7 +280,7 @@ Refine.DefaultImportingController.prototype._commitFileSelection = function() {
|
||||
}
|
||||
|
||||
var self = this;
|
||||
var dismissBusy = DialogSystem.showBusy("Inspecting selected files ...");
|
||||
var dismissBusy = DialogSystem.showBusy("Inspecting<br/>selected files ...");
|
||||
$.post(
|
||||
"/command/core/importing-controller?" + $.param({
|
||||
"controller": "core/default-importing-controller",
|
||||
@ -291,23 +291,19 @@ Refine.DefaultImportingController.prototype._commitFileSelection = function() {
|
||||
"fileSelection" : JSON.stringify(this._job.config.fileSelection)
|
||||
},
|
||||
function(data) {
|
||||
if (!(data)) {
|
||||
self._showImportJobError("Unknown error");
|
||||
window.clearInterval(timerID);
|
||||
return;
|
||||
} else if (data.code == "error" || !("job" in data)) {
|
||||
self._showImportJobError(data.message || "Unknown error");
|
||||
window.clearInterval(timerID);
|
||||
return;
|
||||
}
|
||||
|
||||
dismissBusy();
|
||||
|
||||
// Different files might be selected. We start over again.
|
||||
delete this._parserOptions;
|
||||
if (!(data)) {
|
||||
self._createProjectUI.showImportJobError("Unknown error");
|
||||
} else if (data.code == "error" || !("job" in data)) {
|
||||
self._createProjectUI.showImportJobError((data.message) ? ("Error: " + data.message) : "Unknown error");
|
||||
} else {
|
||||
// Different files might be selected. We start over again.
|
||||
delete this._parserOptions;
|
||||
|
||||
self._job = data.job;
|
||||
self._showParsingPanel(true);
|
||||
self._job = data.job;
|
||||
self._showParsingPanel(true);
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
|
@ -113,7 +113,7 @@ DialogSystem.showBusy = function(message) {
|
||||
|
||||
var body = $('<div>').attr('id', 'loading-message').appendTo(frame);
|
||||
$('<img>').attr("src", "images/large-spinner.gif").appendTo(body);
|
||||
$('<span>').text(" " + (message || "Working...")).appendTo(body);
|
||||
$('<span>').html(" " + (message || "Working...")).appendTo(body);
|
||||
|
||||
var level = DialogSystem.showDialog(frame);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user