Author Topic: Compose New Window Plugin  (Read 6753 times)

Offline internalkernel

  • Jr. Member
  • **
  • Posts: 25
Compose New Window Plugin
« on: August 20, 2010, 02:11:33 PM »
So, I stumbled across this plugin :

Downloads for xrxca's cnw - GitHub

To open the compose/reply/forward buttons into a new window. I love the idea, it's user configurable as well. However it doesn't seem to be working for me. Whenever I enable it, I see no emails and lose the ability to click on anything else in my roundcube view.

I'm hoping someone else has had this problem, is there a known conflict with another plugin? I haven't had time to take the whole system down to figure out if there is an existing conflict - that might be a project for Sunday night.

Thanks!

Offline tsjolshagen

  • Newbie
  • *
  • Posts: 8
Ditto on broken compose_newwindow
« Reply #1 on: August 21, 2010, 11:50:08 AM »
WIth Firebug installed (using FireFox v3.6.7 on Linux x64) I see a Javascript error when I enable compose_newwindow and have contexmenu enabled already. Only the combination of the two seem to cause the issue.

I.m using Roundcube 0.4-stable (Version 0.4-20100807)

The message is:
Code: [Select]

uncaught exception: Syntax error, unrecognized expression: Syntax error, unrecognized expression: a

Line 0


The error message appears to be from the following function:

Code: [Select]
function (a, b, d) {
    if (!(a.nodeName && c.noData[a.nodeName.toLowerCase()])) {
        a = a == A ? za : a;
        var f = a[G], e = c.cache;
        if (!f && typeof b === "string" && d === w) {
            return null;
        }
        f || (f = ++Ya);
        if (typeof b === "object") {
            a[G] = f;
            e[f] = c.extend(true, {}, b);
        } else if (!e[f]) {
            a[G] = f;
            e[f] = {};
        }
        a = e[f];
        if (d !== w) {
            a[b] = d;
        }
        return typeof b === "string" ? a[b] : a;
    }
}

Offline internalkernel

  • Jr. Member
  • **
  • Posts: 25
Compose New Window Plugin
« Reply #2 on: August 21, 2010, 12:36:23 PM »
I had totally forgotten about Firebug... thanks for that!

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,881
    • SKaero - Custom Roundcube development
Compose New Window Plugin
« Reply #3 on: August 21, 2010, 01:31:03 PM »
I made manual compose in new window script for one of my clients I didn't know about this plugin. My guess is the function that doesn't have a name is causing the problem. If it can be given a name I think it should work.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Compose New Window Plugin
« Reply #4 on: August 22, 2010, 04:48:56 AM »
You pulled that function out of jquery-1.4.min.js?!?!?! there is nothing wrong with it.

Skaero: the function does have a name they just didn’t copy the whole thing.

The error comes from the JS in the plugin itself, in closewindow.js, this file contains the code which interacts with the context menu. `li.reply :a` and the 3 other similar lines are wrong, take the `:` away and everything works like normal. AFAIK you can’t use selectors like that.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline internalkernel

  • Jr. Member
  • **
  • Posts: 25
Compose New Window Plugin
« Reply #5 on: August 22, 2010, 06:40:51 AM »
That was it... everything works perfectly again.

Thanks JohnDoh!

Offline tsjolshagen

  • Newbie
  • *
  • Posts: 8
Compose New Window Plugin
« Reply #6 on: August 22, 2010, 08:06:24 AM »
Quote from: JohnDoh;29572
You pulled that function out of jquery-1.4.min.js?!?!?! there is nothing wrong with it.


Firebug did, so YMMW (obviously!) :)

Thanks for the suggestion on fixing the problem with compose_newwindow!