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


PHP Asset::js方法代码示例

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


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

示例1: view

 public function view()
 {
     // Group's inputs.
     $name_group_inputs = [View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('name', $this->requested_aircraft->name, ['class' => 'form-control', 'type' => 'text']), 'label' => 'A/C Name'], false)];
     $general_group_1_inputs = [View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('basic_empty_weight', $this->requested_aircraft->basic_empty_weight, ['class' => 'form-control', 'type' => 'number']) . "kg", 'label' => 'Basic Empty Weight'], false), View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('cg_position', $this->requested_aircraft->cg_position, ['class' => 'form-control', 'type' => 'number']) . "aft of datum", 'label' => 'C of G Position'], false)];
     $description_group_inputs = [View::forge('form/group/input', ['label_coltype' => 'col-xs-12', 'input_coltype' => 'col-xs-12', 'input' => Form::textarea('description', $this->requested_aircraft->description, ['class' => 'form-control']), 'label' => 'Description', 'label_left' => true], false)];
     $weight_limits_group_1_inputs = [View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('max_ramp_weight', $this->requested_aircraft->max_ramp_weight, ['class' => 'form-control', 'type' => 'text']), 'label' => 'Max Ramp Weight'], false), View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('mctow', $this->requested_aircraft->mctow, ['class' => 'form-control', 'type' => 'text']), 'label' => 'MCTOW'], false)];
     $weight_limits_group_2_inputs = [View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('mlw', $this->requested_aircraft->mlw, ['class' => 'form-control', 'type' => 'text']), 'label' => 'MLW'], false), View::forge('form/group/input', ['label_coltype' => 'col-xs-2', 'input_coltype' => 'col-xs-4', 'input' => Form::input('mzfw', $this->requested_aircraft->mzfw, ['class' => 'form-control', 'type' => 'text']), 'label' => 'MZFW'], false)];
     $arms_table_template = View::forge('widgets/tablewithactions/template', ['duplicate_action' => false, 'cells' => [View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_name', '', ['class' => 'form-control'])], false), View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_position', '', ['class' => 'form-control'])], false), View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_value', '', ['class' => 'form-control']) . Form::hidden('_type', 'arm')], false)]]);
     $arms_table = View::forge('widgets/tablewithactions', ['template_row' => $arms_table_template, 'name' => '_arms', 'coltype' => 'col-xs-12 col-md-6', 'headings' => ['<th>Label</th>', '<th>Arm (aft of datum)</th>', '<th>Max Weight</th>'], 'rows' => $this->arms_table_rows], false);
     $cglimits_table_template = View::forge('widgets/tablewithactions/template', ['duplicate_action' => false, 'cells' => [View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_position', '', ['class' => 'form-control'])], false), View::forge('widgets/tablewithactions/row/cell', ['cell_content' => Form::input('_value', '', ['class' => 'form-control']) . Form::hidden('_type', 'maxweight') . Form::hidden('_name', 'limit')], false)]]);
     $cglimits_table = View::forge('widgets/tablewithactions', ['template_row' => $cglimits_table_template, 'name' => '_arms', 'coltype' => 'col-xs-6', 'headings' => ['<th>Arm (aft of datum)</th>', '<th>Weight Limit</th>'], 'rows' => $this->cglimits_table_rows], false);
     $button_group_1_inputs = [Asset::js('tablewithactions.js', false), View::forge('form/button', ['coltype' => 'col-xs-offset-5 col-xs-2', 'link' => 'submit/aircraft/' . $this->id, 'response_target' => './aircraft_form', 'class' => 'form-control btn-success', 'label' => 'Save Changes'], false)];
     // Headings
     $general_heading = View::forge('form/heading', ['text' => 'General', 'size' => 4], false);
     $weight_limits_heading = View::forge('form/heading', ['text' => 'Weight Limits', 'size' => 4], false);
     $arms_heading = View::forge('form/heading', ['text' => 'Arms', 'size' => 4], false);
     $cg_limits_heading = View::forge('form/heading', ['text' => 'C of G Limits', 'size' => 4], false);
     // Groups
     $name_group = View::forge('form/group', ['inputs' => $name_group_inputs], false);
     $general_group_1 = View::forge('form/group', ['inputs' => $general_group_1_inputs], false);
     $description_group = View::forge('form/group', ['inputs' => $description_group_inputs], false);
     $weight_limits_group_1 = View::forge('form/group', ['inputs' => $weight_limits_group_1_inputs]);
     $weight_limits_group_2 = View::forge('form/group', ['inputs' => $weight_limits_group_2_inputs]);
     $buttons_group = View::forge('form/group', ['inputs' => $button_group_1_inputs], false);
     $cg_limits_group = View::forge('form/group', ['inputs' => ['<div class="col-xs-6">' . $cglimits_table . '</div>' . '<div class="col-xs-6">' . 'Graph here' . '</div>']], false);
     $weightandbalance_section_data = ['heading' => 'Weight and Balance Data', 'unique_id' => Str::random('uuid'), 'groups' => [$general_heading, $name_group, $general_group_1, $description_group, $weight_limits_heading, $weight_limits_group_1, $weight_limits_group_2, $arms_heading, $arms_table, $cg_limits_heading, $cg_limits_group, $buttons_group]];
     $weightandbalance_section = View::forge('form/section', $weightandbalance_section_data, false);
     $this->aircraft_form = $weightandbalance_section;
 }
开发者ID:stabernz,项目名称:wnb,代码行数:30,代码来源:aircraft.php

示例2: init

 /**
  * Initialize bootstrap
  */
 public static function init()
 {
     $autoload = \Config::get('bootstrap.assets.autoload', false);
     if (!$autoload) {
         return;
     }
     $path = \Config::get('bootstrap.assets.path', '');
     $use_min = \Config::get('bootstrap.assets.use_min', true);
     $css_file = $path . 'bootstrap';
     $js_file = $path . 'bootstrap';
     if ($use_min) {
         $css_file .= '.min';
         $js_file .= '.min';
     }
     $css_file .= '.css';
     $js_file .= '.js';
     // See if Casset package is used.
     if (\Package::loaded('casset')) {
         \Casset::css($css_file, !$use_min);
         \Casset::js($js_file, !$use_min);
     } else {
         \Asset::css($css_file);
         \Asset::js($js_file);
     }
 }
开发者ID:joel-depiltech,项目名称:fuel-bootstrap,代码行数:28,代码来源:bootstrap.php

示例3: get_detail

 /**
  * フリーマーケット詳細表示画面
  *
  * @access public
  * @param mixed $fleamarket_id フリーマーケットID
  * @return void
  * @author ida
  */
 public function get_detail($fleamarket_id)
 {
     Asset::css('jquery-ui.min.css', array(), 'add_css');
     Asset::js('jquery-ui.min.js', array(), 'add_js');
     if (!$fleamarket_id) {
         return $this->forward('errors/notfound', 404);
     }
     $fleamarket = \Model_Fleamarket::findDetail($fleamarket_id);
     if (!$fleamarket) {
         return $this->forward('errors/notfound', 404);
     }
     $this->setHtmlReplace(array('AREA' => $this->getArea($fleamarket['prefecture_id']), 'AREA_NAME' => $this->getAreaName($fleamarket['prefecture_id']), 'FLEAMARKET_NAME' => $fleamarket['name'], 'LOCATION_ID' => $fleamarket['location_id'], 'LOCATION_NAME' => $fleamarket['location_name']));
     $fleamarket_abouts = \Model_Fleamarket_About::findByFleamarketId($fleamarket_id);
     $fleamarket_images = \Model_Fleamarket_Image::findByFleamarketId($fleamarket_id);
     $entry_styles = \Model_Fleamarket_Entry_Style::findByFleamarketId($fleamarket_id);
     $entries = \Model_Entry::getTotalEntryByFleamarketId($fleamarket_id);
     $fleamarket['entries'] = $entries;
     $view_model = \ViewModel::forge('search/detail');
     $view_model->set('fleamarket', $fleamarket, false);
     $view_model->set('fleamarket_images', $fleamarket_images, false);
     $view_model->set('fleamarket_abouts', $fleamarket_abouts, false);
     $view_model->set('fleamarket_entry_styles', $entry_styles, false);
     $view_model->set('entries', $entries, false);
     $view_model->set('prefectures', \Config::get('master.prefectures'), false);
     $view_model->set('user', $this->login_user, false);
     $this->template->content = $view_model;
 }
开发者ID:eva-tuantran,项目名称:use-knife-solo-instead-chef-solo-day13,代码行数:35,代码来源:search.php

示例4: action_detail

 /**
  * 会場詳細
  *
  * @access public
  * @param mixed $location_id 会場ID
  * @param mixed $fleamarket_id フリマID
  * @return void
  * @author ida
  */
 public function action_detail($location_id = null, $fleamarket_id = null)
 {
     if (!$location_id) {
         return $this->forward('errors/notfound', 404);
     }
     \Asset::css('jquery-ui.min.css', array(), 'add_css');
     \Asset::js('jquery-ui.min.js', array(), 'add_js');
     // 会場に紐づくフリマを取得する
     $fleamarket_date_list = \Model_Fleamarket::find('all', array('select' => array('fleamarket_id', 'event_date'), 'where' => array(array('location_id' => $location_id)), 'order_by' => array('event_date' => 'asc')));
     if (!$location_id || !$fleamarket_date_list) {
         \Response::redirect('errors/notfound');
     }
     if (!$fleamarket_id) {
         $first_fleamarket = end($fleamarket_date_list);
         $fleamarket_id = $first_fleamarket['fleamarket_id'];
     }
     $fleamarket = \Model_Fleamarket::findDetail($fleamarket_id);
     if (!$fleamarket) {
         \Response::redirect('errors/notfound');
     }
     $this->setHtmlReplace(array('AREA' => $this->getArea($fleamarket['prefecture_id']), 'AREA_NAME' => $this->getAreaName($fleamarket['prefecture_id']), 'LOCATION_ID' => $fleamarket['location_id'], 'LOCATION_NAME' => $fleamarket['location_name'], 'FLEAMARKET_NAME' => $fleamarket['name']));
     $fleamarket_abouts = \Model_Fleamarket_About::findByFleamarketId($fleamarket_id);
     $fleamarket_images = \Model_Fleamarket_Image::findByFleamarketId($fleamarket_id);
     $entry_styles = \Model_Fleamarket_Entry_Style::findByFleamarketId($fleamarket_id);
     $view_model = \ViewModel::forge('location/detail');
     $view_model->set('fleamarket', $fleamarket, false);
     $view_model->set('fleamarket_date_list', $fleamarket_date_list, false);
     $view_model->set('fleamarket_images', $fleamarket_images, false);
     $view_model->set('fleamarket_abouts', $fleamarket_abouts, false);
     $view_model->set('fleamarket_entry_styles', $entry_styles, false);
     $view_model->set('prefectures', \Config::get('master.prefectures'), false);
     $view_model->set('user', $this->login_user, false);
     $this->template->content = $view_model;
 }
开发者ID:eva-tuantran,项目名称:use-knife-solo-instead-chef-solo-day13,代码行数:43,代码来源:location.php

示例5: action_index

 public function action_index()
 {
     $data['all'] = Model_Forms::find('all');
     $this->template->js .= Asset::js(array('mylibs/jquery.dataTables.js'));
     $this->template->css = Asset::css(array('sprite.tables.css'));
     $this->template->content = View::forge('forms/index', $data);
 }
开发者ID:roine,项目名称:wawaw,代码行数:7,代码来源:forms.php

示例6: action_list

 /**
  * 予約履歴一覧
  *
  * @access public
  * @param
  * @return void
  * @author kobayashi
  * @author ida
  */
 public function action_list()
 {
     Asset::css('jquery-ui.min.css', array(), 'add_css');
     Asset::js('jquery-ui.min.js', array(), 'add_js');
     $conditions = $this->getCondition();
     $condition_list = \Model_Entry::createAdminSearchCondition($conditions);
     $total_count = \Model_Entry::getCountByAdminSearch($condition_list);
     // ページネーション設定
     $pagination = \Pagination::forge('entry_pagination', $this->getPaginationConfig($total_count));
     $entry_list = \Model_Entry::findAdminBySearch($condition_list, $pagination->current_page, $this->result_per_page);
     $view_model = \ViewModel::forge('admin/entry/list');
     if (\Input::param('fleamarket_id')) {
         $fleamarket = \Model_Fleamarket::find(\Input::param('fleamarket_id'));
         $view_model->set('fleamarket', $fleamarket, false);
     }
     if (\Input::param('user_id')) {
         $user = \Model_User::find(Input::param('user_id'));
         $view_model->set('user', $user, false);
     }
     $view_model->set('entry_list', $entry_list, false);
     $view_model->set('pagination', $pagination, false);
     $view_model->set('conditions', $conditions, false);
     $view_model->set('total_count', $total_count);
     $this->template->content = $view_model;
 }
开发者ID:eva-tuantran,项目名称:use-knife-solo-instead-chef-solo-day13,代码行数:34,代码来源:entry.php

示例7: action_index

 /**
  * 初期画面
  *
  * @access public
  * @return void
  * @author shimma
  */
 public function action_index()
 {
     Asset::js('https://ajaxzip3.googlecode.com/svn/trunk/ajaxzip3/ajaxzip3-https.js', array(), 'add_js');
     $fieldset = self::createFieldset();
     $this->template->content = View::forge('signup/index');
     $this->template->content->set('prefectures', Config::get('master.prefectures'));
     $this->template->content->set('input', $fieldset->input());
     $this->template->content->set('errors', $fieldset->validation()->error_message());
 }
开发者ID:eva-tuantran,项目名称:use-knife-solo-instead-chef-solo-day13,代码行数:16,代码来源:signup.php

示例8: before

 public function before()
 {
     $this->template = "template";
     parent::before();
     $this->css .= Asset::css("reset.css");
     $this->css .= Asset::css("bootstrap.min.css");
     $this->css .= Asset::css("style.css");
     $this->js .= Asset::js("vendor/jquery.min.js");
 }
开发者ID:egapool,项目名称:helthcrawler,代码行数:9,代码来源:base.php

示例9: before

 public function before()
 {
     parent::before();
     if (!\Auth::check()) {
         \Output::redirect('myauth');
     }
     \Asset::remove_path('assets/');
     \Asset::add_path('assets/uploadify/');
     $this->template->css = \Asset::css(array('style.css'), array(), 'layout', false);
     $this->template->js = \Asset::js(array('jquery-1.3.2.min.js', 'swfobject.js', 'jquery.uploadify.v2.1.0.min.js', 'jquery.application.js'), array(), 'layout', false);
 }
开发者ID:huglester,项目名称:fuel-uploadify,代码行数:11,代码来源:uploadify.php

示例10: view

 public function view()
 {
     $initial_content = '';
     $meta_description = '';
     $organisation = '';
     $assets = [Asset::css(['ebs.css', 'bootstrap.css']), Asset::js(['jquery-2.1.4.js', 'ebs.js', 'bootstrap.js', 'confirm-bootstrap.js'])];
     $nav_header = Presenter::forge('layouts/index/header');
     $content = View::forge('layout/content', ['content' => $initial_content]);
     $nav_footer = Presenter::forge('layouts/index/footer');
     $ebs = View::forge('layout/ebs', ['meta_description' => $meta_description, 'organisation' => $organisation, 'assets' => $assets, 'nav_header' => $nav_header, 'content' => $content, 'alert_area' => View::forge('layout/alert_area'), 'nav_footer' => $nav_footer], false);
     $this->ebs = $ebs;
 }
开发者ID:stabernz,项目名称:wnb,代码行数:12,代码来源:index.php

示例11: auto

 /**
  * Auto render the ressource file
  * Read the extension and automatically load the right type
  * @param string|array $ressource Ressource filename
  * @param string ($pattern)
  * @return string Html output
  */
 public static function auto($ressource, $pattern = null)
 {
     $ext = pathinfo($ressource, PATHINFO_EXTENSION);
     if ($ext === 'js') {
         return Asset::js($name, $pattern);
     } else {
         if ($ext === 'css') {
             return Asset::css($name, $pattern);
         } else {
             return false;
         }
     }
 }
开发者ID:bafs,项目名称:parvula,代码行数:20,代码来源:Asset.php

示例12: action_index

 public function action_index()
 {
     if (!Sentry::user()->has_access('charts_monthly')) {
         Session::set_flash('error', 'You don\'t have access to the charts');
         Response::redirect('');
     }
     $data['id'] = '';
     $this->template->js = Asset::js(array('plugins.js', 'mylibs/jquery.ba-resize.js', 'mylibs/jquery.easing.1.3.js', 'mylibs/jquery.ui.touch-punch.js', 'libs/date.js', 'script.js', 'mylibs/highcharts.js', 'mylibs/HighCharts/exporting.js', 'charts.js'));
     $this->template->css = Asset::css(array('plugin.charts.css'));
     $this->template->title = 'Charts';
     $this->template->h2 = 'Monthly Subscription in all the forms';
     $this->template->content = View::forge('charts/view');
 }
开发者ID:roine,项目名称:wawaw,代码行数:13,代码来源:charts.php

示例13: action_index

 /**
  * トップページ
  *
  * @access public
  * @return void
  * @author ida
  * @author shimma
  */
 public function action_index()
 {
     $view_model = \ViewModel::forge('top/index');
     $view_model->set('news_headlines', \Model_News::getHeadlines());
     $view_model->set('upcomming', \ViewModel::forge('component/upcomming'), false);
     $view_model->set('calendar', \ViewModel::forge('component/calendar'), false);
     $view_model->set('search', \ViewModel::forge('component/search')->set('is_top', true), false);
     $view_model->set('popular_ranking', \ViewModel::forge('component/popular'), false);
     $view_model->set('latest', \ViewModel::forge('component/latest'), false);
     Asset::js('jquery.carouFredSel.js', array(), 'add_js');
     Asset::js('jquery.rwdImageMaps.min.js', array(), 'add_js');
     Asset::js('top.js', array(), 'add_js');
     Asset::css('top.css', array(), 'add_css');
     $this->template->content = $view_model;
 }
开发者ID:eva-tuantran,项目名称:use-knife-solo-instead-chef-solo-day13,代码行数:23,代码来源:top.php

示例14: run

 public function run($options)
 {
     //load library
     class_exists('Pmslider_m') or $this->load->model('pmaker/pmslider_m');
     class_exists('Pmslide_m') or $this->load->model('pmaker/pmslide_m');
     //get slider
     $slider = $this->pmslider_m->get_by('id', $options['slider']);
     //get slides
     $slides = $this->pmslide_m->get_slides($options['slider']);
     // add path to widget's assets
     // MODIFY THIS PATH IF YOU'D LIKE TO KEEP THE MODULE ELSEWHERE
     Asset::add_path('pmcamera', 'addons/shared_addons/modules/pmaker/widgets/pm_camera/assets/');
     Asset::css('pmcamera::camera.css', false, 'camera');
     Asset::js('pmcamera::camera.js', false, 'camera');
     Asset::js('pmcamera::jquery.mobile.customized.min.js', false, 'camera');
     return array('options' => $options, 'slider' => $slider, 'slides' => $slides);
 }
开发者ID:nockout,项目名称:tshpro,代码行数:17,代码来源:pm_camera.php

示例15: before

 public function before()
 {
     parent::before();
     // controllerとaction毎にcssとjsを自動読み込み
     $controller = mb_strtolower(str_replace('Controller/', '', strtr(Request::main()->controller, '_', '/')));
     $action = Request::main()->action;
     if (File::exists(DOCROOT . 'assets/css/' . $controller . '.css')) {
         Asset::css(array($controller . '.css'), array(), 'controller_style_css', false);
     }
     if (File::exists(DOCROOT . 'assets/css/' . $controller . '/' . $action . '.css')) {
         Asset::css(array($controller . '/' . $action . '.css'), array(), 'action_style_css', false);
     }
     if (File::exists(DOCROOT . 'assets/js/' . $controller . '.js')) {
         Asset::js(array($controller . '.js'), array(), 'controller_script_js', false);
     }
     if (File::exists(DOCROOT . 'assets/js/' . $controller . '/' . $action . '.js')) {
         Asset::js(array($controller . '/' . $action . '.js'), array(), 'action_script_js', false);
     }
 }
开发者ID:takobonge,项目名称:takobonge_fuel,代码行数:19,代码来源:base.php


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