Roundcube Community Forum

 

Compose New Window Plugin

Started by internalkernel, August 20, 2010, 02:11:33 PM

Previous topic - Next topic

internalkernel

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!

tsjolshagen

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:

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

Line 0


The error message appears to be from the following function:

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;
    }
}

internalkernel

I had totally forgotten about Firebug... thanks for that!

SKaero

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.

JohnDoh

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...

internalkernel

That was it... everything works perfectly again.

Thanks JohnDoh!

tsjolshagen

Quote from: JohnDoh;29572You 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!