This article mainly introduces the usage of the Yii framework pop-up window component CJuiDialog. It analyzes the functions, usage methods and specific parameter functions of the Yii framework component CJuiDialog in detail in the form of examples. Friends in need can refer to the following
This article describes the usage of the Yii framework pop-up window component CJuiDialog. Share it with everyone for your reference, the details are as follows:
CJuiDialog component is under the manual zii.widgets.jui
Use the following code under the view
$this->beginWidget('zii.widgets.jui.CJuiDialog', array( 'id'=>'mydialog',//弹窗ID // additional javascript options for the dialog plugin 'options'=>array(//传递给JUI插件的参数 'title'=>'弹窗标题', 'autoOpen'=>false,//是否自动打开 'width'=>'auto',//宽度 'height'=>'auto',//高度 'buttons'=>array( '关闭'=>'js:function(){ $(this).dialog("close");}', ), ), )); echo 'dialog content here'; $this->endWidget('zii.widgets.jui.CJuiDialog'); // 这是弹窗链接, echo CHtml::link('open dialog', '#', array( 'onclick'=>'$("#mydialog").dialog("open"); return false;',//点击打开弹窗 ));
Attribute | Type | Description | Defined in |
---|---|---|---|
actionPrefix | string | The prefix of the ID of actions. When a widget declares an action provider in CController::actions, it can specify a prefix for its action ID to distinguish it from other widgets or controllers. When the widget is used in a controller's view, the same prefix must be configured. | CWidget |
controller | CController | Returns the controller to which this widget belongs. | CWidget |
cssFile | mixed | The CSS file name of the theme. The default is 'jquery-ui. | CJuiWidget |
htmlOptions | array | Attribute settings of the HTML tag in the JUI component. | CJuiWidget |
id | string | Returns the ID of this widget. If needed, a new ID will be produced and returned. | CWidget |
#options | array | the initial JavaScript options that need to be passed to the JUI plugin. | CJuiWidget |
owner | CBaseController | Returns the owner or creator of this widget. | CWidget |
scriptFile | mixed | The main JUI JavaScript file name.The default is 'jquery-ui. | CJuiWidget |
scriptUrl | string | The root directory containing all JUI JavaScript files. If this property is not set (default), Yii will publish the JUI package included in the zii release and use that to infer the root script URL. | CJuiWidget |
skin | mixed | The name of the skin used by the widget. The default is "default".If this property is set to false, no skin will be used for the widget. | CWidget |
theme | string | The name of the JUI theme. Default is 'base'. Make sure there is a directory under themeUrl with the same name as the value of this property (case sensitive). | CJuiWidget |
themeUrl | string | The root directory containing all JUI theme folders. If this property is not set (default), Yii will publish the JUI package included in the zii release and usethat to infer the root theme URL. | CJuiWidget |
string | Returns the path containing the view files required by this widget. |
The above is the detailed content of About the usage of Yii framework pop-up window component CJuiDialog. For more information, please follow other related articles on the PHP Chinese website!