Bug 7977: Improving upload result message display
authorChris Nighswonger <cnighswonger@foundations.edu>
Fri, 11 May 2012 15:49:22 +0000 (11:49 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Thu, 24 May 2012 12:15:09 +0000 (14:15 +0200)
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Mason James <mtj@kohaaloha.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes-upload.tt

index 996a1b2..2330ee6 100644 (file)
             success     : function(){
                             var response = JSON.parse(jqXHR.responseText);
                             if (response.success) {
-                                $("#server_response").text(response.records+_(' quotes saved.'));
+                                alert(response.records+_(' quotes saved.'));
+                                window.location.reload(true);   // is this the best route?
                             }
                             else {
-                                $("#server_response").text(+response.records+_(' quotes saved, but an error has occurred. Please ask your administrator to check the server log for more details.'));
+                                alert(response.records+_(' quotes saved, but an error has occurred. Please ask your administrator to check the server log for more details.'));
+                                window.location.reload(true);   // is this the best route?
                             }
-                            $("#server_response").fadeIn(200);
                           },
         });
     }
         }
     }
 
-    function fnResetUpload() {
-        $('#server_response').fadeOut(200);
-        window.location.reload(true);   // is this the best route?
-    }
-
     //]]>
     </script>
 </head>
                         <div id="progress_bar"><div class="percent">0%</div></div>
                     </div>
                 </fieldset>
-                <div id="server_response" onclick='fnResetUpload()'>Server Response</div>
                 <table id="quotes_editor" style="visibility: hidden;">
                 <thead>
                     <tr>