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


PHP Context::loadJavascriptPlugin方法代码示例

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


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

示例1: array

$__tmp = array('modules/admin/tpl/js/admin.js', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
?>
<!--#Meta:modules/admin/tpl/js/jquery.tmpl.js--><?php 
$__tmp = array('modules/admin/tpl/js/jquery.tmpl.js', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
?>
<!--#Meta:modules/widget/tpl/js/generate_code.js--><?php 
$__tmp = array('modules/widget/tpl/js/generate_code.js', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
?>
<!--#JSPLUGIN:ui.colorpicker--><?php 
Context::loadJavascriptPlugin('ui.colorpicker');
?>
<script>
	jQuery(function(){
		getWidgetVars();
	});
</script>
<div id="content" class="x">
	<form action="./" method="post" id="fo_widget"><input type="hidden" name="error_return_url" value="<?php 
echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
?>
" /><input type="hidden" name="mid" value="<?php 
echo $__Context->mid;
?>
" /><input type="hidden" name="vid" value="<?php 
echo $__Context->vid;
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:bfdf39a8ae88a32a6a21e047185ccdc2.compiled.php

示例2: XmlJsFilter

<?php

if (!defined("__XE__")) {
    exit;
}
require_once './classes/xml/XmlJsFilter.class.php';
$__xmlFilter = new XmlJsFilter('modules/nproduct/tpl/filter', 'insert_item.xml');
$__xmlFilter->compile();
?>
<!--#JSPLUGIN:ui--><?php 
Context::loadJavascriptPlugin('ui');
?>
<!--#Meta:modules/nproduct/tpl/js/script.js--><?php 
$__tmp = array('modules/nproduct/tpl/js/script.js', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
?>
<!--#Meta:modules/nproduct/tpl/js/_lib/jquery.cookie.js--><?php 
$__tmp = array('modules/nproduct/tpl/js/_lib/jquery.cookie.js', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
?>
<!--#Meta:modules/nproduct/tpl/js/_lib/jquery.hotkeys.js--><?php 
$__tmp = array('modules/nproduct/tpl/js/_lib/jquery.hotkeys.js', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
?>
<!--#Meta:modules/nproduct/tpl/js/jquery.jstree.js--><?php 
$__tmp = array('modules/nproduct/tpl/js/jquery.jstree.js', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:6b65e8bb00d1b3ad9c3f2f936eb586f9.compiled.php

示例3: getFormHTML

 /**
  * @brief type에 따른 form을 리턴
  **/
 function getFormHTML()
 {
     $type = $this->type;
     $name = $this->name;
     $value = $this->_getTypeValue($this->type, $this->value);
     $default = $this->_getTypeValue($this->type, $this->default);
     $column_name = 'extra_vars' . $this->idx;
     $buff = '';
     switch ($type) {
         // 홈페이지 주소
         case 'homepage':
             $buff .= '<input type="text" name="' . $column_name . '" value="' . $value . '" class="homepage" />';
             break;
             // Email 주소
         // Email 주소
         case 'email_address':
             $buff .= '<input type="text" name="' . $column_name . '" value="' . $value . '" class="email_address" />';
             break;
             // 전화번호
         // 전화번호
         case 'tel':
             $buff .= '<input type="text" name="' . $column_name . '" value="' . $value[0] . '" size="4" class="tel" />' . '<input type="text" name="' . $column_name . '" value="' . $value[1] . '" size="4" class="tel" />' . '<input type="text" name="' . $column_name . '" value="' . $value[2] . '" size="4" class="tel" />';
             break;
             // textarea
         // textarea
         case 'textarea':
             $buff .= '<textarea name="' . $column_name . '" class="textarea">' . $value . '</textarea>';
             break;
             // 다중 선택
         // 다중 선택
         case 'checkbox':
             $buff .= '<ul>';
             foreach ($default as $v) {
                 if ($value && in_array($v, $value)) {
                     $checked = ' checked="checked"';
                 } else {
                     $checked = '';
                 }
                 $buff .= '<li><input type="checkbox" name="' . $column_name . '" value="' . htmlspecialchars($v) . '" ' . $checked . ' />' . $v . '</li>';
             }
             $buff .= '</ul>';
             break;
             // 단일 선택
         // 단일 선택
         case 'select':
             $buff .= '<select name="' . $column_name . '" class="select">';
             foreach ($default as $v) {
                 if ($value && in_array($v, $value)) {
                     $selected = ' selected="selected"';
                 } else {
                     $selected = '';
                 }
                 $buff .= '<option value="' . $v . '" ' . $selected . '>' . $v . '</option>';
             }
             $buff .= '</select>';
             break;
             // radio
         // radio
         case 'radio':
             $buff .= '<ul>';
             foreach ($default as $v) {
                 if ($value && in_array($v, $value)) {
                     $checked = ' checked="checked"';
                 } else {
                     $checked = '';
                 }
                 $buff .= '<li><input type="radio" name="' . $column_name . '" ' . $checked . ' value="' . $v . '"  class="radio" />' . $v . '</li>';
             }
             $buff .= '</ul>';
             break;
             // 날짜 입력
         // 날짜 입력
         case 'date':
             // datepicker javascript plugin load
             Context::loadJavascriptPlugin('ui.datepicker');
             $buff .= '<input type="hidden" name="' . $column_name . '" value="' . $value . '" />' . '<input type="text" id="date_' . $column_name . '" value="' . zdate($value, 'Y-m-d') . '" readonly="readonly" class="date" />' . "\n" . '<script type="text/javascript">' . "\n" . '(function($){' . "\n" . '    $(function(){' . "\n" . '        var option = { gotoCurrent: false,yearRange:\'-100:+10\', onSelect:function(){' . "\n" . '            $(this).prev(\'input[type="hidden"]\').val(this.value.replace(/-/g,""))}' . "\n" . '        };' . "\n" . '        $.extend(option,$.datepicker.regional[\'' . Context::getLangType() . '\']);' . "\n" . '        $("#date_' . $column_name . '").datepicker(option);' . "\n" . '    });' . "\n" . '})(jQuery);' . "\n" . '</script>';
             break;
             // 주소 입력
         // 주소 입력
         case "kr_zip":
             // krzip address javascript plugin load
             Context::loadJavascriptPlugin('ui.krzip');
             $buff .= '<div id="addr_searched_' . $column_name . '" style="display:' . ($value[0] ? 'block' : 'none') . ';">' . '<input type="text" readonly="readonly" name="' . $column_name . '" value="' . $value[0] . '" class="address" />' . '<a href="#" onclick="doShowKrZipSearch(this, \'' . $column_name . '\'); return false;" class="button red"><span>' . Context::getLang('cmd_cancel') . '</span></a>' . '</div>' . '<div id="addr_list_' . $column_name . '" style="display:none;">' . '<select name="addr_list_' . $column_name . '"></select>' . '<a href="#" onclick="doSelectKrZip(this, \'' . $column_name . '\'); return false;" class="button blue"><span>' . Context::getLang('cmd_select') . '</span></a>' . '<a href="#" onclick="doHideKrZipList(this, \'' . $column_name . '\'); return false;" class="button red"><span>' . Context::getLang('cmd_cancel') . '</span></a>' . '</div>' . '<div id="addr_search_' . $column_name . '" style="display:' . ($value[0] ? 'none' : 'block') . '">' . '<input type="text" name="addr_search_' . $column_name . '" class="address" value="" />' . '<a href="#" onclick="doSearchKrZip(this, \'' . $column_name . '\'); return false;" class="button green"><span>' . Context::getLang('cmd_search') . '</span></a>' . '</div>' . '<input type="text" name="' . $column_name . '" value="' . htmlspecialchars($value[1]) . '" class="address" />' . '';
             break;
             // 일반 text
         // 일반 text
         default:
             $buff .= ' <input type="text" name="' . $column_name . '" value="' . $value . '" class="text" />';
             break;
     }
     if ($this->desc) {
         $buff .= '<p>' . $this->desc . '</p>';
     }
     return $buff;
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:98,代码来源:Extravar.class.php

示例4: array

<?php

if (!defined("__XE__")) {
    exit;
}
?>
<!--#Meta:modules/member/tpl/js/member_admin.js--><?php 
$__tmp = array('modules/member/tpl/js/member_admin.js', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
?>
<!--#JSPLUGIN:ui.datepicker--><?php 
Context::loadJavascriptPlugin('ui.datepicker');
?>
<script>
	xe.lang.deleteProfileImage = '<?php 
echo $__Context->lang->msg_delete_extend_form;
?>
';
	xe.lang.deleteImageMark = '<?php 
echo $__Context->lang->msg_delete_extend_form;
?>
';
	xe.lang.deleteImageName = '<?php 
echo $__Context->lang->msg_delete_extend_form;
?>
';
</script>
<div class="x_page-header">
	<?php 
if ($__Context->member_srl) {
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:f451b0b4aeb03d3791a73c0a02a7116c.compiled.php

示例5: array

}
?>
<!-- css -->
<!--#Meta:modules/editor/skins/ckeditor/css/default.css--><?php 
$__tmp = array('modules/editor/skins/ckeditor/css/default.css', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
?>
<!--#Meta:common/xeicon/xeicon.min.css--><?php 
$__tmp = array('common/xeicon/xeicon.min.css', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
?>
<!-- JS -->
<!--#JSPLUGIN:ckeditor--><?php 
Context::loadJavascriptPlugin('ckeditor');
?>
<!--#Meta:modules/editor/tpl/js/editor_common.js--><?php 
$__tmp = array('modules/editor/tpl/js/editor_common.js', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
?>
<!--#Meta:modules/editor/tpl/js/editor.app.js--><?php 
$__tmp = array('modules/editor/tpl/js/editor.app.js', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
?>
<!--#Meta:modules/editor/skins/ckeditor/js/xe_interface.js--><?php 
$__tmp = array('modules/editor/skins/ckeditor/js/xe_interface.js', '', '', '');
Context::loadFile($__tmp);
unset($__tmp);
开发者ID:einsss,项目名称:counsel_project,代码行数:31,代码来源:2aaabacc178ee153180eecb4e6184ffd.compiled.php

示例6: getFormHTML

 /**
  * Returns a form based on its type
  *
  * @return string Returns a html form.
  */
 function getFormHTML($include_desc = TRUE)
 {
     static $id_num = 1000;
     $type = $this->type;
     $value = $this->_getTypeValue($this->type, $this->value);
     $default = $this->_getTypeValue($this->type, $this->default);
     $column_name = $this->name;
     $tmp_id = $column_name . '-' . $id_num++;
     $buff = '';
     switch ($type) {
         // Homepage
         case 'homepage':
             $buff .= '<input type="text" name="' . $column_name . '" value="' . $value . '" class="homepage" />';
             break;
             // Email Address
         // Email Address
         case 'email_address':
             $buff .= '<input type="text" name="' . $column_name . '" value="' . $value . '" class="email_address" />';
             break;
             // Phone Number
         // Phone Number
         case 'tel':
             $buff .= '<input type="text" name="' . $column_name . '[]" value="' . $value[0] . '" size="4" maxlength="4" class="tel" />' . '<input type="text" name="' . $column_name . '[]" value="' . $value[1] . '" size="4" maxlength="4" class="tel" />' . '<input type="text" name="' . $column_name . '[]" value="' . $value[2] . '" size="4" maxlength="4" class="tel" />';
             break;
             // textarea
         // textarea
         case 'textarea':
             $buff .= '<textarea name="' . $column_name . '" rows="8" cols="42">' . $value . '</textarea>';
             break;
             // multiple choice
         // multiple choice
         case 'checkbox':
             $buff .= '<ul>';
             foreach ($default as $v) {
                 if ($value && in_array(trim($v), $value)) {
                     $checked = ' checked="checked"';
                 } else {
                     $checked = '';
                 }
                 // Temporary ID for labeling
                 $tmp_id = $column_name . '-' . $id_num++;
                 $buff .= '<li><label for="' . $tmp_id . '"><input type="checkbox" name="' . $column_name . '[]" id="' . $tmp_id . '" value="' . htmlspecialchars($v) . '" ' . $checked . ' />' . $v . '</label></li>';
             }
             $buff .= '</ul>';
             break;
             // single choice
         // single choice
         case 'select':
             $buff .= '<select name="' . $column_name . '" class="select">';
             foreach ($default as $v) {
                 if ($value && in_array(trim($v), $value)) {
                     $selected = ' selected="selected"';
                 } else {
                     $selected = '';
                 }
                 $buff .= '<option value="' . $v . '" ' . $selected . '>' . $v . '</option>';
             }
             $buff .= '</select>';
             break;
             // radio
         // radio
         case 'radio':
             $buff .= '<ul>';
             foreach ($default as $v) {
                 if ($value && in_array(trim($v), $value)) {
                     $checked = ' checked="checked"';
                 } else {
                     $checked = '';
                 }
                 // Temporary ID for labeling
                 $tmp_id = $column_name . '-' . $id_num++;
                 $buff .= '<li><input type="radio" name="' . $column_name . '" id="' . $tmp_id . '" ' . $checked . ' value="' . $v . '"  class="radio" /><label for="' . $tmp_id . '">' . $v . '</label></li>';
             }
             $buff .= '</ul>';
             break;
             // date
         // date
         case 'date':
             // datepicker javascript plugin load
             Context::loadJavascriptPlugin('ui.datepicker');
             $buff .= '<input type="hidden" name="' . $column_name . '" value="' . $value . '" />' . '<input type="text" id="date_' . $column_name . '" value="' . zdate($value, 'Y-m-d') . '" class="date" /> <input type="button" value="' . Context::getLang('cmd_delete') . '" id="dateRemover_' . $column_name . '" />' . "\n" . '<script>' . "\n" . '(function($){' . "\n" . '    $(function(){' . "\n" . '        var option = { dateFormat: "yy-mm-dd", changeMonth:true, changeYear:true, gotoCurrent: false,yearRange:\'-100:+10\', onSelect:function(){' . "\n" . '            $(this).prev(\'input[type="hidden"]\').val(this.value.replace(/-/g,""))}' . "\n" . '        };' . "\n" . '        $.extend(option,$.datepicker.regional[\'' . Context::getLangType() . '\']);' . "\n" . '        $("#date_' . $column_name . '").datepicker(option);' . "\n" . '		$("#dateRemover_' . $column_name . '").click(function(){' . "\n" . '			$(this).siblings("input").val("");' . "\n" . '			return false;' . "\n" . '		})' . "\n" . '    });' . "\n" . '})(jQuery);' . "\n" . '</script>';
             break;
             // address
         // address
         case "kr_zip":
             // krzip address javascript plugin load
             Context::loadJavascriptPlugin('ui.krzip');
             $buff .= '<div id="addr_searched_' . $column_name . '" style="display:' . ($value[0] ? 'block' : 'none') . ';">' . '<input type="text" readonly="readonly" name="' . $column_name . '[]" value="' . $value[0] . '" class="address" />' . '<a href="#" onclick="doShowKrZipSearch(this, \'' . $column_name . '\'); return false;" class="button red"><span>' . Context::getLang('cmd_cancel') . '</span></a>' . '</div>' . '<div id="addr_list_' . $column_name . '" style="display:none;">' . '<select name="addr_list_' . $column_name . '"></select>' . '<a href="#" onclick="doSelectKrZip(this, \'' . $column_name . '\'); return false;" class="button blue"><span>' . Context::getLang('cmd_select') . '</span></a>' . '<a href="#" onclick="doHideKrZipList(this, \'' . $column_name . '\'); return false;" class="button red"><span>' . Context::getLang('cmd_cancel') . '</span></a>' . '</div>' . '<div id="addr_search_' . $column_name . '" style="display:' . ($value[0] ? 'none' : 'block') . '">' . '<input type="text" name="addr_search_' . $column_name . '" class="address" value="" />' . '<a href="#" onclick="doSearchKrZip(this, \'' . $column_name . '\'); return false;" class="button green"><span>' . Context::getLang('cmd_search') . '</span></a>' . '</div>' . '<input type="text" name="' . $column_name . '[]" value="' . htmlspecialchars($value[1]) . '" class="address" />' . '';
             break;
             // General text
         // General text
         default:
             $buff .= ' <input type="text" name="' . $column_name . '" value="' . ($value !== NULL ? $value : $default) . '" class="text" />';
             break;
     }
//.........这里部分代码省略.........
开发者ID:bjrambo,项目名称:nurigo,代码行数:101,代码来源:ExtraItem.class.php

示例7: getCategoryHTML

 /**
  * Common:: Category parameter management module
  * @param int $module_srl
  * @return string
  */
 function getCategoryHTML($module_srl)
 {
     $category_xml_file = $this->getCategoryXmlFile($module_srl);
     Context::set('category_xml_file', $category_xml_file);
     Context::loadJavascriptPlugin('ui.tree');
     // Get a list of member groups
     $oMemberModel = getModel('member');
     $group_list = $oMemberModel->getGroups($module_info->site_srl);
     Context::set('group_list', $group_list);
     $security = new Security();
     $security->encodeHTML('group_list..title');
     // Get information of module_grants
     $oTemplate =& TemplateHandler::getInstance();
     return $oTemplate->compile($this->module_path . 'tpl', 'category_list');
 }
开发者ID:kimkucheol,项目名称:xe-core,代码行数:20,代码来源:document.model.php

示例8: getCategoryHTML

 /**
  * @brief 공통 :: 모듈의 카테고리 변수 관리
  **/
 function getCategoryHTML($module_srl)
 {
     $category_xml_file = $this->getCategoryXmlFile($module_srl);
     Context::set('category_xml_file', $category_xml_file);
     Context::loadJavascriptPlugin('ui.tree');
     // grant 정보를 추출
     $oTemplate =& TemplateHandler::getInstance();
     return $oTemplate->compile($this->module_path . 'tpl', 'category_list');
 }
开发者ID:hottaro,项目名称:xpressengine,代码行数:12,代码来源:document.model.php

示例9: getFormHTML

 /**
  * Returns a form based on its type
  *
  * @return string Returns a form html.
  */
 function getFormHTML()
 {
     static $id_num = 1000;
     $type = $this->type;
     $name = $this->name;
     $value = $this->_getTypeValue($this->type, $this->value);
     $default = $this->_getTypeValue($this->type, $this->default);
     $column_name = 'extra_vars' . $this->idx;
     $tmp_id = $column_name . '-' . $id_num++;
     $buff = array();
     switch ($type) {
         // Homepage
         case 'homepage':
             $buff[] = '<input type="text" name="' . $column_name . '" value="' . $value . '" class="homepage" />';
             break;
             // Email Address
         // Email Address
         case 'email_address':
             $buff[] = '<input type="text" name="' . $column_name . '" value="' . $value . '" class="email_address" />';
             break;
             // Phone Number
         // Phone Number
         case 'tel':
             $buff[] = '<input type="text" name="' . $column_name . '[]" value="' . $value[0] . '" size="4" maxlength="4" class="tel" />';
             $buff[] = '<input type="text" name="' . $column_name . '[]" value="' . $value[1] . '" size="4" maxlength="4" class="tel" />';
             $buff[] = '<input type="text" name="' . $column_name . '[]" value="' . $value[2] . '" size="4" maxlength="4" class="tel" />';
             break;
             // textarea
         // textarea
         case 'textarea':
             $buff[] = '<textarea name="' . $column_name . '" rows="8" cols="42">' . $value . '</textarea>';
             break;
             // multiple choice
         // multiple choice
         case 'checkbox':
             $buff[] = '<ul>';
             foreach ($default as $v) {
                 $checked = '';
                 if ($value && in_array(trim($v), $value)) {
                     $checked = ' checked="checked"';
                 }
                 // Temporary ID for labeling
                 $tmp_id = $column_name . '-' . $id_num++;
                 $buff[] = '  <li><input type="checkbox" name="' . $column_name . '[]" id="' . $tmp_id . '" value="' . htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '" ' . $checked . ' /><label for="' . $tmp_id . '">' . $v . '</label></li>';
             }
             $buff[] = '</ul>';
             break;
             // single choice
         // single choice
         case 'select':
             $buff[] = '<select name="' . $column_name . '" class="select">';
             foreach ($default as $v) {
                 $selected = '';
                 if ($value && in_array(trim($v), $value)) {
                     $selected = ' selected="selected"';
                 }
                 $buff[] = '  <option value="' . $v . '" ' . $selected . '>' . $v . '</option>';
             }
             $buff[] = '</select>';
             break;
             // radio
         // radio
         case 'radio':
             $buff[] = '<ul>';
             foreach ($default as $v) {
                 $checked = '';
                 if ($value && in_array(trim($v), $value)) {
                     $checked = ' checked="checked"';
                 }
                 // Temporary ID for labeling
                 $tmp_id = $column_name . '-' . $id_num++;
                 $buff[] = '<li><input type="radio" name="' . $column_name . '" id="' . $tmp_id . '" ' . $checked . ' value="' . $v . '"  class="radio" /><label for="' . $tmp_id . '">' . $v . '</label></li>';
             }
             $buff[] = '</ul>';
             break;
             // date
         // date
         case 'date':
             // datepicker javascript plugin load
             Context::loadJavascriptPlugin('ui.datepicker');
             $buff[] = '<input type="hidden" name="' . $column_name . '" value="' . $value . '" />';
             $buff[] = '<input type="text" id="date_' . $column_name . '" value="' . zdate($value, 'Y-m-d') . '" class="date" />';
             $buff[] = '<input type="button" value="' . Context::getLang('cmd_delete') . '" class="btn" id="dateRemover_' . $column_name . '" />';
             $buff[] = '<script type="text/javascript">';
             $buff[] = '//<![CDATA[';
             $buff[] = '(function($){';
             $buff[] = '$(function(){';
             $buff[] = '  var option = { dateFormat: "yy-mm-dd", changeMonth:true, changeYear:true, gotoCurrent:false, yearRange:\'-100:+10\', onSelect:function(){';
             $buff[] = '    $(this).prev(\'input[type="hidden"]\').val(this.value.replace(/-/g,""))}';
             $buff[] = '  };';
             $buff[] = '  $.extend(option,$.datepicker.regional[\'' . Context::getLangType() . '\']);';
             $buff[] = '  $("#date_' . $column_name . '").datepicker(option);';
             $buff[] = '  $("#dateRemover_' . $column_name . '").click(function(){';
             $buff[] = '    $(this).siblings("input").val("");';
             $buff[] = '    return false;';
//.........这里部分代码省略.........
开发者ID:perzona420,项目名称:xe-core,代码行数:101,代码来源:Extravar.class.php

示例10: dispIssuetrackerViewSource

    /**
     * @brief 소스 브라우징
     **/
    function dispIssuetrackerViewSource()
    {
        // 접근 권한 체크
        if (!$this->grant->browser_source || !$this->module_info->svn_url) {
            return $this->dispIssuetrackerMessage('msg_not_permitted');
        }
        require_once $this->module_path . 'classes/svn.class.php';
        $path = urldecode(Context::get('path'));
        if (!$path) {
            $path = '/';
        }
        Context::set('path', $path);
        $revs = Context::get('revs');
        $erev = Context::get('erev');
        $brev = Context::get('brev');
        $oSvn = new Svn($this->module_info->svn_url, $this->module_info->svn_cmd);
        $current = $oSvn->getStatus($path);
        Context::set('current', $current);
        $type = Context::get('type');
        switch ($type) {
            case 'diff':
            case 'compare':
                $comp = $oSvn->getComp($path, $brev, $erev);
                Context::set('comp', $comp);
                $path_tree = Svn::explodePath($path, true);
                Context::set('path_tree', $path_tree);
                $this->setTemplateFile('source_compare');
                break;
            case 'log':
                if (!$erev) {
                    $erev = $current->revision;
                }
                $logs = $oSvn->getLog($path, $erev, $brev, false, 50);
                Context::set('logs', $logs);
                if (!$erev) {
                    $erev = $current->erev;
                }
                context::set('erev', $erev);
                context::set('brev', $brev);
                $path_tree = Svn::explodePath($path, true);
                Context::set('path_tree', $path_tree);
                $this->setTemplateFile('source_log');
                break;
            case 'file':
                if ($revs) {
                    $erev = $revs;
                }
                if (!$erev) {
                    $erev = $current->revision;
                }
                $content = $oSvn->getFileContent($path, $erev);
                Context::set('content', $content);
                $logs = $oSvn->getLog($path, $erev, $brev, false, 2);
                $erev = $logs[0]->revision;
                $brev = $logs[1]->revision;
                context::set('erev', $erev);
                context::set('brev', $brev);
                $path_tree = Svn::explodePath($path, true);
                Context::set('path_tree', $path_tree);
                $file_name = array_pop(array_keys($path_tree));
                $file_ext = array_pop(explode(".", $file_name));
                $extlist = array("document" => array("doc", "pdf", "hwp"), "image" => array("jpg", "jpeg", "jpe", "gif", "png", "bmp"), "sound" => array("mp3", "ogg", "wma", "wav"), "movie" => array("avi", "mpg", "mpeg", "mpe", "wmv", "asf", "asx", "mov", "flv", "swf"));
                foreach ($extlist as $key => $exts) {
                    foreach ($exts as $s_key => $ext) {
                        if (!strcasecmp($file_ext, $ext)) {
                            $file_type = $key;
                            break 2;
                        }
                    }
                }
                if (!$file_type) {
                    $file_type = "code";
                    $extToLang = array("h" => "Cpp", "cpp" => "Cpp", "csharp" => "CSharp", "css" => "Css", "html" => "Xml", "sql" => "Sql", "java" => "Java", "py" => "Python", "rb" => "Ruby", "js" => "JScript", "c" => "Cpp", "vb" => "Vb", "xml" => "Xml", "php" => "Php");
                    $file_ext_tmp = strtolower($file_ext);
                    if ($extToLang[$file_ext_tmp]) {
                        $file_ext = $extToLang[$file_ext_tmp];
                    }
                    if (file_exists("./common/js/plugins/code_highlighter/script/shBrush" . $file_ext . ".js")) {
                        Context::loadJavascriptPlugin("code_highlighter");
                        Context::addJsFile('./common/js/plugins/code_highlighter/script/shBrush' . $file_ext . '.js', false);
                        $js_code = <<<dpScript
                                    <script type="text/javascript">
                                        SyntaxHighlighter.config.clipboardSwf = './modules/editor/components/code_highlighter/script/clipboard.swf';
                                        SyntaxHighlighter.all();
                                    </script> 
dpScript;
                        Context::addHtmlFooter($js_code);
                        Context::set('file_ext', $file_ext_tmp);
                    }
                }
                Context::set('file_type', $file_type);
                $this->setTemplateFile('source_file_view');
                break;
            default:
                $path_tree = Svn::explodePath($path, false);
                Context::set('path_tree', $path_tree);
                $list = $oSvn->getList($path, $revs);
//.........这里部分代码省略.........
开发者ID:hottaro,项目名称:xpressengine,代码行数:101,代码来源:issuetracker.view.php

示例11:

<?php

if (!defined("__ZBXE__")) {
    exit;
}
if ($called_position == 'after_module_proc' && Context::getResponseMethod() != "XMLRPC" && Context::get('act') == 'dispWikiEditPage') {
    $module_info = Context::get('module_info');
    if (!$module_info->module) {
        return;
    }
    if ($module_info->module != 'wiki') {
        return;
    }
    Context::loadJavascriptPlugin('hotkeys');
    Context::addJsFile('./addons/wiki_link/wikilink.js', false);
    Context::addCssFile('./addons/wiki_link/wikilink.css', false);
}
开发者ID:hottaro,项目名称:xpressengine,代码行数:17,代码来源:wiki_link.addon.php

示例12: htmlspecialchars

<?php

if (!defined("__XE__")) {
    exit;
}
?>
<!--#JSPLUGIN:filebox--><?php 
Context::loadJavascriptPlugin('filebox');
if ($__Context->use_filebox) {
    ?>
<section class="x_modal" id="modalFilebox">
	<div class="x_modal-header">
		<h1>File Box</h1>
	</div>
	<div class="x_modal-body">
		<h2><?php 
    echo $__Context->lang->upload_file;
    ?>
</h2>
		<form id="new_filebox_upload" action="./" class="x_form-horizontal" method="post" enctype="multipart/form-data"><input type="hidden" name="error_return_url" value="<?php 
    echo htmlspecialchars(getRequestUriByServerEnviroment(), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
    ?>
" /><input type="hidden" name="mid" value="<?php 
    echo $__Context->mid;
    ?>
" />
			<input type="hidden" name="module" value="module" />
			<input type="hidden" name="act" value="procModuleFileBoxAdd" />
			<input type="hidden" name="vid" value="<?php 
    echo $__Context->vid;
    ?>
开发者ID:umjinsun12,项目名称:dngshin,代码行数:31,代码来源:bbbfd86e144632f57411a4113f1147dc.compiled.php

示例13: dispShopToolManageCategories

	/**
	 * Category management view (Admin)
	 */
	public function dispShopToolManageCategories()
	{
		// Retrieve existing categories
		$shopModel = getModel('shop');
		$repository = $shopModel->getCategoryRepository();
		$tree = $repository->getCategoriesTree($this->module_srl);

		// Prepare tree for display
		$tree_config = new HtmlCategoryTreeConfig();
		$tree_config->showManagingLinks = TRUE;
        $tree_config->HTMLmode = FALSE;
        $tree_config->linkCategoryName = TRUE;
        $tree_config->linkGetUrlParams = array('act', 'dispShopToolManageProducts');
		$HTML_tree = $tree->toHTML($tree_config);

		Context::set('HTML_tree', $HTML_tree);

        // Load jQuery tree plugin
        Context::loadJavascriptPlugin('ui.tree');

		// Initialize new empty Category object
		$category = new Category();
		$category->module_srl = $this->module_srl;
		Context::set('category', $category);
	}
开发者ID:haegyung,项目名称:xe-module-shop,代码行数:28,代码来源:shop.view.php

示例14:

<?php

if (!defined("__XE__")) {
    exit;
}
?>
<!--#JSPLUGIN:jquery.fileupload--><?php 
Context::loadJavascriptPlugin('jquery.fileupload');
?>
<!--#JSPLUGIN:jquery.finderSelect--><?php 
Context::loadJavascriptPlugin('jquery.finderSelect');
?>
<!--#JSPLUGIN:handlebars--><?php 
Context::loadJavascriptPlugin('handlebars');
Context::loadLang('modules/editor/skins/ckeditor/lang');
if ($__Context->allow_fileupload) {
    ?>
<div id="xefu-container-<?php 
    echo $__Context->editor_sequence;
    ?>
" class="xefu-container xe-clearfix" data-editor-sequence="<?php 
    echo $__Context->editor_sequence;
    ?>
">
	
	<div class="xefu-dropzone">
		<span class="xefu-btn fileinput-button xefu-act-selectfile">
			<span><i class="xi-icon xi-file-add"></i> <?php 
    echo $__Context->lang->edit->upload_file;
    ?>
</span>
开发者ID:einsss,项目名称:counsel_project,代码行数:31,代码来源:a67664a8ada3bd24666d217effd6677c.compiled.php


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