check if the project has the userMetadata
This commit is contained in:
parent
c2db998b93
commit
1ad40bcd83
@ -108,19 +108,22 @@ Refine.OpenProjectUI.prototype._renderProjects = function(data) {
|
|||||||
var project = data.projects[n];
|
var project = data.projects[n];
|
||||||
project.id = n;
|
project.id = n;
|
||||||
project.date = moment(project.modified).format('YYYY-MM-DD HH:mm A');
|
project.date = moment(project.modified).format('YYYY-MM-DD HH:mm A');
|
||||||
for (var n in data.customMetadataColumns) {
|
|
||||||
var found = false;
|
if (typeof project.userMetadata !== "undefined") {
|
||||||
for(var i = 0; i < project.userMetadata.length; i++) {
|
for (var n in data.customMetadataColumns) {
|
||||||
if (project.userMetadata[i].name === data.customMetadataColumns[n].name) {
|
var found = false;
|
||||||
found = true;
|
for(var i = 0; i < project.userMetadata.length; i++) {
|
||||||
break;
|
if (project.userMetadata[i].name === data.customMetadataColumns[n].name) {
|
||||||
}
|
found = true;
|
||||||
if (!found) {
|
break;
|
||||||
project.userMetadata.push({
|
}
|
||||||
name: data.customMetadataColumns[n].name,
|
if (!found) {
|
||||||
dispay: data.customMetadataColumns[n].display,
|
project.userMetadata.push({
|
||||||
value: ""
|
name: data.customMetadataColumns[n].name,
|
||||||
});
|
dispay: data.customMetadataColumns[n].display,
|
||||||
|
value: ""
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
}
|
}
|
||||||
|
|
||||||
#metadata-body td {
|
#metadata-body td {
|
||||||
padding: 8px
|
padding: 1px
|
||||||
}
|
}
|
||||||
|
|
||||||
#metadata-body tr:nth-child(even) {background: #f2f2f2}
|
#metadata-body tr:nth-child(even) {background: #f2f2f2}
|
||||||
|
Loading…
Reference in New Issue
Block a user