Skip to content

Commit

Permalink
Fixed directory separator for assets path.
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrna committed Aug 13, 2016
1 parent 25291e6 commit de0457b
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 8 deletions.
9 changes: 7 additions & 2 deletions DateAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@
*/
class DateAsset extends AssetBundle
{
public $sourcePath = '@bower/persian-date/dist';
public $js = [
'0.1.8/persian-date-0.1.8.js',
'0.1.8/persian-date-0.1.8.min.js',
];
public $depends = [
'yii\web\JqueryAsset',
'yii\bootstrap\BootstrapPluginAsset',
'yii\bootstrap\BootstrapAsset',
];
public function init()
{
$s = DIRECTORY_SEPARATOR;
$this->sourcePath = "@bower{$s}persian-date{$s}dist";
parent::init();
}
}
1 change: 0 additions & 1 deletion Datepicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ public function registerClientScript()
$this->{'registerDatepicker' . ucfirst($this->theme) . 'ThemeAsset'}($view);
}


$id = $this->options['id'];
$selector = ";jQuery('#$id')";

Expand Down
7 changes: 6 additions & 1 deletion DatepickerAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
class DatepickerAsset extends AssetBundle
{
public $sourcePath = '@bower/persian-datepicker/dist';
public $css = [
'css/persian-datepicker-0.4.5.css',
];
Expand All @@ -26,4 +25,10 @@ class DatepickerAsset extends AssetBundle
public $depends = [
'mrlco\datepicker\DateAsset',
];
public function init()
{
$s = DIRECTORY_SEPARATOR;
$this->sourcePath = "@bower{$s}persian-date{$s}dist";
parent::init();
}
}
7 changes: 6 additions & 1 deletion DatepickerBlueThemeAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
class DatepickerBlueThemeAsset extends AssetBundle
{
public $sourcePath = '@bower/persian-datepicker/dist';
public $css = [
'css/theme/persian-datepicker-blue.css',
];
Expand All @@ -26,4 +25,10 @@ class DatepickerBlueThemeAsset extends AssetBundle
public $depends = [
'mrlco\datepicker\DateAsset',
];
public function init()
{
$s = DIRECTORY_SEPARATOR;
$this->sourcePath = "@bower{$s}persian-date{$s}dist";
parent::init();
}
}
7 changes: 6 additions & 1 deletion DatepickerCheerupThemeAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
class DatepickerCheerupThemeAsset extends AssetBundle
{
public $sourcePath = '@bower/persian-datepicker/dist';
public $css = [
'css/theme/persian-datepicker-cheerup.css',
];
Expand All @@ -26,4 +25,10 @@ class DatepickerCheerupThemeAsset extends AssetBundle
public $depends = [
'mrlco\datepicker\DateAsset',
];
public function init()
{
$s = DIRECTORY_SEPARATOR;
$this->sourcePath = "@bower{$s}persian-date{$s}dist";
parent::init();
}
}
7 changes: 6 additions & 1 deletion DatepickerDarkThemeAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
class DatepickerDarkThemeAsset extends AssetBundle
{
public $sourcePath = '@bower/persian-datepicker/dist';
public $css = [
'css/theme/persian-datepicker-dark.css',
];
Expand All @@ -26,4 +25,10 @@ class DatepickerDarkThemeAsset extends AssetBundle
public $depends = [
'mrlco\datepicker\DateAsset',
];
public function init()
{
$s = DIRECTORY_SEPARATOR;
$this->sourcePath = "@bower{$s}persian-date{$s}dist";
parent::init();
}
}
7 changes: 6 additions & 1 deletion DatepickerRedblackThemeAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
class DatepickerRedblackThemeAsset extends AssetBundle
{
public $sourcePath = '@bower/persian-datepicker/dist';
public $css = [
'css/theme/persian-datepicker-redblack.css',
];
Expand All @@ -26,4 +25,10 @@ class DatepickerRedblackThemeAsset extends AssetBundle
public $depends = [
'mrlco\datepicker\DateAsset',
];
public function init()
{
$s = DIRECTORY_SEPARATOR;
$this->sourcePath = "@bower{$s}persian-date{$s}dist";
parent::init();
}
}

0 comments on commit de0457b

Please sign in to comment.