summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorOlivier Lamy <olamy@apache.org>2012-12-29 23:58:47 +0000
committerOlivier Lamy <olamy@apache.org>2012-12-29 23:58:47 +0000
commitfad02e0a878e71d2934df04b3364b1586b8c7a26 (patch)
tree1d5b2f30bcbbb969094053564fb42774ada5f36a /archiva-modules
parent65bf06bef472c4b01ea1fe3f6e47662f25ce9a6b (diff)
downloadarchiva-fad02e0a878e71d2934df04b3364b1586b8c7a26.tar.gz
archiva-fad02e0a878e71d2934df04b3364b1586b8c7a26.zip
fix validator
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1426861 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js
index 6daf0fffe..f42f5e6d6 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js
@@ -529,11 +529,13 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
save=function(){
var userMessages=$("#user-messages");
- userMessages.html(mediumSpinnerImg());
+
var mainContent=$("#main-content");
+
if (!mainContent.find("#network-configuration-edit-form").valid()){
return;
}
+ userMessages.html(mediumSpinnerImg());
mainContent.find("#network-configuration-btn-save" ).button('loading');
$.ajax("restServices/archivaServices/archivaAdministrationService/setNetworkConfiguration", {
type: "POST",
@@ -565,11 +567,12 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
var networkConfiguration=new NetworkConfiguration(data.maxTotal,data.maxTotalPerHost,data.usePooling);
var networkConfigurationViewModel=new NetworkConfigurationViewModel(networkConfiguration);
ko.applyBindings(networkConfigurationViewModel,mainContent.get(0));
- var validator = mainContent.find("#network-configuration-edit-form").validate({
- showErrors: function(validator, errorMap, errorList) {
- customShowError(mainContent.find("#network-configuration-edit-form" ).get(0),validator,errorMap,errorMap);
- }
- });
+ var validator = mainContent.find("#network-configuration-edit-form")
+ .validate({
+ showErrors: function(validator, errorMap, errorList) {
+ customShowError(mainContent.find("#network-configuration-edit-form" ),validator,errorMap,errorMap);
+ }
+ });
}
});