|
|
|
var EditLineWidth = function (parent) {
|
|
|
|
this.Parent = parent;
|
|
|
|
this.Dialog = $('#edit-line-width-dialog');
|
|
|
|
this.Config = {};
|
|
|
|
|
|
|
|
this.Setup = function () {
|
|
|
|
$("#width-sure-btn").on("click", this.OnSureButtonClick.bind(this));
|
|
|
|
$("#width-cancel-btn").on("click", this.HideDialog.bind(this));
|
|
|
|
$("#width-close").on("click", this.HideDialog.bind(this));
|
|
|
|
};
|
|
|
|
|
|
|
|
this.Show = function (data) {
|
|
|
|
this.Dialog.show();
|
|
|
|
console.log(data)
|
|
|
|
this.Config = data;
|
|
|
|
$("#width").textbox('setValue', data.Value);
|
|
|
|
};
|
|
|
|
|
|
|
|
this.OnSureButtonClick = function () {
|
|
|
|
this.Config.Value = $('#width').textbox('getValue');
|
|
|
|
this.UpdateLineWidth();
|
|
|
|
this.Dialog.hide();
|
|
|
|
};
|
|
|
|
|
|
|
|
this.UpdateLineWidth = function () {
|
|
|
|
$.ajax({
|
|
|
|
type: "POST",
|
|
|
|
dataType: 'text',
|
|
|
|
url: '/ConfigManagement/Update',
|
|
|
|
data: this.User,
|
|
|
|
success: function () {
|
|
|
|
this.Parent.ReLoadTableData();
|
|
|
|
}.bind(this)
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
this.HideDialog = function () {
|
|
|
|
this.Dialog.hide();
|
|
|
|
};
|
|
|
|
};
|