Added basic compatibility for IE6; some visual details and performance issues remain
This commit is contained in:
parent
6eeca4efc2
commit
a9e830c9a3
8 changed files with 87 additions and 12 deletions
|
@ -52,7 +52,7 @@ function rcube_calendar_ui(settings)
|
|||
monthNamesShort: settings['months'],
|
||||
changeMonth: false,
|
||||
showOtherMonths: true,
|
||||
selectOtherMonths: true,
|
||||
selectOtherMonths: true
|
||||
};
|
||||
|
||||
|
||||
|
@ -780,6 +780,8 @@ function rcube_calendar_ui(settings)
|
|||
defaultView: settings['default_view'],
|
||||
allDayText: rcmail.gettext('all-day', 'calendar'),
|
||||
buttonText: {
|
||||
prev: (bw.ie6 ? ' << ' : ' ◄ '),
|
||||
next: (bw.ie6 ? ' >> ' : ' ► '),
|
||||
today: settings['today'],
|
||||
day: rcmail.gettext('day', 'calendar'),
|
||||
week: rcmail.gettext('week', 'calendar'),
|
||||
|
@ -875,7 +877,7 @@ function rcube_calendar_ui(settings)
|
|||
id: event.id,
|
||||
calendar: event.calendar,
|
||||
start: date2unixtime(event.start),
|
||||
end: date2unixtime(event.end),
|
||||
end: date2unixtime(event.end)
|
||||
};
|
||||
if (event.recurrence)
|
||||
recurring_edit_confirm(data, 'resize');
|
||||
|
@ -884,7 +886,8 @@ function rcube_calendar_ui(settings)
|
|||
},
|
||||
viewDisplay: function(view) {
|
||||
me.eventcount = [];
|
||||
window.setTimeout(function(){ $('div.fc-content').css('overflow', view.name == 'month' ? 'auto' : 'hidden') }, 10);
|
||||
if (!bw.ie)
|
||||
window.setTimeout(function(){ $('div.fc-content').css('overflow', view.name == 'month' ? 'auto' : 'hidden') }, 10);
|
||||
},
|
||||
windowResize: function(view) {
|
||||
me.eventcount = [];
|
||||
|
@ -928,7 +931,7 @@ function rcube_calendar_ui(settings)
|
|||
d.setMonth(month - 1);
|
||||
minical.data('year', year).data('month', month);
|
||||
//fc.fullCalendar('gotoDate', d).fullCalendar('setDate', d);
|
||||
},
|
||||
}
|
||||
}));
|
||||
window.setTimeout(init_week_events, 10);
|
||||
|
||||
|
@ -1034,6 +1037,10 @@ function rcube_calendar_ui(settings)
|
|||
|
||||
$('#calendar-color').miniColors();
|
||||
|
||||
// add proprietary css styles if not IE
|
||||
if (!bw.ie)
|
||||
$('div.fc-content').addClass('rcube-fc-content');
|
||||
|
||||
// hide event dialog when clicking somewhere into document
|
||||
$(document).bind('mousedown', dialog_check);
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ class kolab_calendar
|
|||
private $id2uid;
|
||||
private $imap_folder = 'INBOX/Calendar';
|
||||
private $namespace;
|
||||
private $search_fields = array('title', 'description', 'location');
|
||||
private $sensitivity_map = array('public', 'private', 'confidential');
|
||||
private $priority_map = array('low', 'normal', 'high');
|
||||
|
||||
|
@ -180,10 +181,23 @@ class kolab_calendar
|
|||
|
||||
$events = array();
|
||||
foreach ($this->events as $id => $event) {
|
||||
// TODO: filter events by search query
|
||||
|
||||
// filter events by search query
|
||||
if (!empty($search)) {
|
||||
$hit = false;
|
||||
foreach ($this->search_fields as $col) {
|
||||
if (empty($event[$col]))
|
||||
continue;
|
||||
|
||||
// do a simple substring matching (to be improved)
|
||||
$val = mb_strtolower($event[$col]);
|
||||
if (strpos($val, $search) !== false) {
|
||||
$hit = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$hit) // skip this event if not match with search term
|
||||
continue;
|
||||
}
|
||||
|
||||
// list events in requested time window
|
||||
|
|
|
@ -5666,9 +5666,17 @@ function TableEventRenderer() {
|
|||
}
|
||||
}
|
||||
s += "</tr>";
|
||||
|
||||
// IE doesn't like innerHTML on tbody elements so we insert every row individually
|
||||
if (document.all) {
|
||||
$(s).appendTo(segContainer);
|
||||
s = '';
|
||||
}
|
||||
}
|
||||
|
||||
segContainer[0].innerHTML = s;
|
||||
if (!document.all)
|
||||
segContainer[0].innerHTML = s;
|
||||
|
||||
eventElements = segContainer.children();
|
||||
|
||||
// retrieve elements, run through eventRender callback, bind event handlers
|
||||
|
|
|
@ -43,7 +43,7 @@ body.calendarmain {
|
|||
position: absolute;
|
||||
left: 244px;
|
||||
width: 8px;
|
||||
top: 27px;
|
||||
top: 37px;
|
||||
bottom: 0;
|
||||
background: url('images/toggle.gif') 0 48% no-repeat transparent;
|
||||
cursor: pointer;
|
||||
|
@ -226,7 +226,7 @@ pre {
|
|||
}
|
||||
|
||||
#quicksearchbar {
|
||||
right: 10px;
|
||||
right: 4px;
|
||||
}
|
||||
|
||||
#eventshow,
|
||||
|
@ -469,7 +469,7 @@ a.alarm-action-snooze:after {
|
|||
|
||||
/* fullcalendar style overrides */
|
||||
|
||||
.fc-content {
|
||||
.rcube-fc-content {
|
||||
position: absolute !important;
|
||||
top: 37px;
|
||||
left: 0;
|
||||
|
@ -543,7 +543,7 @@ div.fc-event-location {
|
|||
background: #dddddd;
|
||||
background-image: -moz-linear-gradient(center top, #f4f4f4, #d2d2d2);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.00, #f4f4f4), color-stop(1.00, #d2d2d2));
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled='true', startColorstr=#f4f4f4, endColorstr=#d2d2d2, GradientType=1);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled='true', startColorstr=#f4f4f4, endColorstr=#d2d2d2, GradientType=0);
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
|
45
plugins/calendar/skins/default/iehacks.css
Normal file
45
plugins/calendar/skins/default/iehacks.css
Normal file
|
@ -0,0 +1,45 @@
|
|||
/* CSS hacks for IE 6/7 */
|
||||
|
||||
#main {
|
||||
width: expression(Math.max(300, parseInt(document.documentElement.clientWidth)-10)+'px');
|
||||
height: expression(Math.max(300, parseInt(document.documentElement.clientHeight)-100)+'px');
|
||||
}
|
||||
|
||||
#sidebar,
|
||||
#sidebartoggle {
|
||||
height: expression((parseInt(this.parentNode.offsetHeight)-37)+'px');
|
||||
}
|
||||
|
||||
#calendar {
|
||||
width: expression((parseInt(this.parentNode.offsetWidth)-parseInt(document.getElementById('sidebartoggle').offsetWidth)-parseInt(document.getElementById('sidebartoggle').offsetLeft)-4)+'px');
|
||||
height: expression(parseInt(this.parentNode.offsetHeight)+'px');
|
||||
}
|
||||
|
||||
#calendars {
|
||||
height: expression((parseInt(this.parentNode.offsetHeight)-220)+'px');
|
||||
}
|
||||
|
||||
#calendartoolbar a.buttonPas {
|
||||
filter: alpha(opacity=35);
|
||||
}
|
||||
|
||||
html #taskbar a.button-calendar {
|
||||
background-image: url(images/calendar.gif);
|
||||
}
|
||||
|
||||
html #calendartoolbar a.button,
|
||||
html #calendartoolbar a.buttonPas {
|
||||
background-image: url(images/toolbar.gif);
|
||||
}
|
||||
|
||||
html.ie #datepicker a.ui-priority-secondary {
|
||||
filter: alpha(opacity=40);
|
||||
}
|
||||
|
||||
#datepicker .ui-widget-header {
|
||||
width: 102%;
|
||||
}
|
||||
|
||||
.fc-header-title h2 {
|
||||
font-size: 16px;
|
||||
}
|
BIN
plugins/calendar/skins/default/images/calendar.gif
Normal file
BIN
plugins/calendar/skins/default/images/calendar.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 546 B |
BIN
plugins/calendar/skins/default/images/toolbar.gif
Normal file
BIN
plugins/calendar/skins/default/images/toolbar.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 6 KiB |
|
@ -3,6 +3,7 @@
|
|||
<head>
|
||||
<title><roundcube:object name="pagetitle" /></title>
|
||||
<roundcube:include file="/includes/links.html" />
|
||||
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="./plugins/calendar/skins/default/iehacks.css" /><![endif]-->
|
||||
<script type="text/javascript" src="/functions.js"></script>
|
||||
</head>
|
||||
<body class="calendarmain">
|
||||
|
|
Loading…
Add table
Reference in a new issue