var EditLocateIcon = function (parent) { this.Parent = parent; this.Dialog = $('#edit-locate-icon-dialog'); this.Setup = function () { $('#file').on('change', this.onFileChange.bind(this)) $("#icon-sure-btn").on("click", this.OnSureButtonClick.bind(this)); $("#icon-cancel-btn").on("click", this.HideDialog.bind(this)); $("#icon-close").on("click", this.HideDialog.bind(this)); }; this.Show = function (data) { this.Dialog.show(); //$("#path").textbox('setValue', data.Value); }; this.onFileChange = function () { $("#path").textbox('setValue', $('#file').val()); }; this.OnSureButtonClick = function () { this.Dialog.hide(); }; this.HideDialog = function () { this.Dialog.hide(); }; };