diff --git a/creator/packages/steedos-creator/core.coffee b/creator/packages/steedos-creator/core.coffee index 751a845d29..936184e73c 100644 --- a/creator/packages/steedos-creator/core.coffee +++ b/creator/packages/steedos-creator/core.coffee @@ -133,15 +133,6 @@ Creator.getObjectUrl = (object_name, record_id, app_id) -> else return Steedos.absoluteUrl("/app/" + app_id + "/" + object_name + "/list") - -Creator.getObjectField = (object_name, field_name)-> - obj = Creator.Objects[object_name] - if obj.fields[field_name] - return obj.fields[field_name] - else - return Creator.baseObject.fields[field_name] - - Creator.getCollection = (object_name)-> if !object_name object_name = Session.get("object_name") diff --git a/creator/packages/steedos-creator/lib/listviews.coffee b/creator/packages/steedos-creator/lib/listviews.coffee index 516d4e81d6..fbab0c68bd 100644 --- a/creator/packages/steedos-creator/lib/listviews.coffee +++ b/creator/packages/steedos-creator/lib/listviews.coffee @@ -1,28 +1,20 @@ Creator.getTabularColumns = (object_name, columns) -> + obj = Creator.getObject(object_name) cols = [] _.each columns, (field_name)-> - field = Creator.getObjectField(object_name, field_name) + field = obj.fields[field_name] if field?.type col = {} col.data = field_name col.render = (val, type, doc) -> col.sTitle = '