Author: lindner
Date: Mon Feb 11 18:58:13 2008
New Revision: 620692
URL: http://svn.apache.org/viewvc?rev=620692&view=rev
Log:
name field compatibility for 0.6
Modified:
incubator/shindig/trunk/javascript/opensocial6to7.js
Modified: incubator/shindig/trunk/javascript/opensocial6to7.js
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/javascript/opensocial6to7.js?rev=620692&r1=620691&r2=620692&view=diff
==============================================================================
--- incubator/shindig/trunk/javascript/opensocial6to7.js (original)
+++ incubator/shindig/trunk/javascript/opensocial6to7.js Mon Feb 11 18:58:13
2008
@@ -37,6 +37,22 @@
AUTHENTICATED : gadgets.io.AuthorizationType.AUTHENTICATED
};
+
+opensocial.Person.prototype.getFieldOld = opensocial.Person.prototype.getField;
+
+opensocial.Person.prototype.getField = function(fieldname) {
+ if (fieldname == opensocial.Person.Field.NAME) {
+ return
this.getFieldOld(opensocial.Person.Field.NAME).getField(opensocial.Name.Field.UNSTRUCTURED);
+ } else {
+ return this.getFieldOld(fieldname);
+ }
+}
+
+opensocial.Person.prototype.getDisplayNameOld =
opensocial.Person.getDisplayName;
+opensocial.Person.prototype.getDisplayName = function() {
+ return
this.getFieldOld(opensocial.Person.Field.NAME).getField(opensocial.Name.Field.UNSTRUCTURED);
+}
+
opensocial.newActivityOld = opensocial.newActivity;
opensocial.newActivity = function(title, opt_params) {
opt_params['title'] = title;