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;
|
||||
}
|
||||
@ -249,7 +218,7 @@
|
||||
function OnEditModel(e) {
|
||||
if (!IsSuperAdmin)
|
||||
return;
|
||||
var model = grid_dtmodel.source[grid_dtmodel.selectedIndex].Values;
|
||||
var model = grid_dtmodel.source[grid_dtmodel.selectedIndex];
|
||||
if (!model) {
|
||||
modelID = undefined;
|
||||
return;
|
||||
@ -319,8 +288,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_dtmodel.setData(rows);
|
||||
}
|
||||
@ -330,14 +298,9 @@
|
||||
function InitModelGridData() {
|
||||
$('#btnEdit').attr("disabled", "disabled");
|
||||
|
||||
grid_dtmodel = new GridView('#modellist');
|
||||
grid_dtmodel.lang = {
|
||||
all: GetTextByKey("P_GRID_ALL", "(All)"),
|
||||
ok: GetTextByKey("P_GRID_OK", "OK"),
|
||||
reset: GetTextByKey("P_GRID_RESET", "Reset")
|
||||
};
|
||||
grid_dtmodel = createGridView('#modellist');
|
||||
var list_columns = [
|
||||
{ name: 'Name', caption: GetTextByKey("P_MM_MODEL", "Model"), valueIndex: 'Name', css: { 'width': 300, 'text-align': 'left' } },
|
||||
{ name: 'Name', caption: GetTextByKey("P_MM_MODEL", "Model"), valueIndex: 'Name', allowFilter: true, css: { 'width': 300, 'text-align': 'left' } },
|
||||
{ name: 'TypeName', caption: GetTextByKey("P_MM_TYPE", "Type"), valueIndex: 'TypeName', allowFilter: true, css: { 'width': 300, 'text-align': 'left' } },
|
||||
//{ name: 'Edit', caption: "", css: { 'width': 30, 'text-align': 'center' } },
|
||||
//{ name: 'Delete', caption: "", css: { 'width': 30, 'text-align': 'center' } }
|
||||
@ -356,8 +319,10 @@
|
||||
col.allowFilter = list_columns[hd].allowFilter;
|
||||
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)
|
||||
@ -376,8 +341,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)
|
||||
@ -396,15 +363,15 @@
|
||||
}
|
||||
columns.push(col);
|
||||
}
|
||||
grid_dtmodel.canMultiSelect = false;
|
||||
grid_dtmodel.multiSelect = false;
|
||||
grid_dtmodel.columns = columns;
|
||||
grid_dtmodel.init();
|
||||
//grid_dtmodel.rowdblclick = OnEditModel;
|
||||
//grid_dtmodel.onRowDblClicked = OnEditModel;
|
||||
|
||||
grid_dtmodel.selectedrowchanged = function (rowindex) {
|
||||
grid_dtmodel.onRowDblClicked = function (rowindex) {
|
||||
var rowdata = grid_dtmodel.source[rowindex];
|
||||
if (rowdata) {
|
||||
modelID = rowdata.Values.ID;
|
||||
modelID = rowdata.ID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user