This commit is contained in:
@@ -24,17 +24,17 @@ namespace AyaNova.PickList
|
||||
public AuthorizationRoles AllowedRoles { get; set; }
|
||||
public AyaType DefaultListObjectType { get; set; }
|
||||
|
||||
public string DefaultListView { get; set; }
|
||||
public string DefaultTemplate { get; set; }
|
||||
|
||||
|
||||
//return array of field keys in list view
|
||||
public List<string> GetFieldListFromListView(JArray listViewArray)
|
||||
public List<string> GetFieldListFromTemplate(JArray template)
|
||||
{
|
||||
// [{key:"COLUMN UNIQUE KEY ID",sort:"-" or "+",filter:{any:true/false,items:[{FILTER OBJECT SEE BELOW}]} }, {key:"second column unique key"},{...etc...}]
|
||||
List<string> ret = new List<string>();
|
||||
for (int i = 0; i < listViewArray.Count; i++)
|
||||
for (int i = 0; i < template.Count; i++)
|
||||
{
|
||||
var cm = listViewArray[i];
|
||||
var cm = template[i];
|
||||
ret.Add(cm["fld"].Value<string>());
|
||||
}
|
||||
return ret;
|
||||
@@ -42,10 +42,10 @@ namespace AyaNova.PickList
|
||||
|
||||
|
||||
|
||||
public Newtonsoft.Json.Linq.JArray GenerateListColumnsJSONFromListView(JArray listViewArray)
|
||||
public Newtonsoft.Json.Linq.JArray GenerateListColumnsJSONFromTemplate(JArray template)
|
||||
{
|
||||
|
||||
var ListViewFieldKeys = GetFieldListFromListView(listViewArray);
|
||||
var ListViewFieldKeys = GetFieldListFromTemplate(template);
|
||||
var CustomFieldDefinitions = GetCustomFieldDefinitionsForList();
|
||||
|
||||
//Generate JSON fragment to return with column definitions
|
||||
|
||||
Reference in New Issue
Block a user