Skip to content

Commit

Permalink
assets from CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaakp committed Jan 12, 2019
1 parent 4e0b55c commit 2a87fe6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dateline.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,9 @@ public function run() {
$jOpts = Json::encode($options);

$id = $this->getId();
$var = 'q' . str_replace('-', '_', $id);

$js = "var {$id}=$('#{$id}').dateline($jOpts);";
$js = "var {$var}=$('#{$id}').dateline($jOpts);";

$view->registerJs($js);

Expand Down
3 changes: 2 additions & 1 deletion DatelineAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class DatelineAsset extends AssetBundle {
'yii\jui\JuiAsset',
];

public $sourcePath = '@bower/dateline';
// public $sourcePath = '@bower/dateline';
public $baseUrl = '//unpkg.com/@sjaakp/dateline';

public $css = [
'css/jquery.dateline.css'
Expand Down

0 comments on commit 2a87fe6

Please sign in to comment.