]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1672] Upload Artifact section doesn't clear uploaded artifacts.
authorOlivier Lamy <olamy@apache.org>
Mon, 24 Sep 2012 14:15:23 +0000 (14:15 +0000)
committerOlivier Lamy <olamy@apache.org>
Mon, 24 Sep 2012 14:15:23 +0000 (14:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1389395 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/artifacts-management.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/general-admin.html

index dfd1f94d77ea2d24de56b9c558493deb997bb68f..73add9ed05a399a255ef183905480f9779c5391a 100644 (file)
@@ -56,6 +56,10 @@ define("archiva.artifacts-management",["jquery","i18n","utils","jquery.tmpl","kn
           dataType: 'json',
           success: function(data) {
             displaySuccessMessage($.i18n.prop("fileupload.artifacts.saved"));
+            self.artifactUploads=[];
+            $("#main-content" ).find("#uploaded-files-list" ).html('');
+            $.ajax("restServices/archivaUiServices/fileUploadService/clearUploadedFiles", {type: "GET", dataType: 'json'});
+            clearForm("#main-content #fileupload");
           },
           error: function(data) {
             var res = $.parseJSON(data.responseText);
index a19894cf8f31885614f81f6fa7099e4c2dd80290..705d657c5477111a43aeb77ce7c876242aa61334 100644 (file)
     <div class="fileupload-loading"></div>
     <br>
     <table class="table table-striped">
-      <tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery"></tbody>
+      <tbody class="files" data-toggle="modal-gallery" data-target="#modal-gallery" id="uploaded-files-list"></tbody>
     </table>
 </form>