Skip to content

Commit

Permalink
Dev: added package bootstrap-admin to avoid collision with file repla…
Browse files Browse the repository at this point in the history
…cement system in template editor
  • Loading branch information
LouisGac committed Jul 13, 2017
1 parent 30edd2b commit d275678
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions application/config/third_party.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'jquery-migrate-3.0.0'.$minVersion.'.js',
)
),

// Bootstrap
// This package replace the Yiistrap register() function
// Then instead of using the composer dependency system for templates
Expand All @@ -45,6 +46,23 @@
)
),

// Bootstrap admin
// must be different for template editor not to colide with template files replacement
'bootstrap-admin' => array(
'devBaseUrl' => 'assets/packages/bootstrap/',
'basePath' => 'core.bootstrap',
'css'=> array(
'bootstrap'.$minVersion.'.css',/* Admin need it, not public */
'yiistrap'.$minVersion.'.css',
),
'js'=>array(
'bootstrap'.$minVersion.'.js'
),
'depends' => array(
'jquery',
)
),

// bootstrap-slider : for multinumeric with slider
'bootstrap-slider' => array(
'basePath' => 'third_party.bootstrap-slider',
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/admin/templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public function index($editfile = '', $screenname = 'welcome', $templatename = '
}

/* Keep Bootstrap Package clean after loading template : because template can update boostrap */
$aBootstrapPackage = Yii::app()->clientScript->packages['bootstrap'];
$aBootstrapPackage = Yii::app()->clientScript->packages['bootstrap-admin'];

$aViewUrls = $this->_initialise($templatename, $screenname, $editfile, true, true);

Expand Down

0 comments on commit d275678

Please sign in to comment.