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


PHP Asset::script方法代码示例

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


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

示例1: get_list

 /**
  * Listing item transactions
  * @return Response
  */
 public function get_list($type = null, $iid = null)
 {
     if (!Auth::can('view_transactions')) {
         Vsession::cadd('y', __('site.not_allowed'))->cflash('status');
         return Redirect::to_action('item@list');
     }
     if ($iid !== null) {
         if (null !== ($this->iid = $this->filter_item($iid))) {
             $this->item_buttons = $this->delete_button($this->iid);
         } else {
             return Redirect::to_action('transaction@list/overview');
         }
     }
     Asset::script('jquijs', 'app/assets/js/tooltip-image.js', 'jquery');
     switch ($type) {
         case 'overview':
             return $this->get_list_view('overview');
             break;
         case 'advanced':
             return $this->get_list_view('advanced');
             break;
         default:
             return $this->get_list_view('overview');
             break;
     }
 }
开发者ID:sresoft,项目名称:noark_simple_inventory,代码行数:30,代码来源:transaction.php

示例2: get_checkout

 /**
  * Checkout item
  * @return Response
  */
 public function get_checkout($id = null)
 {
     if (!Auth::can('add_checkout')) {
         Vsession::cadd('y', __('site.not_allowed'))->cflash('status');
         return Redirect::to_action('item@list');
     }
     // Generating buttons
     $this->item_buttons = Navigation::item_buttons()->add_item_button(array('icon' => 'icon-arrow-down', 'link' => 'item@checkin', 'text' => __('site.check_in_item')))->add_item_button(array('icon' => 'icon-arrow-up', 'link' => 'item@checkout', 'text' => __('site.check_out_item')))->get_item_buttons();
     Asset::style('jquicss', 'app/assets/css/jquery-ui-1.10.2.custom.min.css', 'jquery');
     Asset::script('jquijs', 'app/assets/js/jquery-ui-1.10.2.custom.js', 'jquery');
     Asset::script('datepicker', 'app/assets/js/jquery.ui.datepicker-' . Config::get('application.language') . '.js', 'jquery');
     if ($id != null) {
         $id = trim(filter_var($id, FILTER_SANITIZE_NUMBER_INT));
         $item = $this->fetch_item('id', $id);
     } else {
         $item = null;
     }
     return View::make('layout.index')->nest('header', 'layout.blocks.header', array('submenu' => $this->submenu))->nest('main', 'item.checkout', array('item' => $item, 'status' => $this->status, 'item_buttons' => $this->item_buttons));
 }
开发者ID:sresoft,项目名称:noark_simple_inventory,代码行数:23,代码来源:item.php

示例3: function

    Asset::script('jquery-ui', 'app/assets/js/jquery-ui.js');
    Asset::script('app', 'app/assets/js/app.js', 'jquery');
    Asset::script('app2', 'app/assets/js/sortable-issues.js', 'jquery');
    Asset::script('swf', '/app/assets/js/uploadify/swfobject.js', 'app');
    Asset::script('uploadify', '/app/assets/js/uploadify/jquery.uploadify.v2.1.4.min.js', 'app');
    Asset::script('project', '/app/assets/js/project.js', 'uploadify');
    if (!isset($view->sidebar)) {
        $view->with('sidebar', View::make('project.sidebar'));
    }
    $view->active = 'projects';
});
View::composer('todo.index', function ($view) {
    Asset::script('app', 'app/assets/js/todo.js', 'jquery');
});
View::composer('user.issues', function ($view) {
    Asset::script('app', 'app/assets/js/todo-issues.js', 'jquery');
});
View::composer('layouts.login', function ($view) {
    Asset::style('login', 'app/assets/css/login.css');
});
Event::listen('404', function () {
    return Response::error('404');
});
Event::listen('500', function () {
    return Response::error('500');
});
/*
|--------------------------------------------------------------------------
| Filters
|--------------------------------------------------------------------------
*/
开发者ID:eliasyanni,项目名称:bugs,代码行数:31,代码来源:routes.php

示例4: array

<?php

return array('layouts.admin.default' => array('name' => 'admin_layout', function ($view) {
    Asset::script('jquery', 'js/jquery-1.7.1.js');
    Asset::script('twipsy', 'js/twipsy.js');
    Asset::script('admin', 'js/admin.js');
    Asset::style('bootstrap', 'css/bootstrap.css');
    Asset::style('admin', 'css/admin.css');
    $view->nest('header', 'partials.header');
    $view->nest('footer', 'partials.footer');
}), 'layouts.site.default' => array('name' => 'site_layout', function ($view) {
    Asset::script('jquery', 'js/jquery-1.7.1.js');
    Asset::script('site', 'js/site.js');
    Asset::style('bootstrap', 'css/bootstrap.css');
    Asset::style('site', 'css/site.css');
    $view->nest('header', 'partials.header');
    $view->nest('nav', 'partials.nav');
    $view->nest('footer', 'partials.footer');
}));
开发者ID:rebelnz,项目名称:rebelcms,代码行数:19,代码来源:composers.php

示例5: get_new

 public function get_new()
 {
     Asset::script('project-new', '/app/assets/js/project-new.js', array('app'));
     return $this->layout->with('active', 'projects')->nest('content', 'projects.new');
 }
开发者ID:niceit,项目名称:tranit-tracker,代码行数:5,代码来源:projects.php

示例6: function

    Asset::style('app', 'app/assets/css/app.css');
    Asset::script('jquery', 'app/assets/js/jquery.js');
    Asset::script('jquery-ui', 'app/assets/js/jquery-ui.js');
    Asset::script('app', 'app/assets/js/app.js', 'jquery-ui');
    if (!isset($view->sidebar)) {
        $view->with('sidebar', View::make('layouts.blocks.default_sidebar'));
    }
});
View::composer('layouts.project', function ($view) {
    Asset::style('app', 'app/assets/css/app.css');
    Asset::script('jquery', 'app/assets/js/jquery.js');
    Asset::script('jquery-ui', 'app/assets/js/jquery-ui.js');
    Asset::script('app', 'app/assets/js/app.js', 'jquery');
    Asset::script('swf', '/app/assets/js/uploadify/swfobject.js', 'app');
    Asset::script('uploadify', '/app/assets/js/uploadify/jquery.uploadify.v2.1.4.min.js', 'app');
    Asset::script('project', '/app/assets/js/project.js', 'uploadify');
    if (!isset($view->sidebar)) {
        $view->with('sidebar', View::make('project.sidebar'));
    }
    $view->active = 'projects';
});
View::composer('layouts.login', function ($view) {
    Asset::style('login', 'app/assets/css/login.css');
});
Event::listen('404', function () {
    return Response::error('404');
});
Event::listen('500', function () {
    return Response::error('500');
});
/*
开发者ID:richardneish,项目名称:tinyissue,代码行数:31,代码来源:routes.php

示例7: function

/*
|--------------------------------------------------------------------------
| Composing
|--------------------------------------------------------------------------
*/
View::composer('layout.index', function ($view) {
    Asset::style('bootstrapcss', 'app/assets/css/bootstrap.min.css');
    Asset::style('datatablescss', 'app/assets/css/jquery.dataTables.css');
    Asset::style('apprisecss', 'app/assets/css/apprise-v2.css');
    Asset::style('style', 'app/assets/css/style.css');
    Asset::style('bs_css', 'app/assets/css/bootstrap-tagsinput.css');
    Asset::script('jquery', 'app/assets/js/jquery-1.9.1.min.js');
    Asset::script('bootstrap', 'app/assets/js/bootstrap.min.js');
    Asset::script('datatables', 'app/assets/js/jquery.dataTables.min.js');
    Asset::script('apprise', 'app/assets/js/apprise-v2.min.js', 'jquery');
    Asset::script('bs_input_script', 'app/assets/js/bootstrap-tagsinput.js');
});
/*
|--------------------------------------------------------------------------
| Application 404 & 500 Error Handlers
|--------------------------------------------------------------------------
|
| To centralize and simplify 404 handling, Laravel uses an awesome event
| system to retrieve the response. Feel free to modify this function to
| your tastes and the needs of your application.
|
| Similarly, we use an event to handle the display of 500 level errors
| within the application. These errors are fired when there is an
| uncaught exception thrown in the application.
|
*/
开发者ID:sresoft,项目名称:noark_simple_inventory,代码行数:31,代码来源:routes.php

示例8: behavior

    /**
     * Load the JavaScript behavior.
     *
     * @param   string  $group   The pane identifier.
     * @param   array   $params  Array of options.
     * @return  void
     */
    protected static function behavior($group, $params = array())
    {
        static $loaded = array();
        if (!array_key_exists((string) $group, $loaded)) {
            $options = array();
            $opt['onActive'] = isset($params['onActive']) ? $params['onActive'] : null;
            $opt['onBackground'] = isset($params['onBackground']) ? $params['onBackground'] : null;
            $opt['display'] = isset($params['startOffset']) ? (int) $params['startOffset'] : null;
            $opt['useStorage'] = isset($params['useCookie']) && $params['useCookie'] ? 'true' : 'false';
            $opt['titleSelector'] = "'dt.tabs'";
            $opt['descriptionSelector'] = "'dd.tabs'";
            foreach ($opt as $k => $v) {
                if ($v) {
                    $options[] = $k . ': ' . $v;
                }
            }
            $options = '{' . implode(',', $options) . '}';
            Behavior::framework(true);
            \App::get('document')->addScriptDeclaration('jQuery(document).ready(function($){
					$("dl#' . $group . '.tabs").tabs();
				});');
            Asset::script('system/jquery.tabs.js', false, true);
            $loaded[(string) $group] = true;
        }
    }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:32,代码来源:Tabs.php

示例9: function

        return Redirect::to('login');
    }
});
Route::filter('ajax', function () {
    if (!Request::ajax()) {
        return Response::error('404');
    }
});
Route::filter('project', function () {
    Project::load_project(Request::route()->parameters[0]);
    if (!Project::current()) {
        return Response::error('404');
    }
});
Route::filter('issue', function () {
    Asset::script('ckeditor', 'app/ckeditor/ckeditor.js');
    Project\Issue::load_issue(Request::route()->parameters[1]);
    if (isset(Request::route()->parameters[2]) && Request::route()->parameters[2] == 'status') {
        $to = "phamquocvinh99@gmail.com";
        $subject = "My subject";
        $txt = "Hello world!";
        $headers = "From: webmaster@example.com" . "\r\n" . "CC: somebodyelse@example.com";
        mail($to, $subject, $txt, $headers);
    }
    if (!Project\Issue::current()) {
        return Response::error('404');
    }
});
Route::filter('permission', function ($permission) {
    if (!Auth::user()->permission($permission)) {
        return Response::error('500');
开发者ID:niceit,项目名称:tranit-tracker,代码行数:31,代码来源:routes.php


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