Changes between Version 14 and Version 15 of adeiInternals

Show
Ignore:
Author:
csa (IP: 141.52.160.26)
Timestamp:
08/06/10 16:47:16 (8 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • adeiInternals

    v14 v15  
    3232This section describes how to extend left sidebar with additional control tabs.  
    3333 * As with additional pages, the new control tab should be created in the modules directory following the [wiki:adeiNewModule guidelines]. It should define ''module_title'' variable and ''moduleJS'', ''modulePage'' functions (the name of tab should be used instead of ''module'' prefix).  
    34  * The ''modulePage'' should provide HTML markup and ''moduleJS'' attach JavaScript handlers to set ADEI variables and, hence, control ADEI engine. The global variable ''adei'' should be used to access ADEI functionality.  
    35  * In certain cases the care on resizing should be taken. The following function registering callbacks can be useful: ''adei.popup.RegisterOnCallback'', ''adei.popup.RegisterOffCallback'', ''adei.popup.RegisterReHeightCallback'', ''adei.popup.RegisterReWidthCallback'', ''control_modules''.RegisterCallback'', and some others. For examples, take a look on ''virtual.php'' and ''source.php'' in the modules folder. 
    36  * Finally, the module should be enabled. Just add the control name into the $CONTROLS variable in the configuration. The '''false''' value in array will enforce starting of a new line of controls. 
     34 * The ''modulePage'' should provide HTML markup and ''moduleJS'' attach !JavaScript handlers to set ADEI variables and, hence, control ADEI engine. The global variable ''adei'' should be used to access ADEI functionality.  
     35 * In certain cases the care on resizing should be taken. The following function registering callbacks can be useful: ''adei.popup.!RegisterOnCallback'', ''adei.popup.!RegisterOffCallback'', ''adei.popup.!RegisterReHeightCallback'', ''adei.popup.!RegisterReWidthCallback'', ''control_modules.!RegisterCallback'', and some others. For examples, take a look on ''virtual.php'' and ''source.php'' in the modules folder. 
     36 * Finally, the module should be enabled. Just add the control name into the $CONTROLS variable in the configuration. The ''false'' value in array will enforce starting of a new line of controls. 
    3737 
    38 == Short Introduction to JavaScript API == 
     38== Short Introduction to !JavaScript API == 
    3939'''ADEI API''': 
    40  * ''adei.SetCustomProperties'' will adjust ADEI variables 
    41  * ''adei.OpenControl'' will open specified control in the sidebar 
    42  * ''adei.SwitchPopup'' will open/close the specified popup 
    43  * ''adei.OpenModule'' will open the specified page 
    44  * ''adei.SetStatus'' will set an informational message in the ADEI statusbar 
    45  * ''adei.ReportError'' will set error message in the ADEI statusbar 
    46  * ''adei.SetSuccessStatus'' will set short living confirmation message in the ADEI status bar 
    47  * ''adei.ProposeStatus'' will set an informational message in the ADEI statusbar if nothing important is currently on display 
    48  * ''adei.SetExtraStatus'' will extend the current statusbar message 
    49  * ''adei.UpdateDIV'' will update content of the specified DIV using supplied service 
    50  * ''adei.Search'' will perform search and open results in the searchtab 
     40 * ''adei.!SetCustomProperties'' will adjust ADEI variables 
     41 * ''adei.!OpenControl'' will open specified control in the sidebar 
     42 * ''adei.!SwitchPopup'' will open/close the specified popup 
     43 * ''adei.!OpenModule'' will open the specified page 
     44 * ''adei.!SetStatus'' will set an informational message in the ADEI statusbar 
     45 * ''adei.!ReportError'' will set error message in the ADEI statusbar 
     46 * ''adei.!SetSuccessStatus'' will set short living confirmation message in the ADEI status bar 
     47 * ''adei.!ProposeStatus'' will set an informational message in the ADEI statusbar if nothing important is currently on display 
     48 * ''adei.!SetExtraStatus'' will extend the current statusbar message 
     49 * ''adei.!UpdateDIV'' will update content of the specified DIV using supplied service 
     50 * ''adei.!Search'' will perform search and open results in the searchtab 
    5151 
    5252 
    53 '''Implementing context dependent controls''': It is possible to track if your control is currently on display using mentioned before functions: 'adei.popup.RegisterOnCallback'', ''adei.popup.RegisterOffCallback'', ''control_modules''.RegisterCallback''. Example is available in ''source.php''. The ''adei.config.GetModule()'' function will return currently opened page. The page change notification callback can be requested using ''adei.module.RegisterCallback'' function. For better compatibility with crappy browsers like IE, it is better to alter the context of control only when it is displayed. The following JavaScript classes and functions could be useful: 
     53'''Implementing context dependent controls''': It is possible to track if your control is currently on display using mentioned before functions: ''adei.popup.!RegisterOnCallback'', ''adei.popup.!RegisterOffCallback'', ''control_modules''.!RegisterCallback''. Example is available in ''source.php''. The ''adei.config.!GetModule()'' function will return currently opened page. The page change notification callback can be requested using ''adei.module.!RegisterCallback'' function. For better compatibility with crappy browsers like IE, it is better to alter the context of control only when it is displayed. The following !JavaScript classes and functions could be useful: 
    5454 * The ''SELECT'' class provides useful interface to generate cascading select controls. 
    5555 * Like with pages, the [wiki:adeiNewModule XML Module] can be used to fill the control context. 
    56  * The simplest way to make part of control appear depending on the current page, is to define the css class for considered elements and, then, show/hide it using 'cssShowClass', 'cssHideClass' functions. Unfortunately, not all HTML objects can be easily hidden in all browsers (yes, again mainly IE is the problem). It is safer to hide div's if possible. 
    57  
    58  * '' 
    59  * The complete removal of controls is not supported in current version of ADEI. 
     56 * The simplest way to make part of control appear depending on the current page, is to define the css class for considered elements and, then, show/hide it using ''cssShowClass'', ''cssHideClass'' functions. Unfortunately, not all HTML objects can be easily hidden in all browsers (yes, again mainly the IE is a problem). It is safer to hide div's if possible. 
     57 * The complete removal of controls is not supported in current version of ADEI. Implementation idea and/or patch are welcome ;)