Commit 63c1d6f0 authored by Carsten Schoenert's avatar Carsten Schoenert

New upstream version 3.5.2+dfsg1

parent c4517b5a
/*
* This Gruntfile serves to build the tokenizr library from source.
*/
/* global module: true */
module.exports = function (grunt) {
grunt.loadNpmTasks("grunt-browserify");
grunt.initConfig({
browserify: {
"tokenizr": {
files: {
"client/third-party/tokenizr/tokenizr.js": [ "node_modules/tokenizr/src/tokenizr.js" ]
},
options: {
transform: [
[ "babelify", {
presets: [
[ "@babel/preset-env", {
"targets": {
"browsers": "last 2 versions, > 1%, ie 11"
}
} ]
]
} ]
],
plugin: [
[ "browserify-derequire" ]
],
browserifyOptions: {
standalone: "Tokenizr",
debug: false
}
}
}
}
});
grunt.registerTask("default", [ "browserify" ]);
};
......@@ -40,3 +40,22 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
====================================================================================================
TinyMCE
Copyright, Moxiecode Systems AB. Released under LGPL License: http://www.tinymce.com/license
====================================================================================================
Tokenizer
Copyright (c) 2015-2018 Ralf S. Engelschall (http://engelschall.com/)
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and
associated documentation files (the "Software"), to dealin the Software without restriction, including
without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included inall copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
......@@ -47,6 +47,7 @@ IMAGEDIR = client/resources/images
IMAGES = $(wildcard $(IMAGEDIR)/*.* $(IMAGEDIR)/whatsnew/*.*)
IMAGESDEST = $(addprefix $(DESTDIR)/, $(IMAGES))
APPICONS = $(wildcard $(IMAGEDIR)/app-icons/*.*)
APPICONSDEST = $(addprefix $(DESTDIR)/, $(APPICONS))
APPICONSSCSS = client/resources/scss/base/_icons.scss
APPICONSEXTENSIONSFILE = client/resources/images/app-icons.extensions.json
EXTJSMODFILES = $(wildcard client/extjs-mod/*.js)
......@@ -58,6 +59,7 @@ ICONSETSDEST = $(addprefix $(DESTDIR)/client/resources/iconsets/, $(ICONSETS))
ICONSETSCSS = $(foreach iconsetdir,$(ICONSETS),client/resources/iconsets/$(iconsetdir)/$(iconsetdir)-icons.css)
ICONSETSCSSDEST = $(addprefix $(DESTDIR)/, $(ICONSETSCSS))
EXTJS = client/extjs/ext-base.js client/extjs/ext-all.js
THIRDPARTY = $(shell find client/third-party -name '*.js') client/third-party/tokenizr/tokenizr.js
POFILES = $(wildcard server/language/*/*/*.po)
JSFILES = $(shell find client/zarafa -name '*.js')
......@@ -75,11 +77,13 @@ test: jstest
server: $(MOS) $(LANGTXTDEST) $(PHPFILES) $(DESTDIR)/$(APACHECONF) $(DISTFILES) $(ROBOTS) $(HTACCESS) $(DESTDIR)/version $(SERVERROOTFILES)
client: $(CSSDEST) $(ICONSETSDEST) $(IMAGESDEST) $(KOPANOCSS) js
client: $(CSSDEST) $(ICONSETSDEST) $(IMAGESDEST) $(KOPANOCSS) $(APPICONSDEST) js
cp -r client/resources/fonts $(DESTDIR)/client/resources/
cp -r client/resources/scss $(DESTDIR)/client/resources/
cp -r client/resources/config.rb $(DESTDIR)/client/resources/
cp -r client/resources/iconsets $(DESTDIR)/client/resources/
cp -r client/zarafa/core/themes $(DESTDIR)/client/
cp -r client/resources/images/app-icons $(DESTDIR)/client/resources/images/
rm -rf $(DESTDIR)/client/themes/*/js
# TODO use separate targets
......@@ -152,10 +156,15 @@ $(JSDEPLOY)/resize.js: client/resize.js
cat client/resize.js > $(JSDEPLOY)/resize-debug.js
$(JSCOMPILER) --js $(@:.js=-debug.js) --js_output_file $@
$(JSDEPLOY)/third-party/ux-thirdparty.js: $(JSDEPLOY)/third-party/TinyMceTextArea-debug.js client/third-party/tokenizr/tokenizr.min.js
$(JSDEPLOY)/third-party/ux-thirdparty.js: $(THIRDPARTY)
mkdir -p $(JSDEPLOY)/third-party
# concatenate using cat
cat $^ > $@
cat $^ > $(@:.js=-debug.js)
$(JSCOMPILER) --js $(@:.js=-debug.js) --js_output_file $@ \
--source_map_location_mapping=$(JSDEPLOY)/\| \
--output_wrapper="%output%//# sourceMappingURL=$(shell basename $@.map)" \
--create_source_map $@.map \
$(JSOPTIONS) --jscomp_off=checkVars
$(JSDEPLOY)/third-party/TinyMceTextArea-debug.js: client/third-party/tinymce/TinyMceTextArea.js
mkdir -p $(JSDEPLOY)/third-party
......@@ -236,6 +245,18 @@ app-icons: $(APPICONSSCSS)
$(APPICONSSCSS): $(APPICONS) $(APPICONSEXTENSIONSFILE) node_modules
$(NPM) run app-icons
# Tokenizr library
# This rule should not be enabled until our build server supports nodejs.
# Just build the tokenizr library locally by running `make tokenizr` whenever
# something has changed. (i.e. the tokenizr lib has been updated)
#client/third-party/tokenizr/tokenizr.js: tokenizr
# $(NPM) run build:tokenizr
.PHONY: tokenizr
tokenizr: node_modules
$(NPM) run build:tokenizr
# Plugins
.PHONY: plugins
......@@ -249,4 +270,4 @@ clean:
@rm -rf node_modules
print-% :
@echo $* = $($*)
\ No newline at end of file
@echo $* = $($*)
This diff is collapsed.
......@@ -176,3 +176,55 @@ table.inner {
td.calendar-item {
width: 100%;
}
/* line 82, ../../scss/external/print.calendar.scss */
.k-calendar-header {
border: 1px solid black;
}
/* line 86, ../../scss/external/print.calendar.scss */
table.k-calendar-days {
margin-top: 5px;
}
/* line 89, ../../scss/external/print.calendar.scss */
table.k-calendar-days th {
border: 1px solid black;
text-align: center;
background-color: lightgrey;
width: 14.28% !important;
}
/* line 96, ../../scss/external/print.calendar.scss */
table.k-calendar-days td {
border: 1px solid #000;
vertical-align: top;
text-align: left;
}
/* line 101, ../../scss/external/print.calendar.scss */
table.k-calendar-days td svg.k-appointment-status {
position: absolute;
display: inline-block;
width: 7px;
top: 0;
left: 0;
bottom: 0;
}
/* line 110, ../../scss/external/print.calendar.scss */
table.k-calendar-days td .k-appointment {
font-size: 14px;
width: 90%;
height: 20px;
border-radius: 4px;
line-height: 1.5;
background-color: #FFF;
position: absolute;
left: 2.5%;
margin-bottom: 1px;
}
/* line 122, ../../scss/external/print.calendar.scss */
table.k-calendar-days td .k-overflow-indicator {
display: inline-block;
position: absolute;
bottom: 0px;
right: 0px;
height: 10px;
}
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path style="fill:#6d6d70" d="m3.6797 1c-.3771 0-.6797.3026-.6797.6797v.3203h-1c-.5540 0-1 .4460-1 1v11c0 .554.446 1 1 1h4v-2h-3v-8h10v1h2v-3c0-.554-.446-1-1-1h-1v-.3203c0-.3771-.303-.6797-.680-.6797h-1.64c-.377 0-.680.3026-.680.6797v.3203h-4v-.3203c0-.3771-.3026-.6797-.6797-.6797zm1.3203 5c-.554 0-1 .446-1 1s.446 1 1 1 1-.446 1-1-.446-1-1-1zm0 3c-.554 0-1 .446-1 1s.446 1 1 1 1-.446 1-1-.446-1-1-1z"/>
<path style="fill:#19b5f1" d="m10.41 6.839v1.6211c-.5578.0439-2.3128-.1146-2.8344.1428-0.489.29168-.62787.91419-.55913 1.4438.01262 1.2287-.03351 3.816.02655 5.0429.11582.59185.74767 1.0051 1.3368.89154 2.2302-.0076 4.4605.01764 6.6906-.01316.66183-.10588 1.0194-.85312.91010-1.4707-.0278-.59850.09577-2.1094-.11576-2.6835-.23781-.4929-.82420-.71804-1.3458-.63712h-.77742v1.6813h.55945c.0018.56050.0019.88136 0 1.4419h-5.6018c-.0037-1.3078-.0037-2.8507 0-4.1586l1.7108.0002v1.6205l2.742-2.461z"/>
</svg>
......@@ -288,8 +288,8 @@ $calendar-tab-height: 30px;
.k-calendar-timestrip-indicator-icon
{
height: 12px;
width: 12px;
height: 16px;
width: 16px;
left: 6px;
position: absolute;
}
......
......@@ -100,14 +100,18 @@ td.x-grid3-hd-menu-open .x-grid3-hd-inner {
padding: 0;
text-align: center;
/* reposition the icon headers */
p {
position: relative;
display: inline-block;
min-width: 20px;
.title {
display: none;
.zarafa-x-grid3-hd-title {
text-overflow: clip;
/* reposition the icon headers */
p {
position: relative;
display: inline-block;
min-width: 20px;
.title {
display: none;
}
}
}
}
......
......@@ -14,7 +14,7 @@
}
/* The tooltip for the calendar appointments */
.zarafa-appointment-tooltip {
.x-tip.zarafa-appointment-tooltip {
z-index: 9000 !important;
.x-tip-tc,
......@@ -33,6 +33,7 @@
}
.x-tip-body {
color: $white;
white-space: normal;
}
h2 {
......
......@@ -79,3 +79,52 @@ td.calendar-item {
width: 100%;
}
.k-calendar-header {
border: 1px solid black;
}
table.k-calendar-days {
margin-top: 5px;
th {
border: 1px solid black;
text-align: center;
background-color: lightgrey;
width: 14.28% !important;
}
td {
border: 1px solid #000;
vertical-align: top;
text-align: left;
svg.k-appointment-status{
position: absolute;
display: inline-block;
width: 7px;
top: 0;
left: 0;
bottom: 0;
}
.k-appointment {
font-size:14px;
width: 90%;
height:20px;
border-radius: 4px;
line-height: 1.5;
background-color:#FFF;
position: absolute;
left:2.5%;
margin-bottom: 1px;
}
.k-overflow-indicator {
display: inline-block;
position: absolute;
bottom: 0px;
right: 0px;
height: 10px;
}
}
}
\ No newline at end of file
License
Copyright (c) 2015-2018 Ralf S. Engelschall (http://engelschall.com/)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Tokenizr in Kopano WebApp
The tokenizr library can be found at https://github.com/rse/tokenizr
To build the library and copy it into the WebApp simply run:
make tokenizr
The needed node_modules will be installed and the library will be build
into client/third-party/tokenizr (the same directory where this README
is located)
During the WebApp build the library will be concatenated to the other
third-party libraries and compiled by the closure compiler.
Note: Since our build server cannot (yet?) run node scripts, the building
of the tokenizr library must be done by the developer when he changes the
source!
Tokenizr in Kopano WebApp
=========================
The tokenizr library can be found at https://github.com/rse/tokenizr
However we made a small adjustment to support unicode matching rules
Until this changed has been merged into the original master branch,
the following branch should be used:
https://github.com/rotous/tokenizr/tree/unicode-support
This diff is collapsed.
This diff is collapsed.
......@@ -64,7 +64,7 @@ Zarafa.ABOUT = ""
+ "<h1>TinyMCE PowerPaste</h1>"
+ "<p>Copyright (C) 2015 Ephox Corporation</p>"
+ "<p>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 "
......@@ -76,4 +76,27 @@ Zarafa.ABOUT = ""
+ "GNU Affero General Public License for more details.</p>"
+ "You should have received a copy of the GNU Affero General Public License "
+ "along with this program. If not, see <a href=\"https://www.gnu.org/licenses/\" target=\"_blank\">https://www.gnu.org/licenses/</a>.</p>";
+ "along with this program. If not, see <a href=\"https://www.gnu.org/licenses/\" target=\"_blank\">https://www.gnu.org/licenses/</a>.</p>"
+ "<h1>Tokenizr -- String Tokenization Library</h1>"
+ "<p>Copyright (c) 2015-2018 Ralf S. Engelschall <a href=\"mailto:rse@engelschall.com\">rse@engelschall.com</a></p>"
+ "Permission is hereby granted, free of charge, to any person obtaining"
+ "a copy of this software and associated documentation files (the"
+ "\"Software\"), to deal in the Software without restriction, including"
+ "without limitation the rights to use, copy, modify, merge, publish,"
+ "distribute, sublicense, and/or sell copies of the Software, and to"
+ "permit persons to whom the Software is furnished to do so, subject to"
+ "the following conditions:</p>"
+ "<p>The above copyright notice and this permission notice shall be included"
+ "in all copies or substantial portions of the Software.</p>"
+ "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,"
+ "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF"
+ "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT."
+ "IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY"
+ "CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,"
+ "TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE"
+ "SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>";
......@@ -993,7 +993,7 @@ Ext.apply(Zarafa, {
var svg = atob(matches[1]);
// Simply replace the color codes
var svgRecolored = svg.replace(activeIconset['primary-color'], themeIconsPrimaryColor).replace(activeIconset['secondary-color'], themeIconsSecondaryColor);
var svgRecolored = svg.replace(new RegExp(activeIconset['primary-color'], 'gi'), themeIconsPrimaryColor).replace(new RegExp(activeIconset['secondary-color'], 'gi'), themeIconsSecondaryColor);
// If we changed anything, replace the CSS rule to use the base64 encoded SVG
// with the new color(s)
......
......@@ -22,30 +22,52 @@ Zarafa.advancesearch.AdvanceSearchContext = Ext.extend(Zarafa.core.Context, {
Zarafa.advancesearch.AdvanceSearchContext.superclass.constructor.call(this, config);
this.registerInsertionPoint('main.toolbar.actions.last', this.createMainToolbarSearchViewButton, this);
Zarafa.core.data.SharedComponentType.addProperty('search.dialog.selectfolder');
Zarafa.core.data.SharedComponentType.addProperty('search.dialog.searchcategory');
},
/**
* Add search switch view button in main panel tool bar, which used to switch the view of
* {@link Zarafa.advancesearch.dialogs.SearchPanel search panel}.
* @return {Ext.Button} return search preview button
* @private
* Returns the buttons for the dropdown list of the VIEW-button in the main toolbar. It will use the
* main.maintoolbar.view.advancesearch insertion point to allow other plugins to add their items at the end.
*
* @return {Ext.Component[]} an array of components
*/
createMainToolbarSearchViewButton : function()
{
var menuItems = new Zarafa.common.CommonViewButtons({'context' : this});
getMainToolbarViewButtons : function(){
var items = container.populateInsertionPoint('main.maintoolbar.view.advancesearch') || [];
var defaultItems = [{
id: 'zarafa-maintoolbar-view-advancesearch-nopreview',
overflowText: _('No preview'),
iconCls: 'icon_previewpanel_off',
text: _('No preview'),
valueView : Zarafa.common.data.Views.LIST,
valueViewMode : Zarafa.common.data.ViewModes.NO_PREVIEW,
valueDataMode : Zarafa.common.data.DataModes.ALL,
handler: this.onContextSelectView,
scope: this
},{
id: 'zarafa-maintoolbar-view-advancesearch-previewright',
overflowText: _('Right preview'),
iconCls: 'icon_previewpanel_right',
text: _('Right preview'),
valueView : Zarafa.common.data.Views.LIST,
valueViewMode : Zarafa.common.data.ViewModes.RIGHT_PREVIEW,
valueDataMode : Zarafa.common.data.DataModes.ALL,
handler: this.onContextSelectView,
scope: this
},{
id: 'zarafa-maintoolbar-view-advancesearch-previewbottom',
overflowText: _('Bottom preview'),
iconCls: 'icon_previewpanel_bottom',
text: _('Bottom preview'),
valueView : Zarafa.common.data.Views.LIST,
valueViewMode : Zarafa.common.data.ViewModes.BOTTOM_PREVIEW,
valueDataMode : Zarafa.common.data.DataModes.ALL,
handler: this.onContextSelectView,
scope: this
}];
return {
xtype : 'button',
scale : 'large',
ref : 'searchView',
hidden : true,
iconCls : 'icon_large_view',
menu : menuItems
};
return defaultItems.concat(items);
},
/**
......
......@@ -33,7 +33,7 @@ Zarafa.advancesearch.KQLParser = Ext.extend(Object, {
'category'
];
var ops = [':', '=', '<>'];
var boolOps = ['AND', 'OR', 'NOT'];
var boolOps = ['AND', 'OR', 'NOT', '+', '-'];
var keyword = false;
var operator = false;
......@@ -196,6 +196,16 @@ Zarafa.advancesearch.KQLParser = Ext.extend(Object, {
var lastToken = null;
while (tokens.length) {
var token = tokens.shift();
// First rewrite + to AND and - to NOT
if ( token.type === 'operator') {
if ( token.value.op === '+' ) {
token.value.op = 'AND';
} else if ( token.value.op === '-' ) {
token.value.op = 'NOT';
}
}
if ( token.type === 'operator' && token.value.op !== 'NOT' ) {
if ( lastToken && (lastToken.type === 'expression' || lastToken.type === 'subquery') ) {
// This is fine, add the token
......
......@@ -65,9 +65,9 @@ Zarafa.advancesearch.dialogs.SearchContentPanel = Ext.extend(Zarafa.core.ui.Cont
var isSearchPanel = activeTab.isXType('zarafa.searchcontentpanel');
// Toggle the search view button.
mainToolbar.searchView.setVisible(isSearchPanel);
var contextName = container.getCurrentContext().getName();
mainToolbar.get('zarafa-maintoolbar-view-advancesearch').setVisible(isSearchPanel);
var contextName = container.getCurrentContext().getName();
switch(contextName) {
case 'calendar':
// Toggle calendar context view buttons
......
......@@ -319,6 +319,9 @@ Zarafa.calendar.CalendarContext = Ext.extend(Zarafa.core.Context, {
case Zarafa.calendar.data.DataModes.DAY:
component = Zarafa.calendar.printer.DaysViewRenderer;
break;
case Zarafa.calendar.data.DataModes.MONTH:
component = Zarafa.calendar.printer.MonthViewRenderer;
break;
}
}
break;
......@@ -605,15 +608,7 @@ Zarafa.calendar.CalendarContext = Ext.extend(Zarafa.core.Context, {
plugins : 'zarafa.menuitemtooltipplugin',
handler: this.onPrintView,
scope: this,
hideOnDisabled: false,
beforeShow: function(item, record) {
// This function is called in a different scope,
// access the context by using the 'scope' property.
var model = item.scope.getModel();
var dataMode = model.getCurrentDataMode();
item.setDisabled(dataMode == Zarafa.calendar.data.DataModes.MONTH);
}
hideOnDisabled: false
}];
return defaultItems.concat(items);
......
// -*- coding: utf-8; indent-tabs-mode: nil -*-
Ext.namespace('Zarafa.calendar.printer');
/**
* @class Zarafa.calendar.printer.AbstractViewRenderer
* @extends Zarafa.common.printer.renderers.BaseRenderer
*
* An abstract class which is used by the {@link Zarafa.calendar.printer.DaysViewRenderer DaysViewRenderer} and
* {@link Zarafa.calendar.printer.MonthViewRenderer MonthViewRenderer} to render the layout for the print appointment.
*/
Zarafa.calendar.printer.AbstractViewRenderer = Ext.extend(Zarafa.common.printer.renderers.BaseRenderer, {
/**
* @property customStylesheetPath
* @type Array of Strings
* The paths at which the print stylesheets can be found for a specific renderer
*/
customStylesheetPath: 'client/resources/css/external/print.calendar.css',
/**
* @cfg {String} timeStyle The style attribute which must be applied to the
* &lt;td&gt; element containing the timestamp for the appointment
*/
timeStyle : '',
/**
* Add additional rendering into the newly created dom tree containing the processed template
*
* @param {Document} printDOM DOM containing processed print template
* @param {Zarafa.calendar.CalendarContextModel} context calendar context to render for printing
*/
postRender: function(printDOM, context)
{
var model = context.getModel();
if(model.getCurrentDataMode() === Zarafa.calendar.data.DataModes.MONTH) {
var daterange = model.getActiveDateRange();
var left = daterange.getStartDate().clone();
var right = daterange.getDueDate().clone();
} else {
var daterange = model.dateRange;
var left = daterange.getStartDate().clone();
var right = daterange.getDueDate().clone();
right.setMonth(right.getMonth()+1);
}
/*
* Particularly in IE, Nodes are not allowed to be inserted into another document
* from the one in which they were created.
* Actually, Here we are trying to create element in printing document, using our original document which is not possible.
* As a solution, we are creating/rendering date picker into the body and than copies the html structure
* of date picker into the printing document.
*/
var leftDP, rightDP;
if (Ext.isIE11){
leftDP = new Ext.DatePicker({
renderTo: Ext.getBody(),
hidden : true,
width : '200px',
value: left,
showToday: false
});
rightDP = new Ext.DatePicker({
renderTo: Ext.getBody(),
hidden : true,
width : '200px',
value: right,
showToday: false
});
var leftPrintDomDP = printDOM.getElementById('datepicker_left');
if (leftPrintDomDP) {
leftPrintDomDP.innerHTML = leftDP.el.dom.innerHTML;
}
var rightPrintDomDP = printDOM.getElementById('datepicker_right');
if (rightPrintDomDP) {
rightPrintDomDP.innerHTML = rightDP.el.dom.innerHTML;
}
// Destroys date picker component with its element from the DOM.
leftDP.destroy();
rightDP.destroy();
} else {
leftDP = new Zarafa.calendar.ui.DatePicker({
renderTo: printDOM.getElementById('datepicker_left'),
value: left,
showToday: false
});
rightDP = new Zarafa.calendar.ui.DatePicker({
renderTo: printDOM.getElementById('datepicker_right'),
value: right,
showToday: false
});
}
}
});
\ No newline at end of file
......@@ -3,24 +3,12 @@ Ext.namespace('Zarafa.calendar.printer');
/**
* @class Zarafa.calendar.printer.DaysViewRenderer
* @extends Zarafa.common.printer.renderers.BaseRenderer
* @extends Zarafa.calendar.printer.AbstractViewRenderer
*
* Prints single day calendar overview.
* Also it serves as baseclass to be used to print other calendar appointments.
*/
Zarafa.calendar.printer.DaysViewRenderer = Ext.extend(Zarafa.common.printer.renderers.BaseRenderer, {
/**
* @property customStylesheetPath
* @type String
* The path at which the print stylesheets can be found for this renderer
*/
customStylesheetPath: 'client/resources/css/external/print.calendar.css',
/**
* @cfg {String} timeStyle The style attribute which must be applied to the
* &lt;td&gt; element containing the timestamp for the appointment
*/
timeStyle : '',
Zarafa.calendar.printer.DaysViewRenderer = Ext.extend(Zarafa.calendar.printer.AbstractViewRenderer, {
/**
* Prepares data suitable for use in an XTemplate from the component
......@@ -125,73 +113,6 @@ Zarafa.calendar.printer.DaysViewRenderer = Ext.extend(Zarafa.common.printer.rend
return data;
},
/**