function test_javascript_include_tag() { $this->assertEqual('<script src="mocked_stylesheet_directory/assets/javascripts/source.js" type="text/javascript"></script>', javascript_include_tag("source")); $this->assertEqual('<script src="mocked_stylesheet_directory/assets/javascripts/source.js" type="text/javascript"></script>' . "\n" . '<script src="http://welaika.com/another_source.js" type="text/javascript"></script>', javascript_include_tag("source", "http://welaika.com/another_source.js")); $this->assertEqual('<script src="mocked_stylesheet_directory/assets/javascripts/source.js" type="text/javascript" charset="utf-8"></script>', javascript_include_tag("source", array("charset" => "utf-8"))); $this->assertEqual('<script src="mocked_stylesheet_directory/assets/javascripts/source.js" type="text/javascript" charset="utf-8"></script>' . "\n" . '<script src="https://welaika.com/another_source.js" type="text/javascript" charset="utf-8"></script>', javascript_include_tag("source", "https://welaika.com/another_source.js", array("charset" => "utf-8"))); }
/** * Returns <script> tags with the url toward all javascripts configured in view.yml or added to the response object. * * You can use this helper to decide the location of javascripts in pages. * By default, if you don't call this helper, symfony will automatically include javascripts before </head>. * Calling this helper disables this behavior. * * @return string <script> tags */ function get_combined_javascripts() { if (!sfConfig::get('app_sfCombinePlugin_enabled', false)) { return get_javascripts(); } $response = sfContext::getInstance()->getResponse(); sfConfig::set('symfony.asset.javascripts_included', true); $configSfCombinePlugin['js'] = sfConfig::get('app_sfCombinePlugin_js', array()); $html = ''; $jsFiles = $include_tags = array(); foreach (array('first', '', 'last') as $position) { foreach ($response->getJavascripts($position) as $files => $options) { if (!in_array($files, $configSfCombinePlugin['js']['online']) && !in_array($files, $configSfCombinePlugin['js']['offline'])) { if (!is_array($files)) { $files = array($files); } $jsFiles = array_merge($jsFiles, $files); } else { $include_tags[] = javascript_include_tag(url_for($files)); } } } $key = _get_key($jsFiles); $include_tags[] = str_replace('.js', '', javascript_include_tag(url_for('sfCombine/js?key=' . $key))); return implode("", $include_tags); }
/** * Generates a HTML Script include Tag, refering to our amazon bucket * * @author Christian Weyand * @param string $pFilename * @param array() $pOptions * @return unknown_type */ function cdn_javascript_tag($pFilename, $pOptions = array()) { if (sfConfig::get("sf_environment") != "dev") { $pFilename = concatNameWithRevision($pFilename, 'css'); } return javascript_include_tag($pFilename, $pOptions); }
/** * Returns <script> tags for all javascripts configured in view.yml or added to the response object. * * You can use this helper to decide the location of javascripts in pages. * By default, if you don't call this helper, symfony will automatically include javascripts before </head>. * Calling this helper disables this behavior. * * @return string <script> tags */ function get_combined_javascripts() { if (!sfConfig::get('app_sfCombinePlugin_enabled', false)) { return get_javascripts(); } sfConfig::set('symfony.asset.javascripts_included', true); $html = ''; $jsFiles = array(); $regularJsFiles = array(); $response = sfContext::getInstance()->getResponse(); $config = sfConfig::get('app_sfCombinePlugin_js', array()); $doNotCombine = isset($config['combine_skip']) ? $config['combine_skip'] : array(); foreach ($response->getJavascripts() as $files => $options) { if (!is_array($files)) { $files = array($files); } // check for js files that should not be combined foreach ($files as $key => $value) { if (skip_asset($value, $doNotCombine)) { array_push($regularJsFiles, $value); unset($files[$key]); } } $jsFiles = array_merge($jsFiles, $files); } if (!empty($jsFiles)) { $html .= str_replace(array('.js', '.pjs'), '', javascript_include_tag(url_for('sfCombine/js?key=' . _get_key($jsFiles)))); } foreach ($regularJsFiles as $file) { $file = javascript_path($file); $html .= javascript_include_tag($file); } return $html; }
function renderMenu() { echo javascript_include_tag('sfShowHideMenu/ClickShowHideMenu.js'); echo stylesheet_tag('sfShowHideMenu/ClickShowHideMenu.css'); echo $this->buildMenuData(); $menu_js = "var clickMenu1 = new ClickShowHideMenu('click-menu1');\n clickMenu1.init();\n"; echo javascript_tag($menu_js); }
function renderHtml() { echo stylesheet_tag('sfToolbar/dhtmlXToolbar.css'); echo javascript_include_tag('sfToolbar/dhtmlXProtobar.js'); echo javascript_include_tag('sfToolbar/dhtmlXToolbar.js'); echo javascript_include_tag('sfToolbar/dhtmlXCommon.js'); echo $this->renderTable(); echo javascript_tag($this->buildData()); }
public function testJsIncludeTag() { $this->assertDomEqual(javascript_include_defaults(), '<script src="/js/prototype.js" type="text/javascript"></script> <script src="/js/controls.js" type="text/javascript"></script> <script src="/js/dragdrop.js" type="text/javascript"></script> <script src="/js/effects.js" type="text/javascript"></script>'); $this->assertDomEqual(javascript_include_tag('sortable'), '<script src="/js/sortable.js" type="text/javascript"></script>'); $this->assertDomEqual(javascript_include_tag(array('sortable', 'test.js')), '<script src="/js/sortable.js" type="text/javascript"></script> <script src="/js/test.js" type="text/javascript"></script>'); }
/** * Returns <script> tags for all javascripts for smartphone pages added to the response object. * * you can use this helper to decide the location of javascripts in pages. * by default, if you don't call this helper, openpne will automatically include javascripts before </head>. * calling this helper disables this behavior. * * @return string <script> tags * * @see get_javascripts() */ function op_smt_get_javascripts() { $response = sfContext::getInstance()->getResponse(); sfConfig::set('symfony.asset.javascripts_included', true); $html = ''; foreach ($response->getSmtJavascripts() as $file => $options) { $html .= javascript_include_tag($file, $options); } return $html; }
function javascript_include_tag($script_names) { if (is_array($script_names)) { $tags = ''; foreach ($script_names as $script) { $tags .= javascript_include_tag($script) . "\n"; } return $tags; } $url = is_external_url($script_names) ? $script_names : url_for("/javascripts/{$script_names}?v=" . TIPI::getVersion()); return '<script src="' . $url . '" type="text/javascript"></script>'; }
function renderMenu() { echo stylesheet_tag('sfTreeMenu/DynamicTree.css'); echo javascript_include_tag('sfTreeMenu/ie5.js'); echo javascript_include_tag('sfTreeMenu/DynamicTree.js'); echo $this->renderMenuData(); $append_js = <<<EOD \t\t var tree = new DynamicTree("tree"); tree.init(); \t\t EOD; echo javascript_tag($append_js); }
function printAssetPaths($assets, $plugin = '') { if (count($assets) > 0) { foreach ($assets as $key => $asset) { $assetType = substr($asset, strrpos($asset, '.') + 1); if ($plugin == '') { echo javascript_include_tag($asset); } elseif ($assetType == 'js') { echo javascript_include_tag(plugin_web_path($plugin, 'js/' . $asset)); } elseif ($assetType == 'css') { echo stylesheet_tag(plugin_web_path($plugin, 'css/' . $asset)); } else { echo $assetType; } } } }
function minify_get_javascripts($position_array = array('first', '', 'last'), $debug = false, $my_already_seen = array()) { $response = sfContext::getInstance()->getResponse(); $app_static_url = sfConfig::get('app_static_url'); $already_seen = $my_already_seen; $minify_files = array(); $external_files = array(); foreach ($position_array as $position) { foreach ($response->getJavascripts($position) as $files) { if (!is_array($files)) { $files = array($files); } $options = array_merge(array('type' => 'text/javascript')); foreach ($files as $file) { // be sure to normalize files with .js at the end $file .= substr($file, -3) === '.js' ? '' : '.js'; if (isset($already_seen[$file])) { continue; } $already_seen[$file] = 1; // check if the javascript is on this server // TODO better handle + what if user wants to precisely place the call?? if (preg_match('/http(s)?:\\/\\//', $file)) { $external_files[] = $file; break; } $file = javascript_path($file); $type = serialize($options); if (isset($minify_files[$type])) { array_push($minify_files[$type], $file); } else { $minify_files[$type] = array($file); } } } } $html = ''; foreach ($external_files as $file) { $html .= javascript_include_tag($file); } foreach ($minify_files as $options => $files) { $options = unserialize($options); $options['src'] = minify_get_combined_files_url($files, $debug); $html .= content_tag('script', '', $options) . "\n"; } return $html; }
/** * Renders the widget. * * @param string $name The element name * @param string $value The value displayed in this widget * @param array $attributes An array of HTML attributes to be merged with the default HTML attributes * @param array $errors An array of errors for the field * * @return string An HTML tag string * @see sfWidgetForm */ public function render($name, $value = null, $attributes = array(), $errors = array()) { if (!$this->getAttribute('size')) { $this->setAttribute('size', $this->getOption('with_time') ? 15 : 9); } $this->default_picker_options['timeFormat'] = $this->getOption('time_format'); $this->default_picker_options['dateFormat'] = $this->getOption('date_format'); $this->default_picker_options['showSecond'] = strstr($this->getOption('time_format'), 'ss') !== false; if ($timestamp = strtotime($value)) { $value = strtr($this->getOption('date_format'), array('yy' => date('Y', $timestamp), 'mm' => date('m', $timestamp), 'dd' => date('d', $timestamp), 'y' => date('y', $timestamp), 'm' => date('n', $timestamp), 'd' => date('j', $timestamp))); if ($this->getOption('with_time')) { $value .= ' ' . strtr($this->getOption('time_format'), array('hh' => date('H', $timestamp), 'mm' => date('i', $timestamp), 'ss' => date('s', $timestamp), 'h' => date('G', $timestamp), 'm' => intval(date('i', $timestamp)), 's' => intval(date('s', $timestamp)))); } } // Generate the datePicker javascript code $jq_picker_options = array_merge($this->default_picker_options, $this->getOption('jq_picker_options')); if (version_compare(PHP_VERSION, '5.3.0') >= 0) { $jq_picker_options = json_encode($jq_picker_options, JSON_FORCE_OBJECT); } else { $jq_picker_options = json_encode($jq_picker_options); } $jq_picker_options = str_replace('\\/', '/', $jq_picker_options); // Fix for: http://bugs.php.net/bug.php?id=49366 $pickerClass = $this->getOption('with_time') ? 'datetimepicker' : 'datepicker'; $id = $this->generateId($name); $attributes['class'] = 'sfDateTimePicker' . (isset($attributes['class']) ? ' ' . $attributes['class'] : ''); $html = parent::render($name, $value, $attributes, $errors); foreach ($this->getStylesheets() as $file => $options) { $html .= stylesheet_tag($file, $options); } foreach ($this->getJavaScripts() as $file) { $html .= javascript_include_tag($file); } $html .= <<<EOHTML <script type="text/javascript"> jQueryPicker(function(){ jQueryPicker("#{$id}").{$pickerClass}({$jq_picker_options}); // jQueryPicker(".ui-datepicker").draggable(); }); </script> EOHTML; return $html; }
function _include_javascripts($position_array = array('first', '', 'last'), $debug = false, $my_already_seen = array()) { $response = sfContext::getInstance()->getResponse(); $static_base_url = sfConfig::get('app_static_url'); $already_seen = $my_already_seen; $internal_files = array(); $external_files = array(); foreach ($position_array as $position) { foreach ($response->getJavascripts($position) as $files) { if (!is_array($files)) { $files = array($files); } foreach ($files as $file) { // be sure to normalize files with .js at the end $file .= substr($file, -3) === '.js' ? '' : '.js'; if (isset($already_seen[$file])) { continue; } $already_seen[$file] = 1; // check if the javascript is on this server // TODO better handle + what if user wants to precisely place the call?? if (preg_match('/http(s)?:\\/\\//', $file)) { $external_files[] = $file; break; } $file = javascript_path($file); $internal_files[] = $file; } } } $html = ''; foreach ($external_files as $file) { $html .= javascript_include_tag($file); } foreach ($internal_files as $file) { $prefix = $debug ? '/no' : ''; $ts = sfTimestamp::getTimestamp($file); if (!empty($ts)) { $file = '/' . $ts . $prefix . $file; } else { $file = $prefix . $file; } $html .= javascript_include_tag($static_base_url . $file); } return $html; }
function sw_get_javascripts() { $params = sfConfig::get('app_swToolbox_swCombine', array('version' => false)); $version = $params['version']; $response = sfContext::getInstance()->getResponse(); $included_files = $response->getCombinedAssets(); sfConfig::set('symfony.asset.javascripts_included', true); $html = ''; foreach ($response->getJavascripts() as $file => $options) { // avoid loading combined files if (in_array($file, $included_files)) { continue; } $file = $version ? $file . '?v=' . $version : $file; $html .= javascript_include_tag($file, $options); } return $html; }
function renderMenu() { echo $this->display_mode == "vertical" ? stylesheet_tag('sfDropDownMenu/vertical.css') : stylesheet_tag('sfDropDownMenu/horizontal.css'); echo javascript_include_tag('sfDropDownMenu/ie5.js'); echo javascript_include_tag('sfDropDownMenu/XulMenu.js'); $image_arrow1 = image_path('sfDropDownMenu/arrow1.gif'); $image_arrow2 = image_path('sfDropDownMenu/arrow2.gif'); $preload_image_js = <<<EOD \t\t /* preload images */ var arrow1 = new Image(4, 7); arrow1.src = "{$image_arrow1}"; var arrow2 = new Image(4, 7); arrow2.src = "{$image_arrow2}"; \t\t EOD; echo javascript_tag($preload_image_js); echo $this->renderMenuData(); }
/** * Get the combined Javascripts in script links. Can get all groups or a * selection. Calling this method will stop symfony automatically inserting * scripts * * * @param mixed $groupsUse (Optional) A string or array of groups to * include or exclude. Null for this to be * ignored. Default null. * @param int $groupsUseType (Optional) The type of grouping either * sfCombinePlusManager::GROUP_INCLUDE or * sfCombinePlusManager::GROUP_EXCLUDE. * These dictate whether the group(s) in * the previous argument should be marked * as used or every group marked as used. * Default sfCombinePlusManager::GROUP_INCLUDE * @param bool $onlyUnusedGroups (Optional) Only use unused groups. Default * true. * @param bool $markGroupsUsed (Optional) Mark the groups that are used * as used. Default true. * @return string */ function get_combined_javascripts($groups = null, $groupType = sfCombinePlusManager::GROUP_INCLUDE, $onlyUnusedGroups = true, $markGroupsUsed = true) { if (!sfConfig::get('app_sfCombinePlusPlugin_enabled', false)) { return get_javascripts(); } $manager = sfCombinePlusManager::getJsManager(); sfConfig::set('symfony.asset.javascripts_included', true); $response = sfContext::getInstance()->getResponse(); $config = sfConfig::get('app_sfCombinePlusPlugin_js', array()); $doNotCombine = isset($config['combine_skip']) ? $config['combine_skip'] : array(); $manager->setSkips(array_merge($manager->getSkips(), $doNotCombine)); $groupedFiles = $manager->getAssetsByGroup($response->getJavascripts(), $config['combine'], $groups, $groupType, $onlyUnusedGroups, $markGroupsUsed); $html = ''; foreach ($groupedFiles as $fileDetails) { if (!$fileDetails['combinable']) { $html .= javascript_include_tag(javascript_path($fileDetails['files']), $fileDetails['options']); } else { $route = isset($config['route']) ? $config['route'] : 'sfCombinePlus'; $html .= javascript_include_tag(url_for('@' . $route . '?module=sfCombinePlus&action=js&' . sfCombinePlusUrl::getUrlString($fileDetails['files'])), $fileDetails['options']); } } return $html; }
<!DOCTYPE html> <html> <head> <title><?php echo (isset($page) && !empty($page) ? $page->getAbsTitle() : ($title ? $title : 'Page Not Found')); ?> | <?php echo SITE_NAME; ?> </title> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <?php echo stylesheet_include_tag(array('book.css', 'main.css', 'highlight.css', 'tipsy.css')); echo javascript_include_tag(array('jquery-1.5.min.js', 'jquery.tipsy.js', 'book.js')); ?> <meta name="description" content="<?php echo SITE_DESC; ?>" /> <link rel="alternate" type="application/rss+xml" title="<?php echo SITE_NAME;?>" href="<?php echo url_for("/feed/"); ?>" /> <link rel="shortcut icon" href="<?php echo url_for("/favicon.ico"); ?>" type="image/vnd.microsoft.icon"> <!--[if IE]><?php echo stylesheet_include_tag('ie.css'); ?><![endif]--> </head> <body id='book'> <?php SimpieView::include_partial("../templates/layout/_header.php"); ?> <div id="wrapper"> <div id="book_header"> <h1><a href='<?php echo url_for("/"); ?>'><span>深入理解PHP内核<span></a></h1> <p>Thinking In PHP Internal</p> </div> <div id="book_main" class="clearfix"> <div class="<?php if($is_detail_view) {echo 'inner-wrapper';} ?> clearfix"> <div id="<?php echo ($is_detail_view ? 'book_content' : 'book_index'); ?>" > <?php SimpieView::include_partial("../templates/layout/_book_tools.php", array('page' => $page, 'extra' => array('title' => ($title ? $title : '')))); ?> <div id="book_body" class="inner-containner"> <?php echo $layout_content; ?> <?php if($is_detail_view): ?> <?php SimpieView::include_partial("../templates/layout/_book_navor.php", array('page' => $page)); ?>
/** * Returns <script> tags for all javascripts associated with the given form. * * The scripts are set by implementing the getJavaScripts() method in the * corresponding widget. * * <code> * class MyWidget extends sfWidgetForm * { * public function getJavaScripts() * { * return array('/path/to/a/file.js'); * } * } * </code> * * @return string <script> tags */ function get_javascripts_for_form(sfForm $form) { $html = ''; foreach ($form->getJavascripts() as $file) { $html .= javascript_include_tag($file); } return $html; }
<?php require_once '/Users/effel/Development/stonebridge/wp-content/plugins/wordless/vendor/phamlp/haml/HamlHelpers.php'; ?> <!--Charset --><meta content="text/html;charset=UTF-8" http-equiv="Content-type" /><meta content="width=device-width, initial-scale=1" name="viewport" /><!--Title --><title> <?php echo bloginfo('title') . wp_title(); ?> </title><!--Stylesheets --><!--screen.css is loaded by default with wp_head() function. See config/initializers/default_hooks.php for details --><!--HTML5 Shiv --> <!--[if lt IE 9]> <?php echo javascript_include_tag("http://html5shiv.googlecode.com/svn/trunk/html5.js"); ?> <![endif]--> <?php wp_head();
/** * Returns <script> tags for all javascripts configured in view.yml or added to the response object. * * You can use this helper to decide the location of javascripts in pages. * By default, if you don't call this helper, symfony will automatically include javascripts before </head>. * Calling this helper disables this behavior. * * @return string <script> tags */ function get_javascripts() { $response = sfContext::getInstance()->getResponse(); $response->setParameter('javascripts_included', true, 'symfony/view/asset'); $already_seen = array(); $html = ''; foreach (array('first', '', 'last') as $position) { foreach ($response->getJavascripts($position) as $files) { if (!is_array($files)) { $files = array($files); } foreach ($files as $file) { $file = javascript_path($file); if (isset($already_seen[$file])) { continue; } $already_seen[$file] = 1; $html .= javascript_include_tag($file); } } } return $html; }
<td class="name"><span>{%=file.name%}</span></td> <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td> <td class="error" colspan="2"><span class="label label-important">Error</span> {%=file.error%}</td> {% } else { %} <td class="preview">{% if (file.thumbnail_url) { %} <a href="{%=file.url%}" title="{%=file.name%}" rel="gallery" download="{%=file.name%}"><img src="{%=file.thumbnail_url%}"></a> {% } %}</td> <td class="name"> <a href="{%=file.url%}" title="{%=file.name%}" rel="{%=file.thumbnail_url&&'gallery'%}" download="{%=file.name%}">{%=file.name%}</a> </td> <td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td> <td></td> {% } %} <td class="delete" colspan="2" style="text-align:right"> <button title="Delete" class="btn btn-danger" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}"> <i class="icon-trash icon-white"></i> <span>Delete</span> </button> </td> </tr> {% } %} {% } %} </script> <?php if ($widget->getOption('include_js')) { foreach ($widget->getJavaScripts() as $javascript) { echo javascript_include_tag($javascript); } }
?> <?php } ?> <input id="submit" type="submit" value="<?php echo __('Save'); ?> " /> </td> </tr> </tfoot> </table> </form> <?php echo javascript_include_tag('catalogue_people.js'); ?> <script type="text/javascript"> $(document).ready(function () { function addMember(people_ref, people_name) { info = 'ok'; $('#exp_member_table tbody tr').each(function() { if($(this).find('input[id$=\"_people_ref\"]').val() == people_ref) info = 'bad' ; }); if(info != 'ok') return false; hideForRefresh($('.ui-tooltip-content .page')) ;
<?php if (strstr($browser, "MSIE 8.0")) { ?> <link href="<?php echo public_path('../../themes/orange/IE_style.css'); ?> " rel="stylesheet" type="text/css"/> <?php } else { ?> <?php echo stylesheet_tag('../orangehrmPimPlugin/css/viewUsTaxExemptionsSuccess'); ?> <?php } echo javascript_include_tag('../orangehrmPimPlugin/js/viewUsTaxExemptionsSuccess'); ?> <script type="text/javascript"> //<![CDATA[ //we write javascript related stuff here, but if the logic gets lengthy should use a seperate js file var lang_edit = "<?php echo __("Edit"); ?> "; var lang_save = "<?php echo __("Save"); ?> "; var lang_negativeAmount = "<?php echo __("Should be a positive number");
* OrangeHRM is free software; you can redistribute it and/or modify it under the terms of * the GNU General Public License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with this program; * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA */ ?> <?php echo javascript_include_tag(plugin_web_path('orangehrmTimePlugin', 'js/viewTimesheet')); ?> <?php $noOfColumns = sizeof($sf_data->getRaw('rowDates')); $width = 350 + $noOfColumns * 75; $actionName = sfContext::getInstance()->getActionName(); ?> <style type="text/css"> #timeComment { width: 365px; margin-bottom: 5px; } </style> <?php
/** * Alters the response upon an event replacing the temp css tag and temp js tag * with the actual stylesheets and javascripts items read from the response. * @param sfEvent $event * @param string $response * @return string the altered response content */ public static function alterResponse(sfEvent $event, $response) { $self = self::getInstance(); $self->getContext()->getConfiguration()->loadHelpers('Asset'); $subject = $event->getSubject(); // Stylesheets $css = ''; foreach ($subject->getStylesheets() as $file => $options) { $css .= stylesheet_tag($file, $options); } $tmpCssTag = sfConfig::get('app_sf_assets_manager_plugin_alter_response_tempcsstag'); // Javascripts $js = ''; foreach ($subject->getJavascripts() as $file => $options) { $js .= javascript_include_tag($file, $options); } $tmpJsTag = sfConfig::get('app_sf_assets_manager_plugin_alter_response_tempjstag'); $altered = preg_replace(sprintf('`%s`', $tmpCssTag), $css, $response); return preg_replace(sprintf('`%s`', $tmpJsTag), $js, $altered); }
<link href="<?php echo public_path('../../themes/orange/css/ui-lightness/jquery-ui-1.7.2.custom.css'); ?> " rel="stylesheet" type="text/css"/> <script type="text/javascript" src="<?php echo public_path('../../scripts/jquery/ui/ui.core.js'); ?> "></script> <script type="text/javascript" src="<?php echo public_path('../../scripts/jquery/ui/ui.datepicker.js'); ?> "></script> <?php echo stylesheet_tag('orangehrm.datepicker.css'); echo javascript_include_tag('orangehrm.datepicker.js'); ?> <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');
$clientId = 427; break; } } else { $randomize = mt_rand(0, 1); switch ($randomize) { case 1: // Регистрация + AMT $clientId = 418; break; default: // Тиньков $clientId = 427; break; } } ?> <dl id="advertisement"> <dt>реклама</dt> <dd> <div id="bannerWrapper"> <div class="inside" style="text-align:center;"> <?php echo javascript_include_tag(sprintf($templateUrl, $clientId)); ?> </div> </div> </dd> </dl>
<?php echo javascript_include_tag('jquery.tooltip.js'); use_javascript(plugin_web_path('orangehrmAdminPlugin', '/js/viewCompanyStructureSuccess')); ?> <style type="text/css"> p { margin-top: 10px; } </style> <div class="box"> <div class="head"> <h1><?php echo __("Organization Structure"); ?> </h1> </div> <div class="inner" > <div id="messageDiv"></div> <?php if ($isOrganizationNameSet) { ?> <?php echo $listForm; ?> <ol id="divCompanyStructureContainer"> <?php $tree->render();
function _a_get_assets_body($type, $assets) { $gzip = sfConfig::get('app_a_minify_gzip', false); sfConfig::set('symfony.asset.' . $type . '_included', true); $html = ''; // We need our own copy of the trivial case here because we rewrote the asset list // for stylesheets after LESS compilation, and there is no way to // reset the list in the response object if (!sfConfig::get('app_a_minify', false)) { // This branch is seen only for CSS, because javascript calls the original Symfony // functionality when minify is off foreach ($assets as $file => $options) { $html .= stylesheet_tag($file, $options); } return $html; } $sets = array(); foreach ($assets as $file => $options) { if (preg_match('/^http(s)?:/', $file) || isset($options['data-minify']) && $options['data-minify'] === 0) { // Nonlocal URL or minify was explicitly shut off. // Don't get cute with it, otherwise things // like Addthis and ckeditor don't work if ($type === 'stylesheets') { $html .= stylesheet_tag($file, $options); } else { $html .= javascript_include_tag($file, $options); } continue; } /* * * Guts borrowed from stylesheet_tag and javascript_tag. We still do a tag if it's * a conditional stylesheet * */ $absolute = false; if (isset($options['absolute']) && $options['absolute']) { unset($options['absolute']); $absolute = true; } $condition = null; if (isset($options['condition'])) { $condition = $options['condition']; unset($options['condition']); } if (!isset($options['raw_name'])) { if ($type === 'stylesheets') { $file = stylesheet_path($file, $absolute); } else { $file = javascript_path($file, $absolute); } } else { unset($options['raw_name']); } if (is_null($options)) { $options = array(); } if ($type === 'stylesheets') { $options = array_merge(array('rel' => 'stylesheet', 'type' => 'text/css', 'media' => 'screen', 'href' => $file), $options); } else { $options = array_merge(array('type' => 'text/javascript', 'src' => $file), $options); } if (null !== $condition) { $tag = tag('link', $options); $tag = comment_as_conditional($condition, $tag); $html .= $tag . "\n"; } else { unset($options['href'], $options['src']); $optionGroupKey = json_encode($options); $set[$optionGroupKey][] = $file; } // echo($file); // $html .= "<style>\n"; // $html .= file_get_contents(sfConfig::get('sf_web_dir') . '/' . $file); // $html .= "</style>\n"; } // CSS files with the same options grouped together to be loaded together foreach ($set as $optionsJson => $files) { $groupFilename = aAssets::getGroupFilename($files); $groupFilename .= $type === 'stylesheets' ? '.css' : '.js'; if ($gzip) { $groupFilename .= 'gz'; } $dir = aFiles::getUploadFolder(array('asset-cache')); if (!file_exists($dir . '/' . $groupFilename)) { $content = ''; foreach ($files as $file) { $path = null; if (sfConfig::get('app_a_stylesheet_cache_http', false)) { $url = sfContext::getRequest()->getUriPrefix() . $file; $fileContent = file_get_contents($url); } else { $path = sfConfig::get('sf_web_dir') . $file; $fileContent = file_get_contents($path); } if ($type === 'stylesheets') { $options = array(); if (!is_null($path)) { // Rewrite relative URLs in CSS files. // This trick is available only when we don't insist on // pulling our CSS files via http rather than the filesystem // dirname would resolve symbolic links, we don't want that $fdir = preg_replace('/\\/[^\\/]*$/', '', $path); $options['currentDir'] = $fdir; $options['docRoot'] = sfConfig::get('sf_web_dir'); } if (sfConfig::get('app_a_minify', false)) { $fileContent = Minify_CSS::minify($fileContent, $options); } } else { // Trailing carriage return makes behavior more consistent with // JavaScript's behavior when loading separate files. For instance, // a missing trailing semicolon should be tolerated to the same // degree it would be with separate files. The minifier is not // a lint tool and should not surprise you with breakage $fileContent = JSMin::minify($fileContent) . "\n"; } $content .= $fileContent; } if ($gzip) { _gz_file_put_contents($dir . '/' . $groupFilename . '.tmp', $content); } else { file_put_contents($dir . '/' . $groupFilename . '.tmp', $content); } @rename($dir . '/' . $groupFilename . '.tmp', $dir . '/' . $groupFilename); } $options = json_decode($optionsJson, true); // Use stylesheet_path and javascript_path so we can respect relative_root_dir if ($type === 'stylesheets') { $options['href'] = stylesheet_path(sfConfig::get('app_a_assetCacheUrl', '/uploads/asset-cache') . '/' . $groupFilename); $html .= tag('link', $options); } else { $options['src'] = javascript_path(sfConfig::get('app_a_assetCacheUrl', '/uploads/asset-cache') . '/' . $groupFilename); $html .= content_tag('script', '', $options); } } return $html; }