reload text panel after uploading pdf
This commit is contained in:
parent
7012b8724a
commit
41a1a1f94f
2 changed files with 2 additions and 19 deletions
|
@ -373,7 +373,7 @@ pandora.ui.textPDF = function(text) {
|
||||||
$iframe && $iframe.postMessage('page', {page: page});
|
$iframe && $iframe.postMessage('page', {page: page});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
that.html('UPLOADED: ' + text.uploaded);
|
that.html('Please upload PDF');
|
||||||
}
|
}
|
||||||
return that;
|
return that;
|
||||||
|
|
||||||
|
|
|
@ -43,10 +43,6 @@ pandora.ui.uploadPDFDialog = function(options) {
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
close: function(data) {
|
close: function(data) {
|
||||||
if (pandora.firefogg) {
|
|
||||||
pandora.firefogg.cancel();
|
|
||||||
delete pandora.firefogg;
|
|
||||||
}
|
|
||||||
that.close();
|
that.close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -73,19 +69,6 @@ pandora.ui.uploadPDFDialog = function(options) {
|
||||||
name: file.name,
|
name: file.name,
|
||||||
id: options.id
|
id: options.id
|
||||||
},
|
},
|
||||||
progress: function(data) {
|
|
||||||
var progress = data.progress || 0;
|
|
||||||
$progress.options({progress: progress});
|
|
||||||
},
|
|
||||||
callback: function(result) {
|
|
||||||
if (result.progress == 1) {
|
|
||||||
Ox.Request.clearCache();
|
|
||||||
// fixme reload text view here
|
|
||||||
that.close();
|
|
||||||
} else {
|
|
||||||
$content.html("failed: " + result.responseText);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).bindEvent({
|
}).bindEvent({
|
||||||
progress: function(data) {
|
progress: function(data) {
|
||||||
$progress.options({progress: data.progress || 0});
|
$progress.options({progress: data.progress || 0});
|
||||||
|
@ -93,7 +76,7 @@ pandora.ui.uploadPDFDialog = function(options) {
|
||||||
done: function(data) {
|
done: function(data) {
|
||||||
if (data.progress == 1) {
|
if (data.progress == 1) {
|
||||||
Ox.Request.clearCache();
|
Ox.Request.clearCache();
|
||||||
pandora.$ui.mainPanel.replaceElement(1, pandora.$ui.rightPanel = pandora.ui.rightPanel());
|
pandora.$ui.mainPanel.replaceElement(1, pandora.$ui.textPanel = pandora.ui.textPanel());
|
||||||
that.close();
|
that.close();
|
||||||
} else {
|
} else {
|
||||||
$content.html("failed: " + data.responseText);
|
$content.html("failed: " + data.responseText);
|
||||||
|
|
Loading…
Reference in a new issue