var Unibase; (function (Unibase) { let Forms; (function (Forms) { let Controls; (function (Controls) { class FileDragNDrop_Settings { loadSettingHtml() { return ``; } bindControlData(controldatajson) { return ""; } SaveControlData(controldatajson) { return ""; } loadControlPropertiesHtml(Container) { var html = `
` + `
` + `
Property Settings
` + `
` + `
` + `
`; $(Container).html(html); $("#divPropSetting").removeClass('hidden'); } bindPropertySettings(prop) { var propertySettings = prop.PropertySettings; if (propertySettings != null && propertySettings != undefined) { var i = 0; $(".Controlproperties-Element").each(function () { var currentPropSetting = $(this).children().find("input").attr("id"); var propSetting = propertySettings.find(x => x.ControlPropertyName == currentPropSetting); $(this).attr("data-controlpropertyid", propSetting.ControlPropertyId); $(this).attr("data-controlpropertyname", propSetting.ControlPropertyName); $(this).attr("data-propertysettingid", propSetting.PropertySettingId); if (currentPropSetting == "IsMultiple") { if (propSetting.ControlPropertyValue == "true") { $("#IsMultiple").prop("checked", true); } else { $("#IsMultiple").prop("checked", false); } } if (currentPropSetting == "IsFileControl") { if (propSetting.ControlPropertyValue == "true") { $("#IsFileControl").prop("checked", true); } else { $("#IsFileControl").prop("checked", false); } } if (currentPropSetting == "IsValidate") { if (propSetting.ControlPropertyValue == "true") { $("#IsValidate").prop("checked", true); } else { $("#IsValidate").prop("checked", false); } } i += 1; }); } } savePropertySettings(prop) { var propertySettings = prop.PropertySettings; var propSettingReq = []; $(".Controlproperties-Element").each(function () { var data = { FormPropertyId: isNaN(Number(prop.FormPropertyId)) ? 0 : Number(prop.FormPropertyId), ControlPropertyId: Number($(this).attr("data-controlpropertyid")), ControlPropertyValue: $(this).children().find("input").prop("checked").toString(), ControlPropertyName: $(this).attr("data-controlpropertyname"), ControlId: isNaN(Number(prop.ControlId)) ? 0 : Number(prop.ControlId), PropertySettingId: Number($(this).attr("data-propertysettingid")), }; propSettingReq.push(data); }); return propSettingReq; } static Instance() { if (this._instance === undefined) this._instance = new FileDragNDrop_Settings(); return this._instance; } } Controls.FileDragNDrop_Settings = FileDragNDrop_Settings; })(Controls = Forms.Controls || (Forms.Controls = {})); })(Forms = Unibase.Forms || (Unibase.Forms = {})); })(Unibase || (Unibase = {}));