]> source.dussan.org Git - archiva.git/commitdiff
MRM-1748
authorskygo <skygo@unknown>
Wed, 13 Mar 2013 10:42:32 +0000 (10:42 +0000)
committerskygo <skygo@unknown>
Wed, 13 Mar 2013 10:42:32 +0000 (10:42 +0000)
-use is(":checked") because attr("checked") was always returning not set.
-adapt defaultfileupload boolean conversion to handle "1" as true value.

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1455874 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultFileUploadService.java
archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/artifacts-management.js

index 6e6da12b5ffeaa7cbe8b37fab88d62bd97718349..a30bc6d2f477ed58e3b2f8a63c6444aaba57c348 100644 (file)
@@ -125,8 +125,8 @@ public class DefaultFileUploadService
         {
 
             String classifier = getStringValue( multipartBody, "classifier" );
-            boolean pomFile = BooleanUtils.toBoolean( getStringValue( multipartBody, "pomFile" ) );
-
+            boolean pomFile = BooleanUtils.toBoolean( getStringValue( multipartBody, "pomFile" ), "1", "" );
+            
             Attachment file = multipartBody.getAttachment( "files[]" );
 
             //Content-Disposition: form-data; name="files[]"; filename="org.apache.karaf.features.command-2.2.2.jar"
index 9a571355d38a0e94638e93a799eed9c38fd18b33..213ea43bfbc5b1252308a4dde509350e2dffeac8 100644 (file)
@@ -107,7 +107,7 @@ define("archiva.artifacts-management",["jquery","i18n","utils","jquery.tmpl","kn
                   }
                 );
                 fileUpload.bind('fileuploadsubmit', function (e, data) {
-                  var pomFile = data.context.find('#pomFile' ).attr("checked");
+                  var pomFile = data.context.find('#pomFile' ).is(":checked");
                   var classifier = data.context.find('#classifier' ).val();
                   if (!data.formData){
                     data.formData={};