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