Author Topic: Roundcube 0.2 Stable Signature Fix  (Read 16156 times)

Offline a_magoon

  • Newbie
  • *
  • Posts: 7
Roundcube 0.2 Stable Signature Fix
« on: February 16, 2009, 08:23:39 PM »
Hi guys,

Don't know whether this is the right category, so please move Admins if this should be elsewhere.

Our company had issues where clients wished for the signature to be located above the other messages. We paid for a developer to complete this for us, and what a job he did.

He has added another tick box inside Personal Settings where you can select to have the signature above the text or not. Here we are releasing it for the public to use as they'd like. There's a few modded files, but the originals are in the zip also.

Enjoy! Let me know how you all get on. Possibly add this to the actual package also Admins! Please read the readme also.

Cheers
« Last Edit: January 17, 2010, 10:21:07 PM by a_magoon »

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
Roundcube 0.2 Stable Signature Fix
« Reply #2 on: February 17, 2009, 02:44:17 AM »
Thx works fine for me !!!

my app.js are diffrent is the unpacked app.js the modification on unpacked app.js ...

remove this
Code: [Select]
if (this.env.signatures[id]['is_html'])
          {
          sig = this.env.signatures[id]['plain_text'];
          }
        if (sig.indexOf('-- ')!=0)
          sig = '-- \n'+sig;
        message += '\n\n'+sig;

with this

Code: [Select]
if (this.env.signatures[id]['is_html'])
          {
          sig = this.env.signatures[id]['plain_text'];
          }
        if (sig.indexOf('-- ')!=0)
          {
          sig = '-- \n'+sig;
          }
        if (this.env.signatures[id]["above_quoted"])
          {
 message = "\n\n"+sig + "\n\n"+message;
 }
        else
 {
          message += '\n\n'+sig;
          }

Offline Napsty

  • Jr. Member
  • **
  • Posts: 20
Roundcube 0.2 Stable Signature Fix
« Reply #3 on: February 17, 2009, 12:57:28 PM »
Hi a_magoon

Thank you for stepping into this problem.
I've tried it and it works great in Text E-Mails. However, in HTML E-Mails the signature is still shown at the end of the Mail.

Tested with Firefox 3.0.6 and IE 8.

In IE 8 I get the following JavaScript error:

Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.
app.js
Code: 0
Line: 3173
Char: 1

Offline a_magoon

  • Newbie
  • *
  • Posts: 7
Roundcube 0.2 Stable Signature Fix
« Reply #4 on: February 17, 2009, 03:47:56 PM »
Thanks Rosali for placing this in Trac.

Offline a_magoon

  • Newbie
  • *
  • Posts: 7
Roundcube 0.2 Stable Signature Fix
« Reply #5 on: February 17, 2009, 03:51:51 PM »
Hi Napsty,

I'll have him take another look as to why it doesn't work in HTML mode and post up a response when I hear more.

Offline a_magoon

  • Newbie
  • *
  • Posts: 7
HTML part of the fix
« Reply #6 on: February 17, 2009, 04:55:32 PM »
Hi guys,

Here you go for the HTML part of the fix. Only need to update your app.js file.


Cheers.
« Last Edit: January 17, 2010, 10:21:27 PM by a_magoon »

Offline Napsty

  • Jr. Member
  • **
  • Posts: 20
Roundcube 0.2 Stable Signature Fix
« Reply #7 on: February 18, 2009, 02:32:51 AM »
Superbe work!!!
Just tested it and it works smooth!

If I ever visit NZ I'll spend you some pints! ;D

Offline a_magoon

  • Newbie
  • *
  • Posts: 7
Roundcube 0.2 Stable Signature Fix
« Reply #8 on: February 18, 2009, 02:51:12 PM »
No problem at all - nothing wrong with a good NZ brew :)

If we get any more commercial work done on Roundcube I'll post these up also.


Cheers.

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
Roundcube 0.2 Stable Signature Fix
« Reply #9 on: February 18, 2009, 03:02:32 PM »
Hi a_maagon,

my app.js are the unpacked and modified version,

can you post a diff or patch file from your app.js with html fix or post what you have modified in the file.

many thx and also sorry for the bad english

Offline a_magoon

  • Newbie
  • *
  • Posts: 7
Roundcube 0.2 Stable Signature Fix
« Reply #10 on: February 18, 2009, 04:01:51 PM »
Hi Lacri,

Overwriting the first app.js with the second patched app.js file will give you the HTML functionality.

I'll have a look at including them into one file for you.

Offline a_magoon

  • Newbie
  • *
  • Posts: 7
Roundcube 0.2 Stable Signature Fix
« Reply #11 on: February 18, 2009, 04:16:50 PM »
Merged zip file - should work directly from this without having to apply both parts earlier in this thread.

Cheers,
« Last Edit: January 17, 2010, 10:21:56 PM by a_magoon »

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
Roundcube 0.2 Stable Signature Fix
« Reply #12 on: February 19, 2009, 01:53:19 AM »
Hi a_maagon,

the html fix isnt in the diff in your last post i have search in your postet app.js thx :)

here is the html fix for the uncompressed version from app.js

search
Code: [Select]

editor.getBody().appendChild(sigElem);


and replace with
Code: [Select]

if (this.env.signatures[id]["above_quoted"])
  {
  editor.getBody().insertBefore(sigElem, editor.getBody().firstChild);
  }
else
  {
  editor.getBody().appendChild(sigElem);
  }

Offline ABerglund

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 673
Roundcube 0.2 Stable Signature Fix
« Reply #13 on: February 23, 2009, 02:35:07 PM »
In my experience, all these patches for moving the signature above the reply in HTML messages break the HTML word wrap. This one is no different.
Arne Berglund
SysAdmin, Internet Services
Lane Education Service District
Eugene, OR, USA

Offline bigworm

  • Newbie
  • *
  • Posts: 4
Roundcube 0.2 Stable Signature Fix
« Reply #14 on: February 25, 2009, 12:34:44 PM »
nice work!