mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-17 02:41:02 +01:00
add onbeforeunload as action
This commit is contained in:
parent
61474e73c4
commit
3abeb7c464
@ -1098,6 +1098,26 @@ abstract class egw_framework
|
|||||||
return self::$body_tags['onUnload'];
|
return self::$body_tags['onUnload'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets an onBeforeUnload action for a page
|
||||||
|
*
|
||||||
|
* @param string $code='' javascript to be used
|
||||||
|
* @param boolean $replace=false false: append to existing, true: replace existing tag
|
||||||
|
* @return string content of onXXX tag after adding code
|
||||||
|
*/
|
||||||
|
static function set_onbeforeunload($code='',$replace=false)
|
||||||
|
{
|
||||||
|
if ($replace || empty(self::$body_tags['onBeforeUnload']))
|
||||||
|
{
|
||||||
|
self::$body_tags['onBeforeUnload'] = $code;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self::$body_tags['onBeforeUnload'] .= $code;
|
||||||
|
}
|
||||||
|
return self::$body_tags['onBeforeUnload'];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets an onResize action for a page
|
* Sets an onResize action for a page
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user