Skip to content
Snippets Groups Projects
Commit 4fc8124a authored by Julian Maurice's avatar Julian Maurice
Browse files

hotline #16951 Reset DOM changes in calendar header introduced by #16320

because they break some skins
parent e21c1065
Branches
Tags
6 merge requests!529Hotline 6.56,!512Master,!467Master,!465Hotline 6.54,!461Hotline/16760 ccbm type doc not correctly set at update,!457Hotline/16951 agenda month and arrow disappear
......@@ -206,9 +206,9 @@ class ZendAfi_View_Helper_Calendar_Table extends Zend_View_Helper_HtmlElement {
' »',
$anchor_class);
$tds_content = $this->view->tag('td', $previews_month, ['class' => 'calendar_title_left_arrow']);
$tds_content.= $this->view->tag('td', $current_month, ['class' => 'calendar_title_month']);
$tds_content.= $this->view->tag('td', $next_month, ['class' => 'calendar_title_right_arrow']);
$tds_content = $this->view->tag('td', '', ['class' => 'calendar_title_left_arrow']);
$tds_content .= $this->view->tag('td', $previews_month . $current_month . $next_month, ['class' => 'calendar_title_month']);
$tds_content .= $this->view->tag('td', '', ['class' => 'calendar_title_right_arrow']);
return $this->view->tag('tr', $tds_content, ['class' => 'calendar_title']);
}
......
var ajaxify_calendars = function () {
var month_link = $(".calendar_ajax_ready, .calendar_title_left_arrow a, .calendar_title_right_arrow a, .calendar .month_list a:not(.no_event), .filters a");
var month_link = $(".calendar_ajax_ready, a.calendar_title_month_clickable:first-child, a.calendar_title_month_clickable:last-child, .calendar .month_list a:not(.no_event), .filters a");
month_link.click(function(event) {
var url = $(this).attr('href');
......
......@@ -342,4 +342,44 @@ class CmsControllerCalendarActionWithDayTest extends AbstractControllerTestCase
$this->assertXPath('//div[@class="calendar"]//table//a[contains(@class, "day_clickable")][contains(@href, "date/2014-09-15")]');
}
}
class CmsControllerCalendarActionHeaderTest extends AbstractControllerTestCase {
public function setUp() {
parent::setUp();
$this->cfg_accueil = [
'modules' => [
'1' => [
'division' => '1',
'type_module' => 'CALENDAR',
'preferences' => [
'titre' => 'Rendez-vous',
'rss_avis' => false,
'id_categorie' => '12-2',
'display_cat_select' => true,
'enabled_filters' => 'date;place;custom_field_2;zork',
'display_event_info' => 'none'
]
]
],
'options' => []
];
$this->fixture('Class_Profil',
['id' => 3,
'browser' => 'opac',
'libelle' => 'Rendez-vous',
'cfg_accueil' => $this->cfg_accueil]);
$this->dispatch('/index/index/id_profil/3');
}
/** @test */
public function calendarHeaderShouldContainsThreeLinks() {
$this->assertXPathCount(3, '//td[@class="calendar_title_month"]/a');
$this->assertXPathContentContains('//td[@class="calendar_title_month"]/a[1]', '«');
$this->assertXPathContentContains('//td[@class="calendar_title_month"]/a[3]', '»');
}
}
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment