123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- var Unibase;
- (function (Unibase) {
- let Forms;
- (function (Forms) {
- let Controls;
- (function (Controls) {
- class TextBox_Setting {
- loadSettingHtml() {
- return ``;
- }
- bindControlData(controldatajson) {
- return "";
- }
- SaveControlData(controldatajson) {
- return "";
- }
- loadControlPropertiesHtml(Container) {
- var html = `<section class="">` +
- `<div class="card PropertySettings">` +
- `<div class="card-header"><h6><b>Property Settings</b></h6></div>` +
- `<div class="card-body" id="divPropSetting"><div class="row"><div class="col-sm-6 Controlproperties-Element" data-propertysettingid="0" data-controlpropertyid="0" data-controlpropertyname="MaxLength">Max Length<input type="number" class="form-control" id="MaxLength" value=""></div></div></div>` +
- `</div></section>`;
- $(Container).html(html);
- $("#divPropSetting").removeClass('hidden');
- }
- bindPropertySettings(prop) {
- var propertySettings = prop.PropertySettings;
- if (propertySettings.length > 0 && propertySettings != null && propertySettings != undefined) {
- var i = 0;
- $(".Controlproperties-Element").each(function () {
- if (propertySettings[i].ControlPropertyName == "MaxLength") {
- $(this).attr("data-controlpropertyid", propertySettings[i].ControlPropertyId);
- $(this).attr("data-controlpropertyname", propertySettings[i].ControlPropertyName);
- $(this).attr("data-propertysettingid", propertySettings[i].PropertySettingId);
- $("#MaxLength").val(propertySettings[i].ControlPropertyValue);
- }
- i += 1;
- });
- }
- }
- savePropertySettings(prop) {
- var propertySettings = prop.PropertySettings;
- var propSettingReq = [];
- $(".Controlproperties-Element").each(function () {
- if ($(this).children().closest("input").val().toString()) {
- var data = {
- FormPropertyId: Number(prop.FormPropertyId),
- ControlPropertyId: Number($(this).attr('data-controlpropertyid')),
- ControlPropertyValue: $(this).children().closest("input").val().toString(),
- ControlPropertyName: $(this).attr('data-controlpropertyname'),
- ControlId: Number(prop.ControlId),
- PropertySettingId: Number($(this).attr("data-propertysettingid")),
- };
- propSettingReq.push(data);
- }
- });
- return propSettingReq;
- }
- static Instance() {
- if (this.instance === undefined) {
- this.instance = new TextBox_Setting();
- }
- return this.instance;
- }
- }
- Controls.TextBox_Setting = TextBox_Setting;
- })(Controls = Forms.Controls || (Forms.Controls = {}));
- })(Forms = Unibase.Forms || (Unibase.Forms = {}));
- })(Unibase || (Unibase = {}));
|