Merge field GUIDs instead of overwriting them for portal field counts

This commit is contained in:
Eashwar Ranganathan
2013-02-11 02:45:27 -08:00
parent 12f2a2d11b
commit fa940341e3

View File

@ -116,10 +116,15 @@ window.handleDataResponse = function(data, textStatus, jqXHR) {
});
$.each(ppp, function(ind, portal) {
if(p2f[portal[0]] === undefined)
if(portal[2].portalV2['linkedFields'] === undefined) {
portal[2].portalV2['linkedFields'] = [];
else
portal[2].portalV2['linkedFields'] = $.unique(p2f[portal[0]]);
}
if(p2f[portal[0]] !== undefined) {
$.merge(p2f[portal[0]], portal[2].portalV2['linkedFields']);
portal[2].portalV2['linkedFields'] = $.grep(p2f[portal[0]], function(v, i) {
return $.inArray(v, p2f[portal[0]]) === i;
});
}
});
$.each(ppp, function(ind, portal) { renderPortal(portal); });