Yea we're still stuck on the restcontainer at the moment, I'll go see about
those conversions then. Thanks!

  -- Chris

On Mon, Sep 8, 2008 at 4:07 AM, Cassie <[EMAIL PROTECTED]> wrote:

> No - these are not the correct changes. The javascript api should not have
> changed at all. The jsonrpccontainer.js file converts the gender field from
> a string into an enum and should also be fixing up the name fields.
>
> Is the php land still on the restfulcontainer.js file? Maybe you just need
> to copy the conversions I did in jsonrpccontainer to the restfulctonainer.
> (I actually have a todo to pull it into a separate file because we will
> probably need very similar code for opensocial8to9.js (when we write it) -
> so pulling it into a separate file would get both containers on the right
> track)
>
> If you are already on jsonrpccontainer then there must be a bug in my
> conversion code :(
>
> - Cassie
>
>
>
> On Sun, Sep 7, 2008 at 3:05 AM, Chris Chabot <[EMAIL PROTECTED]> wrote:
>
> > Hey guys, I got this proposed patch from Joseph Smarr for the PC
> alignment
> > work and wanted to quickly bounce it of the list to see if your ok with
> it
> > before committing, changes looked correct to me for the 0.8.1
> > implementation:
> >
> > ===================================================================
> > --- javascript/samplecontainer/examples/SocialHelloWorld.xml    (revision
> > 692745)
> > +++ javascript/samplecontainer/examples/SocialHelloWorld.xml    (working
> > copy)
> > @@ -76,7 +76,7 @@
> >
> >          html += '<div class="person">';
> >          html += '<div class="bubble c' + count % numberOfStyles + '">' +
> > hellos[count % hellos.length];
> > -         html += '<div class="name">' + allPeople[i].getDisplayName() +
> '
> > (' + count + ') ' +
> > allPeople[i].getField(opensocial.Person.Field.GENDER).getDisplayValue();
> > +         html += '<div class="name">' + allPeople[i].getDisplayName() +
> '
> > (' + count + ') ' +
> allPeople[i].getField(opensocial.Person.Field.GENDER);
> >          html += '</div></div>';
> >
> >          if (allPeople[i].getField(opensocial.Person.Field.THUMBNAIL_URL)
> > Index: features/opensocial-reference/person.js
> > ===================================================================
> > --- features/opensocial-reference/person.js     (revision 692745)
> > +++ features/opensocial-reference/person.js     (working copy)
> > @@ -514,10 +514,10 @@
> >  opensocial.Person.prototype.getDisplayName = function() {
> >   var name = this.getField(opensocial.Person.Field.NAME<
> > http://opensocial.person.field.name/>
> > );
> >   if (name) {
> > -    // Try unstructured field first
> > -    var unstructured =
> name.getField(opensocial.Name.Field.UNSTRUCTURED);
> > -    if (unstructured) {
> > -      return unstructured;
> > +    // Try formatted field first
> > +    var formatted = name.getField(opensocial.Name.Field.FORMATTED);
> > +    if (formatted) {
> > +      return formatted;
> >     }
> >
> >     // Next try to construct the name from the individual components
> >
>

Reply via email to