Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap

This commit is contained in:
Jerome Nadaud
2013-11-07 16:48:56 +01:00
729 changed files with 8289 additions and 30730 deletions
+1 -1
View File
@@ -450,7 +450,7 @@ class HookCore extends ObjectModel
//retro compat of controller names
$matching_name = array(
'authentication' => 'auth',
'compare' => 'products-comparison',
'productscomparison' => 'compare'
);
if (isset($matching_name[$controller]) && in_array($matching_name[$controller], $exceptions))
continue;
+16 -10
View File
@@ -1917,6 +1917,14 @@ class AdminControllerCore extends Controller
$this->helper = $helper;
}
public function setDeprecatedMedia()
{
$admin_webpath = str_ireplace(_PS_ROOT_DIR_, '', _PS_ADMIN_DIR_);
$admin_webpath = preg_replace('/^'.preg_quote(DIRECTORY_SEPARATOR, '/').'/', '', $admin_webpath);
$this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/backward-admin-bootstrap-reset.css', 'all');
$this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/backward-admin-old.css', 'all');
}
public function setMedia()
{
@@ -1928,11 +1936,9 @@ class AdminControllerCore extends Controller
// Deprecated stylesheets + reset bootstrap style for the #nobootstrap field - Backward compatibility
if (!$this->bootstrap)
{
$this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/backward/admin.css', 'all');
$this->addCSS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/css/backward/bootstrap_admin_reset.css', 'all');
}
$this->setDeprecatedMedia();
//todo css for rtl support
if ($this->context->language->is_rtl)
$this->addCSS(_THEME_CSS_DIR_.'rtl.css');
@@ -1946,6 +1952,7 @@ class AdminControllerCore extends Controller
_PS_JS_DIR_.'ajax.js',
_PS_JS_DIR_.'toolbar.js',
));
//loads specific javascripts for the admin theme, bootstrap.js should be moved into /js root directory
$this->addJS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/js/vendor/bootstrap.js');
$this->addJS(__PS_BASE_URI__.$admin_webpath.'/themes/'.$this->bo_theme.'/js/admin-theme.js');
@@ -1970,14 +1977,13 @@ class AdminControllerCore extends Controller
* @param boolean $htmlentities if set to true(default), the return value will pass through htmlentities($string, ENT_QUOTES, 'utf-8')
* @return string the translation if available, or the english default text.
*/
protected function l($string, $class = 'AdminTab', $addslashes = false, $htmlentities = true)
protected function l($string, $class = null, $addslashes = false, $htmlentities = true)
{
// classname has changed, from AdminXXX to AdminXXXController
// So we remove 10 characters and we keep same keys
if (strtolower(substr($class, -10)) == 'controller')
$class = substr($class, 0, -10);
elseif ($class == 'AdminTab')
if ($class === null || $class == 'AdminTab')
$class = substr(get_class($this), 0, -10);
// classname has changed, from AdminXXX to AdminXXXController, so we remove 10 characters and we keep same keys
elseif (strtolower(substr($class, -10)) == 'controller')
$class = substr($class, 0, -10);
return Translate::getAdminTranslation($string, $class, $addslashes, $htmlentities);
}
-1
View File
@@ -748,7 +748,6 @@ class FrontControllerCore extends Controller
$this->addJqueryUI('ui.sortable');
$this->addjqueryPlugin('fancybox');
$this->addJS(_PS_JS_DIR_.'hookLiveEdit.js');
$this->addCSS(_PS_CSS_DIR_.'jquery.fancybox-1.3.4.css', 'all'); // @TODO
}
if ($this->context->language->is_rtl)
$this->addCSS(_THEME_CSS_DIR_.'rtl.css');
+5 -3
View File
@@ -64,6 +64,8 @@ class HelperListCore extends Helper
public $position_identifier;
public $table_id;
/**
* @var string Customize list display
*
@@ -536,8 +538,8 @@ class HelperListCore extends Helper
isset($this->context->cookie->{$this->list_id.'_pagination'}) ? $this->context->cookie->{$this->list_id.'_pagination'} : null
);
if ($this->position_identifier && (int)Tools::getValue($this->position_identifier, 1))
$table_id = substr($this->identifier, 3, strlen($this->identifier));
if (!isset($this->table_id) && $this->position_identifier && (int)Tools::getValue($this->position_identifier, 1))
$this->table_id = substr($this->identifier, 3, strlen($this->identifier));
if ($this->position_identifier && ($this->orderBy == 'position' && $this->orderWay != 'DESC'))
$table_dnd = true;
@@ -628,7 +630,7 @@ class HelperListCore extends Helper
'id_cat' => $id_cat,
'shop_link_type' => $this->shopLinkType,
'has_actions' => !empty($this->actions),
'table_id' => isset($table_id) ? $table_id : null,
'table_id' => isset($this->table_id) ? $this->table_id : null,
'table_dnd' => isset($table_dnd) ? $table_dnd : null,
'name' => isset($name) ? $name : null,
'name_id' => isset($name_id) ? $name_id : null,