sync
This commit is contained in:
@ -12,37 +12,6 @@
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.dialog-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dialog-content table td.label {
|
||||
width: 100px;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
line-height: 24px;
|
||||
height: 24px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.dialog-content table td input,
|
||||
.dialog-content table td textarea {
|
||||
border: 1px solid #a9a9a9;
|
||||
width: 200px;
|
||||
height: 18px;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.dialog-content table td input[type="checkbox"] {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dialog-content table td textarea {
|
||||
height: 100px;
|
||||
max-width: 200px;
|
||||
}
|
||||
|
||||
#dialogdatatb td {
|
||||
padding-top: 30px;
|
||||
}
|
||||
@ -85,7 +54,7 @@
|
||||
|
||||
var makeID;
|
||||
function OnEdit() {
|
||||
var make = grid_dt.source[grid_dt.selectedIndex].Values;
|
||||
var make = grid_dt.source[grid_dt.selectedIndex];
|
||||
if (!make) {
|
||||
makeID = undefined;
|
||||
return;
|
||||
@ -156,8 +125,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);
|
||||
@ -165,12 +133,7 @@
|
||||
|
||||
var grid_dt;
|
||||
function InitGridData() {
|
||||
grid_dt = new GridView('#makelist');
|
||||
grid_dt.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dt = createGridView('#makelist');
|
||||
var list_columns = [
|
||||
{ name: 'Name', caption: "Make Name", valueIndex: 'Name', css: { 'width': 360, 'text-align': 'left' } },
|
||||
{ name: 'Edit', caption: "", css: { 'width': 30, 'text-align': 'center' } },
|
||||
@ -189,8 +152,10 @@
|
||||
col.key = list_columns[hd].valueIndex;
|
||||
if (col.name === "Edit") {
|
||||
if (!IsSuperAdmin) continue;
|
||||
col.isurl = true;
|
||||
col.text = "\uf044";
|
||||
col.sortable = false;
|
||||
col.resizable = false;
|
||||
col.type = GridView.ColumnTypes.Icon;
|
||||
col.text = "edit";
|
||||
col.events = {
|
||||
onclick: function () {
|
||||
if (this.CanEdit)
|
||||
@ -209,8 +174,10 @@
|
||||
}
|
||||
else if (col.name === "Delete") {
|
||||
if (!IsSuperAdmin) continue;
|
||||
col.isurl = true;
|
||||
col.text = "\uf00d";
|
||||
col.sortable = false;
|
||||
col.resizable = false;
|
||||
col.type = GridView.ColumnTypes.Icon;
|
||||
col.text = "times";
|
||||
col.events = {
|
||||
onclick: function () {
|
||||
if (this.CanEdit)
|
||||
@ -229,15 +196,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) {
|
||||
makeID = rowdata.Values.ID;
|
||||
makeID = rowdata.ID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user