当前位置: 首页>>代码示例>>PHP>>正文


PHP Util::get_js方法代码示例

本文整理汇总了PHP中Util::get_js方法的典型用法代码示例。如果您正苦于以下问题:PHP Util::get_js方法的具体用法?PHP Util::get_js怎么用?PHP Util::get_js使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Util的用法示例。


在下文中一共展示了Util::get_js方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: show

 public function show()
 {
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     $rmodel = new AdminrulesAdm();
     switch (Get::req('res', DOTY_ALPHANUM, "")) {
         case 'ok_ins':
             UIFeedback::info(Lang::t('_OPERATION_SUCCESSFUL', 'standard'));
             break;
         case 'err_ins':
             UIFeedback::error(Lang::t('_OPERATION_FAILURE', 'standard'));
             break;
         default:
             if ($rmodel->totalGroup() <= 0) {
                 UIFeedback::notice(Lang::t('_NO_PROFILE_SET', 'adminrules'));
             }
             break;
     }
     $rules_list_js = "";
     if ($this->permissions['assign_profile']) {
         $rules = $rmodel->getGroupForDropdown();
         $rules_list_js .= '[';
         $first = true;
         foreach ($rules as $idst => $label) {
             $rules_list_js .= ($first ? '' : ',') . '{"label":"' . $label . '","value":' . $idst . '}';
             if ($first) {
                 $first = false;
             }
         }
         $rules_list_js .= ']';
     }
     $this->render('show', array('filter_text' => $this->_getSessionValue('filter', ""), 'permissions' => $this->permissions, 'rules_list_js' => $rules_list_js));
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:32,代码来源:AdminmanagerAdmController.php

示例2: setupJs

    function setupJs($tags_id, $private_tags = '')
    {
        if (!$this->_use_tag) {
            return '';
        }
        $lang =& DoceboLanguage::createInstance('tags', 'framework');
        $this->tags_id = $tags_id;
        YuiLib::load(array('autocomplete' => 'autocomplete-min.js', 'selector' => 'selector-beta-min.js'), array('assets/skins/sam' => 'autocomplete.css'));
        Util::get_js(Get::rel_path('adm') . '/lib/lib.tags.js', true, true);
        // setup some thing that we need in the tag editor
        $GLOBALS['page']->add('<script type="text/javascript">' . "\n" . 'var tag_params ={
			resource_type: "' . $this->resource_type . '", 
			addr: "' . $GLOBALS['where_framework_relative'] . '/ajax.adm_server.php",
			query_append: "file=tags",
			query:"' . $tags_id . '",
			private_query:"' . $private_tags . '",
			popular_tags: "' . addslashes(implode(', ', $this->getPopularTag())) . '",
			user_tags: "' . addslashes(implode(', ', $this->getUserPopularTag(getLogUserId()))) . '", 
			lang: { tags: "' . addslashes($lang->def("_TAGS")) . '",
				tips: "' . addslashes($lang->def("_TAGS_TIPS")) . '",
				popular_tags: "' . addslashes($lang->def("_POPULAR")) . '",
				user_tags: "' . addslashes($lang->def("_YOURS")) . '",
				save: "' . addslashes($lang->def("_SAVE")) . '",
				undo: "' . addslashes($lang->def("_UNDO")) . '",
				add_tags: "' . addslashes($lang->def("_ADD_TAGS")) . '",
				update_tags: "' . addslashes($lang->def("_MOD")) . '"
			}
		};' . "\n" . '</script>', 'scripts');
    }
开发者ID:abhinay100,项目名称:forma_app,代码行数:29,代码来源:lib.tags.php

示例3: show

 public function show()
 {
     Util::get_js(Get::rel_path('lms') . '/views/kb/kb.js', true, true);
     Util::get_js(Get::rel_path('base') . '/addons/yui/stylesheet/stylesheet-min.js', true, true);
     $filter_text = Get::req('filter_text', DOTY_STRING, "");
     require_once _lms_ . '/lib/lib.kbres.php';
     $kbres = new KbRes();
     $kb_model = new KbAlms();
     $initial_folders = $kbres->getKbFolders(0, 1);
     // 0 = root
     $tag_count = $kbres->getTagUseCount();
     // --- set tag cloud data ------------
     $min = false;
     $max = false;
     $tot = 0;
     $tag_cloud = array();
     foreach ($tag_count as $tag_id => $tag_info) {
         $tot += $tag_info['use_count'];
         $min = $min > $tag_info['use_count'] ? $tag_info['use_count'] : $min;
         $max = $max < $tag_info['use_count'] ? $tag_info['use_count'] : $max;
     }
     $min_class_size = 1;
     $max_class_size = 7;
     foreach ($tag_count as $tag_id => $tag_info) {
         $uc = $tag_info['use_count'];
         $range = $max - $min + 1;
         $pos = $range / $uc;
         $class_size = round($max_class_size / $pos);
         $tag_cloud[$tag_id] = array('tag_name' => $tag_info['tag_name'], 'class_size' => $class_size);
     }
     $course_filter_arr[-1] = Lang::t('_FILTER', 'kb');
     $course_filter_arr += $kb_model->getCoursesVisibleToUser();
     $this->render('show', array('filter_text' => $filter_text, 'initial_folders' => $initial_folders, 'tag_cloud' => $tag_cloud, 'course_filter_arr' => $course_filter_arr, 'url_select_folder' => 'ajax.server.php?r=kb/selFolder&folder_id='));
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:34,代码来源:KbLmsController.php

示例4: drawCalendar

function drawCalendar()
{
    checkPerm('view');
    $size = importVar('size', false, 'max');
    $width = "90%";
    if ($size == "min") {
        $width = "200px";
    }
    addCss('calendar_' . $size);
    YuiLib::load('base,dragdrop');
    Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar.js', true, true);
    Util::get_js(Get::rel_path('lms') . '/modules/calendar/calendar_helper.js', true, true);
    //permissions = permissions granted to the logged user according to his/her level and role
    //	2 => can create/delete/modify all events
    //	1 => can create/delete/modify only own events
    //	0 => can view only
    $permissions = 0;
    if (checkPerm('mod', true)) {
        $permissions = 2;
    } elseif (checkPerm('personal', true)) {
        $permissions = 1;
    }
    //mode="edit" => events can be added and edited according to given permissions
    //mode="view" => events can only be viewed regardless the permissions
    $GLOBALS['page']->add('<script type="text/javascript">' . '	setup_cal(	null, ' . '\'lms\', ' . '\'lms\', ' . '\'edit\', ' . '\'' . $permissions . '\', ' . '\'' . Docebo::user()->getIdSt() . '\' ' . ');' . '</script>', 'page_head');
    $GLOBALS['page']->add("\n" . getTitleArea(Lang::t('_CALENDAR', 'calendar'), 'calendar') . '<div class="std_block">' . '<div id="displayCalendar" style="clear: both; width:' . $width . '"></div>' . '<div class="nofloat"></div>' . '</div>', 'content');
}
开发者ID:abhinay100,项目名称:forma_app,代码行数:27,代码来源:calendar.php

示例5: show

 public function show()
 {
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     Util::get_js(Get::rel_path('adm') . '/views/groupmanagement/groupmanagement.js', true, true);
     Util::get_js(Get::rel_path('base') . '/widget/dialog/dialog.js', true, true);
     $this->render('show', array('permissions' => $this->permissions, 'result_message' => "", 'filter_text' => ''));
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:7,代码来源:GroupmanagementAdmController.php

示例6: load

 /**
  * Load css and yui file
  * @return null
  * @param $js Array[optional]
  * @param $css Array[optional]
  */
 public static function load($module_list = false, $noprint = false)
 {
     $module_list = 'base,autocomplete,charts,tabview,table,treeview,colorpicker';
     if (strpos($module_list, 'base') !== false) {
         $module_list = 'base,' . $module_list;
     }
     $list = explode(',', $module_list);
     $js_load = array();
     $css_load = array();
     foreach ($list as $k => $module) {
         if (isset(self::$_css_map[$module])) {
             $css_load = array_unique(array_merge($css_load, self::$_css_map[$module]));
         }
         if (isset(self::$_js_map[$module])) {
             $js_load = array_unique(array_merge($js_load, self::$_js_map[$module]));
         }
     }
     // remove js alredy loaded
     $css_load = array_diff($css_load, self::$_css_loaded);
     $js_load = array_diff($js_load, self::$_js_loaded);
     if (empty($css_load) && empty($js_load)) {
         return '';
     }
     // load new css
     $to_load = '';
     if (!empty($css_load)) {
         $to_load .= '<!-- yui css -->';
         foreach ($css_load as $k => $filename) {
             $to_load .= Util::get_css(Get::tmpl_path('base') . 'yui-skin/' . $filename, true);
         }
     }
     // load new js
     if (!empty($js_load)) {
         $to_load .= '<!-- yui js -->';
         foreach ($js_load as $k => $filename) {
             $to_load .= Util::get_js('/addons/yui/' . $filename);
             if ($filename == 'utilities/utilities.js') {
                 $to_load .= "\n" . '<script type="text/javascript"> YAHOO.util.Connect.initHeader(\'X-Signature\',\'' . Util::getSignature() . '\'); YAHOO.util.Connect.startEvent.subscribe(function() { YAHOO.util.Connect.initHeader(\'X-Signature\',\'' . Util::getSignature() . '\'); });</script>';
             }
             if ($filename == 'charts/charts-min.js') {
                 $to_load .= "\n" . '<script type="text/javascript"> YAHOO.widget.Chart.SWFURL = "' . Get::rel_path('base') . '/addons/yui/charts/assets/charts.swf"; </script>';
             }
         }
         if (Lang::direction() == 'rtl') {
             $to_load .= Util::get_js('/addons/yui/yui-rtl.js');
         }
     }
     // add loaded file to the cache
     if (!empty($css_load)) {
         self::$_css_loaded = array_merge(self::$_css_loaded, $css_load);
     }
     if (!empty($js_load)) {
         self::$_js_loaded = array_merge(self::$_js_loaded, $js_load);
     }
     if (function_exists('cout') && !$noprint) {
         cout($to_load, 'page_head');
     } else {
         return $to_load;
     }
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:66,代码来源:lib.yuilib.php

示例7: init

 function init()
 {
     YuiLib::load(array('json' => 'json-min.js', 'container' => 'container_core-min.js', 'menu' => 'menu-min.js', 'button' => 'button-min.js', 'treeview' => 'treeview-min.js'), array('assets/skins/sam' => 'skin.css'));
     cout(Util::get_css('base-folder-tree.css'), 'page_head');
     cout(Util::get_js('appLms/lib/category/lib.categorytree.js'), 'page_head');
     Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:7,代码来源:lib.categorytree.php

示例8: init

 public function init()
 {
     require_once _base_ . '/lib/lib.json.php';
     $this->json = new Services_JSON();
     Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     //$js_path = Get::rel_path('base').'/widget/competenceselector/';
     //Util::get_js($js_path.'competenceselector.js', true, true);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:lib.competenceselector.php

示例9: init

 public function init()
 {
     YuiLib::load('container,menu,button');
     Util::get_js(Get::rel_path('adm') . '/lib/user_selector/lib.common.js', true, true);
     Util::get_js(Get::rel_path('adm') . '/lib/user_selector/lib.dynamicuserfilter.js', true, true);
     if ($this->_use_other_fields) {
         Util::get_js(Get::rel_path('adm') . '/lib/user_selector/lib.otherfieldtypes.js', true, true);
     }
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:lib.dynamicuserfilter.php

示例10: init

 public function init()
 {
     parent::init();
     require_once _base_ . '/lib/lib.json.php';
     $this->json = new Services_JSON();
     $this->model = new DashboardAdm();
     YuiLib::load('autocomplete,tabview');
     Util::get_js(Get::rel_path('adm') . '/views/dashboard/dashboard.js', true, true);
     $this->permissions = array('view' => checkPerm('view', true, 'dashboard', 'framework'), 'view_user' => checkPerm('view', true, 'usermanagement', 'framework'), 'add_user' => checkPerm('add', true, 'usermanagement', 'framework'), 'mod_user' => checkPerm('mod', true, 'usermanagement', 'framework'), 'del_user' => checkPerm('del', true, 'usermanagement', 'framework'), 'view_course' => checkPerm('view', true, 'course', 'lms'), 'add_course' => checkPerm('add', true, 'course', 'lms'), 'mod_course' => checkPerm('mod', true, 'course', 'lms'), 'del_course' => checkPerm('del', true, 'course', 'lms'), 'view_communications' => checkPerm('view', true, 'communication', 'lms'), 'add_communications' => checkPerm('add', true, 'communication', 'lms'), 'view_games' => checkPerm('view', true, 'games', 'lms'), 'add_games' => checkPerm('add', true, 'games', 'lms'), 'subscribe' => checkPerm('subscribe', true, 'course', 'lms'));
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:10,代码来源:DashboardAdmController.php

示例11: initLibraries

 /**
  * Include the required libraries in order to have all the things ready and working
  */
 public function initLibraries()
 {
     // load yui
     YuiLib::load(array('yahoo-dom-event' => 'yahoo-dom-event.js', 'connection' => 'connection-min.js', 'dragdrop' => 'dragdrop-min.js', 'element' => 'element-beta-min.js', 'animation' => 'animation-min.js', 'json' => 'json-min.js', 'container' => 'container_core-min.js', 'menu' => 'menu-min.js', 'button' => 'button-min.js', 'container' => 'container-min.js', 'button' => 'button-min.js', 'treeview' => 'treeview-min.js', 'resize' => 'resize-beta-min.js', 'selector' => 'selector-beta-min.js'), array('assets/skins/sam' => 'skin.css'));
     // Selector class
     Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
     // Commodities functions
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     // The tableview main file
     Util::get_js(Get::rel_path('base') . '/lib/table_view/tableview.js', true, true);
     // Datatable css
     Util::get_css('../yui-skin/datatable.css', false, true);
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:16,代码来源:class.tableview.php

示例12: showTask

 public function showTask()
 {
     if (!$this->permissions['view']) {
         echo 'You can\'t access.';
         return;
     }
     //tabview widget, used in role and group editing
     Yuilib::load('tabview');
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     Util::get_js(Get::rel_path('adm') . '/views/functionalroles/functionalroles.js', true, true);
     Util::get_css('base-folder-tree.css', false, true);
     //render view
     $this->render('show', array('permissions' => $this->permissions, 'selected_group' => 0, 'filter_text' => ""));
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:14,代码来源:FunctionalrolesAdmController.php

示例13: initLibraries

 public function initLibraries()
 {
     YuiLib::load(array('yahoo-dom-event' => 'yahoo-dom-event.js', 'connection' => 'connection-min.js', 'dragdrop' => 'dragdrop-min.js', 'element' => 'element-beta-min.js', 'animation' => 'animation-min.js', 'json' => 'json-min.js', 'container' => 'container_core-min.js', 'menu' => 'menu-min.js', 'button' => 'button-min.js', 'container' => 'container-min.js', 'button' => 'button-min.js', 'treeview' => 'treeview-min.js', 'resize' => 'resize-beta-min.js', 'selector' => 'selector-beta-min.js'), array('assets/skins/sam' => 'skin.css'));
     Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     $js_path = Get::rel_path('base') . '/lib/folder_tree/';
     Util::get_js($js_path . 'ddnode.js', true, true);
     Util::get_js($js_path . 'foldernode.js', true, true);
     Util::get_js($js_path . 'foldertree.js', true, true);
     //addCss('folder_tree', 'framework');
     cout(Util::get_css('base-folder-tree.css'), 'page_head');
     foreach ($this->styleSheets as $sheet) {
         cout(Util::get_css($sheet . '.css'), 'page_head');
     }
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:15,代码来源:class.client_tree.php

示例14: init

 /**
  * Initialize required libraries
  */
 public function init()
 {
     YuiLib::load('base,treeview,selector');
     Util::get_js(Get::rel_path('base') . '/lib/lib.elem_selector.js', true, true);
     Util::get_js(Get::rel_path('base') . '/lib/js_utils.js', true, true);
     Util::get_css('base-folder-tree.css', false, true);
     $js_path = Get::rel_path('base') . '/widget/tree/';
     if ($this->dragDrop) {
         Util::get_js($js_path . 'ddnode.js', true, true);
     }
     Util::get_js($js_path . 'foldernode.js', true, true);
     Util::get_js($js_path . 'foldertree.js', true, true);
     if ($this->treeClass != "FolderTree" && $this->treeFile) {
         Util::get_js($this->treeFile, true, true);
     }
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:19,代码来源:lib.tree.php

示例15: __construct

 public function __construct($id, $initFromSession = false)
 {
     parent::__construct($id);
     $this->jsClassName = 'CourseFolderTree';
     $this->serverUrl = 'ajax.adm_server.php?plf=lms&file=category_tree&sf=folder_tree';
     Util::get_js(Get::rel_path('base') . '/widget/dialog/dialog.js', true, true);
     require_once _base_ . '/lib/lib.dialog.php';
     initDialogs();
     $initialShowedNodes = array();
     if ($initFromSession) {
         if (isset($_SESSION['course_category']['tree_status'])) {
             $tree_status =& $_SESSION['course_category']['tree_status'];
             //if (isset($tree_status['showed_nodes'])) {}
         }
         if (isset($_SESSION['course_category']['filter_status'])) {
             $filter_status =& $_SESSION['course_category']['filter_status'];
             if (isset($filter_status['c_category'])) {
                 $this->setOption('initialSelectedNode', $filter_status['c_category']);
             }
         }
     }
     $lang =& DoceboLanguage::CreateInstance('course', 'lms');
     //$this->setOption('langs', array('_ROOT'=>def('_CATEGORY', 'course', 'lms')));
     $this->addLangKey('_ROOT', $lang->def('_CATEGORY'));
     $this->addLangKey('_YES', $lang->def('_CONFIRM'));
     $this->addLangKey('_NO', $lang->def('_UNDO'));
     $this->addLangKey('_NEW_FOLDER_NAME', $lang->def('_NEW_CATEGORY'));
     $this->addLangKey('_MOD', $lang->def('_MOD'));
     $this->addLangKey('_AREYOUSURE', $lang->def('_AREYOUSURE'));
     $this->addLangKey('_NAME', $lang->def('_NAME'));
     $this->addLangKey('_MOD', $lang->def('_MOD'));
     $this->addLangKey('_DEL', $lang->def('_DEL'));
     //$this->addLangKey('_', $lang->def(''));
     //$selected_node = (isset($_SESSION['course_category']['filter_status']) ? $_SESSION['course_category']['filter_status']['c_category'] : 0); //0 = root node
     $tree_status = $this->_getCourseTreeStatus();
     //0 = root node
     $this->setOption('iconPath', Get::tmpl_path() . 'images/');
     $this->setOption('dragdrop', true);
     //$this->setOption('initNodes', $initialShowedNodes);
     $this->setOption('useCheckboxes', false);
     $this->setOption('addFolderButton', 'add_folder_button');
     //$this->setOption('initialTreeStatus', $tree_status);
     //$this->setOption('options', '');
     //$this->setOption('options', '');
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:45,代码来源:class.category_tree.php


注:本文中的Util::get_js方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。