[kronolith] unable to edit permissions for shared calendars

Benoit St-André ben at benoitst-andre.net
Sat Sep 6 10:31:02 PDT 2003


Le sam 06/09/2003 à 12:05, Benoit St-André a écrit :
> Le sam 06/09/2003 à 06:08, Jan Schneider a écrit :
> > Zitat von Benoit St-André <ben at benoitst-andre.net>:
> > 
> > > Le ven 05/09/2003 à 14:40, Chuck Hagenbuch a écrit :
> > > > Quoting Benoit St-André <ben at benoitst-andre.net>:
> > > >
> > > > > I'm having problems with shared calendars. I'm unable to edit
> > > > > permissions (I supposed it should work like nag shared tasks lists).
> > > I
> > > > > go in options, in "manage multiple calendars", I choose "Edit your
> > > > > calendars" , then I see my default calendars, but even if I choose
> > > > > another in the select box, nothing changes in the screen (I suppose
> > > that
> > > > > a "permissions" button should appear right next to the calendar type
> > > > > listbox).
> > > >
> > 
> > Works fine here. Perhaps a javascript problem? What browser do you use?
> > 
> > Jan.
> > 
> > --
> > http://www.horde.org - The Horde Project
> > http://www.ammma.de - discover your knowledge
> > http://www.tip4all.de - Deine private Tippgemeinschaft
> 
> Ok, we're getting near the problem.... we have done a new fresh install
> of horde, minutes after, permissions were working...
> 
> More minutes after, it stopped working... Then, it all became clear. It
> is working in english, but not in french.
> 
> Very weird. I'm now investigating if translation is not our source of
> problem (is it possible that a iso-8859-1 character causes problem in
> javascript ?). I'll give some news back about it, if somebody has other
> clues, you are welcome :-)
> -- 

Ok, it is indeed a javascript problem. And I'm now asking the main
question related to that problem on the i18n list also...

The problem was that the msg "Permissions" was translated by "Droits
d'accès" in french, which is a correct translation.

But, in kronolith/templates/calendar/javascript.inc:36 , that message is
included in a javascript function

function newType()
{
    var id =
document.shares.share.options[document.shares.share.selectedIndex].value;
    var type =
document.shares.type.options[document.shares.type.selectedIndex].value;

    // Don't show the access/permission button when creating a new
    // share.
    if (id != -1) {
        if (type == 1) {
            document.shares.accesslist.value = '<?php echo
_("Permissions") ?>';
            document.shares.accesslist.style.visibility = 'visible';
        } else {
            document.shares.accesslist.style.visibility = 'hidden';
        }
    }
}

I've temporarily corrected the problem by putting "Permissions" as a
french translation (which is not quite the right one, meaning that
calendar sharing probably never worked in french !). I thought about
escaping the msg like "Droits d\'accès" but I'm not sure about what it
would do if the message was also used elsewhere in another template...
We could also use double quotes in the javascript, but that could'nt fit
for all javascript...

So, what is the right way to correct that problem for good ?

-- 
Benoit St-André 
ben at benoitst-andre.net http://benoitst-andre.net
Connaissez-vous Linuxédu-Québec ? http://linuxeduquebec.org



More information about the kronolith mailing list