refinement to readonly mode: banner now gray and removed disabled for controls as they were too faded to read properly and some controls with action buttons didn't work (email, phone etc)
This commit is contained in:
@@ -710,6 +710,7 @@ function buildRecords(listData, columndefinitions) {
|
||||
let dataType = columndefinitions[iColumn].dt;
|
||||
let display = column.v;
|
||||
let openableAyaType = null;
|
||||
|
||||
/*
|
||||
public enum UiFieldDataType : int
|
||||
{
|
||||
@@ -733,92 +734,94 @@ function buildRecords(listData, columndefinitions) {
|
||||
|
||||
}
|
||||
*/
|
||||
switch (dataType) {
|
||||
case 1: //datetime format to shortdatetime
|
||||
display = window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
||||
display,
|
||||
timeZoneName,
|
||||
languageName,
|
||||
hour12
|
||||
);
|
||||
break;
|
||||
case 2: //date only
|
||||
display = window.$gz.locale.utcDateToShortDateLocalized(
|
||||
display,
|
||||
timeZoneName,
|
||||
languageName
|
||||
);
|
||||
break;
|
||||
case 3: //time only
|
||||
display = window.$gz.locale.utcDateToShortTimeLocalized(
|
||||
display,
|
||||
timeZoneName,
|
||||
languageName,
|
||||
hour12
|
||||
);
|
||||
break;
|
||||
case 4: //text
|
||||
if (display.length > MAX_TEXT_COLUMN_LENGTH) {
|
||||
display = display.substring(0, MAX_TEXT_COLUMN_LENGTH) + "...";
|
||||
}
|
||||
break;
|
||||
case 7: //decimal
|
||||
display = window.$gz.locale.decimalLocalized(display, languageName);
|
||||
break;
|
||||
case 8: //currency
|
||||
display = window.$gz.locale.currencyLocalized(
|
||||
display,
|
||||
languageName,
|
||||
currencyName
|
||||
);
|
||||
break;
|
||||
case 9: //tags
|
||||
if (display && display.length > 0) {
|
||||
display = display.join(", ");
|
||||
} else {
|
||||
display = "";
|
||||
}
|
||||
|
||||
break;
|
||||
case 10: //enum
|
||||
display = window.$gz.enums.get(
|
||||
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
|
||||
// console.log("Openable type:", column);
|
||||
switch (column.v) {
|
||||
//Not openable types
|
||||
case 18: //DataListView
|
||||
break;
|
||||
default:
|
||||
openableAyaType = column.v;
|
||||
break;
|
||||
if (display != null) {
|
||||
switch (dataType) {
|
||||
case 1: //datetime format to shortdatetime
|
||||
display = window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
||||
display,
|
||||
timeZoneName,
|
||||
languageName,
|
||||
hour12
|
||||
);
|
||||
break;
|
||||
case 2: //date only
|
||||
display = window.$gz.locale.utcDateToShortDateLocalized(
|
||||
display,
|
||||
timeZoneName,
|
||||
languageName
|
||||
);
|
||||
break;
|
||||
case 3: //time only
|
||||
display = window.$gz.locale.utcDateToShortTimeLocalized(
|
||||
display,
|
||||
timeZoneName,
|
||||
languageName,
|
||||
hour12
|
||||
);
|
||||
break;
|
||||
case 4: //text
|
||||
if (display.length > MAX_TEXT_COLUMN_LENGTH) {
|
||||
display = display.substring(0, MAX_TEXT_COLUMN_LENGTH) + "...";
|
||||
}
|
||||
}
|
||||
// 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(
|
||||
display,
|
||||
languageName,
|
||||
false,
|
||||
2
|
||||
);
|
||||
break;
|
||||
default:
|
||||
//do nothing, allow it to stay as is (checkbox, plain text etc)
|
||||
break;
|
||||
case 7: //decimal
|
||||
display = window.$gz.locale.decimalLocalized(display, languageName);
|
||||
break;
|
||||
case 8: //currency
|
||||
display = window.$gz.locale.currencyLocalized(
|
||||
display,
|
||||
languageName,
|
||||
currencyName
|
||||
);
|
||||
break;
|
||||
case 9: //tags
|
||||
if (display && display.length > 0) {
|
||||
display = display.join(", ");
|
||||
} else {
|
||||
display = "";
|
||||
}
|
||||
|
||||
break;
|
||||
case 10: //enum
|
||||
display = window.$gz.enums.get(
|
||||
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
|
||||
// console.log("Openable type:", column);
|
||||
switch (column.v) {
|
||||
//Not openable types
|
||||
case 18: //DataListView
|
||||
break;
|
||||
default:
|
||||
openableAyaType = column.v;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 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(
|
||||
display,
|
||||
languageName,
|
||||
false,
|
||||
2
|
||||
);
|
||||
break;
|
||||
default:
|
||||
//do nothing, allow it to stay as is (checkbox, plain text etc)
|
||||
}
|
||||
}
|
||||
//build the row column object vm will be used by the datatable
|
||||
let columnObject = {
|
||||
|
||||
Reference in New Issue
Block a user