mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-25 16:33:22 +00:00
Creation of the first version of the printing interface
This commit is contained in:
@@ -33,6 +33,13 @@ var categoriesStyleSheet = null;
|
||||
var clipboard = null;
|
||||
var eventsToCopy = [];
|
||||
|
||||
function printView() {
|
||||
|
||||
window.open("printView","","width=660,height=470");
|
||||
|
||||
return false; /* stop following the link */
|
||||
}
|
||||
|
||||
function newEvent(type, day, hour, duration) {
|
||||
var folder = null;
|
||||
if (UserDefaults['SOGoDefaultCalendar'] == 'personal')
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
|
||||
BODY
|
||||
{
|
||||
top: 1em;
|
||||
bottom: 1em;
|
||||
right: 1em;
|
||||
left: 1em;
|
||||
overflow:scroll;
|
||||
}
|
||||
|
||||
.toolbar
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
|
||||
|
||||
#labelTitle
|
||||
{
|
||||
width:100%;
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
|
||||
#printButton
|
||||
{
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
DIV#leftSide
|
||||
{
|
||||
min-height:370px;
|
||||
max-height:370px;
|
||||
max-width:220px;
|
||||
min-width:220px;
|
||||
float:left;
|
||||
}
|
||||
|
||||
DIV#rightSide
|
||||
{
|
||||
min-height:370px;
|
||||
max-height:370px;
|
||||
min-width:330px;
|
||||
max-width:330px;
|
||||
float:right;
|
||||
|
||||
}
|
||||
DIV#rightFrame
|
||||
{
|
||||
min-height:350px;
|
||||
max-height:350px;
|
||||
background-color:#FFFFFF;
|
||||
border-radius:8px;
|
||||
border-top: 1px solid #909090;
|
||||
border-left: 1px solid #909090;
|
||||
border-bottom: 1px solid #FFFFFF;
|
||||
border-right: 1px solid #FFFFFF;
|
||||
margin-top: 12px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 1em;
|
||||
padding-left:10px;
|
||||
padding-right:10px;
|
||||
overflow:scroll;
|
||||
}
|
||||
|
||||
#dateRangeFrom, #dateRangeTo
|
||||
{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* Overiding the general.css */
|
||||
|
||||
TABLE.frame{
|
||||
width:97%;
|
||||
text-align: left;
|
||||
background:#dddddd;
|
||||
border-radius:8px;
|
||||
display:table;
|
||||
}
|
||||
|
||||
#startingDate, #endingDate
|
||||
{
|
||||
width:auto;
|
||||
vertical-align:8px;
|
||||
}
|
||||
#labelFrom, #labelTo
|
||||
{
|
||||
vertical-align:8px;
|
||||
}
|
||||
|
||||
SPAN.caption
|
||||
{
|
||||
background: -webkit-linear-gradient(bottom, #E6E7E6, #dddddd); /* For Safari 5.1 to 6.0 */
|
||||
background: -o-linear-gradient(bottom, #E6E7E6, #dddddd); /* For Opera 11.1 to 12.0 */
|
||||
background: -moz-linear-gradient(bottom, #E6E7E6, #dddddd); /* For Firefox 3.6 to 15 */
|
||||
background: linear-gradient(to bottom, #E6E7E6, #dddddd); /* Standard syntax (must be last) */
|
||||
}
|
||||
|
||||
|
||||
/******************************/
|
||||
|
||||
@media print
|
||||
{
|
||||
.no-print, SPAN.caption
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
DIV#rightSide
|
||||
{
|
||||
border:solid red 1px;
|
||||
max-width:100%;
|
||||
max-height:99%;
|
||||
float:none;
|
||||
}
|
||||
DIV#rightFrame
|
||||
{
|
||||
border:solid green 1px;
|
||||
width:100%;
|
||||
height:99%;
|
||||
marging: 0;
|
||||
padding: 0;
|
||||
//border:0;
|
||||
overflow:visible;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/* -*- Mode: js2-mode; tab-width: 4; c-label-minimum-indentation: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
|
||||
/*
|
||||
Copyright (C) 2005 SKYRIX Software AG
|
||||
Copyright (C) 2006-2011 Inverse
|
||||
|
||||
This file is part of OpenGroupware.org.
|
||||
|
||||
OGo is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License as published by the
|
||||
Free Software Foundation; either version 2, or (at your option) any
|
||||
later version.
|
||||
|
||||
OGo 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 Lesser General Public
|
||||
License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with OGo; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
this.onAdjustTime = function(event) {
|
||||
onAdjustDueTime(event);
|
||||
};
|
||||
|
||||
this.onAdjustDueTime = function(event) {
|
||||
/*var dateDelta = (window.getStartDate().valueOf() - window.getShadowStartDate().valueOf());
|
||||
var newDueDate = new Date(window.getDueDate().valueOf() + dateDelta);
|
||||
window.setDueDate(newDueDate);*/
|
||||
|
||||
window.timeWidgets['start']['date'].updateShadowValue();
|
||||
};
|
||||
|
||||
this.initTimeWidgets = function (widgets) {
|
||||
this.timeWidgets = widgets;
|
||||
|
||||
jQuery(widgets['start']['date']).closest('.date').datepicker({autoclose: true, weekStart: 0, position: "bellow"});
|
||||
jQuery(widgets['end']['date']).closest('.date').datepicker({autoclose: true, weekStart: 0, position: "bellow"});
|
||||
|
||||
//jQuery(widgets['start']['date']).change(onAdjustTime);
|
||||
|
||||
/*jQuery(widgets['startingDate']['date']).closest('.date').datepicker({autoclose: true,
|
||||
weekStart: 0,
|
||||
endDate: lastDay,
|
||||
startDate: firstDay,
|
||||
setStartDate: lastDay,
|
||||
startView: 2,
|
||||
position: "below-shifted-left"});*/
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
function onPrintCancelClick(event) {
|
||||
this.blur();
|
||||
onCloseButtonClick(event);
|
||||
}
|
||||
|
||||
function onPrintClick(event) {
|
||||
this.blur();
|
||||
window.print();
|
||||
}
|
||||
|
||||
|
||||
|
||||
function init() {
|
||||
|
||||
$("cancelButton").observe("click", onPrintCancelClick);
|
||||
$("printButton").observe("click", onPrintClick);
|
||||
|
||||
var widgets = {'start': {'date': $("startingDate")},
|
||||
'end': {'date': $("endingDate")}};
|
||||
initTimeWidgets(widgets);
|
||||
|
||||
}
|
||||
|
||||
document.observe("dom:loaded", init);
|
||||
Reference in New Issue
Block a user