correctly display/cleanup error message where repository missing

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1366906 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-07-29 19:21:30 +00:00
parent 44a0d63f4f
commit c50be07275
1 changed files with 4 additions and 1 deletions

View File

@ -886,6 +886,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
} }
reportStatisticsFormValidator=function(){ reportStatisticsFormValidator=function(){
$.log("reportStatisticsFormValidator");
var validate = $("#main-content #report-statistics-form-id").validate({ var validate = $("#main-content #report-statistics-form-id").validate({
rules: { rules: {
rowCountStatistics: { rowCountStatistics: {
@ -919,6 +920,8 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
mainContent.find("#rowCount-info-button" ).popover(); mainContent.find("#rowCount-info-button" ).popover();
this.showStatistics=function() { this.showStatistics=function() {
$.log("showStatistics");
clearUserMessages( "repositoriesErrorMessage" );
if (!mainContent.find("#report-statistics-form-id").valid()) { if (!mainContent.find("#report-statistics-form-id").valid()) {
return; return;
} }
@ -926,7 +929,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
displayErrorMessage( $.i18n.prop('report.statistics.repositories.required'), "repositoriesErrorMessage" ); displayErrorMessage( $.i18n.prop('report.statistics.repositories.required'), "repositoriesErrorMessage" );
return; return;
} }
clearUserMessages( "repositoriesErrorMessage" );
var resultTabContent = mainContent.find("#report-result"); var resultTabContent = mainContent.find("#report-result");
url = "restServices/archivaServices/reportServices/getStatisticsReport/?rowCount=" url = "restServices/archivaServices/reportServices/getStatisticsReport/?rowCount="