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


PHP load_js函数代码示例

本文整理汇总了PHP中load_js函数的典型用法代码示例。如果您正苦于以下问题:PHP load_js函数的具体用法?PHP load_js怎么用?PHP load_js使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: array

 public function &__call($func_name, array $args = array())
 {
     if ($func_name == 'addElement' && isset($args[0])) {
         if (is_string($args[0])) {
             $type = $args[0];
         } else {
             $type = $args[0]->getType();
         }
         if ($type == 'select' || $type == 'commondata' || $type == 'multiselect') {
             load_js('modules/Libs/QuickForm/select.js');
             if (!isset($args[4])) {
                 $args[4] = array('onkeydown' => 'typeAhead();');
             }
             if (is_array($args[4])) {
                 $args[4]['onkeydown'] = 'typeAhead();';
             } else {
                 $args[4] .= ' onkeydown="typeAhead();"';
             }
         }
     }
     if (is_object($this->qf)) {
         //			if($func_name==='accept') trigger_error(print_r($args,true));
         $return = call_user_func_array(array(&$this->qf, $func_name), $args);
     } else {
         trigger_error("QuickFrom object doesn't exists", E_USER_ERROR);
     }
     return $return;
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:28,代码来源:QuickForm_0.php

示例2: applet

 public function applet($conf, &$opts)
 {
     $recordset = "quick_search";
     $theme = $this->init_module('Base/Theme');
     $form = $this->init_module('Libs/QuickForm');
     $txtQuery = 'query_text';
     $txtLabel = 'query_label';
     $btnQuery = 'query_button';
     $id = $conf['criteria'];
     $searchPrompt = Applets_QuickSearchCommon::getSearchPromptById($id);
     $conf['a_title'] = $conf['a_title'] == "Quick Search" ? Applets_QuickSearchCommon::getPresetNameById($id) : $conf['a_title'];
     $placeholder = $searchPrompt == "" ? "" : $searchPrompt;
     $opts['title'] = $conf['a_title'];
     $opts['go'] = false;
     load_css('modules/Applets/QuickSearch/theme/quick_form.css');
     load_js('modules/Applets/QuickSearch/js/quicksearch.js');
     //$js ='setDelayOnSearch()';
     //eval_js($js);
     $txt = $form->addElement('text', $txtQuery, __('Search'));
     $txt->setAttribute('id', $txtQuery . "_" . $id);
     $txt->setAttribute('class', 'QuickSearch_text');
     $txt->setAttribute('onkeypress', 'setDelayOnSearch(\'' . $id . '\')');
     $txt->setAttribute('placeholder', _V($placeholder));
     $theme->assign($txtLabel, __('Search'));
     $theme->assign($txtQuery, $txt->toHtml());
     $theme->assign('search_id', $conf['criteria']);
     $theme->display('quick_form');
     return true;
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:29,代码来源:QuickSearch_0.php

示例3: gerenciar

 public function gerenciar()
 {
     set_tema('footerinc', load_js(array('data-table', 'table')), FALSE);
     set_tema('titulo', 'Registros de auditoria');
     set_tema('conteudo', load_modulo('auditoria', 'gerenciar'));
     load_template();
 }
开发者ID:janderfrancisco,项目名称:saara_cursos,代码行数:7,代码来源:auditoria.php

示例4: get

 public static function get($id, $content, $header = '', $big = 0)
 {
     if (MOBILE_DEVICE) {
         return '';
     }
     static $init = true;
     if ($init) {
         Base_ThemeCommon::load_css('Libs/Leightbox', 'default', false);
         load_js('modules/Libs/Leightbox/leightbox.js');
         $init = false;
     }
     ob_start();
     print '<div id="' . $id . '" big="1" class="leightbox">';
     print '<input type="hidden" id="' . $id . '_bigsize" value="' . ($big ? 1 : 0) . '" />';
     if ($big) {
         eval_js('s = $(\'' . $id . '\').style;' . 's.top = \'5%\';' . 's.left = \'5%\';' . 's.width = \'90%\';' . 's.height = \'90%\';' . 's.padding = \'0px\';');
     }
     $smarty = Base_ThemeCommon::init_smarty();
     $smarty->assign('close_href', 'href="javascript:leightbox_deactivate(\'' . $id . '\')"');
     $smarty->assign('content', $content);
     $smarty->assign('header', $header);
     $smarty->assign('close_label', __('Close'));
     $smarty->assign('resize_label', __('Resize'));
     $smarty->assign('close_href', 'href="javascript:leightbox_deactivate(\'' . $id . '\')"');
     Base_ThemeCommon::display_smarty($smarty, 'Libs_Leightbox');
     print '</div>';
     return ob_get_clean();
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:28,代码来源:LeightboxCommon_0.php

示例5: iniciar_editor

function iniciar_editor()
{
    $CI =& get_instance();
    set_tema('headerinc', load_js(base_url('htmleditor/jquery.tinymce.min.js'), NULL, TRUE), FALSE);
    set_tema('headerinc', load_js(base_url('htmleditor/tinymce.min.js'), NULL, TRUE), FALSE);
    set_tema('headerinc', load_js(base_url('htmleditor/init_editor.js'), NULL, TRUE), FALSE);
}
开发者ID:AlencarDC,项目名称:Painel-CI,代码行数:7,代码来源:funcoes_helper.php

示例6: toHtml

	function toHtml() {
		if(count($this->_cd)>1) {
			load_js('modules/Utils/CommonData/qf.js');
			$id=$this->getAttribute('id');
			if(!isset($id)) {
				$id = $this->getName();
				$this->updateAttributes(array('id'=>$id));
			}
			$val = $this->getValue();
			$val = $val[0];
			if($this->_flagFrozen) {
				eval_js('new Utils_CommonData_freeze(\''.Epesi::escapeJS($id,false).'\', \''.Epesi::escapeJS(json_encode($this->_cd),false).'\')');
				$html = '<span id="'.$id.'_label">&nbsp;</span>';
				$name = $this->getPrivateName();
				// Only use id attribute if doing single hidden input
				$html .= '<input' . $this->_getAttrString(array(
					     'type'  => 'hidden',
					     'name'  => $name,
					     'value' => $val,
					     'id'    => $id
					 )) . ' />';
				return $html;
			}
			eval_js('new Utils_CommonData(\''.Epesi::escapeJS($id,false).'\', \''.Epesi::escapeJS($val,false).'\', \''.Epesi::escapeJS(json_encode($this->_cd),false).'\', '.($this->_add_empty_fields?1:0).')');
		}
	        return parent::toHtml();
	}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:27,代码来源:qf.php

示例7: gerenciar_midia

    public function gerenciar_midia()
    {
        $this->load->library('table');
        //vai carregar o modulo usuarios e mostrar a tela de recuperação de senha
        set_tema('headerinc', load_css('dataTables.bootstrap.min'), FALSE);
        set_tema('headerinc', load_css('responsive.bootstrap.min'), FALSE);
        set_tema('headerinc', load_css('ionicons.min', 'css/ionicons/css'), FALSE);
        set_tema('footerinc', load_js('jquery.dataTables'), FALSE);
        set_tema('footerinc', load_js('dataTables.bootstrap.min'), FALSE);
        set_tema('footerinc', load_js('dataTables.responsive.min'), FALSE);
        set_tema('footerinc', load_js('table-manage-responsive-auditoria.min'), FALSE);
        set_tema('footerinc', load_js('tooltip'), FALSE);
        set_tema('footerinc', '<script>
		$(document).ready(function() {
			App.init();
			TableManageResponsive.init();
                        $(\'[data-toggle="tooltip"]\').tooltip();   
		});
	</script>', FALSE);
        set_tema('titulo', 'Listagem de Mídias');
        set_tema('conteudo', load_modulo('midia', 'gerenciar'));
        set_tema('rodape', '');
        //vai substituir o rodape padrao
        load_template();
    }
开发者ID:AlencarDC,项目名称:Painel-CI,代码行数:25,代码来源:midia.php

示例8: init

 public static function init()
 {
     load_js('modules/Base/Notify/js/desktop-notify.js');
     load_js('modules/Base/Notify/js/main.js');
     eval_js_once("if (notify.isSupported) {\n\t\tclearInterval(Base_Notify__interval);\n\t\tvar Base_Notify__interval = setInterval(function () {Base_Notify__refresh('" . CID . "');}, " . self::refresh_rate * 1000 . ");\n\t\t}");
     eval_js_once('function Base_Notify__alert () {alert(\'' . __('Notifications disabled or not supported!') . '\\n' . __('Check your browser settings and allow notifications to use this feature...') . '\');}');
 }
开发者ID:62BRAINS,项目名称:EPESI,代码行数:7,代码来源:NotifyCommon_0.php

示例9: autohide_fields

 public static function autohide_fields($field, $field_type, $hide_mapping)
 {
     $allowed_modes = array('hide', 'show');
     $groups = array();
     foreach ($hide_mapping as $map) {
         if (!isset($map['fields']) || !isset($map['values'])) {
             continue;
         }
         $map['mode'] = isset($map['mode']) ? $map['mode'] : reset($allowed_modes);
         if (!in_array($map['mode'], $allowed_modes)) {
             continue;
         }
         $map['fields'] = is_array($map['fields']) ? $map['fields'] : array($map['fields']);
         $map['fields'] = array_map(function ($f) {
             return "#{$f}, #_{$f}__data";
         }, $map['fields']);
         $map['fields'] = implode(', ', $map['fields']);
         $map['values'] = is_array($map['values']) ? $map['values'] : array($map['values']);
         $map['values'] = array_map(function ($v) {
             if (is_bool($v)) {
                 $v = intval($v);
             }
             return strval($v);
         }, $map['values']);
         $groups[] = $map;
     }
     if (empty($groups)) {
         return;
     }
     load_js('modules/Libs/QuickForm/autohide_fields.js');
     $js_groups = json_encode($groups);
     eval_js("\n\t\t\t\tjq(function(){\n\t\t\t\t\tvar hide_ctrl = jq('#{$field}');\n\t\t\t\t\tLibs_QuickForm__hide_groups['{$field}']={$js_groups};\n\t\t\t\t\thide_ctrl.change(Libs_QuickForm__autohide).trigger('change');\n\t\t\t\t});");
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:33,代码来源:QuickFormCommon_0.php

示例10: construct

	public function construct( $title=null , $address=null ) {
		$this->_id = Utils_Path::$path_counter;
//		$this->layout = $arg;
		if( $title ) {
			$this->_string = '<a "'.($address).'" class=path_link>' . htmlspecialchars($title) . '</a>';
		}
		load_js("modules/Utils/Path/js/path.js");
	}
开发者ID:62BRAINS,项目名称:EPESI,代码行数:8,代码来源:Path_0.php

示例11: gerenciar

 public function gerenciar()
 {
     //lista os dados do banco de dados
     $query = $this->midias->get_all()->result();
     set_tema('footerinc', load_js(array('data-table', 'table')), FALSE);
     set_tema('titulo', 'Registros de Midia');
     set_tema('conteudo', load_modulo($this->view . 'gerenciar', array('query' => $query)));
     load_template();
 }
开发者ID:glhrmfrts2,项目名称:Loja_Beit,代码行数:9,代码来源:midias.php

示例12: index

 public function index($msg = NULL)
 {
     $this->data['msg'] = $msg;
     $this->load->helper('assets');
     $this->data['js'] = load_js(array('jquery.validate.min', 'valid/contact', 'jquery.maskedinput.min', 'maskedinput'));
     $this->data['css'] = load_css(array('main'));
     $this->set_title(SITE_NAME . " | Fale Conosco");
     $this->site();
 }
开发者ID:marcelod,项目名称:codeistrap,代码行数:9,代码来源:contact.php

示例13: confirmation_register

 public function confirmation_register($msg = NULL)
 {
     $this->data['msg'] = $msg;
     $this->load->helper('assets');
     $this->data['js'] = load_js(array('jquery.validate.min', 'valid/confirmation_register'));
     $this->set_title(SITE_NAME . " | Confirmação de Registro");
     $this->set_view('confirmation_register');
     $this->site();
 }
开发者ID:marcelod,项目名称:codeistrap,代码行数:9,代码来源:register.php

示例14: index

 public function index()
 {
     $this->load->helper('assets');
     $this->data['css'] = load_css(array('datatables-bootstrap'));
     $this->data['js'] = load_js(array('jquery.form', 'jquery.dataTables.min', 'datatables-bootstrap', 'datatables.fnReloadAjax', 'admin/actionDatatables', 'admin/dtUsers', 'jquery.maskedinput.min', 'maskedinput', 'search_zipcode', 'jquery.validate.min', 'valid/admin/user_create', 'valid/admin/user_edit'));
     $this->set_title(SITE_NAME . " | " . "Administração" . " | " . "Usuários");
     $this->set_view('admin/users/home');
     $this->admin();
 }
开发者ID:marcelod,项目名称:codeistrap,代码行数:9,代码来源:users.php

示例15: body

 public function body($arg = null, $rb = null, $uid = null)
 {
     if (isset($arg) && isset($rb)) {
         $this->group = $rb->tab . '/' . $arg['id'];
         if (Utils_WatchdogCommon::get_category_id($rb->tab) !== null) {
             $this->watchdog_category = $rb->tab;
             $this->watchdog_id = $arg['id'];
         }
         $this->set_view_func(array('Utils_RecordBrowserCommon', 'create_default_linked_label'), array($rb->tab, $arg['id']));
     }
     if (!isset($this->group) && !$uid) {
         trigger_error('Key not given to attachment module', E_USER_ERROR);
     }
     $_SESSION['client']['utils_attachment_group'] = $this->group;
     load_js('modules/Utils/Attachment/attachments.js');
     Base_ThemeCommon::load_css('Utils_Attachment', 'browse');
     $this->rb = $this->init_module(Utils_RecordBrowser::module_name(), 'utils_attachment', 'utils_attachment');
     $defaults = array('permission' => Base_User_SettingsCommon::get('CRM_Common', 'default_record_permission'), 'func' => serialize($this->func), 'args' => serialize($this->args));
     $rb_cols = array();
     $single_group = is_string($this->group) || count($this->group) == 1;
     if ($this->force_multiple) {
         $single_group = false;
     }
     if ($single_group) {
         $group = is_string($this->group) ? $this->group : reset($this->group);
         $defaults['local'] = $group;
     } else {
         // force attached to display
         $rb_cols['attached_to'] = true;
         $this->rb->set_button(false);
     }
     $this->rb->set_defaults($defaults);
     $this->rb->set_additional_actions_method(array($this, 'add_actions'));
     $this->rb->set_header_properties(array('sticky' => array('width' => 1, 'display' => false), 'attached_to' => array('width' => "16em"), 'edited_on' => array('width' => "12em"), 'title' => array('width' => "20em")));
     if ($uid) {
         $this->rb->set_button(false);
         $this->rb->disable_actions(array('delete'));
         $this->display_module($this->rb, array(array(':Created_by' => $uid), $rb_cols, array('sticky' => 'DESC', 'edited_on' => 'DESC')), 'show_data');
     } else {
         $crits = array();
         if (!is_array($this->group)) {
             $this->group = array($this->group);
         }
         if (isset($_SESSION['attachment_copy']) && count($this->group) == 1 && $_SESSION['attachment_copy']['group'] != $this->group) {
             $this->rb->new_button(Base_ThemeCommon::get_template_file(Utils_Attachment::module_name(), 'link.png'), __('Paste'), Utils_TooltipCommon::open_tag_attrs($_SESSION['attachment_copy']['text']) . ' ' . $this->create_callback_href(array($this, 'paste')));
         }
         if ($this->group) {
             $g = array_map(array('DB', 'qstr'), $this->group);
             $crits['id'] = DB::GetCol('SELECT attachment FROM utils_attachment_local WHERE local IN (' . implode(',', $g) . ')');
         } else {
             $crits['id'] = 0;
         }
         $this->display_module($this->rb, array($crits, $rb_cols, array('sticky' => 'DESC', 'edited_on' => 'DESC')), 'show_data');
     }
 }
开发者ID:cretzu89,项目名称:EPESI,代码行数:55,代码来源:Attachment_0.php


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