Author Topic: Updated NPK theme -- texual buttons  (Read 7921 times)

Offline nkinkade

  • Newbie
  • *
  • Posts: 3
Updated NPK theme -- texual buttons
« on: March 22, 2009, 01:04:09 PM »
A few weeks ago I sent an email to roundcube-users about a theme I was working on that replaced the image buttons with styled texual buttons.  At that point I had just started to hash out what I wanted from the theme.  Since then I have added new functionality and replaced the image buttons on all the screens, not just on the main mailbox view.  Notably:

* The "Archive" button is now configurable in the preferences
* A "Copy to" button/dropdown was added
* A "Move to" button/dropdown was added
* A configurable "Not Spam" button for those of us using Bayesian spam filters.

I have been using this for the past week and it seems to work as expected.  Here are some screen shots:

http://natha.nkinka.de/downloads/roundcube/npk_roundcube_skin_mail.png
http://natha.nkinka.de/downloads/roundcube/npk_roundcube_skin_message.png
http://natha.nkinka.de/downloads/roundcube/npk_roundcube_skin_reply.png
http://natha.nkinka.de/downloads/roundcube/npk_roundcube_skin_addressbook.png

The theme itself is attached to this post, but is also available here:

https://natha.nkinka.de/downloads/roundcube/npk_roundcube_skin.zip

There are README and INSTALL files inside the skin directory.  Because this skin adds some new functionality to the interface, it requires patching some core RoundCube files.  A patch file is included and instructions are in the INSTALL file.  I have tested the patch to apply cleanly to 0.2.1, and I presume (hope) it will also apply to 0.2, but I haven't tested that.

Let me know if there are any problems, or if anyone has any suggestions on how to make it better.

Nathan

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
Updated NPK theme -- texual buttons
« Reply #1 on: March 25, 2009, 07:32:33 AM »
Great work ...

I found a little Bug when i moving a Message from a folder to another (drag’n drop) the little moving box is empty original is in the moving box the selected message subject. can you fix this please

Offline nkinkade

  • Newbie
  • *
  • Posts: 3
Updated NPK theme -- texual buttons
« Reply #2 on: March 25, 2009, 11:49:31 AM »
Have you also by chance applied the threading patches from Chris January (RoundCube Mailing Lists)?  Because I believe the problem is related to the threading.  I think the problem lies near line 913 (may be diff. on your install because of some of the patches I have) of ./roundcubemail/program/js/list.js where this conditional fails because of the threading patches:

Code: [Select]

if (((node = obj.childNodes[i].firstChild) &&
  (node.nodeType==3 || node.nodeName=='A')) &&
  (this.subject_col < 0 || (this.subject_col >= 0 && this.subject_col == c)))


Where in the threading case the firstChild is div.leaf and is not of nodeType 3 or nodeName A.  In the threading case we actually want childNode[2] not firstChild.  I'll write up a patch later today to fix this for the threading implementation.

If you think the issue you are having is not the threading, then please let me know a few more details about what the makeup of each row is in the interface.  I don't think so, but perhaps some of the threading stuff slipped through in my patches or the theme itself.

Nathan

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
Updated NPK theme -- texual buttons
« Reply #3 on: March 25, 2009, 03:07:00 PM »
yes i have applied the patches with little modification for me my modifications are not the problem. yes this problem is related to threading i have testet with the program/steps/mail/func.inc and the program/js/app.js the divs are the Problem

i hope you find a solution to fix this many thanks

edit:
i have found the solution thanks for your good tips
Code: [Select]
if (((node = obj.childNodes[i].lastChild.lastChild.firstChild) && (node.nodeType==3 || node.nodeName=='A')) &&
              (this.subject_col < 0 || (this.subject_col >= 0 && this.subject_col == c)))

this works fine for me :D
« Last Edit: March 25, 2009, 04:05:20 PM by lacri »

Offline nkinkade

  • Newbie
  • *
  • Posts: 3
Updated NPK theme -- texual buttons
« Reply #4 on: March 25, 2009, 07:42:04 PM »
Hmm.  I'm not exactly sure how or why that works for you, but at best it seems not very robust.  Here is what I think is a relatively robust solution that also simplifies the original code a bit.  It works by asking:

1) Is obj.childNodes.nodeName = 'TD'
2) AND is obj.childNodes.className = 'subject'
3) At this point I'm satisfied we're looking at the subject , so just grab every bit of text contained within it.

Before it was a good deal more complicated, and, as we have discovered, prone to easy breakage when changes happen to the interface for whatever reason:

code.nkinka.de Git - roundcube.git/commitdiff

Nathan

Offline lacri

  • Full Member
  • ***
  • Posts: 179
    • http://www.php-lexikon.de
Updated NPK theme -- texual buttons
« Reply #5 on: March 26, 2009, 03:41:35 AM »
many thanks nkinkade

i have fixed in my version the thread view for viewing on all browsers the original code works only on opera correctly i have added the patches for /js/app.js /js/list.js and /steps/mail/func.inc to fix displaying errors for all browsers my roundcube is little specialy roundcube svn + roundcube delvel api and many self made patches and features i hope the patch works for you

when user in thread viewing and mark many messages with collapsed messages the collapsed messages are displaying in the moving box here is a litte modification to fix this and not show hidden messages in moving box.

Code: [Select]
//search to
subject = node.nodeType==3 ? node.data : node.innerHTML;
              names += (subject.length > 50 ? subject.substring(0, 50)+'...' : subject) + '<br />';

//and replace with

if((pnode = obj.childNodes[i].parentNode) && (pnode.nodeName=='TR' && pnode.style.display!='none'))
              {
              subject = node.nodeType==3 ? node.data : node.innerHTML;
              names += (subject.length > 50 ? subject.substring(0, 50)+'...' : subject) + '<br />';
              }
sorry for this bad english i'm german ;)

here is little screenshot to see what i mean is a firefox screen
« Last Edit: February 01, 2011, 04:29:26 AM by lacri »