Bugzilla – Attachment 34040 Details for
Bug 11211
Move calculation code out of C4::Calendar
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11211 - Followups for calendar.tt
Bug-11211---Followups-for-calendartt.patch (text/plain), 5.44 KB, created by
Magnus Enger
on 2014-12-01 13:34:30 UTC
(
hide
)
Description:
Bug 11211 - Followups for calendar.tt
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2014-12-01 13:34:30 UTC
Size:
5.44 KB
patch
obsolete
>From 35bee670dc44ce0d5d8ab9842cbc83dd32b562cf Mon Sep 17 00:00:00 2001 >From: Magnus Enger <digitalutvikling@gmail.com> >Date: Mon, 1 Dec 2014 14:26:37 +0100 >Subject: [PATCH] Bug 11211 - Followups for calendar.tt > >- Make sure dates are sorted correctly in the table of unique/single events > (This is the same fix that was done on bug 13289.) >- Make sure weekdays are sorted correctly in the table of "Events repeating > weekly", including taking the CalendarFirstDayOfWeek syspref into account >- Some minor changes in the "Hints" text >- Replace "Unique event" with "Single event" in the colour coded legend, > since that is what is used on the rest of the page >- Make headers above tables and tooltips in the main calendar more in line with > the language used in the colour coded legend > >To test: >- Apply this patch on top of the other patches on this bug >- Add single events that span a month boundary >- Check that dates are sorted chronologically in the "Single events" table >- Add several weekly events and check that sorting is by the order of days in > the week, not alphabetical >- Toggle CalendarFirstDayOfWeek and check that the sorting in the "Events > repeating weekly" table behaves as it should >- Check that the other changes described above makes sense >--- > .../prog/en/modules/tools/calendar.tt | 41 ++++++++++++---------- > 1 file changed, 22 insertions(+), 19 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/calendar.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/calendar.tt >index 1aa5178..c50daf0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/calendar.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/calendar.tt >@@ -1,4 +1,5 @@ > [% USE 'JavaScript' %] >+[% USE 'Koha' %] > [% USE 'KohaDates' %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › [% branchname %] Calendar</title> >@@ -147,9 +148,9 @@ > if ( single_events[dateString] != null) { > return [true, "event", "Single event: "+single_events[dateString].title]; > } else if ( yearly_events[dayMonth] != null ) { >- return [true, "repeatableyearly", "Yearly event: "+yearly_events[dayMonth].title]; >+ return [true, "repeatableyearly", "Event repeating yearly: "+yearly_events[dayMonth].title]; > } else if ( weekly_events[weekDay] != null ){ >- return [true, "repeatableweekly", "Weekly event: "+weekly_events[weekDay].title]; >+ return [true, "repeatableweekly", "Event repeating weekly: "+weekly_events[weekDay].title]; > } else { > return [true, "normalday", "Normal day"]; > } >@@ -182,11 +183,12 @@ > $("#branch").change(function(){ > changeBranch(); > }); >- $("#weekly-events,#single-events").dataTable($.extend(true, {}, dataTablesDefaults, { >- "sDom": 't', >- "bPaginate": false >- })); >- $("#yearly-events").dataTable($.extend(true, {}, dataTablesDefaults, { >+ // Replace week number with week name >+ $("#weekly-events>tbody>tr").each(function(){ >+ var first_td_span = $(this).find('td').first().find('span'); >+ first_td_span.html(weekdays[first_td_span.html()]); >+ }); >+ $("#yearly-events,#weekly-events,#single-events").dataTable($.extend(true, {}, dataTablesDefaults, { > "sDom": 't', > "aoColumns": [ > { "sType": "title-string" },null,null,null >@@ -459,23 +461,23 @@ li.hoursentry input { > <div class="help"> > <h4>Hints</h4> > <ul> >- <li>Search in the calendar the day you want to set as event.</li> >- <li>Click the date to add or edit a event.</li> >+ <li>Search for the day you want to set as an event in the calendar.</li> >+ <li>Click the date to add or edit an event.</li> > <li>Enter a title and description for the event.</li> > <li>Specify how the event should repeat.</li> >- <li>Click Save to finish.</li> >+ <li>Click "Save" to finish.</li> > </ul> > <h4>Key</h4> > <p> > <span class="key normalday">Working day</span> >- <span class="key event">Unique event</span> >+ <span class="key event">Single event</span> > <span class="key repeatableweekly">Event repeating weekly</span> > <span class="key repeatableyearly">Event repeating yearly</span> > </p> > </div> > <div id="event-list"> > [% IF ( weekly_events ) %] >-<h3>Weekly - Repeatable Events</h3> >+<h3>Events repeating weekly</h3> > <table id="weekly-events"> > <thead> > <tr> >@@ -488,11 +490,12 @@ li.hoursentry input { > <tbody> > [% FOREACH event IN weekly_events %] > <tr> >- <td> >-<script type="text/javascript"> >- document.write(weekdays[ [% event.weekday %]]); >-</script> >- </td> >+ [%# Make sure Sundays are sorted last, if Monday should be considered the first day of the week %] >+ [% IF Koha.Preference( 'CalendarFirstDayOfWeek' ) == 'Monday' && event.weekday == 0 %] >+ <td><span title="7">[% event.weekday %]</span></td> >+ [% ELSE %] >+ <td><span title="[% event.weekday %]">[% event.weekday %]</span></td> >+ [% END %] > <td>[% event.title %]</td> > <td>[% event.description %]</td> > <td> >@@ -512,7 +515,7 @@ li.hoursentry input { > [% END %] > > [% IF ( yearly_events ) %] >-<h3>Yearly - Repeatable Events</h3> >+<h3>Events repeating yearly</h3> > <table id="yearly-events"> > <thead> > <tr> >@@ -549,7 +552,7 @@ li.hoursentry input { > [% END %] > > [% IF ( single_events ) %] >-<h3>Single Events</h3> >+<h3>Single events</h3> > <table id="single-events"> > <thead> > <tr> >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11211
:
24856
|
25528
|
25556
|
26434
|
29731
|
30959
|
32110
|
32867
|
32978
|
32992
|
33415
|
33895
|
33896
|
33898
|
33899
|
33908
| 34040