From dacb4f7eb4d2beebbf5d11099669e280994411f8 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Tue, 22 Nov 2011 16:36:10 +0000 Subject: [PATCH] // delete multiple button save in AdminStatsTabController and added juery ui datepicker --- admin-dev/themes/template/stats/calendar.tpl | 16 ++++++++++-- .../admin/AdminReferrersController.php | 25 ------------------- controllers/admin/AdminStatsTabController.php | 12 ++------- 3 files changed, 16 insertions(+), 37 deletions(-) diff --git a/admin-dev/themes/template/stats/calendar.tpl b/admin-dev/themes/template/stats/calendar.tpl index aadce2307..a2e10cb8d 100644 --- a/admin-dev/themes/template/stats/calendar.tpl +++ b/admin-dev/themes/template/stats/calendar.tpl @@ -40,13 +40,25 @@

{if isset($translations.From)}{$translations.From}{else}{l s='From:'}{/if} - +

{if isset($translations.To)}{$translations.To}{else}{l s='From:'}{/if} - +

+ + +
 
diff --git a/controllers/admin/AdminReferrersController.php b/controllers/admin/AdminReferrersController.php index 817a84d50..eb51cc80f 100644 --- a/controllers/admin/AdminReferrersController.php +++ b/controllers/admin/AdminReferrersController.php @@ -160,26 +160,6 @@ class AdminReferrersControllerCore extends AdminController $this->_group = 'GROUP BY sa.id_referrer'; - $this->toolbar_btn['save-calendar'] = array( - 'href' => '#', - 'desc' => $this->l('Save Calendar') - ); - - $this->toolbar_btn['save-settings'] = array( - 'href' => '#', - 'desc' => $this->l('Save Settings') - ); - - $this->toolbar_btn['refresh-index'] = array( - 'href' => '#', - 'desc' => $this->l('Refresh Index') - ); - - $this->toolbar_btn['refresh-cache'] = array( - 'href' => '#', - 'desc' => $this->l('Refresh Cache') - ); - $this->tpl_list_vars = array( 'enable_calendar' => $this->enableCalendar(), 'calendar_form' => $this->displayCalendar(), @@ -419,11 +399,6 @@ class AdminReferrersControllerCore extends AdminController public function initView() { - $this->toolbar_btn['save-calendar'] = array( - 'href' => '#', - 'desc' => $this->l('Save Calendar') - ); - $referrer = new Referrer((int)Tools::getValue('id_referrer')); $display_tab = array( diff --git a/controllers/admin/AdminStatsTabController.php b/controllers/admin/AdminStatsTabController.php index 4d4c6e304..78ef1fd45 100644 --- a/controllers/admin/AdminStatsTabController.php +++ b/controllers/admin/AdminStatsTabController.php @@ -38,16 +38,6 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor { $this->toolbar_title = $this->l('Stats'); - $this->toolbar_btn['save-calendar'] = array( - 'href' => '#', - 'desc' => $this->l('Save Calendar') - ); - - $this->toolbar_btn['save-settings'] = array( - 'href' => '#', - 'desc' => $this->l('Save Settings') - ); - if ($this->display == 'view') { // Some controllers use the view action without an object @@ -86,6 +76,8 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor $context = Context::getContext(); $tpl = $context->smarty->createTemplate('stats/calendar.tpl'); + $context->controller->addJqueryUI('ui.datepicker'); + $tpl->assign(array( 'current' => self::$currentIndex, 'token' => $token,