1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Get rid of some JS warnings

This commit is contained in:
e107steved 2007-08-16 19:30:49 +00:00
parent fdd13ecda3
commit bc07d4d7f2
2 changed files with 7 additions and 4 deletions

View File

@ -20,11 +20,11 @@ function getRefToDivMod( divID, oDoc ) {
//resize method for popup window (resize to fit contents) //resize method for popup window (resize to fit contents)
function resizeWinTo() { function resizeWinTo() {
if( !document.images.length ) { document.images[0] = document.layers[0].images[0]; } if( !document.images.length ) { document.images[0] = document.layers[0].images[0]; }
if( !document.images[0].height || window.doneAlready ) { return; } //in case images are disabled if( !document.images[0].height || window.doneAlready ) { return false; } //in case images are disabled
var oH = getRefToDivMod( 'myID' ); if( !oH ) { return false; } var oH = getRefToDivMod( 'myID' ); if( !oH ) { return false; }
var oW = oH.clip ? oH.clip.width : oH.offsetWidth; var oW = oH.clip ? oH.clip.width : oH.offsetWidth;
var oH = oH.clip ? oH.clip.height : oH.offsetHeight; if( !oH ) { return false; } var oH = oH.clip ? oH.clip.height : oH.offsetHeight; if( !oH ) { return false; }
if( !oH || window.doneAlready ) { return; } //in case images are disabled if( !oH || window.doneAlready ) { return false; } //in case images are disabled
window.doneAlready = true; //for Safari and Opera window.doneAlready = true; //for Safari and Opera
/*//no idea why this is in here /*//no idea why this is in here
if(document.getElementsByTagName) { if(document.getElementsByTagName) {
@ -45,6 +45,7 @@ function resizeWinTo() {
//'var scW = screen.availWidth ? screen.availWidth : screen.width; //'var scW = screen.availWidth ? screen.availWidth : screen.width;
//'var scH = screen.availHeight ? screen.availHeight : screen.height; //'var scH = screen.availHeight ? screen.availHeight : screen.height;
//'if( !window.opera ) { x.moveTo(Math.round((scW-oW)/2),Math.round((scH-oH)/2)); } //'if( !window.opera ) { x.moveTo(Math.round((scW-oW)/2),Math.round((scH-oH)/2)); }
return false;
} }
@ -154,4 +155,5 @@ function openPerfectPopup(oSrc, oWidth, oTitle, oText){
imgWin.document.close(); imgWin.document.close();
if( imgWin.focus ) { imgWin.focus(); } if( imgWin.focus ) { imgWin.focus(); }
return false;
} }

View File

@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_handlers/ren_help.php,v $ | $Source: /cvs_backup/e107_0.8/e107_handlers/ren_help.php,v $
| $Revision: 1.2 $ | $Revision: 1.3 $
| $Date: 2007-05-17 20:14:57 $ | $Date: 2007-08-16 19:30:49 $
| $Author: e107steved $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@ -130,6 +130,7 @@ function Color_Select($formid='col_selector') {
var tdblk = '<td style=\'background-color: #000000; cursor: default; height: 10px; width: 10px;\'><\/td>'; var tdblk = '<td style=\'background-color: #000000; cursor: default; height: 10px; width: 10px;\'><\/td>';
var g = 1; var g = 1;
var s = 0; var s = 0;
var i, j, k;
function td_render(color) { function td_render(color) {
return '<td style=\'background-color: #' + color + '; height: 10px; width: 10px;\' onmousedown=\"addtext(\'[color=#' + color + '][/color]\')\"><\/td>'; return '<td style=\'background-color: #' + color + '; height: 10px; width: 10px;\' onmousedown=\"addtext(\'[color=#' + color + '][/color]\')\"><\/td>';