display alert image in case of error when checking remote repo

This commit is contained in:
Olivier Lamy 2014-05-19 16:13:26 +10:00
parent 0a1a105b50
commit a78b6070bc
1 changed files with 5 additions and 2 deletions

View File

@ -1230,10 +1230,13 @@ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
success: function(result){ success: function(result){
$.log("result:"+result); $.log("result:"+result);
if(result=="true"){ if(result=="true"){
mainContent.find("img[id='"+repoId+"']").attr("src", "images/weather-clear.png" ) mainContent.find("img[id='"+repoId+"']").attr("src", "images/weather-clear.png" );
} else { } else {
mainContent.find("img[id='"+repoId+"']").attr("src", "images/weather-severe-alert-16-16.png" ) mainContent.find("img[id='"+repoId+"']").attr("src", "images/weather-severe-alert-16-16.png" );
} }
},
error: function(result){
mainContent.find("img[id='"+repoId+"']").attr("src", "images/weather-severe-alert-16-16.png" );
} }
}); });
}); });