* Format dtable fields.
This commit is contained in:
@@ -94,7 +94,7 @@ class datatable extends control
|
||||
}
|
||||
|
||||
$name = 'datatable.' . $module . ucfirst($method) . '.cols';
|
||||
$value = json_encode(array_values($fieldList));
|
||||
$value = json_encode($fieldList);
|
||||
$this->loadModel('setting')->setItem($account . '.' . $name, $value);
|
||||
if($this->post->global) $this->setting->setItem('system.' . $name, $value);
|
||||
|
||||
|
||||
@@ -109,17 +109,7 @@ class datatableModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
usort($setting, array('datatableModel', 'sortCols'));
|
||||
|
||||
/* In index array, find actions. */
|
||||
$types = array_column($setting, 'type');
|
||||
$index = array_search('actions', $types);
|
||||
|
||||
if($index)
|
||||
{
|
||||
$setting['actions'] = $setting[$index];
|
||||
unset($setting[$index]);
|
||||
}
|
||||
uasort($setting, array('datatableModel', 'sortCols'));
|
||||
|
||||
return $setting;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user