diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt
index ef673902..741e8649 100644
--- a/ayanova/devdocs/todo.txt
+++ b/ayanova/devdocs/todo.txt
@@ -12,7 +12,7 @@ todo: open ad-hoc type and id from data list idea
todo: Administration - History
View the history log in full without being for specific items, i.e. data list view
-
+todo: default sort order for default data list views specified? (see eventdatalist for example)
todo: Administration - Statistics WTF?
What is this for? Administration related statistics?
diff --git a/ayanova/src/components/gz-data-table.vue b/ayanova/src/components/gz-data-table.vue
index 92b8f5de..659bd765 100644
--- a/ayanova/src/components/gz-data-table.vue
+++ b/ayanova/src/components/gz-data-table.vue
@@ -83,17 +83,13 @@
+ {{ c }}
-
{{ c.v }}
@@ -126,8 +122,20 @@
{{ c.v }}
-
- {{ c.v }}
+
+
+
+ {{ c }}
+
+
+
+ {{ c.v }}
+
@@ -244,12 +252,6 @@
>
{{ c.v }}
-
{{ c.v }}
@@ -284,8 +286,20 @@
{{ c.v }}
-
- {{ c.v }}
+
+
+
+ {{ c }}
+
+
+
+ {{ c.v }}
+
@@ -481,12 +495,17 @@ export default {
vm.loading = false;
vm.getDataFromApi();
},
- gridCellButtonClick(key, i) {
- //translate key to actual object type from header data
- //key format is row-column e.g."500-2"
- //get the datatype of the column which matches the server columns array index
- let typeToOpen = this.serverColumns[key.split("-")[1]].ay;
-
+ gridCellButtonClick(key, i, ot) {
+ let typeToOpen = null;
+ //if ot is not null then *that* is the Openable Type otherwise it's in the header data
+ if (ot) {
+ typeToOpen = ot;
+ } else {
+ //translate key to actual object type from header data
+ //key format is row-column e.g."500-2"
+ //get the datatype of the column which matches the server columns array index
+ typeToOpen = this.serverColumns[key.split("-")[1]].ay;
+ }
//i is the actual AyaNova index of vm record so we have all we need to open vm object
window.$gz.eventBus.$emit("openobject", { type: typeToOpen, id: i });
},
@@ -619,6 +638,7 @@ function buildRecords(listData, columndefinitions) {
let dataType = columndefinitions[iColumn].dt;
let display = column.v;
+ let openableAyaType = null;
/*
public enum UiFieldDataType : int
{
@@ -687,6 +707,21 @@ function buildRecords(listData, columndefinitions) {
columndefinitions[iColumn].et,
display
);
+ //is it an AyaType openable type column like in the EventDataList AyaType column?
+ if (
+ columndefinitions[iColumn].et == "AyaType" &&
+ column.i != null &&
+ column.i != 0
+ ) {
+ //yes so provide the ot (openable type) info needed for the grid to make this openable
+ openableAyaType = column.v;
+ }
+ // console.log("gz-data-table:buildRecords:enumtype column is ", column);
+ // //v contains the type number and i contains the id of the record if it's an aytype enum openable
+ // console.log(
+ // "gz-data-table:buildRecords:enumtype column devfinition is ",
+ // columndefinitions[iColumn]
+ // );
break;
case 14: //MemorySize (file size)
display = window.$gz.locale.humanFileSize(
@@ -711,6 +746,13 @@ function buildRecords(listData, columndefinitions) {
if (column.i) {
columnObject["i"] = column.i;
}
+
+ //is the source column a special AyaType enum with an id signifying to be openable directly?
+ if (openableAyaType) {
+ //signal to grid to make it an openable link
+ columnObject["ot"] = openableAyaType;
+ }
+
o.columns["c" + iColumn.toString()] = columnObject;
//Is:
//Headers: [ { "text": "Name", "value": "c1" }, { "text": "Serial #", "value": "c2" },