當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CJuiWidget類代碼示例

本文整理匯總了PHP中CJuiWidget的典型用法代碼示例。如果您正苦於以下問題:PHP CJuiWidget類的具體用法?PHP CJuiWidget怎麽用?PHP CJuiWidget使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了CJuiWidget類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: init

 /**
  * 初始化
  * @see CJuiWidget::init()
  */
 public function init()
 {
     $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
     $this->baseUrl = Yii::app()->getAssetManager()->publish($path);
     $this->themeUrl = $this->scriptUrl = $this->baseUrl;
     parent::init();
     $this->htmlOptions['id'] = $this->id;
     $this->htmlOptions['class'] .= ' tree';
     if ($this->iconsCss) {
         $this->cssFile[] = 'zTreeIcons.css';
     }
     if ($this->treeNodeKey !== null) {
         $this->options['treeNodeKey'] = $this->treeNodeKey;
     }
     if ($this->treeNodeParentKey !== null) {
         $this->options['treeNodeParentKey'] = $this->treeNodeParentKey;
     }
     $this->options['isSimpleData'] = $this->isSimpleData;
     if ($this->width !== null) {
         $this->backgroundHtmlOptions['style'] .= " width:{$this->width}px;";
     }
     if ($this->height !== null) {
         $this->backgroundHtmlOptions['style'] .= " height:{$this->height}px;";
     }
     if ($this->backgroundId['id'] === null) {
         $this->backgroundId = isset($this->backgroundHtmlOptions['id']) ? $this->backgroundHtmlOptions['id'] : $this->id . 'background';
     }
     $this->backgroundHtmlOptions['id'] = $this->backgroundId;
 }
開發者ID:nirvana-info,項目名稱:old_bak,代碼行數:33,代碼來源:zTree.php

示例2: init

 /**
  * Initialize the JNotify Widget
  */
 public function init()
 {
     $this->registerClientScripts();
     $this->themeUrl = Yii::app()->themeManager->baseUrl;
     $this->theme = Yii::app()->theme->name;
     parent::init();
 }
開發者ID:maruthisivaprasad,項目名稱:zurmo,代碼行數:10,代碼來源:JNotify.php

示例3: run

 public function run()
 {
     $this->publishAssets();
     $this->registerClientScripts();
     Yii::app()->getClientScript()->registerScript($this->id . '-js', "jQuery('#{$this->id}').checkboxTree(" . json_encode($this->options) . ")", CClientScript::POS_READY);
     parent::run();
     echo '</ul>';
 }
開發者ID:Gameonn,項目名稱:JS_API,代碼行數:8,代碼來源:ECheckBoxTree.php

示例4: init

 /**
  * Renders the open tag of the draggable element.
  * This method also registers the necessary javascript code.
  */
 public function init()
 {
     parent::init();
     $id = $this->getId();
     $this->htmlOptions['id'] = $id;
     $options = empty($this->options) ? '' : CJavaScript::encode($this->options);
     Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $id, "jQuery('#{$id}').draggable({$options});");
     echo CHtml::openTag($this->tagName, $this->htmlOptions) . "\n";
 }
開發者ID:BGCX261,項目名稱:zii-svn-to-git,代碼行數:13,代碼來源:CJuiDraggable.php

示例5: init

 /**
  * Publishes the required assets
  */
 public function init()
 {
     parent::init();
     if (!isset($this->htmlOptions['id']) && !isset($this->fileKey)) {
         $this->htmlOptions['id'] = \CHtml::modelName($this->model);
     } elseif (!isset($this->htmlOptions['id']) && isset($this->fileKey)) {
         $this->htmlOptions['id'] = \CHtml::modelName($this->model) . $this->fileKey;
     }
     if (!isset($this->htmlOptions['enctype'])) {
         $this->htmlOptions['enctype'] = 'multipart/form-data';
     }
 }
開發者ID:hanterrian,項目名稱:xupload-fpm-tmp,代碼行數:15,代碼來源:XUpload.php

示例6: init

 /**
  * Renders the open tag of the resizable element.
  * This method also registers the necessary javascript code.
  */
 public function init()
 {
     parent::init();
     $id = $this->getId();
     if (isset($this->htmlOptions['id'])) {
         $id = $this->htmlOptions['id'];
     } else {
         $this->htmlOptions['id'] = $id;
     }
     $options = CJavaScript::encode($this->options);
     Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $id, "jQuery('#{$id}').resizable({$options});");
     echo CHtml::openTag($this->tagName, $this->htmlOptions) . "\n";
 }
開發者ID:gilyaev,項目名稱:framework-bench,代碼行數:17,代碼來源:CJuiResizable.php

示例7: init

 /**
 * Initializes the widget.
 * This method registers all needed client scripts
 */
 public function init()
 {
     parent::init();
     $this->baseUrl = CHtml::asset(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets');
     $url = $this->cssFile !== false ? $this->cssFile : $this->baseUrl . '/css/juiBlockUI.css';
     $blockUI = YII_DEBUG ? '/js/jquery.blockUI.js' : '/js/jquery.blockUI.min.js';
     $cs = Yii::app()->getClientScript();
     $cs->registerScriptFile($this->baseUrl . $blockUI);
     if ($this->useExternalStylesheet) {
         $cs->registerCssFile($url);
         $this->addScriptLines(array('$.blockUI.defaults.css = {}'));
     }
 }
開發者ID:hipogea,項目名稱:zega,代碼行數:17,代碼來源:JuiBlockUI.php

示例8: init

 /**
  * Initializes the widget.
  */
 public function init()
 {
     parent::init();
     //get comments module
     $commentsModule = Yii::app()->getModule('comments');
     //get model config for comments module
     $this->_config = $commentsModule->getModelConfig($this->model);
     if (count($this->_config) > 0) {
         $this->registeredOnly = isset($this->_config['registeredOnly']) ? $this->_config['registeredOnly'] : $this->registeredOnly;
         $this->useCaptcha = isset($this->_config['useCaptcha']) ? $this->_config['useCaptcha'] : $this->useCaptcha;
         $this->postCommentAction = isset($this->_config['postCommentAction']) ? $this->_config['postCommentAction'] : $this->postCommentAction;
     }
     $this->registerScripts();
 }
開發者ID:awecode,項目名稱:awecms,代碼行數:17,代碼來源:ECommentsBaseWidget.php

示例9: init

 /**
  * Renders the open tag of the dialog.
  * This method also registers the necessary javascript code.
  */
 public function init()
 {
     parent::init();
     $cs = Yii::app()->getClientScript();
     $scriptUrl = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.modules.dashboard.assets'));
     $cs->registerCssFile($scriptUrl . '/jgrowl/jquery.jgrowl.css');
     $cs->registerScriptFile($scriptUrl . '/jgrowl/jquery.jgrowl.js');
     $cs->registerScriptFile($scriptUrl . '/js/json2.js');
     $cs->registerCssFile($scriptUrl . '/css/dashboard.css');
     $cs->registerScriptFile($scriptUrl . '/js/dashboard.js');
     $param['baseUrl'] = Yii::app()->createUrl('dashboard/default') . '/';
     $param = CJavaScript::encode($param);
     $js = "jQuery.dashboard({$param});";
     $cs->registerScript(__CLASS__ . '#dashboard', $js);
     $id = $this->getId();
     if (isset($this->htmlOptions['id'])) {
         $id = $this->htmlOptions['id'];
     } else {
         $this->htmlOptions['id'] = $id;
     }
     echo CHtml::openTag($this->tagName, $this->htmlOptions) . "\n";
     $this->render('dashboard', array('portlets' => $this->portlets, 'allPortlets' => $this->allPortlets));
 }
開發者ID:sharmarakesh,項目名稱:edusec-college-management-system,代碼行數:27,代碼來源:DWidget.php

示例10: registerScripts

 /**
  * Registers the JS and CSS Files
  *
  * @return void
  */
 protected function registerScripts()
 {
     parent::registerCoreScripts();
     $basePath = Yii::getPathOfAlias('application.extensions.emultiselect.assets');
     $baseUrl = Yii::app()->getAssetManager()->publish($basePath);
     $cs = Yii::app()->getClientScript();
     $cs->registerCssFile($baseUrl . '/' . 'ui.multiselect.css');
     $this->scriptUrl = $baseUrl;
     $this->registerScriptFile('ui.multiselect.js');
     $params = array();
     if ($this->sortable) {
         $params[] = "sortable:true";
     } else {
         $params[] = "sortable:false";
     }
     if ($this->searchable) {
         $params[] = "searchable:true";
     } else {
         $params[] = "searchable:false";
     }
     $parameters = '{' . implode(',', $params) . '}';
     Yii::app()->clientScript->registerScript('EMultiSelect', '$(".multiselect").multiselect(' . $parameters . ');', CClientScript::POS_READY);
 }
開發者ID:rusli-nasir,項目名稱:smsempresayii,代碼行數:28,代碼來源:EMultiSelect.php

示例11: init

    /**
     * Renders the open tag of the dialog.
     * This method also registers the necessary javascript code.
     */
    public function init()
    {
        //js part
        Yii::app()->clientScript->registerScript('ui_dialog_ace_extend', ' 
				$.widget("ui.dialog", $.extend({}, $.ui.dialog.prototype, {
					_title: function(title) {
						var $title = this.options.title || "&nbsp;"
						if( ("title_html" in this.options) && this.options.title_html == true )
							title.html($title);
						else title.text($title);
					}
				}));

            ');
        $ace_link = Yii::app()->assetManager->publish(Yii::app()->params['ace_assets'], false, -1, false);
        // forceCopy
        $this->scriptUrl = $ace_link . '/js';
        //$this->scriptFile = array('jquery.ui.touch-punch.min.js'); // don't need it yet
        $this->themeUrl = $ace_link;
        $this->theme = 'css';
        //$this->cssFile = 'jquery-ui-1.10.3.full.min.css';
        parent::init();
        //set id
        $id = $this->getId();
        if (isset($this->htmlOptions['id'])) {
            $id = $this->htmlOptions['id'];
        } else {
            $this->htmlOptions['id'] = $id;
        }
        $this->registreSelector();
        //options
        $this->options['title'] = $this->createTilte();
        $this->options['title_html'] = true;
        $options = CJavaScript::encode($this->options);
        Yii::app()->getClientScript()->registerScript(__CLASS__ . '#' . $id, "jQuery('#{$id}').dialog({$options});");
        echo CHtml::openTag($this->tagName, $this->htmlOptions) . "\n";
    }
開發者ID:uldisn,項目名稱:ace,代碼行數:41,代碼來源:CJuiAceDialog.php

示例12: init

 public function init()
 {
     assert('!empty($this->layoutType)');
     assert('!empty($this->uniqueLayoutId)');
     assert('!empty($this->moduleId)');
     assert('!empty($this->saveUrl)');
     assert('is_bool($this->collapsible)');
     assert('is_bool($this->movable)');
     assert('in_array($this->layoutType, array("100", "50,50", "75,25"))');
     // Not Coding Standard
     $this->themeUrl = Yii::app()->baseUrl . '/themes';
     $this->theme = Yii::app()->theme->name;
     $this->registerJuiPortletsScripts();
     parent::init();
 }
開發者ID:youprofit,項目名稱:Zurmo,代碼行數:15,代碼來源:JuiPortlets.php

示例13: __construct

 public function __construct()
 {
     $this->attachBehaviors($this->behaviors());
     parent::__construct();
 }
開發者ID:nizsheanez,項目名稱:blog.ru,代碼行數:5,代碼來源:JuiWidget.php

示例14: registerCoreScripts

 /**
  * Registers the core script files.
  * This method overrides the parent implementation by registering the cookie plugin when cookie option is used.
  */
 protected function registerCoreScripts()
 {
     parent::registerCoreScripts();
     if (isset($this->options['cookie'])) {
         Yii::app()->getClientScript()->registerCoreScript('cookie');
     }
 }
開發者ID:gilyaev,項目名稱:framework-bench,代碼行數:11,代碼來源:CJuiTabs.php

示例15: init

 public function init()
 {
     parent::init();
 }
開發者ID:Aldanzein,項目名稱:bursa-kerja,代碼行數:4,代碼來源:S3Slider.php


注:本文中的CJuiWidget類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。