// delete multiple button save in AdminStatsTabController and added juery ui datepicker
This commit is contained in:
@@ -40,13 +40,25 @@
|
||||
<input type="submit" name="submitDateMonthPrev" class="button" value="{$translations.Month}-1" style="margin-top:2px">
|
||||
<input type="submit" name="submitDateYearPrev" class="button" value="{$translations.Year}-1" style="margin-top:2px">
|
||||
<p>{if isset($translations.From)}{$translations.From}{else}{l s='From:'}{/if}
|
||||
<input type="text" name="datepickerFrom" id="datepickerFrom" value="{$datepickerFrom}">
|
||||
<input type="text" name="datepickerFrom" id="datepickerFrom" value="{$datepickerFrom}" class="datepicker">
|
||||
</p>
|
||||
<p>{if isset($translations.To)}{$translations.To}{else}{l s='From:'}{/if}
|
||||
<input type="text" name="datepickerTo" id="datepickerTo" value="{$datepickerTo}">
|
||||
<input type="text" name="datepickerTo" id="datepickerTo" value="{$datepickerTo}" class="datepicker">
|
||||
</p>
|
||||
<input type="submit" name="submitDatePicker" id="submitDatePicker" class="button" value="{if isset($translations.Save)}{$translations.Save}{else}{l s=' Save '}{/if}" />
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
if ($("form#calendar_form .datepicker").length > 0)
|
||||
$("form#calendar_form .datepicker").datepicker({
|
||||
prevText: '',
|
||||
nextText: '',
|
||||
dateFormat: 'yy-mm-dd'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="clear space"> </div>
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user