The error when editing the eGroupware contacts with Opera has it but I was a bit annoyed. Looking for something I found the error in the file "etemplate / js / etemplate.js". This contains the function "set_style_by_class (t, c, p, v)" and is using the style information corresponding to the done field is visible or invisible. The crux of the matter is that Opera apparently internally with "CLASS" attribute works as eGroupware and only "class" tests:
etemplate / js / etemplate.js line 209
if (node.attributes.item (j). nodeName == 'class') {
if (node.attributes.item (j). nodeValue == c) {
eval ('node.style.' + p + "= '" + v + "'");
}
}
First I had fixed the javascript itself, but in terms of updates is not so thrilling and accordingly I have myself a look at an Opera user made JavaScript that as Firefox's Greasemonkey changes can make to a page without the site operator, the fit must:
eGroupware_edit_contacts_fix.js
if (location.hostname.match (/ subdomain \. domain \. tld $ / i)) {
window.opera.defineMagicFunction ('set_style_by_class', function (real, that, t, c, p, v) {
var elements;
if (t == '*') {
/ / '*' Not supported by IE / Win 5.5 and below
elements = (document.all)? document.all: document.getElementsByTagName ('*');
Else {}
elements = document.getElementsByTagName (t);
}
for (var i = 0; i <elements.length; i + +) {
var node = elements.item (i);
for (var j = 0; j <node.attributes.length j + +) {
nodeName = node.attributes.item (j) nodeName.toLowerCase ().;
if (nodeName == 'class') {
if (node.attributes.item (j). nodeValue == c) {
eval ('node.style.' + p + "= '" + v + "'");
}
}
}
}
});
}
I'm just so the string is checked for "class", copied, a lowercase drübergehaun and it works well as the contacts edit the Opera. Somehow I find the variant that uses because eGroupware but very strange. I look funny when I'm here, is there ne obs clean way.
The User JavaScript is of course to download.
Simply throw in a directory and the Opera on Settings (Alt-P): - notify> Path to User Javascripts -> Advanced -> Content -> JavaScript Options. Previously but still enter the host in the first row. As seen in the example, have to be points with '\' escaped.
UPDATE 15:06 20:01
Thanks for the fix, have him committed to trunk and 1.4. Ralf [ the forum ]
Was directly in eGroupware taken . 1.4 and the error should therefore also with Opera and users without Javascript no longer exist.









Leave Comment