Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2532746
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
12 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/plugins/calendar/print.js b/plugins/calendar/print.js
index c3c647ce..941d04c3 100644
--- a/plugins/calendar/print.js
+++ b/plugins/calendar/print.js
@@ -1,173 +1,176 @@
/**
* Print view for the Calendar plugin
*
* @author Thomas Bruederli <bruederli@kolabsys.com>
*
* @licstart The following is the entire license notice for the
* JavaScript code in this file.
*
* Copyright (C) 2011, Kolab Systems AG <contact@kolabsys.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @licend The above is the entire license notice
* for the JavaScript code in this file.
*/
/* calendar plugin printing code */
window.rcmail && rcmail.addEventListener('init', function(evt) {
// quote html entities
var Q = function(str)
{
return String(str).replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
};
var rc_loading;
var showdesc = true;
var settings = $.extend(rcmail.env.calendar_settings, rcmail.env.libcal_settings);
// create list of event sources AKA calendars
var src, event_sources = [];
var add_url = (rcmail.env.search ? '&q='+escape(rcmail.env.search) : '');
for (var id in rcmail.env.calendars) {
+ if (!rcmail.env.calendars[id].active)
+ continue;
+
source = $.extend({
url: "./?_task=calendar&_action=load_events&source=" + escape(id) + add_url,
className: 'fc-event-cal-'+id,
id: id
}, rcmail.env.calendars[id]);
event_sources.push(source);
}
var viewdate = new Date();
if (rcmail.env.date)
viewdate.setTime(rcmail.env.date * 1000);
// initalize the fullCalendar plugin
var fc = $('#calendar').fullCalendar({
header: {
left: '',
center: 'title',
right: 'agendaDay,agendaWeek,month,table'
},
aspectRatio: 0.85,
ignoreTimezone: true, // will treat the given date strings as in local (browser's) timezone
date: viewdate.getDate(),
month: viewdate.getMonth(),
year: viewdate.getFullYear(),
defaultView: rcmail.env.view,
eventSources: event_sources,
monthNames : settings['months'],
monthNamesShort : settings['months_short'],
dayNames : settings['days'],
dayNamesShort : settings['days_short'],
firstDay : settings['first_day'],
firstHour : settings['first_hour'],
slotMinutes : 60/settings['timeslots'],
timeFormat: {
'': settings['time_format'],
agenda: settings['time_format'] + '{ - ' + settings['time_format'] + '}',
list: settings['time_format'] + '{ - ' + settings['time_format'] + '}',
table: settings['time_format'] + '{ - ' + settings['time_format'] + '}'
},
axisFormat : settings['time_format'],
columnFormat: {
month: 'ddd', // Mon
week: 'ddd ' + settings['date_short'], // Mon 9/7
day: 'dddd ' + settings['date_short'], // Monday 9/7
list: settings['date_agenda'],
table: settings['date_agenda']
},
titleFormat: {
month: 'MMMM yyyy',
week: settings['dates_long'],
day: 'dddd ' + settings['date_long'],
list: settings['dates_long'],
table: settings['dates_long']
},
listSections: rcmail.env.listSections !== undefined ? rcmail.env.listSections : settings['agenda_sections'],
listRange: rcmail.env.listRange || settings['agenda_range'],
tableCols: ['handle', 'date', 'time', 'title', 'location'],
allDayText: rcmail.gettext('all-day', 'calendar'),
buttonText: {
day: rcmail.gettext('day', 'calendar'),
week: rcmail.gettext('week', 'calendar'),
month: rcmail.gettext('month', 'calendar'),
table: rcmail.gettext('agenda', 'calendar')
},
listTexts: {
until: rcmail.gettext('until', 'calendar'),
past: rcmail.gettext('pastevents', 'calendar'),
today: rcmail.gettext('today', 'calendar'),
tomorrow: rcmail.gettext('tomorrow', 'calendar'),
thisWeek: rcmail.gettext('thisweek', 'calendar'),
nextWeek: rcmail.gettext('nextweek', 'calendar'),
thisMonth: rcmail.gettext('thismonth', 'calendar'),
nextMonth: rcmail.gettext('nextmonth', 'calendar'),
future: rcmail.gettext('futureevents', 'calendar'),
week: rcmail.gettext('weekofyear', 'calendar')
},
loading: function(isLoading) {
rc_loading = rcmail.set_busy(isLoading, 'loading', rc_loading);
},
// event rendering
eventRender: function(event, element, view) {
if (view.name != 'month' && view.name != 'table') {
var cont = element.find('.fc-event-title');
if (event.location) {
cont.after('<div class="fc-event-location">@ ' + Q(event.location) + '</div>');
cont = cont.next();
}
if (event.description && showdesc) {
cont.after('<div class="fc-event-description">' + Q(event.description) + '</div>');
}
/* TODO: create icons black on white
if (event.recurrence)
element.find('.fc-event-time').append('<i class="fc-icon-recurring"></i>');
if (event.alarms)
element.find('.fc-event-time').append('<i class="fc-icon-alarms"></i>');
*/
}
if (view.name == 'table' && event.description && showdesc) {
var cols = element.children().css('border', 0).length;
element.after('<tr class="fc-event-row-secondary fc-event"><td colspan="'+cols+'" class="fc-event-description">' + Q(event.description) + '</td></tr>');
}
},
viewDisplay: function(view) {
// remove hard-coded hight and make contents visible
window.setTimeout(function(){
if (view.name == 'table') {
$('div.fc-list-content').css('overflow', 'visible').height('auto');
}
else {
$('div.fc-agenda-divider')
.next().css('overflow', 'visible').height('auto')
.children('div').css('overflow', 'visible').height('auto');
}
// adjust fixed height if vertical day slots
var h = $('table.fc-agenda-slots:visible').height() + $('table.fc-agenda-allday:visible').height() + 4;
if (h) $('table.fc-agenda-days td.fc-widget-content').children('div').height(h);
}, 20);
}
});
// activate settings form
$('#propdescription').change(function(){
showdesc = this.checked;
fc.fullCalendar('render');
});
});
diff --git a/plugins/calendar/skins/larry/print.css b/plugins/calendar/skins/larry/print.css
index 5d190f5b..ce6e8e73 100644
--- a/plugins/calendar/skins/larry/print.css
+++ b/plugins/calendar/skins/larry/print.css
@@ -1,213 +1,228 @@
/*** Printing styles for Calendar plugin ***/
body {
- margin: 0;
+ margin: 0 0 1em 0;
color: #000;
background: #fff;
}
body, td, th, div, p, h3, select, input, textarea {
font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
font-size: 8pt;
}
#calendar {
position: relative;
top: 0;
left: 0;
height: auto;
margin: 5em auto 0 auto;
overflow: visible;
}
#calendar .fc-header-right {
padding-right: 0;
}
#printconfig {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 10000;
padding: 0.5em;
background: #ebebeb;
border-bottom: 1px solid #999;
box-shadow: 0 3px 4px #ccc;
-moz-box-shadow: 0 3px 4px #ccc;
-webkit-box-shadow: 0 3px 4px #ccc;
}
#printconfig .prop {
padding-right: 2em;
}
#message {
position: absolute;
top: 5.5em;
left: 1em;
}
#message div.loading {
color: #666;
font-style: italic;
}
#calendarlist {
- list-style-type: square;
+ list-style: none;
margin: 2em 0;
padding-left: 1em;
}
+#calendarlist ul {
+ float: left;
+ list-style: none;
+ padding-left: 0;
+}
+
#calendarlist li {
+ float: left;
padding-left: 0;
- padding-right: 3em;
+ padding-right: 0;
margin-left: 0;
font-weight: bold;
}
+#calendarlist li div {
+ float: left;
+ padding-right: 3em;
+}
+
#calendarlist input,
#calendarlist .handle {
display: none;
}
#calendarlist li.x-invitations div {
color: #999;
font-style: italic;
}
.calwidth {
width: 700px;
margin: 0 auto;
}
.rightalign {
float: right;
padding-top: 0.3em;
}
@media print {
.noprint,
.fc-header-right span {
display: none;
}
#calendar {
margin-top: 0;
}
}
/* fullcalendar style overrides */
.fc-view {
overflow: visible;
}
.fc-event-skin,
.fc-event-inner .fc-event-skin {
color: black;
background-color: #fff !important;
}
.fc-event-title {
font-weight: bold;
}
.fc-event-hori .fc-event-title {
font-weight: normal;
white-space: nowrap;
}
.fc-event-hori .fc-event-time {
white-space: nowrap;
font-weight: normal !important;
font-size: 10px;
padding-right: 0.6em;
}
.fc-grid .fc-event-time {
font-weight: normal !important;
padding-right: 0.3em;
}
.fc-event-cateories {
font-style: italic;
}
.fc-event-location {
font-size: 90%;
}
.fc-agenda-slots td div {
height: 1.4em;
}
.fc-widget-header,
.fc-mon, .fc-tue, .fc-wed, .fc-thu, .fc-fri {
background-color: #fff;
}
.fc-widget-header, .fc-widget-content {
border-color: #ccc;
}
.fc-icon-alarms,
.fc-icon-recurring {
display: inline-block;
width: 11px;
height: 11px;
background: url('images/eventicons.gif') 0 0 no-repeat;
margin-left: 3px;
line-height: 10px;
}
.fc-icon-alarms {
background-position: 0 -13px;
}
.fc-view-list, .fc-view-table {
border: 0;
}
.fc-view-list div.fc-list-header,
.fc-view-table td.fc-list-header {
padding: 0.3em;
background: #fff;
font-weight: bold;
font-size: 1.2em;
color: #333;
border-color: #333;
border-style: solid;
border-width: 1px 0;
filter: none;
}
.fc-list-section .fc-event {
cursor: auto;
}
.fc-view-table tr.fc-event td,
.fc-view-table tr.fc-event td.fc-event-handle {
border-color: #999;
padding-top: 0.5em;
padding-bottom: 0.5em;
}
.fc-view-table tr.fc-last td {
border: 0;
}
.fc-view-table tr.fc-event .fc-event-description {
padding-left: 2em;
padding-top: 0em;
}
.fc-event-vert .fc-event-description {
font-size: 90%;
font-style: italic;
}
+.fc-view-month .fc-event-hori .fc-event-inner {
+ background: #fff !important;
+}
.fc-view-table col.fc-event-location {
width: 20%;
}
diff --git a/plugins/calendar/skins/larry/templates/print.html b/plugins/calendar/skins/larry/templates/print.html
index 8d7789a0..e679f729 100644
--- a/plugins/calendar/skins/larry/templates/print.html
+++ b/plugins/calendar/skins/larry/templates/print.html
@@ -1,28 +1,29 @@
<roundcube:object name="doctype" value="html5" />
<html>
<head>
<title><roundcube:object name="pagetitle" /></title>
</head>
<body class="calendarprint">
<div id="printconfig" class="noprint">
<div class="calwidth">
<a href="#close" onclick="window.close()" class="rightalign"><roundcube:label name="close" /></a>
<span class="prop"><input type="button" id="printme" value="<roundcube:label name='print' />" onclick="window.print()"></span>
<span class="prop"><label><input type="checkbox" id="propdescription" checked="checked" /> <roundcube:label name="calendar.printdescriptions" /></label></span>
</div>
</div>
<roundcube:object name="message" id="message" class="noprint" />
<div id="calendar" class="calwidth"></div>
<div class="calwidth">
<roundcube:object name="plugin.calendar_list" activeonly="true" id="calendarlist" />
+ <br style="clear:both">
</div>
<roundcube:object name="plugin.calendar_css" printmode="true" />
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="plugins/calendar/skins/classic/print.iehacks.css" /><![endif]-->
</body>
</html>
\ No newline at end of file
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Wed, Feb 4, 9:22 PM (5 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
427771
Default Alt Text
(12 KB)
Attached To
Mode
R14 roundcubemail-plugins-kolab
Attached
Detach File
Event Timeline
Log In to Comment