jseventunload.patch

Administrator Admin, 2006-12-26 21:31

Download (1.47 KB)

View differences:

typo3_src-4.0.4/typo3/sysext/cms/tslib/class.tslib_fe.php 2006-12-26 21:18:09.000000000 +0100
286 286
		'onmousemove' => array(),
287 287
		'onmouseup' => array(),
288 288
		'onload' => array(),
289
		'onunload' => array(),
289 290
	);
290 291
	var $JSCode='';						// Deprecated, use additionalJavaScript instead.
291 292
	var $JSImgCode='';					// Used to accumulate JavaScript loaded images (by menus)
typo3_src-4.0.4/typo3/sysext/cms/tslib/class.tslib_pagegen.php 2006-12-26 21:19:12.000000000 +0100
337 337
			$setEvents[]='	document.onload=T3_onloadWrapper;';
338 338
			$setBody[]='onload="T3_onloadWrapper();"';
339 339
		}
340

  
340
		if (is_array($GLOBALS['TSFE']->JSeventFuncCalls['onunload']) && count($GLOBALS['TSFE']->JSeventFuncCalls['onunload']))	{
341
			$functions[]='	function T3_onunloadWrapper()	{	'.implode('   ',$GLOBALS['TSFE']->JSeventFuncCalls['onunload']).'	}';
342
			$setEvents[]='	document.onunload=T3_onloadWrapper;';
343
			$setBody[]='onunload="T3_onunloadWrapper();"';
344
		}
345
		
341 346
		return Array(count($functions)?'
342 347
<script type="text/javascript">
343 348
	/*<![CDATA[*/