This commit is contained in:
2024-03-26 15:56:31 +08:00
parent 634e8b71ab
commit 0855ae42cd
547 changed files with 94818 additions and 60463 deletions

View File

@ -135,7 +135,7 @@
showAlert(GetTextByKey("P_AG_PLEASESELECTAMACHINEGROUP", "Please select a Machine Group."), GetTextByKey("P_AG_EDITMACHINEGROUP", "Edit Machine Group"));
return;
}
var group = grid_dt.source[indexInEdit].Values;
var group = grid_dt.source[indexInEdit];
if (!group) {
machineGroupID = undefined;
return;
@ -191,8 +191,7 @@
var rows = [];
for (var i = 0; i < data.length; i++) {
var r = data[i];
var fr = { Values: r };
rows.push(fr);
rows.push(r);
}
grid_dt.setData(rows);
@ -202,16 +201,11 @@
function InitGridData() {
$('#btnEdit').attr("disabled", "disabled");
grid_dt = new GridView('#grouplist');
grid_dt.lang = {
all: GetTextByKey("P_GRID_ALL", "(All)"),
ok: GetTextByKey("P_GRID_OK", "OK"),
reset: GetTextByKey("P_GRID_RESET", "Reset")
};
grid_dt = createGridView('#grouplist');
var list_columns = [
{ name: 'Name', caption: GetTextByKey("P_AG_GROUPNAME", "Group Name"), valueIndex: 'Name', css: { 'width': 360, 'text-align': 'left' } },
{ name: 'Name', caption: GetTextByKey("P_AG_GROUPNAME", "Group Name"), valueIndex: 'Name', allowFilter: true, css: { 'width': 360, 'text-align': 'left' } },
{ name: 'Description', caption: GetTextByKey("P_AG_DESCRIPTION", "Description"), valueIndex: 'Description', css: { 'width': 360, 'text-align': 'left' } },
{ name: 'Code', caption: GetTextByKey("P_AG_CODE", "Code"), valueIndex: 'Code', css: { 'width': 200, 'text-align': 'left' } },
{ name: 'Code', caption: GetTextByKey("P_AG_CODE", "Code"), valueIndex: 'Code', allowFilter: true, css: { 'width': 200, 'text-align': 'left' } },
{ name: 'Edit', caption: "", css: { 'width': 30, 'text-align': 'center' } },
{ name: 'Delete', caption: "", css: { 'width': 30, 'text-align': 'center' } }
];
@ -226,9 +220,13 @@
col.width = list_columns[hd].css.width;
col.align = list_columns[hd].css["text-align"]
col.key = list_columns[hd].valueIndex;
col.allowFilter = list_columns[hd].allowFilter;
if (col.name === "Edit") {
col.isurl = true;
col.text = "\uf044";
col.sortable = false;
col.resizable = false;
col.type = GridView.ColumnTypes.Icon;
col.text = "edit";
col.events = {
onclick: function () {
OnEdit();
@ -240,8 +238,10 @@
col.attrs = { 'title': GetTextByKey("P_AG_EDIT", 'Edit') };
}
else if (col.name === "Delete") {
col.isurl = true;
col.text = "\uf00d";
col.sortable = false;
col.resizable = false;
col.type = GridView.ColumnTypes.Icon;
col.text = "times";
col.events = {
onclick: function () {
OnDelete(this);
@ -254,15 +254,15 @@
}
columns.push(col);
}
grid_dt.canMultiSelect = false;
grid_dt.multiSelect = false;
grid_dt.columns = columns;
grid_dt.init();
grid_dt.rowdblclick = OnEdit;
grid_dt.onRowDblClicked = OnEdit;
grid_dt.selectedrowchanged = function (rowindex) {
grid_dt.onSelectedRowChanged = function (rowindex) {
var rowdata = grid_dt.source[rowindex];
if (rowdata) {
machineGroupID = rowdata.Values.ID;
machineGroupID = rowdata.ID;
}
}
}
@ -367,7 +367,7 @@
<td>Available Assets</td>
<td></td>
<td>Assigned Group Assets
<input type="checkbox" id="chk_showallassignedassets" title="When checked, all associated or linked items will display regardless of filter. " /><label for="chk_showallassignedassets">Show All Assigned</label>
<input type="checkbox" id="chk_showallassignedassets" title="When checked, all associated or linked items will display regardless of filter. " /><label for="chk_showallassignedassets" data-lgid="P_M3_SHOWALLASSIGNED">Show All Assigned</label>
</td>
</tr>
</thead>
@ -397,7 +397,7 @@
<div class="maskbg" style="display: none;"></div>
</div>
<div class="dialog" id="dialog_machinegroup1" style="display: none; height: 100%; border-bottom: 0; border-top: 0; z-index: 2">
<div class="dialog" id="dialog_machinegroup1" style="display: none; height: 100%; border-bottom: 0; border-top: 0;">
<iframe id="iframe_machinegroup" style="width: 100%; height: 100%; display: block; border: none"></iframe>
<div class="maskbg" style="display: none"></div>
</div>