[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.8-178-g432df1d

? sunnavy sunnavy at bestpractical.com
Tue Oct 26 20:55:39 EDT 2010


The branch, 3.8-trunk has been updated
       via  432df1da150eff66d7b17b2b0812114e0db9896a (commit)
      from  10572e20930fb78647124ee3ec30c046d0acf797 (commit)

Summary of changes:
 share/html/NoAuth/js/util.js |   26 ++++++++------------------
 1 files changed, 8 insertions(+), 18 deletions(-)

- Log -----------------------------------------------------------------
commit 432df1da150eff66d7b17b2b0812114e0db9896a
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Oct 27 08:52:02 2010 +0800

    no need to ajax more than once

diff --git a/share/html/NoAuth/js/util.js b/share/html/NoAuth/js/util.js
index 908b72b..d835a7f 100644
--- a/share/html/NoAuth/js/util.js
+++ b/share/html/NoAuth/js/util.js
@@ -318,23 +318,13 @@ function checkboxToInput(target,checkbox,val){
 function toggleTicketBookmark( id, url ) {
     var elements = $$("span.toggle-"+id);
     if ( elements.length ) {
-        if ( elements.length == 1 ) {
-            new Ajax.Request(url, {
-                onSuccess: function(response) {
-                    $(elements[0]).replace(response.responseText);
-                }
-                }
-            );
-        }
-        else {
-            new Ajax.Request(url);
-            new Ajax.Request(url+'&Toggle=0', {
-                onSuccess: function(response) {
-                    elements.each( function( item ) {
-                        item.replace(response.responseText);
-                    })
-                }
-            });
-        }
+        new Ajax.Request(url, {
+            method: 'get',
+            onSuccess: function(response) {
+                elements.each( function( item ) {
+                    item.replace(response.responseText);
+                })
+            }
+        });
     }
 }

-----------------------------------------------------------------------


More information about the Rt-commit mailing list