AJAX: Reset votes: now uses whiteOutMiniPrompt()
authorDan
Mon, 04 May 2009 23:03:37 -0400
changeset 946 ff58e1732482
parent 945 c19242d13a49
child 947 f222643fb578
AJAX: Reset votes: now uses whiteOutMiniPrompt()
includes/clientside/static/ajax.js
--- a/includes/clientside/static/ajax.js	Mon May 04 23:02:53 2009 -0400
+++ b/includes/clientside/static/ajax.js	Mon May 04 23:03:37 2009 -0400
@@ -579,12 +579,16 @@
           },
           onclick: function(e)
           {
-            miniPromptDestroy(this);
-            setAjaxLoading();
+            var box = miniPromptGetParent(this);
+            var whitey = whiteOutMiniPrompt(box);
             ajaxGet(stdAjaxPrefix+'&_mode=resetdelvotes', function(ajax) {
               if ( ajax.readyState == 4 && ajax.status == 200 ) {
-                unsetAjaxLoading();
-                alert(ajax.responseText);
+                whiteOutReportSuccess(whitey);
+                setTimeout(function()
+                  {
+                    miniPromptDestroy(box);
+                  }, 1250);
+                
                 item = document.getElementById('mdgDeleteVoteNoticeBox');
                 if(item)
                 {
@@ -1455,6 +1459,7 @@
         if ( releases.length > 0 )
         {
           thediv.className = 'tblholder';
+          // FIXME: l10n
           if ( update_available )
           {
             var infobox = document.createElement('div');
@@ -1485,6 +1490,7 @@
           var td3 = document.createElement('th');
           var td4 = document.createElement('th');
           
+          // FIXME: l10n
           td1.appendChild( document.createTextNode('Release type') );
           td2.appendChild( document.createTextNode('Version') );
           td3.appendChild( document.createTextNode('Code name') );