From: Lo?c C. <lo...@us...> - 2001-05-17 19:28:16
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv31790/chat Modified Files: loader.php3 handle_input.php3 Log Message: Optimize a bit js work Index: loader.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/loader.php3,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** loader.php3 2001/05/10 11:47:22 1.19 --- loader.php3 2001/05/17 19:28:14 1.20 *************** *** 408,416 **** </head> ! <body onunload="if (typeof(window.parent.frames['exit']) != 'undefined' && typeof(window.parent.jsLeaveChat) != 'undefined' && !window.parent.jsLeaveChat && window.parent.jsConnect < 1) window.parent.pmcConnecting(1)"> <script type="text/javascript" language="javascript1.1"> <!-- ! if (typeof(window.parent.frames['exit']) != 'undefined' ! && typeof(window.parent.pmcConnectDone) != 'undefined') { window.parent.pmcConnectDone(); --- 408,415 ---- </head> ! <body onunload="if (typeof(window.parent.jsLeaveChat) != 'undefined' && !window.parent.jsLeaveChat && window.parent.jsConnect == 0) window.parent.pmcConnecting(1)"> <script type="text/javascript" language="javascript1.1"> <!-- ! if (typeof(window.parent.pmcConnectDone) != 'undefined') { window.parent.pmcConnectDone(); Index: handle_input.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/handle_input.php3,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** handle_input.php3 2001/05/10 11:47:22 1.24 --- handle_input.php3 2001/05/17 19:28:14 1.25 *************** *** 220,225 **** if (typeof(elements['submitType'].disabled) != 'undefined') elements['submitType'].disabled = false; ! } <?php /** --- 220,227 ---- if (typeof(elements['submitType'].disabled) != 'undefined') elements['submitType'].disabled = false; ! } // end of with (window.parent.frames['input']....) + with (window.parent) + { <?php /** *************** *** 229,233 **** { ?> ! // Refresh the messages frame if necessary <?php if ($enforceFirstLoad) --- 231,235 ---- { ?> ! // Refresh the messages frame if necessary <?php if ($enforceFirstLoad) *************** *** 235,249 **** echo("\n"); ?> ! window.parent.frames['messages'].window.document.close(); ! window.parent.jsIsInitLoad = true; ! window.parent.jsLastLoadedMsgTime = 0; ! window.parent.jsLastCheckedUserTime = 0; ! window.parent.jsConnect = 0; <?php } echo("\n"); ?> ! if (window.parent.jsConnect == 0) ! window.parent.pmcConnecting(1); <?php } --- 237,251 ---- echo("\n"); ?> ! frames['messages'].window.document.close(); ! jsIsInitLoad = true; ! jsLastLoadedMsgTime = 0; ! jsLastCheckedUserTime = 0; ! jsConnect = 0; <?php } echo("\n"); ?> ! if (jsConnect == 0) ! pmcConnecting(1); <?php } *************** *** 259,265 **** echo("\n"); ?> ! // Display a JavaScript alert box with the error message if necessary ! window.parent.pmcSetMsgBoxFocus(); ! alert('<?php echo(pmcSlashSingleQuotes($error)); ?>'); <?php } --- 261,267 ---- echo("\n"); ?> ! // Display a JavaScript alert box with the error message if necessary ! pmcSetMsgBoxFocus(); ! alert('<?php echo(pmcSlashSingleQuotes($error)); ?>'); <?php } *************** *** 275,284 **** echo("\n"); ?> ! // Add the red colors when the user has just been promoted to moderator ! if (!window.parent.jsIsModerator) ! { ! window.parent.frames['input'].window.location.replace('<?php echo($inputUrl); ?>'); ! window.parent.jsIsModerator = 1; ! } <?php } --- 277,286 ---- echo("\n"); ?> ! // Add the red colors when the user has just been promoted to moderator ! if (!jsIsModerator) ! { ! frames['input'].window.location.replace('<?php echo($inputUrl); ?>'); ! jsIsModerator = 1; ! } <?php } *************** *** 287,300 **** echo("\n"); ?> ! // Remove the red colors when the user has became a 'simple user' ! if (window.parent.jsIsModerator) ! { ! window.parent.frames['input'].window.location.replace('<?php echo($inputUrl); ?>'); ! window.parent.jsIsModerator = 0; ! } <?php } echo("\n"); ?> } // --> --- 289,303 ---- echo("\n"); ?> ! // Remove the red colors when the user has became a 'simple user' ! if (jsIsModerator) ! { ! frames['input'].window.location.replace('<?php echo($inputUrl); ?>'); ! jsIsModerator = 0; ! } <?php } echo("\n"); ?> + } // end of with (window.parent) } // --> |