| [ Index ] |
|
Code source de PRADO 3.0.6 |
[Code source] [Imprimer] [Statistiques]
TClientScriptManager class file
| Author: | Qiang Xue <qiang.xue@gmail.com> |
| Copyright: | Copyright © 2005 PradoSoft |
| License: | http://www.pradosoft.com/license/ |
| Version: | $Id: TClientScriptManager.php 1397 2006-09-07 07:55:53Z wei $ |
| Poids: | 575 lignes (16 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
TClientScriptManager:: (38 méthodes):
__construct()
registerPradoScript()
getPradoScriptBasePath()
renderPradoScripts()
registerPostBackControl()
registerDefaultButton()
registerFocusControl()
getDefaultButtonOptions()
registerStyleSheetFile()
registerStyleSheet()
registerHeadScriptFile()
registerHeadScript()
registerScriptFile()
registerBeginScript()
registerEndScript()
registerHiddenField()
isStyleSheetFileRegistered()
isStyleSheetRegistered()
isHeadScriptFileRegistered()
isHeadScriptRegistered()
isScriptFileRegistered()
isBeginScriptRegistered()
isEndScriptRegistered()
isHiddenFieldRegistered()
renderStyleSheetFiles()
renderStyleSheets()
renderHeadScriptFiles()
renderHeadScripts()
renderScriptFiles()
renderBeginScripts()
renderEndScripts()
renderHiddenFields()
__construct()
setFunction()
getOption()
setOption()
getOptions()
ensureFunction()
Classe: TClientScriptManager - X-Ref
TClientScriptManager class.| __construct(TPage $owner) X-Ref |
| Constructor. param: TPage page that owns this client script manager |
| registerPradoScript($name) X-Ref |
| Registers Prado scripts by library name. Each library may include one or several script files. Currently, the following libraries are available: - prado : basic prado js framework - effects : - ajax : ajax related js - validator : validator js - logger : js logger - datepicker : datepicker js - rico : - colorpicker : colorpicker js The script files registered will be published. param: string script library name. |
| getPradoScriptBasePath() X-Ref |
return: string the directory containing the PRADO js script files |
| renderPradoScripts($writer) X-Ref |
| Renders the HTML tags for PRADO js files param: THtmlWriter writer |
| registerPostBackControl($jsClass,$options) X-Ref |
| Registers postback javascript for a control. param: string javascript class responsible for the control being registered for postback param: array postback options |
| registerDefaultButton($panel, $button) X-Ref |
| Register a default button to panel. When the $panel is in focus and the 'enter' key is pressed, the $button will be clicked. param: TControl panel to register the default button action param: TControl button to trigger a postback |
| registerFocusControl($target) X-Ref |
| Registers the control to receive default focus. param: TControl|string the control or the client ID of the HTML element to receive default focus |
| getDefaultButtonOptions($panel, $button) X-Ref |
return: array default button options. |
| registerStyleSheetFile($key,$url,$media='') X-Ref |
| Registers a CSS file to be rendered in the page head param: string a unique key identifying the file param: string URL to the CSS file param: string media type of the CSS (such as 'print', 'screen', etc.). Defaults to empty, meaning the CSS applies to all media types. |
| registerStyleSheet($key,$css,$media='') X-Ref |
| Registers a CSS block to be rendered in the page head param: string a unique key identifying the CSS block param: string CSS block |
| registerHeadScriptFile($key,$url) X-Ref |
| Registers a javascript file in the page head param: string a unique key identifying the file param: string URL to the javascript file |
| registerHeadScript($key,$script) X-Ref |
| Registers a javascript block in the page head. param: string a unique key identifying the script block param: string javascript block |
| registerScriptFile($key,$url) X-Ref |
| Registers a javascript file to be rendered within the form param: string a unique key identifying the file param: string URL to the javascript file to be rendered |
| registerBeginScript($key,$script) X-Ref |
| Registers a javascript script block at the beginning of the form param: string a unique key identifying the script block param: string javascript block |
| registerEndScript($key,$script) X-Ref |
| Registers a javascript script block at the end of the form param: string a unique key identifying the script block param: string javascript block |
| registerHiddenField($name,$value) X-Ref |
| Registers a hidden field to be rendered in the form. param: string a unique key identifying the hidden field param: string|array hidden field value, if the value is an array, every element |
| isStyleSheetFileRegistered($key) X-Ref |
param: string a unique key return: boolean whether there is a CSS file registered with the specified key |
| isStyleSheetRegistered($key) X-Ref |
param: string a unique key return: boolean whether there is a CSS block registered with the specified key |
| isHeadScriptFileRegistered($key) X-Ref |
param: string a unique key return: boolean whether there is a head javascript file registered with the specified key |
| isHeadScriptRegistered($key) X-Ref |
param: string a unique key return: boolean whether there is a head javascript block registered with the specified key |
| isScriptFileRegistered($key) X-Ref |
param: string a unique key return: boolean whether there is a javascript file registered with the specified key |
| isBeginScriptRegistered($key) X-Ref |
param: string a unique key return: boolean whether there is a beginning javascript block registered with the specified key |
| isEndScriptRegistered($key) X-Ref |
param: string a unique key return: boolean whether there is an ending javascript block registered with the specified key |
| isHiddenFieldRegistered($key) X-Ref |
param: string a unique key return: boolean whether there is a hidden field registered with the specified key |
| renderStyleSheetFiles($writer) X-Ref |
param: THtmlWriter writer for the rendering purpose |
| renderStyleSheets($writer) X-Ref |
param: THtmlWriter writer for the rendering purpose |
| renderHeadScriptFiles($writer) X-Ref |
param: THtmlWriter writer for the rendering purpose |
| renderHeadScripts($writer) X-Ref |
param: THtmlWriter writer for the rendering purpose |
| renderScriptFiles($writer) X-Ref |
param: THtmlWriter writer for the rendering purpose |
| renderBeginScripts($writer) X-Ref |
param: THtmlWriter writer for the rendering purpose |
| renderEndScripts($writer) X-Ref |
param: THtmlWriter writer for the rendering purpose |
| renderHiddenFields($writer) X-Ref |
param: THtmlWriter writer for the rendering purpose |
| __construct() X-Ref |
| Constructor, initialize the options list. |
| setFunction($name, $code) X-Ref |
| Adds on client-side event handler by wrapping the code within a javascript function block. If the code begins with "javascript:", the code is assumed to be a javascript function block rather than arbiturary javascript statements. param: string option name param: string javascript statements. |
| getOption($name) X-Ref |
return: string gets a particular option, null if not set. |
| setOption($name, $value) X-Ref |
param: string option name param: mixed option value. |
| getOptions() X-Ref |
return: TMap gets the list of options as TMap |
| ensureFunction($javascript) X-Ref |
| Ensure that the javascript statements are wrapped in a javascript function block as <code>function(sender, parameter){ //code }</code>. |
| Généré le : Sun Feb 25 21:07:04 2007 | par Balluche grâce à PHPXref 0.7 |