List Info

Thread: the ui uses a diffrent id system from the id's that com




the ui uses a diffrent id system from the id's that com
country flaguser name
United States
2007-05-31 20:14:57
Bobby,

There's already been some previous action on this front. I
foolishly 
sent my message as a reply to commits-cosmo, so it's nowhere
in the 
mailing list archive. I'll repost here.

According to BCM, the set of possible characters for the UID
is 
compatible, so we should be able to fix this at some point.

Multiple lozenge pieces for multi-day events don't share the
same DOM 
id, so that should not cause whatever problem you saw -- the
extra divs 
appearing off to the right of the main one get named like
this:

eventDiv__evgh2Q2AbFBXhm (main)
eventDiv__aux1__evgh2Q2AbFBXhm
eventDiv__aux2__evgh2Q2AbFBXhm
... Etc.

If you swap out the id being used, it *should* all still
work.

I can see where one of the sub-pieces of the divs in the
multi-day 
lozenge array are actually getting a dupe id 
(eventDivContent__evgh2Q2AbFBXhm) for the corresponding one
in the main 
div, but that's in the extisting implementation, and
wouldn't cause 
stuff to break just because of the change you made.

I know the randomized string thing is a big irritation for
everybody. 
Let's get a bug filed for this and get it on the list of
stuff to fix.


Matthew


-------- Original Message --------
Subject: Re: [commits-cosmo] (travis) [4400] Reverting
unnecessary 
change	in	generating event registry ids.
Date: Thu, 10 May 2007 17:45:43 -0500
From: Matthew Eernisse <mdeosafoundation.org>
To: commits-cosmoosafoundation.org
References: <20070510172816.F2782F101Dtutu.osafoundation.org>

Travis,

The temp id strings are used in the DOM node ids to identify
the
components of a particular cal event lozenge. I am working
under the
assumption there might be characters in the UID that are not
legal in
DOM node ids.

Since we're serving the content as text/html still, that
means a those
characters defined as legal for the id attribute in HTML 4
-- "only
strings matching the pattern [A-Za-z][A-Za-z0-9:_.-]* should
be used."

Here's the spec:

http://www.w3.org/TR
/xhtml1/#C_8

A better alternative might be to do some sort of
transformation on the
actual UID string of the item to ensure it's always legal
for use in the
id attribute. Then we wouldn't have a different id for the
same event
lozenge each time the data reloads.

Hope that helps clear up any confusion.


Matthew



svncheckinosafoundation.org wrote:
> Revision
>     4400 <http://cvs.osafoundation.org/viewcvs.cgi?rev=4
400&view=rev>
> Author
>     travis
> Date
>     2007-05-10 10:28:16 -0700 (Thu, 10 May 2007)
> 
> 
>       Log Message
> 
> Reverting unnecessary change in generating event
registry ids. At some 
> point, we should revisit this, if only so I understand
why we're using 
> these temporary ids.
> 
> 
>       Modified Paths
> 
>     *
cosmo/trunk/cosmo/src/main/webapp/js/cosmo/view/cal.js
>      
<#cosmotrunkcosmosrcmainwebappjscosmoviewcaljs>
> 
> 
>       Diff
> 
> 
>         Modified:
cosmo/trunk/cosmo/src/main/webapp/js/cosmo/view/cal.js
>         (4399 => 4400)
> 
> ---
cosmo/trunk/cosmo/src/main/webapp/js/cosmo/view/cal.js	2007-
05-10 16:55:31 UTC (rev 4399)
> +++
cosmo/trunk/cosmo/src/main/webapp/js/cosmo/view/cal.js	2007-
05-10 17:28:16 UTC (rev 4400)
>  -980,8 +980,7 
>          for (var i = 0; i < arr.length; i++) {
>              var note = arr[i];
>              var eventStamp = note.getEventStamp();
> -
> -            var id = note.getUid();
> +            var id = self.generateTempId();
>              var ev = new CalEvent(id, null);
>              ev.data = note;
>              h.setItem(id, ev);
> 
> 
>
------------------------------------------------------------
------------
> 
> _______________________________________________
> Commits-Cosmo mailing list
> Commits-Cosmoosafoundation.org
> http://lists.osafoundation.org/cgi-bin/mail
man/listinfo/commits-cosmo

_______________________________________________
Commits-Cosmo mailing list
Commits-Cosmoosafoundation.org
http://lists.osafoundation.org/cgi-bin/mail
man/listinfo/commits-cosmo

_______________________________________________
cosmo-dev mailing list
cosmo-devlists.osafoundation.org
http://lists.osafoundation.org/mailman/listinfo/cosmo-d
ev

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )