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


PHP use_javascript函数代码示例

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


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

示例1: header

 function header($params)
 {
     global $DOCUMENT_ROOT, $HTML, $group_id;
     use_javascript('/js/sortable.js');
     html_use_jquery();
     $params['toptab'] = 'taskboard';
     $params['group'] = $group_id;
     $labels[] = _("View Taskboard");
     $links[] = '/plugins/taskboard/index.php?group_id=' . $group_id;
     if (session_loggedin()) {
         if (forge_check_perm('tracker', $this->getID(), 'manager')) {
             $labels[] = _('Administration');
             $links[] = '/plugins/taskboard/admin/index.php?group_id=' . $group_id;
             $action = getStringFromRequest('action');
             if ($action == 'edit_column') {
                 $labels[] = _('Configure Columns');
                 $links[] = '/plugins/taskboard/admin/index.php?group_id=' . $group_id . '&action=columns';
                 $column_id = getStringFromRequest('column_id', '');
                 if ($column_id) {
                     $labels[] = _('Delete Column');
                     $links[] = '/plugins/taskboard/admin/index.php?group_id=' . $group_id . '&action=delete_column&column_id=' . $column_id;
                 }
             }
         }
     }
     $params['submenu'] = $HTML->subMenu($labels, $links);
     site_project_header($params);
 }
开发者ID:vpylypv,项目名称:taskboard,代码行数:28,代码来源:TaskBoardHtml.class.php

示例2: render

 public function render($name, $value = array(), $attributes = array(), $errors = array())
 {
     $widget = array();
     use_javascript('jquery.tooltip/jquery.tooltip.js');
     use_stylesheet('../js/jquery.tooltip/jquery.tooltip.css');
     $widget['%thumbnails%'] = '';
     $widget['%thumbnails%'] .= '';
     $j = 0;
     foreach ($value as $j => $image) {
         if (!isset($image['id'])) {
             continue;
         }
         $fileIdInput = new sfWidgetFormInputHidden();
         $fileNameInput = new sfWidgetFormInputHidden();
         $commentInput = new sfWidgetFormInput(array(), array('maxlength' => 255));
         $largeInput = new sfWidgetFormInputHidden();
         $thumbnailInput = new sfWidgetFormInputHidden();
         $widget['%thumbnails%'] .= '<div class="upload_item" style="margin-bottom: 10px;" >' . '<span style="display: inline; width: 260px; float: left; text-align: center; padding-top: 10px;">' . link_to($image['name'], strval($image['Large']), array('class' => 'preview', 'rel' => strval($image['Thumbnail']))) . '</span>' . '&nbsp;' . $thumbnailInput->render($name . "[" . $j . "][Thumbnail]", strval($image['Thumbnail']), array()) . $largeInput->render($name . "[" . $j . "][Large]", strval($image['Large']), array()) . $fileNameInput->render($name . "[" . $j . "][name]", $image['name'], array()) . $fileIdInput->render($name . "[" . $j . "][id]", $image['id'], array()) . '<span>Title:</span>' . $commentInput->render($name . "[" . $j . "][description]", $image['description'], array('class' => 'text  input-mercha-account')) . '&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="del-photo"><img src="/images/cross.gif"  style="vertical-align:middle;" /></a>' . '</div>';
     }
     $i = $j + 1;
     $fileInput = new sfWidgetFormInputFile();
     $commentInput = new sfWidgetFormInput();
     $widget['%thumbnails%'] .= '<div class="upload_item" style="margin-bottom: 10px;" >' . $fileInput->render($name . "[" . $i . "][file]", null, array('class' => '', 'style' => "padding-left:0px;  width: 260px;  padding:0px; ")) . '&nbsp;' . '<span>Title:</span>' . $commentInput->render($name . "[" . $i . "][description]", null, array('class' => 'text  input-mercha-account')) . '&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="del-photo" style="vertical-align:middle;"><img src="/images/cross.gif" /></a>' . '</div>' . '<div class=" add-another-location bottom_add_new_category_link" style="padding-top: 0px; padding-bottom: 15px;">' . '<div class="plus_category">' . '<div class="left margin1"><img src="/images/plus.gif" /></div>' . '<div class="left margin_top3"><a href="#" class="add-photo">Add Another Photo</a></div>' . '</div>' . '</div>';
     $js = jq_javascript_tag("\r\n      jQuery(document).ready(function(){\r\n        i = jQuery('.upload_item').length + 1;\r\n        \r\n        jQuery('a.del-photo').live('click', function(e){\r\n          e.preventDefault();\r\n          jQuery(this).parents('.upload_item').remove();\r\n        });\r\n        \r\n        jQuery('.preview').tooltip({ \r\n            delay: 0, \r\n            showURL: false, \r\n            bodyHandler: function() { \r\n                return jQuery('<img/>').attr('src', jQuery(this).attr('rel')); \r\n            } \r\n        });\r\n        \r\n        jQuery('a.add-photo').live('click', function(e){\r\n          \r\n          e.preventDefault();\r\n          \r\n          var already = jQuery('.upload_item');\r\n          \r\n          var newUpload = '';\r\n          \r\n          var maxCount = " . intval($this->getOption('max_count')) . ";\r\n          \r\n          if ((maxCount > 0 && already.length < maxCount) || maxCount == 0) {\r\n          \r\n            newUpload = \r\n              '<div class=\\'upload_item\\' style=\\'margin-bottom: 10px;\\'><input type=\\'file\\' name=\\'" . $name . "[' + i + '][file]" . "\\' class=\"\" style=\"padding-left:0px;  width: 260px; padding:0px; \" />' +\n              '&nbsp;<span>Title:</span>' +\r\n              '<input type=\\'text\\' name=\\'" . $name . "[' + i + '][description]" . "\\' class=\\'text input-mercha-account\\' >';\r\n          \r\n            newUpload += \r\n              '&nbsp;&nbsp;&nbsp;&nbsp;<a href=\\'#\\' class=\\'del-photo\\'><img src=\\'/images/cross.gif\\'  style=\\'vertical-align:middle;\\' /></a>';\r\n          \r\n            \r\n            \r\n            newUpload += '</div>';\r\n            \r\n            jQuery(newUpload).insertBefore(jQuery(this).parents('div.add-another-location'));\r\n            i++;\r\n          }\r\n        })\r\n      \r\n      });\r\n    ");
     return $js . '<div id="uploader" style="width: 590px;">' . strtr($this->getOption('template'), $widget) . '</div>';
 }
开发者ID:rollmax,项目名称:read2read,代码行数:26,代码来源:tsWidgetFormUploadImageMany.class.php

示例3: importAssets

 /**
  * @return mixed
  */
 public function importAssets()
 {
     use_javascript("jstree/js/jstree.min.js");
     use_javascript("treeManagement/jstree/common.js");
     use_javascript("treeManagement/jstree/editMode/editMode.js");
     use_stylesheet("jstree/themes/default/style.min.css");
     use_stylesheet("jstree/custom/custom.css");
 }
开发者ID:lendji4000,项目名称:compose,代码行数:11,代码来源:ModeEditTreeStrategy.php

示例4: ncbt_menu

/**
 * Get the HTML snippet for a Bootstrap Menu.
 *
 * @param string $config  An optional path to the config file. Defaults to {sf_config_dir}/menu.yml
 * @param array  $options An optional array of options. Currently only 'secondary' is supported.
 *
 * @return string
 */
function ncbt_menu($config = null, $options = array())
{
    use_stylesheet('/ncBootstrapMenuHelper/css/bootstrap.min.css');
    use_javascript('/ncBootstrapMenuHelper/js/bootstrap-dropdown.css', 'last');
    if (null === $config) {
        $config = sfConfig::get('sf_config_dir') . '/menu.yml';
    }
    $config = new ncbtMenuConfigParser($config, $options);
    return strval($config->getMenu());
}
开发者ID:ncuesta,项目名称:ncBootstrapMenuPlugin,代码行数:18,代码来源:BootstrapMenuHelper.php

示例5: use_plop_javascript

/**
 * Add one or several JavaScript file(s) to the page
 * @param Mixed $j String or array
 */
function use_plop_javascript($js)
{
    if (is_array($js)) {
        foreach ($js as $f) {
            use_javascript($f);
        }
    } else {
        use_javascript($js);
    }
}
开发者ID:noreiller,项目名称:sfPlopPlugin,代码行数:14,代码来源:sfPlopHelper.php

示例6: grid_libraries

function grid_libraries()
{
    use_javascript('jqgrid/js/i18n/grid.locale-en.js');
    use_javascript('jqgrid/plugins/ui.multiselect.js');
    use_javascript('jqgrid/js/jquery.jqGrid.min.js');
    use_javascript('jqgrid/plugins/jquery.tablednd.js');
    use_javascript('jqgrid/plugins/jquery.contextmenu.js');
    $js = '<link rel="stylesheet" type="text/css" href="' . base_url() . 'css/jquery/jquery-ui.custom.css" />
    <link rel="stylesheet" type="text/css" href="' . base_url() . 'js/jqgrid/css/ui.jqgrid.css" />';
    return $js;
}
开发者ID:kostya1017,项目名称:our,代码行数:11,代码来源:grid_helper.php

示例7: get_sharethis_badge

/**
 * Returns the ShareThis integration code snippet.
 *
 * See: http://www.sharethis.com
 *
 * @package    Reditype
 * @subpackage helper
 * @author     Piers Warmers <piers@wranglers.com.au>
 * @param      array $options
 * @return     string
 */
function get_sharethis_badge($options = null)
{
    $string = '';
    $username = sfConfig::get('app_rt_social_networking_service_username', '');
    $option_string = '';
    use_javascript('http://w.sharethis.com/button/sharethis.js#publisher=' . $username);
    if (!is_null($options)) {
        $options['url'] = isset($options['url']) ? $options['url'] : '';
        $options['title'] = isset($options['title']) ? $options['title'] : '';
        $options['description'] = isset($options['description']) ? $options['description'] : '';
        $option_string = sprintf(' url="%s", title="%s", summary="%s" ', $options['url'], $options['title'], $options['description']);
        $option_string = sprintf('{ url: "%s", title: "%s", summary: "%s" }', $options['url'], $options['title'], $options['description']);
    }
    $string = <<<EOS
<script language="javascript" type="text/javascript">
\tSHARETHIS.addEntry({$option_string}, {button:true} );
</script>
EOS;
    return $string;
}
开发者ID:pierswarmers,项目名称:rtCorePlugin,代码行数:31,代码来源:rtSocialNetworkingHelper.php

示例8: _loadJsOamTools

function _loadJsOamTools()
{
    $debug = sfContext::getInstance()->getRequest()->getParameter('debug', false);
    $async_map = sfConfig::get('app_async_map', false);
    $lang = sfContext::getInstance()->getUser()->getCulture();
    if ($debug) {
        include_partial('documents/map_lib_include_debug');
    } else {
        use_stylesheet('/static/css/carto_base.css', 'custom');
        use_stylesheet('/static/css/popup.css', 'custom');
        if (!$async_map) {
            use_javascript('/static/js/carto/build/carto.min.js', 'maps');
        }
    }
    use_stylesheet('/static/css/carto.css', 'custom');
    if (!$async_map || $debug) {
        use_javascript("/static/js/carto/build/lang-{$lang}.min.js", 'maps');
        use_javascript('/static/js/popup.js', 'maps');
        use_javascript('/static/js/carto/embedded.js', 'maps');
    }
}
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:21,代码来源:OamMapHelper.php

示例9: init_assets_library_popup

function init_assets_library_popup()
{
    use_javascript('/sfAssetsLibraryPlugin/js/main', 'last');
    return javascript_tag('sfAssetsLibrary.init(\'' . url_for('sfAsset/list') . '?popup=2' . '\')');
}
开发者ID:rewrewby,项目名称:propertyx,代码行数:5,代码来源:sfAssetHelper.php

示例10: use_javascript

var viewPhoto = '<?php 
echo $viewPhoto;
?>
';
var MAXLENGTH = 140;
var fileMaxSize = '<?php 
echo opTimelinePluginUtil::getFileSizeMax();
?>
';
//]]>
</script>
<?php 
use_javascript('/opTimelinePlugin/js/jquery.timeline.js', 'last');
use_javascript('/opTimelinePlugin/js/jquery.timeago.js', 'last');
use_javascript('/opTimelinePlugin/js/timeline-loader.api.js', 'last');
use_javascript('/opTimelinePlugin/js/lightbox.js', 'last');
use_stylesheet('/opTimelinePlugin/css/lightbox.css', 'last');
use_stylesheet('/opTimelinePlugin/css/bootstrap.css', 'last');
use_stylesheet('/opTimelinePlugin/css/timeline.css', 'last');
?>

<?php 
include_partial('timeline/timelineTemplate');
?>

<div class="partsHeading"><h3><?php 
echo $activity->getMember()->getName();
?>
さんの<?php 
echo $op_term['activity'];
?>
开发者ID:aso,项目名称:opTimelinePlugin,代码行数:31,代码来源:showSuccess.php

示例11: include_title

echo include_title();
?>
        <?php 
$culture = $sf_user->getCulture();
$langFile = '/sf/calendar/lang/calendar-' . strtolower(substr($culture, 0, 2));
$jss = array('/sf/calendar/calendar', is_readable(sfConfig::get('sf_symfony_data_dir') . '/web/' . $langFile . '.js') ? $langFile : '/sf/calendar/lang/calendar-en', '/sf/calendar/calendar-setup');
foreach ($jss as $js) {
    echo use_javascript($js);
}
echo use_stylesheet('/sf/calendar/skins/dark/theme');
#echo use_javascript(sfConfig::get('sf_prototype_pmb_dir').'/js/prototype');
#echo use_javascript(sfConfig::get('sf_prototype_pmb_dir').'/js/effects');
#echo use_javascript(sfConfig::get('sf_prototype_pmb_dir').'/js/controls');
echo use_javascript(sfConfig::get('sf_prototype_web_dir') . '/js/prototype');
echo use_javascript(sfConfig::get('sf_prototype_web_dir') . '/js/effects');
echo use_javascript(sfConfig::get('sf_prototype_web_dir') . '/js/controls');
?>

        <link rel="shortcut icon" href=<?php 
echo image_path('favicon.ico');
?>
 />
        <style>
            div.overlay {
                position: absolute;
                top: 0;
                left: 0;
                z-index: 90;
                width: 0;
                height: 0;
                filter:alpha(opacity=80);
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:layout.php

示例12: public_path

?>
<script type="text/javascript" src="<?php 
echo public_path('../../scripts/jquery/ui/ui.draggable.js');
?>
"></script>
<script type="text/javascript" src="<?php 
echo public_path('../../scripts/jquery/ui/ui.resizable.js');
?>
"></script>

<?php 
use_stylesheet('../../../themes/orange/css/jquery/jquery.autocomplete.css');
use_stylesheet('../../../themes/orange/css/ui-lightness/jquery-ui-1.7.2.custom.css');
use_javascript('../../../scripts/jquery/ui/ui.core.js');
use_javascript('../../../scripts/jquery/ui/ui.dialog.js');
use_javascript('../../../scripts/jquery/jquery.autocomplete.js');
?>

<div id="validationMsg" style="margin-left: 16px; width: 470px"><?php 
echo isset($messageData) ? templateMessage($messageData) : '';
?>
</div>
<div class="outerbox"  style="width: 500px">
    <div class="maincontent">
        <div class="mainHeading">
            <h2><?php 
echo __('My Attendance Records');
?>
</h2>
        </div>
        <br class="clear">
开发者ID:THM068,项目名称:orangehrm,代码行数:31,代码来源:viewMyAttendanceRecordSuccess.php

示例13: use_stylesheet

<?php 
use_stylesheet('select');
use_javascript('tr-select');
include_partial('global/h1', array('txt' => 'Electrical Transformers Selection Process'));
?>
<div id='step_box'>
	<div class='step one'><img id='indy_1st' src='/images/industry-first-trans.png' alt="Industry's first transformer selection tool" /></div>
	<div id='step'>
		<h2 class='one'>Select Your KVA Rating <img id='tooltip' src='/images/help.png' alt='kVA Help' /></h2>
		

		
		<div id='tip' class='invisible'>
			<p class='_1st q'><span>Q)</span> What's the difference between KVA and VA rating?</p>
			<p><span>A)</span> 1 KVA = 1000 Volt Amps.  Therefore a 2500 VA transformer would be listed as 2.5 KVA.</p>
			<p class='q'><span>Q)</span> I don't see my specific KVA listed?</p>
			<p><span>A)</span> We have listed the most common KVA requirements.  It is commonly acceptable to oversize your transformer to the next largest size listed.  For example, if you require a 2.5 KVA transformer you should select a 3 KVA transformer, or if you require a 40 KVA transformer you should select 45 KVA. Make sure to size the associated circuit breaker appropriately.</p>
		</div>
		<div id='kva'>
			<div class='mod sm'>
				<p>0.25 &ndash; 1 KVA</p>
				<ul>
					<li class='m'><?php 
echo link_to('0.05', '@tr_select', array('query_string' => 'kva=0.05&step=kva', 'class' => 'ajax'));
?>
</li>
					<li><?php 
echo link_to('0.08', '@tr_select', array('query_string' => 'kva=0.08&step=kva', 'class' => 'ajax'));
?>
</li>
开发者ID:morganney,项目名称:livewire,代码行数:30,代码来源:selectSuccess.php

示例14: include_title

?>
    <?php 
include_title();
?>
    <link rel="shortcut icon" href="/favicon.ico" />
    <?php 
use_stylesheet('reset.css');
?>
    <?php 
use_stylesheet('header.css');
?>
    <?php 
use_stylesheet('mainstyles.css');
?>
    <?php 
use_javascript('header.js');
?>
    <script type="text/javascript" src="/js/jquery-1.10.2.min.js"></script>
    <?php 
include_stylesheets();
?>
    <?php 
include_javascripts();
?>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
</head>
<body>
    <?php 
include_partial("public/header");
?>
    <div class="page_title">
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:31,代码来源:layout_eclassroomsolutions.php

示例15: _WeekCalendar_common

function _WeekCalendar_common()
{
    use_javascript('/jquery-weekcalendar/jquery.weekcalendar.js', 'last');
    use_stylesheet('/jquery-weekcalendar/jquery.weekcalendar.css', 'first');
}
开发者ID:nvidela,项目名称:kimkelen,代码行数:5,代码来源:WeekCalendarHelper.php


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