/**
  * 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);
     }
 }
 public function before()
 {
     parent::before();
     Casset::css('admin.css');
     Casset::js('bootstrap.js');
     Casset::js('admin.js');
 }
Esempio n. 3
0
 /**
  * JS
  *
  * Either adds the javascript to the group, or returns the script tag.
  *
  * @access	public
  * @param	mixed	The file name, or an array files.
  * @param	array	An array of extra attributes
  * @param	string	The asset group name
  * $raw		bool	If set to true the result css tags will include the file contents directly instead of via a link tag.
  * $is_minify	bool	If set to true minify and combine files at only prod env.
  * @return	string
  */
 public static function js($stylesheets = array(), $attr = array(), $group = NULL, $raw = false, $is_minify = false, $is_use_minified_file = false)
 {
     if (Fuel::$env == Fuel::PRODUCTION) {
         if ($is_minify) {
             foreach ($stylesheets as $stylesheet) {
                 Casset::js($stylesheet, false, $group);
             }
             return;
         }
         if ($is_use_minified_file) {
             $stylesheets = Util_File::convert_filename2min($stylesheets);
         }
     }
     return parent::js($stylesheets, $attr, $group, $raw);
 }
            Are you sure you want to continue?
        </div>

    <!-- Placed at the end of the document so the pages load faster -->
    <?php 
Casset::js('jquery.zclip.min.js');
Casset::js('bootstrap.min.js');
Casset::js('sortable.js');
Casset::js('jquery-ui-1.10.3.custom.min.js');
Casset::js('bootstrap-switch.min.js');
Casset::js('base.js');
if (Uri::Current() === Uri::Base() && isset($image_js) === true) {
    Casset::add_path('image', APPPATH . 'modules/image/');
    Casset::js('image::image.js');
}
Casset::js('jquery.colorbox-min.js');
echo Casset::render_js();
?>
    <script>
        var text_input = document.getElementById ('urlbox');
 
        if (text_input != null)
        {
           text_input.focus ();
           text_input.select ();
        }
        
        var max_file_size = <?php 
echo min($max_upload, $max_post);
?>
;
Esempio n. 5
0
<?php

Casset::less('less/layouts/default/config.less', true, 'base');
Casset::less('less/layouts/default/layout.less', true, 'base');
Casset::less('less/layouts/default/config.less', true, 'page');
Casset::js('libs/jquery/jquery.min.js', false, 'base');
Casset::js('libs/jquery/plugins/jquery.validate.js', true, 'page');
Casset::js('libs/bootstrap/js/bootstrap-alert.js', true, 'base');
Casset::js('libs/bootstrap/js/bootstrap-modal.js', true, 'base');
Casset::js('libs/bootstrap/js/bootstrap-transition.js', true, 'base');
Casset::js('libs/bootstrap/plugins/bootbox/bootbox.js', true, 'base');
Casset::js('libs/bootstrap/plugins/bootstrap-hover-dropdown.js', true, 'base');
Casset::js('js/common.js', true, 'base');
Casset::js('js/common/common.validate.js', true, 'page');
$app_name = Config::get('app_name');
$seller = Seller::active();
$sellers = Seller::all();
?>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>
		<?php 
echo $app_name;
?>
		<?php 
if (!empty($title) && empty($breadcrumbs)) {
    ?>
			- <?php 
Esempio n. 6
0
<?php

/**
 * Created by PhpStorm.
 * User: aris
 * Date: 9/22/14
 * Time: 12:13 PM
 */
header("Content-Type:text/html; charset=utf-8");
echo Casset::js('jquery.min.js');
//echo Casset::render_js();
print '----View : ormpractice----<br>print out data only with var_dump : <br><br><br>';
echo '<pre>';
/*structure of value object from controller
     '_ormGetAllGuest' = Model_DataTrain::Orm_GetAllGuest(),
     '_ormFindGuest' = Model_DataTrain::Orm_FindGuest('Sunny'),
     '_crudGetAllGoods' = Model_DataTrain::Crud_GetAllGoods(),
     '_crudFindGoods' = Model_DataTrain::Crud_FindGoods( 'Toilet' ),
  */
print '---使用 ORM 存取客戶基本資料 : 全部房客列表<br>';
var_dump($_ormGetAllGuest);
print '<br>';
print '---使用 ORM 存取客戶基本資料 : 查找單一客戶Sunny<br>';
var_dump($_ormFindGuest);
print '<br>';
print '---使用 model_crud 存取商品基本資料 : 全部商品列表<br>';
var_dump($_crudGetAllGoods);
print '<br>';
print '---使用 model_crud 存取商品基本資料 : 查找單一商品Toilet<br>';
var_dump($_crudFindGoods);
echo '</pre>';
Esempio n. 7
0
<?php

Casset::less('less/common/chart.less', true, 'page');
if (empty($type)) {
    $type = 'highcharts';
}
Casset::js("libs/highcharts/{$type}.js", true, 'page');
Casset::js('libs/highcharts/modules/exporting.js', true, 'page');
Esempio n. 8
0
<?php

$layout->title = 'Activity';
$layout->pagenav = render('statistics/customers/pagenav');
$layout->leftnav = render('statistics/leftnav');
$layout->breadcrumbs['Statistics'] = 'statistics';
$layout->breadcrumbs['Customers'] = '';
$layout->breadcrumbs['Activity'] = '';
render('common/chart', array('type' => 'highstock'));
Casset::js('js/controller/statistics/customers/activity.js', true, 'page');
?>

<div id="chart-customer-activity" style="width:100%; height:400px;" data-url="/api/customers/statistics/activity"></div>
Esempio n. 9
0
<?php

$layout->title = 'Totals';
$layout->pagenav = render('statistics/customers/pagenav');
$layout->leftnav = render('statistics/leftnav');
$layout->breadcrumbs['Statistics'] = 'statistics';
$layout->breadcrumbs['Customers'] = '';
$layout->breadcrumbs['Totals'] = '';
render('common/chart', array('type' => 'highstock'));
Casset::js('js/controller/statistics/customers/totals.js', true, 'page');
?>

<div id="chart-customer-totals" style="width:100%; height:400px;" data-url="/api/customers/statistics/totals"></div>
Esempio n. 10
0
 /**
  * Assets loader
  *
  * @access  private
  */
 private function _init_assets()
 {
     Casset::css('main.css');
     Casset::js('main.js');
 }
Esempio n. 11
0
<?php

$layout->title = 'Conversion';
$layout->pagenav = render('statistics/customers/pagenav');
$layout->leftnav = render('statistics/leftnav');
$layout->breadcrumbs['Statistics'] = 'statistics';
$layout->breadcrumbs['Customers'] = '';
$layout->breadcrumbs['Conversion'] = '';
render('common/chart');
Casset::js('libs/highcharts/modules/funnel.js', true, 'page');
Casset::js('js/controller/statistics/customers/conversion.js', true, 'page');
?>

<div id="chart-customer-conversion" style="width:600px; height:400px;" data-url="/api/customers/statistics/conversion"></div>