This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

* finalized Post import

git-svn-id: http://plugins.svn.wordpress.org/canalblog-importer/branches/1.2@385126 b8457f37-d9ea-0310-8a92-e5e31aec5664
  • Loading branch information...
1 parent d905fc3 commit 79b71d13a5c50a22906863ca62b844ae6873454e oncletom committed May 15, 2011
@@ -28,20 +28,30 @@
};
CI.HandleResponse = function(response){
- var $AjaxResponseHolder = $('#ajax-responses');
+ var $AjaxResponseHolder = $('#ajax-responses'),
+ progress = $('operation progress', response).text();
/*
* Adding messages to the UI
*/
$('object > response_data', response).each(function(){
$AjaxResponseHolder.prepend('<li>'+$(this).text()+'</li>');
+ isOK = true;
});
- $('#import-progress-value').text($('operation progress', response).text());
+ $('#import-progress-value').text(progress);
+
+ /*
+ * No progress? Means error
+ */
+ if ('' === progress)
+ {
+ $AjaxResponseHolder.prepend('<li>'+response+'</li>');
+ }
/*
* Continue batch
*/
- if (1 !== parseInt($('operation finished', response).text(), 10))
+ else if (1 !== parseInt($('operation finished', response).text(), 10))
{
return CI.ExecuteRemoteOperation();
}
Binary file not shown.
Oops, something went wrong.

0 comments on commit 79b71d1

Please sign in to comment.