Skip to content

Commit

Permalink
Merge pull request #35 from fedemotta/feature/UpdatingAssets
Browse files Browse the repository at this point in the history
Fix #34: Update to use bower package repo
  • Loading branch information
kartik-v committed May 7, 2015
2 parents 24373d8 + 2940e7f commit 2b9b200
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 4,419 deletions.
8 changes: 5 additions & 3 deletions DateRangePickerAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,18 @@
*/
class DateRangePickerAsset extends \kartik\base\AssetBundle
{
public $depends = ['\kartik\daterange\MomentAsset'];
public $depends = [
'\kartik\daterange\MomentAsset',
'\kartik\daterange\DateRangePickerDefaultAsset',
];

/**
* @inheritdoc
*/
public function init()
{
$this->setSourcePath(__DIR__ . '/assets');
$this->setupAssets('css', ['css/daterangepicker', 'css/daterangepicker-kv']);
$this->setupAssets('js', ['js/daterangepicker']);
$this->setupAssets('css', ['css/daterangepicker-kv']);
parent::init();
}

Expand Down
30 changes: 30 additions & 0 deletions DateRangePickerDefaultAsset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015
* @package yii2-date-range
* @version 1.6.1
*/

namespace kartik\daterange;

/**
* DateRangePickerDefault bundle for \kartik\daterange\DateRangePicker.
*
* @author Kartik Visweswaran <kartikv2@gmail.com>
* @since 1.0
*/
class DateRangePickerDefaultAsset extends \kartik\base\AssetBundle
{
public $sourcePath = '@bower/bootstrap-daterangepicker';

public $js = [
'daterangepicker.js',
];
public $css = [
'daterangepicker-bs3.css',
];
public $depends = ['yii\web\JqueryAsset','\kartik\daterange\MomentAsset',];


}
14 changes: 5 additions & 9 deletions MomentAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@
class MomentAsset extends \kartik\base\AssetBundle
{
public $jsOptions = ['position' => \yii\web\View::POS_HEAD];

public $sourcePath = '@bower/moment';

/**
* @inheritdoc
*/
public function init()
{
$this->setSourcePath(__DIR__ . '/assets');
$this->setupAssets('js', ['js/moment']);
parent::init();
}
public $js = [
'moment.js',
];

}
319 changes: 0 additions & 319 deletions assets/css/daterangepicker.css

This file was deleted.

Loading

0 comments on commit 2b9b200

Please sign in to comment.