[Vtigercrm-commits] [vtiger-commits] r6829 - /vtigercrm/trunk/modules/Webmails/webmails.js

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed May 31 04:22:38 EDT 2006


Author: mmbrich
Date: Wed May 31 02:22:36 2006
New Revision: 6829

Log:
double nested function, may cause issues in IE, see function notes on reasoning

Modified:
    vtigercrm/trunk/modules/Webmails/webmails.js

Modified: vtigercrm/trunk/modules/Webmails/webmails.js
==============================================================================
--- vtigercrm/trunk/modules/Webmails/webmails.js (original)
+++ vtigercrm/trunk/modules/Webmails/webmails.js Wed May 31 02:22:36 2006
@@ -263,15 +263,25 @@
         window.setTimeout("periodic_event()",box_refresh);
 }
 function show_hidden() {
-        $("status").style.display="block";
+	// prototype uses enumerable lists to queue events for execution.
+	// because of this, this function executes and returns imediately and
+	// the status spinner is never seen.  The status spinner below is a hack
+	// and doesn't even attempt to pretend like it knows the event is finished.
+	// this cannot be fixed with the scriptaculous beforeStart and afterFinish
+	// event hooks for some reason, maybe because the event duration is too quick?
+	window.setTimeout(function() {
+        	$("status").style.display="block";
+		window.setTimeout(function() {
+       			$("status").style.display="none";
+		},2000);
+	},0);
         var els = document.getElementsByClassName("deletedRow");
         for(var i=0;i<els.length;i++) {
                 if(els[i].style.display == "none")
-                        new Effect.Appear(els[i],{queue: {position: 'end', scope: 'command'}, duration: 0.2});
+                        new Effect.Appear(els[i],{queue: {position: 'end', scope: 'show'}, duration: 0.2});
                 else
-                        new Effect.Fade(els[i],{queue: {position: 'end', scope: 'command'}, duration: 0.2});
+                        new Effect.Fade(els[i],{queue: {position: 'end', scope: 'show'}, duration: 0.2});
         }
-        $("status").style.display="none";
 }
 function mass_delete() {
 	var ok = confirm("Are you sure you want to delete these messages?");





More information about the vtigercrm-commits mailing list