Skip to content

Commit

Permalink
Ensures the system knows which 'framework' we are using, even on ajax…
Browse files Browse the repository at this point in the history
…_action [#984 state:resolved]
  • Loading branch information
dleffler committed Apr 12, 2013
1 parent 36a125d commit 60fdf04
Show file tree
Hide file tree
Showing 6 changed files with 174 additions and 155 deletions.
2 changes: 1 addition & 1 deletion framework/core/expFramework.php
Expand Up @@ -242,7 +242,7 @@
*/
function renderAction(array $parms=array()) {
global $user, $db;

//Get some info about the controller
// $baseControllerName = expModules::getControllerName($parms['controller']);
$fullControllerName = expModules::getControllerClassName($parms['controller']);
Expand Down
9 changes: 6 additions & 3 deletions framework/core/forms/basetemplate.php
Expand Up @@ -65,16 +65,19 @@ function __construct($item_type, $item_dir, $view = "Default") {
$this->tpl->cache_id = md5($this->viewfile);

// set up plugin search order based on framework
if (empty($head_config['framework'])) $head_config['framework'] = '';
if ($head_config['framework'] == 'bootstrap') {
$framework = expSession::get('framework');
// if (empty($head_config['framework'])) $head_config['framework'] = '';
// if ($head_config['framework'] == 'bootstrap') {
if ($framework == 'bootstrap') {
$this->tpl->setPluginsDir(array(
BASE.'themes/'.DISPLAY_THEME.'/plugins',
BASE.'framework/plugins/bootstrap',
BASE.'framework/plugins/jquery',
BASE.'framework/plugins',
SMARTY_PATH.'plugins',
));
} elseif ($head_config['framework'] == 'jquery') {
// } elseif ($head_config['framework'] == 'jquery') {
} elseif ($framework == 'jquery') {
$this->tpl->setPluginsDir(array(
BASE.'themes/'.DISPLAY_THEME.'/plugins',
BASE.'framework/plugins/jquery',
Expand Down
9 changes: 6 additions & 3 deletions framework/core/forms/controllertemplate.php
Expand Up @@ -46,16 +46,19 @@ function __construct($controller, $viewfile) {
$this->tpl->cache_id = md5($this->viewfile);

// set up plugin search order based on framework
if (empty($head_config['framework'])) $head_config['framework'] = '';
if ($head_config['framework'] == 'bootstrap') {
$framework = expSession::get('framework');
// if (empty($head_config['framework'])) $head_config['framework'] = '';
// if ($head_config['framework'] == 'bootstrap') {
if ($framework == 'bootstrap') {
$this->tpl->setPluginsDir(array(
BASE.'themes/'.DISPLAY_THEME.'/plugins',
BASE.'framework/plugins/bootstrap',
BASE.'framework/plugins/jquery',
BASE.'framework/plugins',
SMARTY_PATH.'plugins',
));
} elseif ($head_config['framework'] == 'jquery') {
// } elseif ($head_config['framework'] == 'jquery') {
} elseif ($framework == 'jquery') {
$this->tpl->setPluginsDir(array(
BASE.'themes/'.DISPLAY_THEME.'/plugins',
BASE.'framework/plugins/jquery',
Expand Down
1 change: 1 addition & 0 deletions framework/core/subsystems/expTheme.php
Expand Up @@ -135,6 +135,7 @@ public static function headerInfo($config) {
if ($head_config['framework'] == 'jquery' || $head_config['framework'] == 'bootstrap') array_unshift($auto_dirs,BASE.'framework/core/forms/controls/jquery');
if ($head_config['framework'] == 'bootstrap') array_unshift($auto_dirs,BASE.'framework/core/forms/controls/bootstrap');
array_unshift($auto_dirs,BASE.'themes/'.DISPLAY_THEME.'/controls');
if (!expSession::is_set('framework')) expSession::set('framework',$head_config['framework']);

$metainfo = self::pageMetaInfo();

Expand Down

0 comments on commit 60fdf04

Please sign in to comment.