From 16f183e8a7c6434e498e3e676dfbf7f51b3dde7f Mon Sep 17 00:00:00 2001 From: lLefevre Date: Fri, 30 Dec 2011 15:54:01 +0000 Subject: [PATCH] // fix check default theme in AdminShopController --- controllers/admin/AdminShopController.php | 9 ++++++++- js/toolbar.js | 6 ++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/controllers/admin/AdminShopController.php b/controllers/admin/AdminShopController.php index c9c37f55f..84c816e34 100755 --- a/controllers/admin/AdminShopController.php +++ b/controllers/admin/AdminShopController.php @@ -313,6 +313,13 @@ class AdminShopControllerCore extends AdminController ); $themes = Theme::getThemes(); + if (!isset($obj->id_theme)) + foreach ($themes as $theme) + if (isset($theme->id)) + { + $id_theme = $theme->id; + break; + } $this->fields_form['input'][] = array( 'type' => 'theme', @@ -390,7 +397,7 @@ class AdminShopControllerCore extends AdminController $this->fields_value = array( 'id_group_shop' => $obj->id_group_shop, 'active' => true, - 'id_theme_checked' => isset($obj->id_theme) ? $obj->id_theme : 0 + 'id_theme_checked' => isset($obj->id_theme) ? $obj->id_theme : $id_theme ); $this->tpl_form_vars = array( diff --git a/js/toolbar.js b/js/toolbar.js index bfc2dfbe1..5b50ca6c7 100644 --- a/js/toolbar.js +++ b/js/toolbar.js @@ -28,12 +28,14 @@ $(document).ready(function(){ else if ($(this).hasClass("fix-toolbar") && (!window_is_more_than_twice_the_toolbar || (viewTop <= placeholderTop)) ) { $(this).removeClass("fix-toolbar"); + $(this).removeAttr('style'); + $(this).parent().removeAttr('style'); } } }); }); // end bind - // if count errors + // if count errors $('#hideError').live('click', function(e) { e.preventDefault(); @@ -43,7 +45,7 @@ $(document).ready(function(){ return false; }); - // if count warnings + // if count warnings $('#linkSeeMore').live('click', function(e){ e.preventDefault(); $('#seeMore').show('slow');