Detailed Description
Class processes dialog macroes.
- Author
- Dodonov A.A.
Definition at line 26 of file dialog_markup.php.
Constructor & Destructor Documentation
Constructor.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 69 of file dialog_markup.php.
{
try
{
$this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
$this->PageJS =
get_package(
'page::page_js' ,
'last' , __FILE__ );
$this->String =
get_package(
'string' ,
'last' , __FILE__ );
$this->Utilities =
get_package(
'utilities' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
| compile_add_opener |
( |
& |
$BlockSettings | ) |
|
Function compiles macro 'add_opener'.
- Parameters
-
| $BlockSettings | - Compilation parameters. |
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 678 of file dialog_markup.php.
{
try
{
$this->prepare_data_for_opener( $BlockSettings );
$AddOpenerScript = $this->CachedMultyFS->get_template( __FILE__ , 'add_opener.tpl' );
$Data = $BlockSettings->get_raw_settings();
$AddOpenerScript = $this->String->print_record( $AddOpenerScript , $Data );
return( $AddOpenerScript );
}
catch( Exception $e )
{
}
}
| compile_dialog |
( |
& |
$BlockSettings | ) |
|
Function compiles macro 'dialog'.
- Parameters
-
| $BlockSettings | - Compilation parameters. |
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 598 of file dialog_markup.php.
{
try
{
$Code = $this->CachedMultyFS->get_template( __FILE__ , 'dialog_init.tpl' );
$Data = $BlockSettings->get_raw_settings();
$Code = $this->String->print_record( $Code , $Data );
$Code = $this->append_add_opener_if_necessary( $Code , $BlockSettings );
return( $Code );
}
catch( Exception $e )
{
}
}
| compile_iframe_dialog |
( |
& |
$Settings | ) |
|
Function compiles macro 'iframe_dialog'.
- Parameters
-
| $BlockSettings | - Compilation parameters. |
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 398 of file dialog_markup.php.
{
try
{
$id = $Settings->get_setting( 'id' , md5( microtime( true ) ) );
$Code = $this->CachedMultyFS->get_template( __FILE__ , 'iframe_dialog.tpl' );
$PlaceHolders = array( '{id}' , '{href}' , '{all_settings}' );
$Data = array( $id , $Settings->get_setting( 'href' ) , $Settings->get_all_settings() );
$Code = str_replace( $PlaceHolders , $Data , $Code );
return( $Code );
}
catch( Exception $e )
{
}
}
| compile_opener |
( |
& |
$Settings | ) |
|
Function compiles opener.
- Parameters
-
- Returns
- Code of the opener.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 439 of file dialog_markup.php.
{
try
{
list( $Selector , $Opener )= $Settings->get_settings( 'selector,opener' );
$DataSource = $Settings->get_setting( 'data_source' , $Selector );
$DataAcceptor = $Settings->get_setting( 'data_acceptor' , '' );
$StatusAcceptor = $Settings->get_setting( 'status_acceptor' , '' );
$Validation = $Settings->get_setting( 'before_open_validation' , 'nop' );
return(
"{add_opener:data_source=$DataSource;data_acceptor=$DataAcceptor;status_acceptor=$StatusAcceptor;".
"before_open_validation=$Validation;opener=$Opener;selector=$Selector}"
);
}
catch( Exception $e )
{
}
}
| compile_select_dialog |
( |
& |
$Settings | ) |
|
Function compiles macro 'select_dialog'.
- Parameters
-
| $BlockSettings | - Compilation parameters. |
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 270 of file dialog_markup.php.
{
try
{
$DataSource = $Settings->get_setting( 'data_source' , md5( rand().microtime( true ) ) );
$Settings->set_setting( 'data_source' , $DataSource );
$id = $Settings->get_setting( 'id' , md5( microtime( true ) ) );
$Settings->set_setting( 'id' , $id );
$Code = '{select_dialog_content:'.$Settings->get_all_settings().
'}{dialog:selector=#'.$id.';'.$Settings->get_all_settings().
';cancel=true;ok_processor=ultimix.ExtractSimpleSelectResult}';
return( $Code );
}
catch( Exception $e )
{
}
}
| compile_select_dialog_content |
( |
& |
$Settings | ) |
|
Preparing dialog script.
- Parameters
-
- Returns
- Dialog script.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 226 of file dialog_markup.php.
{
try
{
$id = $Settings->get_setting( 'id' , md5( microtime( true ) ) );
$Type = $Settings->get_setting( 'type' , 'simple' );
$Script = $Type == 'simple' ?
$this->CachedMultyFS->get_template( __FILE__ , 'simple_select_dialog.tpl' ) : '';
$Script = str_replace( '{id}' , $id , $Script );
$SimpleRecords = $this->select_dialog_content( $ettings );
$Script = str_replace( '{records}' , $SimpleRecords , $Script );
return( $Script );
}
catch( Exception $e )
{
}
}
| compile_static_dialog |
( |
& |
$BlockSettings | ) |
|
Function compiles macro 'static_dialog'.
- Parameters
-
| $BlockSettings | - Parameters. |
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 359 of file dialog_markup.php.
{
try
{
$id = $BlockSettings->get_setting( 'id' , md5( microtime( true ) ) );
$Script = $this->CachedMultyFS->get_template( __FILE__ , 'static_dialog.tpl' );
$Script = str_replace( '{id}' , $id , $Script );
$Script = str_replace( '{all_settings}' , $BlockSettings->get_all_settings() , $Script );
return( $Script );
}
catch( Exception $e )
{
}
}
| compile_view_dialog |
( |
& |
$Settings | ) |
|
Function compiles macro 'view_dialog'.
- Parameters
-
- Returns
- HTML code.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 314 of file dialog_markup.php.
{
try
{
$id = $Settings->get_setting( 'id' , md5( microtime( true ) ) );
$Code = '';
if( isset( $this->Dialogs[ $id ] ) === false )
{
$Code = $this->CachedMultyFS->get_template( __FILE__ , 'view_dialog.tpl' );
$Code = str_replace( '{id}' , $id , $Code );
$Code = str_replace( '{all_settings}' , $Settings->get_all_settings() , $Code );
$this->Dialogs[ $id ] = true;
}
return( $Code );
}
catch( Exception $e )
{
}
}
| pre_generation |
( |
& |
$Options | ) |
|
Function executes before any page generating actions took place.
- Parameters
-
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 189 of file dialog_markup.php.
{
try
{
$Path = '{http_host}/'._get_package_relative_path_ex( 'jquery::dialog_markup' , 'last' );
$this->PageJS->add_javascript( "$Path/include/js/iframe.dialog.js" );
$this->PageJS->add_javascript( "$Path/include/js/jquery.dialog.js" );
}
catch( Exception $e )
{
}
}
| prepare_data_for_dialog |
( |
& |
$BlockSettings | ) |
|
Function prepares data for dialog.
- Parameters
-
| $BlockSettings | - Compilation parameters. |
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 557 of file dialog_markup.php.
{
try
{
$BlockSettings->get_setting( 'selector' );
$this->prepare_basic_settings( $BlockSettings );
$BlockSettings->set_undefined( 'hide_close_button' , 'false' );
$BlockSettings->set_undefined( 'ok_processor' , '' );
$BlockSettings->set_undefined( 'cancel' , 'false' );
$BlockSettings->set_undefined( 'on_open' , 'nop()' );
}
catch( Exception $e )
{
}
}
Field Documentation
Cached info about created packages.
- Author
- Dodonov A.A.
Definition at line 53 of file dialog_markup.php.
The documentation for this class was generated from the following file: