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


PHP Builder::add_js方法代码示例

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


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

示例1: widget

     $model = $this->__get_module('__model_list', 'models', $model_name);
     if (!$model) {
         return Loader::get_model($model_name);
     }
     return $model;
 }
 public function widget($name, $options, $return = FALSE)
 {
     if (empty($name)) {
         return '';
     }
     $widget_name = (string) str_replace('/', '__', $name);
     $widget_path = $name;
     if (!function_exists($widget_name)) {
         $path = APPPATH . 'widgets/' . $widget_path . EXT;
         include_once $path;
         if (!function_exists($widget_name)) {
             Log::log_error("Widget does not exist. widgets:[{$widget_name}], path:[{$path}]");
             return '';
         }
     }
     if (!in_array($widget_name, self::$__widget_call_list)) {
         self::$__widget_call_list[] = $widget_name;
         //$path = Builder::get_style_path("/widgets/{$widget_path}");
         //Builder::set_head($path, 'css');
         $widget_path = str_replace('/', '-', $widget_path);
         Builder::add_css("widgets/{$widget_path}");
         Builder::add_js("widgets/{$widget_path}");
         //Builder::set_head($path.'_noscript', 'css');
         //Builder::set_head("./widgets/{$widget_path}", 'js', TRUE);
     }
     $result = $widget_name($options);
开发者ID:viking2000,项目名称:web-antarix,代码行数:32,代码来源:controller.php

示例2: login

 public function login()
 {
     Builder::add_meta('robots', 'none', TRUE);
     Builder::add_js(array('system/jquery-1.8.3', 'system/wx'));
     Builder::add_css(array('system/reset', 'pages/frontend'));
     Builder::add_css('pages/frontend-contacts');
     Builder::add_constant(array('command' => 'user', 'action' => 'login'));
     $this->view('login', array());
 }
开发者ID:viking2000,项目名称:web-antarix,代码行数:9,代码来源:identification.php

示例3: image__gallery

/**
 * Created by JetBrains PhpStorm.
 * User: PHP Development
 * Date: 31.07.14
 * Time: 15:58
 * To change this template use File | Settings | File Templates.
 */
function image__gallery(array $options = array())
{
    //Builder::set_head(PA_SYSTEM_JS.'pirobox.min', 'js');
    Builder::add_js('system/pirobox.min');
    $images = glob('./' . $options['album'] . '/thumbs/*.jpg');
    $thumbs = '';
    foreach ($images as $img) {
        $large = str_replace('/thumbs', '/large', $img);
        $thumbs .= '<div class="ig-demo"><a href="' . base_url($large) . '" class="pirobox_gall" title="' . $options['title'] . '"><img src="' . base_url($img) . '" /></a></div>';
    }
    return <<<EOT
            <div class="image-gallery">
                <h2>{$options['title']}</h2>
\t\t\t    {$thumbs}
\t\t\t</div><div class="clear"></div>
EOT;
}
开发者ID:viking2000,项目名称:web-antarix,代码行数:24,代码来源:gallery.php

示例4: slider__full

/**
 * Created by JetBrains PhpStorm.
 * User: Администратор
 * Date: 28.06.14
 * Time: 0:43
 * To change this template use File | Settings | File Templates.
 */
function slider__full(array $options)
{
    if (!is_array($options)) {
        return '';
    }
    Builder::add_js("widgets/slider/full");
    Builder::add_js('system/jquery.easing.1.3');
    Builder::add_css("widgets/slider/full");
    $large = '';
    $thumbs = '';
    foreach ($options as $key => $item) {
        $large .= '<li><img src="' . base_url($item['image_large']) . '" alt="large image"/><div class="ei-title"><h2>' . $item['title'] . '</h2><h3>' . $item['subtitle'] . '</h3></div></li>';
        $thumbs .= '<li><a href="#">' . $key . '</a><img src="' . base_url($item['image_thumb']) . '" alt="thumb image" /></li>';
    }
    return <<<EOT
    <div id="ei-slider" class="ei-slider"><ul class="ei-slider-large">{$large}</ul><ul class="ei-slider-thumbs"><li class="ei-slider-element">Current</li>{$thumbs}</ul></div><div style="clear: both;"></div>
EOT;
}
开发者ID:viking2000,项目名称:web-antarix,代码行数:25,代码来源:full.php

示例5: read

 public function read($opt = NULL)
 {
     Builder::add_plugin('jQuery-slimScroll');
     Builder::add_js('system/wx');
     Builder::add_css('pages/frontend-article');
     Builder::add_css(array('pages/home-about', 'system/github'));
     $article_id = reset($opt);
     if (empty($article_id)) {
         throw new Exception_wx(4040004, $article_id);
     }
     $article_meta = $this->model('articles_model')->get($article_id);
     $content['id'] = $article_id;
     $content['type'] =& $article_meta['type'];
     $content['header'] =& $article_meta['header'];
     $content['creation'] =& $article_meta['creation'];
     Builder::set_title(get_string('url_naming', $article_meta['type']) . ' — ' . $article_meta['header']);
     $left['list'] = $this->model('articles_model')->get_articles_by_type($content['type']);
     $left['current'] = base_url("articles/read/{$article_id}");
     $content['previous'] = NULL;
     $content['following'] = NULL;
     $index = 0;
     foreach ($left['list'] as $key => &$item) {
         if ($left['current'] == $item['link']) {
             $index = $key;
             break;
         }
     }
     if ($index > 0) {
         $content['previous'] =& $left['list'][$index - 1]['link'];
     }
     if ($index < count($left['list']) - 1) {
         $content['following'] =& $left['list'][$index + 1]['link'];
     }
     if (isset($article_meta['description'])) {
         Builder::add_meta('description', $article_meta['description']);
     }
     if (isset($article_meta['keywords'])) {
         Builder::add_meta('keywords', $article_meta['keywords']);
     }
     $page = array();
     $page['content'] = $this->view('article_read', $content, TRUE);
     $this->view('frontend/frontend', $page);
 }
开发者ID:viking2000,项目名称:web-antarix,代码行数:43,代码来源:articles.php

示例6: contacts

 public function contacts()
 {
     Builder::set_title(get_string('pages', 'feedback'));
     Builder::add_meta('robots', 'none', TRUE);
     Builder::add_js('system/wx');
     Builder::add_css('pages/frontend-contacts');
     Builder::add_css('pages/support');
     Builder::add_constant(array('COMMAND' => 'home', 'ACTION' => 'set_contact'));
     //--------------Contents-----------------
     $contents = get_structure('frontend/contact');
     $contents = $this->view('contacts', $contents, TRUE);
     $nav = array();
     $nav[get_string('url_naming', 'home')] = '';
     $nav[get_string('url_naming', 'contacts')] = 'special/contact';
     //------------------Total page------------
     $page = array();
     $page['nav'] =& $nav;
     $page['content'] = $contents;
     $this->view('frontend/frontend', $page);
 }
开发者ID:viking2000,项目名称:web-antarix,代码行数:20,代码来源:special.php


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