ultimix
jsdialogs_1_0_0 Class Reference

Public Member Functions

 __construct ()
 pre_generation ($Options)
 selection_dialog ($FilePath, $EntityName, $Str, &$Changed)
 view ($Options)

Data Fields

 $CachedMultyFS = false
 $PageCSS = false
 $PageJS = false
 $Settings = false
 $String = false

Detailed Description

Class loads java script libraries.

Author
Dodonov A.A.

Definition at line 26 of file jsdialogs.php.

Constructor & Destructor Documentation

__construct ( )

Constructor.

Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 58 of file jsdialogs.php.

{
try
{
$this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
$this->PageCSS = get_package( 'page::page_css' , 'last' , __FILE__ );
$this->PageJS = get_package( 'page::page_js' , 'last' , __FILE__ );
$this->Settings = get_package_object( 'settings::settings' , 'last' , __FILE__ );
$this->String = get_package( 'string' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

Member Function Documentation

pre_generation (   $Options)

Function executes before any page generating actions took place.

Parameters
$Options- Settings.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 92 of file jsdialogs.php.

{
try
{
$Path = _get_package_relative_path_ex( 'jsdialogs' , '1.0.0' );
$this->PageCSS->add_stylesheet( "{http_host}/$Path/res/css/jsdialogs.css" );
$this->PageJS->add_javascript( "{http_host}/$Path/include/js/dialogs.js" );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
selection_dialog (   $FilePath,
  $EntityName,
  $Str,
$Changed 
)

Function creates record selection dialog.

Parameters
$FilePath- Path to the package.
$EntityName- Name of the entity.
$Str- Processing string.
$Changed- true if any of the page's elements was compiled.
Returns
HTML code to display.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 185 of file jsdialogs.php.

{
try
{
$MacroName = $EntityName.'_selection_dialog';
for( ; $MacroParameters = $this->String->get_macro_parameters( $Str , $MacroName ) ; )
{
$this->Settings->load_settings( $MacroParameters );
$Template = $this->CachedMultyFS->get_template( $FilePath , "$MacroName.tpl" );
$Template = $this->add_opener( $Settings , $Template );
$id = $this->Settings->get_setting( 'id' , md5( microtime( true ) ) );
$Template = str_replace( '{id}' , $id , $Template );
$Str = str_replace( '{'."$MacroName:$MacroParameters}" , $Template , $Str );
$Changed = true;
}
return( $Str );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
view (   $Options)

View for the scripting library.

Parameters
$Options- not used.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 230 of file jsdialogs.php.

{
try
{
return( '' );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

Field Documentation

$CachedMultyFS = false

Cached packages.

Author
Dodonov A.A.

Definition at line 38 of file jsdialogs.php.

$PageCSS = false

Definition at line 39 of file jsdialogs.php.

$PageJS = false

Definition at line 40 of file jsdialogs.php.

$Settings = false

Definition at line 41 of file jsdialogs.php.

$String = false

Definition at line 42 of file jsdialogs.php.


The documentation for this class was generated from the following file: