Printing Mails

Discuss features and workflows for the Tine 2.0 email client

Printing Mails

Postby kaystrobach » Wed Jan 13, 2010 8:24 am

As you've seen, with SSO stuff I'm currently migrating the complete groupware to tine20, as it seems to be the best opensource on the market and fit my needs.

But there is a "big" problem in the felamimail App.
There is no easy way to print an email ;)
It's not really a problem for me - as i can select the text, and print the selection-, but for the people in my office.

So I suggest that there should be an print button in the mail app which opens up a new window / frame and uses window.print() to send the document to the printer and close the window afterwards.

Thanks a lot

Kay
http://www.kay-strobach.de - Open Source Rocks
User avatar
kaystrobach
Tine 2.0 Community Contributor
 
Posts: 463
Joined: Sat Jan 02, 2010 1:06 pm
Location: Germany

Re: Printing Mails

Postby ph_il » Thu Jan 14, 2010 10:33 am

yup, we already have this on our features list in the tracker: http://www.tine20.org/bugtracker/view.php?id=1278

we would like to export the emails to easily printable pdf.
Philipp Schüle
Tine 2.0 Core Developer

Visit http://www.tine20.com (commercial support, consulting and development)
Visit http://www.tine20.net (Tine 2.0 hosting)
User avatar
ph_il
Tine 2.0 Core Developer
 
Posts: 3513
Joined: Fri Mar 07, 2008 11:41 am

Re: Printing Mails

Postby kaystrobach » Sat Jan 16, 2010 1:15 pm

thanks
http://www.kay-strobach.de - Open Source Rocks
User avatar
kaystrobach
Tine 2.0 Community Contributor
 
Posts: 463
Joined: Sat Jan 02, 2010 1:06 pm
Location: Germany

Re: Printing Mails

Postby kaystrobach » Sat Jan 16, 2010 1:49 pm

Oh in the bugreport you wrote pdf export - but i mean a simple new window with the content of the mail and calling window.print().
That is easier than creating a pdf and will fit most people needs.

Thanks again
http://www.kay-strobach.de - Open Source Rocks
User avatar
kaystrobach
Tine 2.0 Community Contributor
 
Posts: 463
Joined: Sat Jan 02, 2010 1:06 pm
Location: Germany

Re: Printing Mails

Postby nelius » Sat Jan 16, 2010 3:01 pm

maybe it's even possible bo print a hidden iframe/frame in background, so we could skip the extra window
Cornelius Weiss
Tine 2.0 Lead Developer

Visit http://www.tine20.com for commercial support / consulting / development.
Visit http://www.officespot20.com for Tine 2.0 hosting.
User avatar
nelius
Tine 2.0 Core Developer
 
Posts: 1150
Joined: Tue Nov 06, 2007 7:25 pm

Re: Printing Mails

Postby kaystrobach » Sat Jan 16, 2010 5:14 pm

mhmm should be possible. your're and it's better to not open an additional window especially for webterminals. ;)

Code: Select all
function PrintIframe()
{
frames["IframeName"].focus();
frames["IframeName"].print();
}

or in the iframe

self.iframeName.focus();
self.iframeName.print();


http://bytes.com/topic/javascript/answe ... ing-iframe

regards

Kay
http://www.kay-strobach.de - Open Source Rocks
User avatar
kaystrobach
Tine 2.0 Community Contributor
 
Posts: 463
Joined: Sat Jan 02, 2010 1:06 pm
Location: Germany

Re: Printing Mails

Postby ph_il » Mon Jan 18, 2010 1:57 pm

i updated the issue in the tracker and added a link to this forum topic.

thanks for your hints!
Philipp Schüle
Tine 2.0 Core Developer

Visit http://www.tine20.com (commercial support, consulting and development)
Visit http://www.tine20.net (Tine 2.0 hosting)
User avatar
ph_il
Tine 2.0 Core Developer
 
Posts: 3513
Joined: Fri Mar 07, 2008 11:41 am

Re: Printing Mails

Postby kaystrobach » Wed Apr 28, 2010 10:12 pm

Here is some basic code to support printing from the felamimailclient.
Search for print to find the changes or make a diff to svn trunk ...

Best regards
Kay

Code: Select all
216c216,223
<         
---
>         this.action_printMessage = new Ext.Action({
>             requiredGrant: 'readGrant',
>          text: this.app.i18n._('Print'),
>             handler: this.onPrintMessage,
>             disabled:true,
>             iconCls:'action_print',
>             scope:this
>         });
225c232,233
<             this.action_addAccount
---
>             this.action_addAccount,
>             this.action_printMessage
227d234
<         
348c355,356
<                         this.action_markUnread
---
>                         this.action_markUnread,
>                         this.action_printMessage
853c861,876
<     
---
>       
>     onPrintMessage:function() {
>         if(!Ext.get('felamimailPrintHelperIframe')) {
>          Ext.getBody().createChild({
>             id: 'felamimailPrintHelper',
>             tag:'div',
>             //style:'position:absolute;top:0px;width:100%;height:100%;',
>             children:[{
>                tag:'iframe',
>                id: 'felamimailPrintHelperIframe'
>             }]
>          });
>       }
>       Ext.get('felamimailPrintHelperIframe').dom.contentWindow.document.documentElement.innerHTML = this.detailsPanel.getEl().dom.innerHTML;
>       Ext.get('felamimailPrintHelperIframe').dom.contentWindow.print();
>     },
Last edited by kaystrobach on Thu Apr 29, 2010 10:13 am, edited 2 times in total.
http://www.kay-strobach.de - Open Source Rocks
User avatar
kaystrobach
Tine 2.0 Community Contributor
 
Posts: 463
Joined: Sat Jan 02, 2010 1:06 pm
Location: Germany

Re: Printing Mails

Postby kaystrobach » Wed Apr 28, 2010 10:23 pm

@TODO:

* Print Icon
* Solve Problem with div's which width is bigger than the document width.
* Check in other Browsers than firefox
* Print Preview?
http://www.kay-strobach.de - Open Source Rocks
User avatar
kaystrobach
Tine 2.0 Community Contributor
 
Posts: 463
Joined: Sat Jan 02, 2010 1:06 pm
Location: Germany

Re: Printing Mails

Postby nelius » Thu Apr 29, 2010 9:29 am

@Kay

PLEASE: Let us use patches as a basis for communication!

You also are free to create a branch in the svn and commit what ever you want, so we can ask our IDE's for patches, and have easy merging process.
Cornelius Weiss
Tine 2.0 Lead Developer

Visit http://www.tine20.com for commercial support / consulting / development.
Visit http://www.officespot20.com for Tine 2.0 hosting.
User avatar
nelius
Tine 2.0 Core Developer
 
Posts: 1150
Joined: Tue Nov 06, 2007 7:25 pm

Next

Return to Felamimail (Existing)

Who is online

Users browsing this forum: No registered users and 1 guest

Startseite
NewsDemoDownloadForumWikiBlog
Support
Support at first hand!
If the forum does not help anymore ... Professional support is available directly from our Tine2.0 core Developers.

more »