[commits-cosmo] (travis) [4400] Reverting unnecessary change in generating event registry ids.

Travis Vachon travis at osafoundation.org
Thu May 10 15:55:27 PDT 2007


Whoo hoo!

Unless I'm drastically mistaken the set of possible characters in a  
uid matches that pattern. I'll double check with Brian, but if this  
is the only reason we aren't using uids I think we may be able to ice  
this code.

Thanks!

Travis


On May 10, 2007, at 3:45 PM, Matthew Eernisse wrote:

> 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
>
>
>
> svncheckin at osafoundation.org wrote:
>> Revision
>>     4400 <http://cvs.osafoundation.org/viewcvs.cgi?rev=4400&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-Cosmo at osafoundation.org
>> http://lists.osafoundation.org/cgi-bin/mailman/listinfo/commits-cosmo
>
> _______________________________________________
> Commits-Cosmo mailing list
> Commits-Cosmo at osafoundation.org
> http://lists.osafoundation.org/cgi-bin/mailman/listinfo/commits-cosmo



More information about the Commits-Cosmo mailing list