40 | | Implementing context dependent control. It is possible to track if the control is currently on display or not 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. |
---|
| 38 | == Short Introduction to JavaScript API == |
---|
| 39 | '''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 |
---|
| 51 | |
---|
| 52 | |
---|
| 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: |
---|
| 54 | * The ''SELECT'' class provides useful interface to generate cascading select controls. |
---|
| 55 | * 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. |