浏览代码

fixed TableAjax hist view

Piotr Labudda 9 年之前
父节点
当前提交
ad12a8031a
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      SE/se-lib/TableAjax.php

+ 4 - 3
SE/se-lib/TableAjax.php

@@ -3586,7 +3586,7 @@ function TableAjax__HIST_Route(args) {
 						'<tr>';
 			for (j in data['fields']) {
 				var fieldName = data['fields'][j];
-				histAjaxOut += '<th>' + (data['field_label'][fieldName] || fieldName).replace('_', ' ') + '</th>';
+				histAjaxOut += '<th>' + (data['field_label'][fieldName] || fieldName).replace(/_/g, ' ') + '</th>';
 			}
 			histAjaxOut += '</tr>' +
 					'</thead>' +
@@ -4966,8 +4966,9 @@ jQuery(document).ready(function(){
 			$histItem['_author'] = V::get('_author', '', $row);
 			$histItem['changes'] = array();
 			foreach ($visibleColsWithIds as $fldId => $fieldName) {
-				// if (in_array($fieldName, array('ID', 'A_RECORD_UPDATE_DATE', 'A_RECORD_UPDATE_AUTHOR', 'A_RECORD_CREATE_DATE', 'A_RECORD_CREATE_AUTHOR'))) continue;
-				// if ($row->{$fieldName} == 'N/S;') continue;
+				if (!array_key_exists($fieldName, (array)$row)) continue;
+				if ('N/S;' == V::get($fieldName, '', $row)) continue;
+
 				$changeItem = array();
 				$changeItem['fieldName'] = $fieldName;
 				$changeItem['acl_read'] = $acl->canReadObjectField($fieldName, $record);