DisplayName for related features
Hi,
in the html5 template 1.3.1 when I have a featureclass with a related table where the displayfield is a date I can see only the epoch time in the related features section of a feature details.
I changed the function in mapping.js line 216 from
_processRelatedFeature:function(a,b,c){var d=new ObservableCollection,e=b.attributes[a.displayField];e||(e=b.attributes[a.objectIdField]);return{displayName:new Observable(e),relationName:new Observable(c.displayName.get()), featureUrl:a.url+"/"+b.attributes[a.objectIdField],attributes:this._makeAttributesObservable(b.attributes,a),geometry:new Observable(b.geometry),hasAttachments:new Observable(false),attachmentInfos:d}}
to
_processRelatedFeature:function(a,b,c){var d=new ObservableCollection,e=b.attributes[a.displayField];if(e){for(var i =0;i<a.fields.length;i++){if(a.fields[i].name==a.displayField && a.fields[i].type =="esriFieldTypeDate"){e=this._formatDate(e);break;}}};e||(e=b.attributes[a.objectIdField]);return{displayName:new Observable(e),relationName:new Observable(c.displayName.get()), featureUrl:a.url+"/"+b.attributes[a.objectIdField],attributes:this._makeAttributesObservable(b.attributes,a),geometry:new Observable(b.geometry),hasAttachments:new Observable(false),attachmentInfos:d}}
And now it display formatted date. I saw the same happens in version 2.0. Would Latitude fix this in future releases?
Thanks,
marco
-
Hi Marco,
Thanks for the info and the proposed fix, we'll prioritize this issue and try to get it into the next maintenance release.
Cheers,
Jason
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
1 kommentar