[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/phpgwapi/inc/ -> class.javascript.inc.php (sommaire)

(pas de description)

Poids: 473 lignes (16 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

javascript:: (13 méthodes):
  javascript()
  get_alert()
  get_body_attribs()
  get_confirm()
  get_script_links()
  set_onload()
  set_onunload()
  set_onresize()
  unset_script_link()
  validate_file()
  validate_jsapi()
  get_javascript_globals()
  convert_phparray_jsarray()


Classe: javascript  - X-Ref

eGroupWare javascript support class

Only instanstiate this class using:
<code>
if(!@is_object($GLOBALS['egw']->js))
{
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
}
</code>

This way a theme can see if this is a defined object and include the data,
while the is_object() wrapper prevents whiping out existing data held in
this instance variables, primarily the $files variable.

Note: The package argument is the subdirectory of js - all js should live in subdirectories

javascript()   X-Ref
Constructor

Initialize the instance variables

get_alert($msg)   X-Ref
Returns the javascript required for displaying a popup message box

returns: string the javascript to be used for displaying the message
param: string $msg the message to be displayed to user

get_body_attribs()   X-Ref
Adds on(Un)Load= attributes to the body tag of a page

returns: string the attributes to be used

get_confirm($msg)   X-Ref
Returns the javascript required for displaying a confirmation message box

returns: string the javascript to be used for displaying the message
param: string $msg the message to be displayed to user

get_script_links()   X-Ref
Used for generating the list of external js files to be included in the head of a page

NOTE: This method should only be called by the template class.
The validation is done when the file is added so we don't have to worry now

returns: string the html needed for importing the js into a page

set_onload($code)   X-Ref
Sets an onLoad action for a page

param: string javascript to be used

set_onunload($code)   X-Ref
Sets an onUnload action for a page

param: string javascript to be used

set_onresize($code)   X-Ref
Sets an onResize action for a page

param: string javascript to be used

unset_script_link($app, $package, $file=False)   X-Ref
DO NOT USE - NOT SURE IF I AM GOING TO USE IT - ALSO IT NEEDS SOME CHANGES!!!!
Used for removing a file or package of files to be included in the head section of a page

param: string $app application to use
param: string $package the name of the package to be removed
param: string $file the name of a file in the package to be removed - if ommitted package is removed

validate_file($package, $file, $app='phpgwapi', $browser=true)   X-Ref
Checks to make sure a valid package and file name is provided

returns: bool was the file found?
param: string $package package to be included
param: string $file file to be included - no ".js" on the end
param: string $app application directory to search - default = phpgwapi
param: bool   $browser insert specific browser javascript.

validate_jsapi()   X-Ref
Pas de description

get_javascript_globals()   X-Ref
Pas de description

convert_phparray_jsarray($name, $array, $new=true)   X-Ref
Pas de description



Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7