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


PHP drupal_add_js函数代码示例

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


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

示例1: phptemplate_settings

/**
 * Implementation of THEMEHOOK_settings() function.
 *
 * @param $saved_settings
 *   array An array of saved settings for this theme.
 * @return
 *   array A form array.
 */
function phptemplate_settings($saved_settings)
{
    // Empty the cached css...
    cache_clear_all('abessive_custom_css', 'cache');
    $form = array();
    require_once path_to_theme() . '/abessive_settings.php';
    // Add Farbtastic color picker
    drupal_add_css('misc/farbtastic/farbtastic.css', 'module', 'all', FALSE);
    drupal_add_js('misc/farbtastic/farbtastic.js');
    drupal_add_js(path_to_theme() . '/theme-settings.js');
    $defaults = _abessive_default_settings();
    $settings = array_merge($defaults, $saved_settings);
    $form['abessive_picker'] = array('#type' => 'markup', '#value' => '<div id="picker"></div>');
    $form['abessive_background_color'] = array('#type' => 'textfield', '#title' => t('Background Color'), '#description' => t('What colour should the body background behind all the containers be? Default: %val', array('%val' => $defaults['abessive_background_color'])), '#default_value' => $settings['abessive_background_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field'));
    $form['abessive_border_color'] = array('#type' => 'textfield', '#title' => t('Border Color'), '#description' => t('What colour should the border around all the containers be? Default: %val', array('%val' => $defaults['abessive_border_color'])), '#default_value' => $settings['abessive_border_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field'));
    $form['abessive_content_background_color'] = array('#type' => 'textfield', '#title' => t('Content Background Color'), '#description' => t('What colour should the background of all the containers be? Default: %val', array('%val' => $defaults['abessive_content_background_color'])), '#default_value' => $settings['abessive_content_background_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field', 'abessive_calculate_gradient'));
    $form['abessive_content_background_color']['abessive_r5'] = $form['abessive_content_background_color']['abessive_r4'] = $form['abessive_content_background_color']['abessive_r3'] = $form['abessive_content_background_color']['abessive_r2'] = array('#type' => 'value', '#default_value' => 0);
    $form['abessive_text_color'] = array('#type' => 'textfield', '#title' => t('Text Color'), '#description' => t('What colour should the text be? Default: %val', array('%val' => $defaults['abessive_text_color'])), '#default_value' => $settings['abessive_text_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field'));
    $form['abessive_link_color'] = array('#type' => 'textfield', '#title' => t('Hyperlink Color'), '#description' => t('What colour should hyperlinks be? Default: %val', array('%val' => $defaults['abessive_link_color'])), '#default_value' => $settings['abessive_link_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field'));
    $form['abessive_link_hover_color'] = array('#type' => 'textfield', '#title' => t('Hyperlink Hover Color'), '#description' => t('What colour should hyperlinks be when hovered over? Default: %val', array('%val' => $defaults['abessive_link_hover_color'])), '#default_value' => $settings['abessive_link_hover_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field'));
    $form['abessive_link_active_color'] = array('#type' => 'textfield', '#title' => t('Hyperlink Active Color'), '#description' => t('What colour should active hyperlinks be? Default: %val', array('%val' => $defaults['abessive_link_active_color'])), '#default_value' => $settings['abessive_link_active_color'], '#size' => 7, '#maxlength' => 7, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#attributes' => array('class' => 'form-item-use-colorpicker'), '#element_validate' => array('abessive_validate_hex_field'));
    $form['abessive_left_width'] = array('#type' => 'textfield', '#title' => t('Left Column Width'), '#description' => t('How wide should the left column be? Default: %val', array('%val' => $defaults['abessive_left_width'])), '#default_value' => $settings['abessive_left_width'], '#size' => 3, '#maxlength' => 3, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#field_suffix' => 'px', '#element_validate' => array('abessive_validate_numeric_field'));
    $form['abessive_right_width'] = array('#type' => 'textfield', '#title' => t('Right Column Width'), '#description' => t('How wide should the right column be? Default: %val', array('%val' => $defaults['abessive_right_width'])), '#default_value' => $settings['abessive_right_width'], '#size' => 3, '#maxlength' => 3, '#prefix' => '<div class="container-inline">', '#suffix' => '</div>', '#field_suffix' => 'px', '#element_validate' => array('abessive_validate_numeric_field'));
    $form['#submit'][] = 'abessive_submit_settings';
    return $form;
}
开发者ID:hoangbktech,项目名称:bhl-bits,代码行数:34,代码来源:theme-settings.php

示例2: lamtech_preprocess_html

function lamtech_preprocess_html(&$vars)
{
    drupal_add_html_head_link(array('href' => 'http://fonts.googleapis.com/css?family=Roboto:300', 'rel' => 'stylesheet', 'type' => 'text/css'));
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/html-elements.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/forms.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/page.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/comments.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/views.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/forums.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/fields.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/blocks.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/css/navigation.css');
    //  drupal_add_css(drupal_get_path('theme', 'lamtech') . '/bootstrap/css/bootstrap.min.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/bootstrap/css/bootstrap-theme.min.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/responsive.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/lamtech.bootstrap.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/lamtech.core.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/lamtech.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/lamtech.common.css', array('group' => 1));
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/lamtech.typography.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/lamtech.forms.css');
    drupal_add_css(drupal_get_path('theme', 'lamtech') . '/tpl/anb/css/off-canvas.css');
    drupal_add_js(drupal_get_path('theme', 'lamtech') . '/bootstrap/js/bootstrap.js');
    drupal_add_js(drupal_get_path('theme', 'lamtech') . '/js/jquery.smooth-scroll.js');
}
开发者ID:LamTechConsult,项目名称:lamtechsl,代码行数:25,代码来源:template.php

示例3: stability_process_page

/**
 * Implementation of hook_preprocess_page().
 */
function stability_process_page(&$variables)
{
    global $user;
    $variables['login_account_links'] = '';
    if (theme_get_setting('login_account_links') || module_exists('uc_cart')) {
        $output = '';
        if (theme_get_setting('login_account_links')) {
            $output .= '<span class="login">
        <i class="fa fa-lock"></i> ' . l($user->uid ? t('My Account') : t('Login'), 'user') . '
      </span>';
            $output .= $user->uid ? '<span class="logout"><i class="fa fa-sign-out"></i> ' . l(t('Logout'), 'user/logout') . '</span>' : '';
            $output .= !$user->uid ? '<span class="register"><i class="fa fa-pencil-square-o"></i>' . t('Not a Member?') . ' ' . l(t('Register'), 'user/register') . '</span>' : '';
        }
        if (module_exists('uc_cart')) {
            $output .= '<span class="cart">
        <i class="fa fa-shopping-cart"></i> ' . l(t('Shopping Cart'), 'cart') . '
      </span>';
        }
        $variables['login_account_links'] = '
      <div class="header-top-right">
        ' . $output . '
      </div>';
    }
    $header_top_menu_tree = module_exists('i18n_menu') ? i18n_menu_translated_tree('menu-header-top-menu') : menu_tree('menu-header-top-menu');
    $variables['header_top_menu_tree'] = drupal_render($header_top_menu_tree);
    // Process Slideshow Sub Header
    if (theme_get_setting('sub_header') == 5 || arg(2) == 'sub-header' && arg(3) == '5') {
        drupal_add_js(drupal_get_path('theme', 'stability') . '/vendor/jquery.glide.min.js');
    }
    if (theme_get_setting('retina')) {
        drupal_add_js(drupal_get_path('theme', 'stability') . '/vendor/jquery.retina.js');
    }
    drupal_add_js(array('stability' => array('flickr_id' => theme_get_setting('flickr_id'), 'logo_sticky' => theme_get_setting('logo_sticky'))), 'setting');
}
开发者ID:harryboulderdash,项目名称:PlayGFC,代码行数:37,代码来源:template.php

示例4: mvp_preprocess_html

function mvp_preprocess_html(&$vars)
{
    drupal_add_js(drupal_get_path('theme', 'mvp') . '/js/modernizr.min.js', array('scope' => 'header_scripts', 'every_page' => TRUE, 'weight' => 0));
    drupal_add_js(drupal_get_path('theme', 'mvp') . '/js/jquery-1.8.2.min.js', array('scope' => 'header', 'group' => JS_LIBRARY, 'every_page' => TRUE, 'weight' => 0));
    drupal_add_js(drupal_get_path('theme', 'mvp') . '/js/jquery-ui-1.10.4.min.js', array('scope' => 'header', 'group' => JS_LIBRARY, 'every_page' => TRUE, 'weight' => 3));
    if (request_uri() == '/content-dashboard') {
        drupal_add_js('(function($) {
      Drupal.behaviors.chosenSelects = {
        attach: function(context, settings) {
          $(".views-widget-filter-edit-type select#edit-type").chosen({
            width: "200px",
            placeholder_text_multiple: "Enter in a Content Type"
          });
          $(".views-widget-filter-edit-status-1 select").chosen({
            width: "200px",
            disable_search_threshold: 3
          });
        }
      };
    })(jQuery);', array('type' => 'inline', 'group' => JS_THEME, 'weight' => 2, 'defer' => TRUE));
    }
    $node = menu_get_object();
    if ($node && $node->nid) {
        $vars['theme_hook_suggestions'][] = 'html__' . $node->type;
    }
}
开发者ID:stevengrimaldo,项目名称:myvoipprovider,代码行数:26,代码来源:template.php

示例5: progressive_sub_preprocess_html

/**
 * Implementation of hook_preprocess_html().
 */
function progressive_sub_preprocess_html(&$variables)
{
    global $language;
    $css_customizer = theme_get_setting('skin') . '-pages-customizer.css';
    drupal_add_css(drupal_get_path('theme', 'progressive') . '/css/customizer/' . $css_customizer, array('group' => CSS_THEME));
    drupal_add_css(drupal_get_path('theme', 'progressive_sub_sub') . '/css/custom.css');
    if ($language->dir == 'rtl') {
        drupal_add_css(drupal_get_path('theme', 'progressive') . '/css/drupal-rtl.css', array('group' => CSS_THEME));
    }
    drupal_add_js(array('theme_path' => drupal_get_path('theme', 'progressive'), 'basePath' => base_path(), 'progressive' => array('mobile_menu_toggle' => theme_get_setting('mobile_menu_toggle')), 'ubercart_currency' => variable_get('uc_currency_sign')), 'setting');
    // Page 404
    if (arg(0) == 'page-404-bg') {
        $variables['classes_array'][] = 'page-404-promo';
    }
    // Login Page
    global $user;
    if (arg(0) == 'user' && (in_array(arg(1), array('register', 'password', 'login')) || arg(1) == '' && !$user->uid)) {
        $variables['classes_array'][] = 'page-login-promo';
    }
    if (theme_get_setting('boxed') || $_GET['q'] == 'node/107' && strpos($_SERVER['HTTP_HOST'], 'nikadevs') !== FALSE) {
        $variables['classes_array'][] = 'boxed';
    }
    $layout = _nikadevs_cms_get_active_layout();
    $one_page = isset($layout['settings']['one_page']) && $layout['settings']['one_page'] ? 1 : 0;
    if (theme_get_setting('header_top_menu') && !in_array($_GET['q'], array('user/login', 'user/register', 'user/password')) && !$one_page) {
        $variables['classes_array'][] = 'hidden-top';
    }
    if ($one_page) {
        $variables['classes_array'][] = 'one-page';
    }
}
开发者ID:ivanvincent,项目名称:imsv_fe,代码行数:34,代码来源:template.php

示例6: cu_omega_preprocess_html

/**
 * Implements hook_preprocess_html().
 */
function cu_omega_preprocess_html(&$vars)
{
    // Remove page-node- body class
    foreach ($vars['attributes_array']['class'] as $key => $value) {
        if ($value == 'page-node-') {
            unset($vars['attributes_array']['class'][$key]);
        }
    }
    $vars['head_title_array']['slogan'] = 'University of Colorado Boulder';
    $vars['head_title'] = implode(' | ', $vars['head_title_array']);
    //$vars['attributes_array']['class'][]='banner-white';
    $headings = theme_get_setting('headings') ? theme_get_setting('headings') : 'headings-bold';
    $vars['attributes_array']['class'][] = $headings;
    $page_title_image_background = theme_get_setting('page_title_image_background') ? theme_get_setting('page_title_image_background') : 'page-title-image-background-white';
    $vars['attributes_array']['class'][] = $page_title_image_background;
    $icon_color = theme_get_setting('block_icons_color') ? theme_get_setting('block_icons_color') : 'block-icons-inherit';
    $vars['attributes_array']['class'][] = $icon_color;
    drupal_add_js(drupal_get_path('theme', 'cu_omega') . '/js/mobile-menu-toggle.js');
    drupal_add_js(drupal_get_path('theme', 'cu_omega') . '/js/track-focus.js', array('scope' => 'footer'));
    $element = array('#tag' => 'link', '#attributes' => array('href' => '//fast.fonts.net/cssapi/86696b99-fb1a-4964-9676-9233fb4fca8f.css', 'rel' => 'stylesheet', 'type' => 'text/css'));
    if (variable_get('use_fonts', TRUE)) {
        drupal_add_html_head($element, 'web_fonts');
    }
    // Turn off IE Compatibility Mode
    $element = array('#tag' => 'meta', '#attributes' => array('http-equiv' => 'X-UA-Compatible', 'content' => 'IE=edge'));
    drupal_add_html_head($element, 'ie_compatibility_mode');
    // Check to see if site is responsive or not...
    $responsive = theme_get_setting('alpha_responsive') ? 'is-responsive' : 'is-not-responsive';
    $vars['attributes_array']['class'][] = $responsive;
}
开发者ID:CuBoulder,项目名称:cu-express-drops-7,代码行数:33,代码来源:template.php

示例7: desenalaw_preprocess_page

function desenalaw_preprocess_page(&$vars)
{
    if (request_path() == 'contact') {
        $googleMapsAPIKey = 'AIzaSyDzMhdB1eRFcpPFxwe4A0FG7M7FGc0YtVY';
        drupal_add_js("https://maps.googleapis.com/maps/api/js?key={$googleMapsAPIKey}", 'external');
    }
}
开发者ID:CCI-Studios,项目名称:De-Sena-Law-2016,代码行数:7,代码来源:template.php

示例8: omega_alpha_preprocess_html

/**
 * Implements hook_preprocess_html().
 */
function omega_alpha_preprocess_html(&$vars)
{
    $theme = alpha_get_theme();
    $vars['doctype'] = '<!DOCTYPE html>' . "\n";
    $vars['rdf'] = new stdClass();
    $vars['rdf']->version = '';
    $vars['rdf']->namespaces = '';
    $vars['rdf']->profile = '';
    // Serialize RDF Namespaces into an RDFa 1.1 prefix attribute.
    if ($vars['rdf_namespaces']) {
        $prefixes = array();
        foreach (explode("\n  ", ltrim($vars['rdf_namespaces'])) as $namespace) {
            // Remove xlmns: and ending quote and fix prefix formatting.
            $prefixes[] = str_replace('="', ': ', substr($namespace, 6, -1));
        }
        $vars['rdf']->namespaces = ' prefix="' . implode(' ', $prefixes) . '"';
    }
    if (alpha_library_active('omega_mediaqueries')) {
        $layouts = array();
        if (isset($theme->grids[$theme->settings['grid']])) {
            foreach ($theme->grids[$theme->settings['grid']]['layouts'] as $layout) {
                if ($layout['enabled']) {
                    $layouts[$layout['layout']] = $layout['media'];
                }
            }
            drupal_add_js(array('omega' => array('layouts' => array('primary' => $theme->grids[$theme->settings['grid']]['primary'], 'order' => array_keys($layouts), 'queries' => $layouts))), 'setting');
        }
    }
}
开发者ID:aakb,项目名称:smartaarhus_dk,代码行数:32,代码来源:template.php

示例9: gitp_preprocess_page

/** hook_preprocess_page(&$variables) */
function gitp_preprocess_page(&$variables)
{
    $path = drupal_get_path('theme', 'gitp');
    if ($variables['theme_hook_suggestions'][0] == 'page__taxonomy') {
        drupal_add_js('/' . $path . '/assets/js/init-bs-popover.js', 'file');
    }
}
开发者ID:pioneerroad,项目名称:gitp-theme,代码行数:8,代码来源:template-preprocess.php

示例10: equinox_preprocess_page

/**
 * @file template.php
 * This file provides theme functions to override or extend Drupal behavior.
 *
 * @author Raymond Jelierse
 */

function equinox_preprocess_page(&$variables) {
  // Default JavaScript settings
  $theme_settings = array(
      'carouselTimeout' => 10000,
      'carouselTransitionSpeed' => 500,
  );

  // Refresh theme settings
  theme_get_setting('', TRUE);

  if (theme_get_setting('carousel_timeout') !== NULL) {
    $theme_settings['carouselTimeout'] = intval(theme_get_setting('carousel_timeout'));
  }

  if (theme_get_setting('carousel_transition_speed') !== NULL) {
    $theme_settings['carouselTransitionSpeed'] = intval(theme_get_setting('carousel_transition_speed'));
  }

  drupal_add_js(array('equinox' => $theme_settings), 'setting');
  $variables['scripts'] = drupal_get_js();

  // Create user menu
  $variables['user_menu'] = theme('links', menu_navigation_links('navigation'), array('id' => 'user-links-menu', 'class' => 'links user-links'));

  // Add check variable for administration section.
  $variables['is_admin'] = (arg(0) == 'admin');

  // Remove breadcrumb if not in the administration section.
  if (!$variables['is_admin']) {
    $variables['breadcrumb'] = '';
  }

  // Multilanguage site logo
  $variables['logo'] = sprintf('%s/images/logo-%s.png', url(drupal_get_path('theme', 'equinox')), $variables['language']->language);
}
开发者ID:rjelierse,项目名称:equinox,代码行数:42,代码来源:template.php

示例11: omega_alpha_preprocess_html

/**
 * Implements hook_preprocess_html().
 */
function omega_alpha_preprocess_html(&$vars)
{
    $theme = alpha_get_theme();
    $vars['rdf'] = new stdClass();
    if (module_exists('rdf')) {
        $vars['doctype'] = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML+RDFa 1.1//EN">' . "\n";
        $vars['rdf']->version = ' version="HTML+RDFa 1.1"';
        $vars['rdf']->namespaces = $vars['rdf_namespaces'];
        $vars['rdf']->profile = ' profile="' . $vars['grddl_profile'] . '"';
    } else {
        $vars['doctype'] = '<!DOCTYPE html>' . "\n";
        $vars['rdf']->version = '';
        $vars['rdf']->namespaces = '';
        $vars['rdf']->profile = '';
    }
    if (alpha_library_active('omega_mediaqueries')) {
        $layouts = array();
        if (isset($theme->grids[$theme->settings['grid']])) {
            foreach ($theme->grids[$theme->settings['grid']]['layouts'] as $layout) {
                if ($layout['enabled']) {
                    $layouts[$layout['layout']] = $layout['media'];
                }
            }
            drupal_add_js(array('omega' => array('layouts' => array('primary' => $theme->grids[$theme->settings['grid']]['primary'], 'order' => array_keys($layouts), 'queries' => $layouts))), 'setting');
        }
    }
}
开发者ID:CuBoulder,项目名称:cu-express-drops-7,代码行数:30,代码来源:template.php

示例12: basukebu_preprocess_page

/**
 * @file
 * The primary PHP file for this theme.
 */
function basukebu_preprocess_page(&$variables)
{
    $js_path = drupal_get_path('theme', 'basukebu') . '/js/';
    if (user_has_role(IS_AUTH_USER)) {
        drupal_add_js($js_path . 'basukebu.sticky_header.js');
    }
}
开发者ID:sutekicut,项目名称:BASUKEBU,代码行数:11,代码来源:template.php

示例13: solkit_octal_preprocess_maintenance_page

/**
 * Implements template_preprocess_maintenance_page().
 */
function solkit_octal_preprocess_maintenance_page(&$variables)
{
    global $install_state;
    if ($install_state) {
        // Find the number of tasks to run.
        $tasks = install_tasks_to_display($install_state);
        $total = sizeof($tasks);
        // Find the position of the active task.
        $keys = array_keys($tasks);
        $active_task = $install_state['active_task'];
        $current = array_search($active_task, $keys) + 1;
        // Show steps.
        $variables['steps'] = t('Step @current of @total', array('@current' => $current, '@total' => $total));
        $variables['title'] = $tasks[$active_task];
    }
    $profile = isset($_GET['profile']) ? $_GET['profile'] : '';
    if ($profile) {
        $path = drupal_get_path('profile', $profile);
        $info_file = $path . '/' . $profile . '.info';
        $info = drupal_parse_info_file($info_file);
        $variables['site_name'] = $info['name'];
        $version['version'] = $info['version'];
        // Use copyright from distro info file.
        if (isset($info['copyright'])) {
            $variables['copyright'] = $info['copyright'];
        } else {
            $variables['copyright'] = st('@name @version', array('@name' => $info['name'], '@version' => $info['version']));
        }
        // Quick fix to add the required radix-progress.js.
        // We assume that Radix is at profiles/*/themes/radix.
        // TODO: handle this better.
        drupal_add_js($path . '/themes/radix/assets/javascripts/radix-progress.js');
    }
}
开发者ID:solutiondrop,项目名称:solkit_octal,代码行数:37,代码来源:template.php

示例14: infopeople_preprocess_html

function infopeople_preprocess_html(&$variables)
{
    drupal_add_css('//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css', array('group' => CSS_DEFAULT, 'weight' => -50, 'type' => 'external'));
    drupal_add_css('//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css', array('group' => CSS_DEFAULT, 'weight' => -48, 'type' => 'external'));
    drupal_add_css('//infopeople.org/sites/all/modules/civicrm/css/navigation.css', array('group' => CSS_DEFAULT, 'weight' => -50, 'type' => 'external'));
    drupal_add_js('//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js', array('weight' => '-1000', 'type' => 'external'));
}
开发者ID:ux45,项目名称:infopeople2015,代码行数:7,代码来源:template.php

示例15: intranet_preprocess_html

function intranet_preprocess_html(&$variables)
{
    drupal_add_css(base_path() . path_to_theme() . '/styles/style.css', array('type' => 'external'));
    drupal_add_css(base_path() . path_to_theme() . '/styles/icons.css', array('type' => 'external'));
    drupal_add_css(base_path() . path_to_theme() . '/styles/animate.css', array('type' => 'external'));
    drupal_add_css(base_path() . path_to_theme() . '/styles/responsive.css', array('type' => 'external'));
    /*$styling = theme_get_setting('styling', 'intranet');
      if ($styling == 'rtl')
        drupal_add_css(base_path() . path_to_theme() . '/styles/rtl.css', array('type' => 'external'));
    
      //Version background
      $version = theme_get_setting('version_c', 'intranet');
      if ($version == 'dark')
        drupal_add_css(base_path() . path_to_theme() . '/styles/dark.css', array('type' => 'external'));
      */
    drupal_add_css(base_path() . path_to_theme() . '/styles/update.css', array('type' => 'external'));
    drupal_add_js(base_path() . path_to_theme() . '/js/intranet.js', array('type' => 'file', 'scope' => 'footer'));
    drupal_add_js(base_path() . path_to_theme() . '/js/jquery.ticker.js', array('type' => 'file', 'scope' => 'header'));
    drupal_add_js(base_path() . path_to_theme() . '/js/custom.js', array('type' => 'file', 'scope' => 'footer'));
    /*
    
      $disable_switcher = theme_get_setting('intranet_disable_switch', 'intranet');
      if (empty($disable_switcher))
        $disable_switcher = 'on';
      if (!empty($disable_switcher) && $disable_switcher == 'on') {
        //Style
        drupal_add_js(base_path() . path_to_theme() . '/customizer/script.js', array('type' => 'file', 'scope' => 'footer'));
        drupal_add_css(base_path() . path_to_theme() . '/customizer/style.css', array('type' => 'external'));
        //End style
      }  */
    drupal_add_js(base_path() . path_to_theme() . '/js/update.js', array('type' => 'file', 'scope' => 'footer'));
    //included file validation js function
    include_file_validation_js_function();
}
开发者ID:cap-mayank,项目名称:intranet,代码行数:34,代码来源:template.php


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