This commit is contained in:
2020-12-18 19:31:24 +00:00
parent b6f2a0bae2
commit 92495be7a2

View File

@@ -85,7 +85,7 @@
<!-- openable object with an ID --> <!-- openable object with an ID -->
<div <div
class="subtitle-1" class="subtitle-1"
@click="gridCellButtonClick(c.key, c.i)" @click="gridCellButtonClick(c.key, c.i, c.ot)"
> >
<a href="javascript:"> {{ c.v }}</a> <a href="javascript:"> {{ c.v }}</a>
</div> </div>
@@ -100,7 +100,7 @@
<!-- openable object with an ID --> <!-- openable object with an ID -->
<div <div
class="subtitle-1" class="subtitle-1"
@click="gridCellButtonClick(c.key, c.i)" @click="gridCellButtonClick(c.key, c.i, c.ot)"
> >
<a href="javascript:"> {{ c.v }}</a> <a href="javascript:"> {{ c.v }}</a>
</div> </div>
@@ -261,7 +261,7 @@
<!-- openable object with an ID --> <!-- openable object with an ID -->
<div <div
class="subtitle-1" class="subtitle-1"
@click="gridCellButtonClick(c.key, c.i)" @click="gridCellButtonClick(c.key, c.i, c.ot)"
> >
<a href="javascript:"> {{ c.v }}</a> <a href="javascript:"> {{ c.v }}</a>
</div> </div>
@@ -276,7 +276,7 @@
<!-- openable object with an ID --> <!-- openable object with an ID -->
<div <div
class="subtitle-1" class="subtitle-1"
@click="gridCellButtonClick(c.key, c.i)" @click="gridCellButtonClick(c.key, c.i, c.ot)"
> >
<a href="javascript:"> {{ c.v }}</a> <a href="javascript:"> {{ c.v }}</a>
</div> </div>
@@ -563,7 +563,7 @@ export default {
}, },
gridCellButtonClick(key, i, ot) { gridCellButtonClick(key, i, ot) {
let typeToOpen = null; let typeToOpen = null;
//if ot is not null then *that* is the Openable Type otherwise it's in the header data //if ot is not null or undefined then *that* is the Openable Type otherwise it's in the header data
if (ot) { if (ot) {
typeToOpen = ot; typeToOpen = ot;
} else { } else {
@@ -799,7 +799,8 @@ function buildRecords(listData, columndefinitions) {
if ( if (
columndefinitions[iColumn].et == "AyaType" && columndefinitions[iColumn].et == "AyaType" &&
column.i != null && column.i != null &&
column.i != 0 column.i != 0 &&
column.ot == undefined
) { ) {
//yes so provide the ot (openable type) info needed for the grid to make this openable //yes so provide the ot (openable type) info needed for the grid to make this openable
// console.log("Openable type:", column); // console.log("Openable type:", column);
@@ -864,12 +865,19 @@ function buildRecords(listData, columndefinitions) {
columnObject["i"] = column.i; columnObject["i"] = column.i;
} }
//TODO: Deprecate in favor of ot system below
//is the source column a special AyaType enum with an id signifying to be openable directly? //is the source column a special AyaType enum with an id signifying to be openable directly?
if (openableAyaType) { if (openableAyaType) {
//signal to grid to make it an openable link //signal to grid to make it an openable link
columnObject["ot"] = openableAyaType; columnObject["ot"] = openableAyaType;
} }
//Is there an overriding openable type already defined?
//(this is used by dynamic columns with different object type and id's that are openable like attachments and event logs and Review list etc)
if (column.ot) {
columnObject["ot"] = column.ot;
}
o.columns["c" + iColumn.toString()] = columnObject; o.columns["c" + iColumn.toString()] = columnObject;
//Is: //Is:
//Headers: [ { "text": "Name", "value": "c1" }, { "text": "Serial #", "value": "c2" }, //Headers: [ { "text": "Name", "value": "c1" }, { "text": "Serial #", "value": "c2" },