Merge branch 'master' of ssh://git.kolabsys.com/git/roundcube
This commit is contained in:
commit
db94c1ef68
7 changed files with 1498 additions and 7 deletions
|
@ -111,6 +111,7 @@ class calendar extends rcube_plugin
|
|||
$this->register_action('freebusy-status', array($this, 'freebusy_status'));
|
||||
$this->register_action('freebusy-times', array($this, 'freebusy_times'));
|
||||
$this->register_action('randomdata', array($this, 'generate_randomdata'));
|
||||
$this->register_action('print',array($this,'print_view'));
|
||||
}
|
||||
else if ($this->rc->task == 'settings') {
|
||||
// add hooks for Calendar settings
|
||||
|
@ -1190,5 +1191,34 @@ class calendar extends rcube_plugin
|
|||
echo json_encode($result);
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle for printing calendars
|
||||
*/
|
||||
|
||||
public function print_view()
|
||||
{
|
||||
|
||||
|
||||
$this->rc->output->set_pagetitle($this->gettext('Print'));
|
||||
$this->rc->output->set_env('nview', get_input_value('nview', RCUBE_INPUT_GPC));
|
||||
// Add CSS stylesheets to the page header
|
||||
$skin = $this->rc->config->get('skin');
|
||||
$this->include_stylesheet('skins/' . $skin . '/fullcalendar.css');
|
||||
$this->include_stylesheet('skins/' . $skin . '/fullcalendar.printl.css');
|
||||
|
||||
// Add JS files to the page header
|
||||
$this->include_script('print.js');
|
||||
|
||||
$this->register_handler('plugin.calendar_css', array($this->ui, 'calendar_css'));
|
||||
$this->register_handler('plugin.calendar_list', array($this->ui, 'calendar_list'));
|
||||
$this->register_handler('plugin.calendar_select', array($this->ui, 'calendar_select'));
|
||||
|
||||
|
||||
// $this->rc->output->add_label('low','normal','high','delete','cancel','uploading','noemailwarning');
|
||||
|
||||
$this->rc->output->send("calendar.print");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -812,9 +812,9 @@ function rcube_calendar_ui(settings)
|
|||
|
||||
/*** public methods ***/
|
||||
//public method to show the print dialog.
|
||||
this.print_calendars = function() {
|
||||
this.print_calendars = function(view) {
|
||||
|
||||
calendars_print_dialog('new');
|
||||
window.open ("?_task=calendar&_action=print&nview="+view.name+"","rc_print_calendars","width=670");
|
||||
|
||||
};
|
||||
|
||||
|
@ -1415,7 +1415,7 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
|
|||
|
||||
// configure toolbar buttons
|
||||
rcmail.register_command('addevent', function(){ cal.add_event(); }, true);
|
||||
rcmail.register_command('print', function(){ cal.print_calendars(); }, true);
|
||||
rcmail.register_command('print', function(){ cal.print_calendars($('#calendar').fullCalendar('getView')); }, true);
|
||||
|
||||
// configure list operations
|
||||
rcmail.register_command('calendar-create', function(){ cal.calendar_edit_dialog(null); }, true);
|
||||
|
|
|
@ -58,7 +58,7 @@ class calendar_ui
|
|||
{
|
||||
$skin = $this->rc->config->get('skin');
|
||||
$this->calendar->include_stylesheet('skins/' . $skin . '/fullcalendar.css');
|
||||
$this->calendar->include_stylesheet('skins/' . $skin . '/jquery.miniColors.css');
|
||||
$this->calendar->include_stylesheet('skins/' . $skin . '/jquery.miniColors.css');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
1336
plugins/calendar/print.js
Normal file
1336
plugins/calendar/print.js
Normal file
File diff suppressed because it is too large
Load diff
97
plugins/calendar/skins/default/fullcalendar.printl.css
Normal file
97
plugins/calendar/skins/default/fullcalendar.printl.css
Normal file
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* FullCalendar v1.5.1 Print Stylesheet
|
||||
*
|
||||
* Include this stylesheet on your page to get a more printer-friendly calendar.
|
||||
* When including this stylesheet, use the media='print' attribute of the <link> tag.
|
||||
* Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css.
|
||||
*
|
||||
* Copyright (c) 2011 Adam Shaw
|
||||
* Dual licensed under the MIT and GPL licenses, located in
|
||||
* MIT-LICENSE.txt and GPL-LICENSE.txt respectively.
|
||||
*
|
||||
* Date: Sat Apr 9 14:09:51 2011 -0700
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* Events
|
||||
-----------------------------------------------------*/
|
||||
|
||||
/**
|
||||
.fc-event-skin {
|
||||
background: none !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.fc-event-hori {
|
||||
border-width: 0 0 1px 0 !important;
|
||||
border-bottom-style: dotted !important;
|
||||
border-bottom-color: #000 !important;
|
||||
padding: 1px 0 0 0 !important;
|
||||
}
|
||||
|
||||
.fc-event-hori .fc-event-inner {
|
||||
border-width: 0 !important;
|
||||
padding: 0 1px !important;
|
||||
}
|
||||
|
||||
|
||||
.fc-event-vert {
|
||||
border-width: 0 0 0 1px !important;
|
||||
border-left-style: dotted !important;
|
||||
border-left-color: #000 !important;
|
||||
padding: 0 1px 0 0 !important;
|
||||
}
|
||||
|
||||
.fc-event-vert .fc-event-inner {
|
||||
border-width: 0 !important;
|
||||
padding: 1px 0 !important;
|
||||
}
|
||||
|
||||
.fc-event-bg {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.fc-event .ui-resizable-handle {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* UI
|
||||
*/
|
||||
|
||||
#calendar {
|
||||
position: absolute;
|
||||
overflow: visible;
|
||||
top: 0;
|
||||
left: 2px;
|
||||
right: 2px;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
#calendars {
|
||||
position: absolute;
|
||||
display:none;
|
||||
top: 25px;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background-color: #F9F9F9;
|
||||
border: 1px solid #999999;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#main {
|
||||
position: absolute;
|
||||
clear: both;
|
||||
top: 25px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 10px;
|
||||
}
|
|
@ -204,9 +204,6 @@
|
|||
<roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" />
|
||||
</div>
|
||||
|
||||
<div id="printcalendar">
|
||||
Stub
|
||||
</div>
|
||||
<roundcube:object name="plugin.calendar_css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
31
plugins/calendar/skins/default/templates/print.html
Normal file
31
plugins/calendar/skins/default/templates/print.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<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>
|
||||
<roundcube:object name="message" id="message" />
|
||||
<body class="calendarmain">
|
||||
<div id="noprint"><input type="button" id="printme" value="Print"></div>
|
||||
<div id="main">
|
||||
<div id="printablearea">
|
||||
<div id="calendars">
|
||||
<div class="boxlistcontent">
|
||||
<roundcube:object name="plugin.calendar_list" id="calendarslist" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="calendar"></div>
|
||||
|
||||
<roundcube:object name="plugin.calendar_css" />
|
||||
</div>
|
||||
<script>
|
||||
$('#printme').click(function() {
|
||||
alert('Not working yet');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Reference in a new issue