This commit is contained in:
2023-03-11 17:30:20 +00:00
commit b6c4e025bc
5124 changed files with 1153349 additions and 0 deletions
@@ -0,0 +1,684 @@
var Unibase;
(function (Unibase) {
let Forms;
(function (Forms) {
let Controls;
(function (Controls) {
class SubForm {
constructor() {
this.Index = 0;
}
init(formpropertyid, prop, callback) {
var instance = SubForm.Instance();
}
loadControl(containerid, prop) {
var ControlJsonText = JSON.parse(prop.ControlJsonText);
var html = '';
var parentPkid = Unibase.Platform.Forms.Components.FormViewer.instance.Pk_Value;
html = '<div class="divSubForm" class="SubformInstalledAppId" data-subforminstalledappid="' + ControlJsonText.InstalledAppId + '"><input type="hidden" id="SubformInstalledAppId_' + prop.FormPropertyId + '" value="' + ControlJsonText.InstalledAppId + '" ><div class="divNextSubForm_' + prop.UniqueId + ' hidden"></div><div class="divNextSubFormList_' + prop.UniqueId + ' divCheckRequired"><div class="subformControlData"></div><div class="subformBtnContainer text-center"></div><div class="subformTableDataList"></div></div></div>';
if (ControlJsonText.EnableSubFormSettings == true) {
html += '<div class="col-sm-3 div_SubFormdetails" id="div_subformsettings">' +
'<a href="javascript:;" class="btn btn-success text-white btnAddSubForm btnSubform_' + prop.UniqueId + '" id="btnAddSubForm_' + prop.UniqueId + '" data-subformcount="0" data-islistsubform="false" /><span>' + ControlJsonText.ButtonName + '</span></a>' +
'</div>';
}
$("#" + containerid).html(html);
if (ControlJsonText.EnableSubFormSettings == true) {
$("#btnAddSubForm_" + prop.UniqueId).click(function () {
var childformdata = ControlJsonText.FormInfo;
Unibase.Forms.Controls.SubForm.Instance().addButtonClick(childformdata, prop.UniqueId, ControlJsonText.SubFormName, ControlJsonText.ChildFormId, 0);
});
var html = '<div class="divSubFormUl loadfirstsubformdata hidden divNextSubForm_' + prop.UniqueId + ' divNextSubForm_' + prop.FormPropertyId + ' divNextSubForm_' + prop.UniqueId + '_0"><div class="card-header"><span class="pull-left">' + ControlJsonText.SubFormName + '-0' + '</span><a class="ml-auto btn-xs pull-right btn btn-icon btn-icon-circle btn-pink btn-icon-style-3 remove-icon_' + prop.FormPropertyId + '" href="javascript:;" title="Remove row" onclick="Unibase.Forms.Controls.SubForm.Instance().SubFormRemove(' + prop.FormPropertyId + ",0,\'" + ControlJsonText.SubFormName + '\');"><span class="btn-icon-wrap"><i class="fa fa-times remove-icon_ ' + prop.FormPropertyId + '"></i><span></span></span></a></div><div class="card-body divSubForm_' + prop.UniqueId + '" id="divSubForm_' + prop.UniqueId + '"></div></div>';
$(".divNextSubForm_" + prop.UniqueId).after(html);
var childformdata = ControlJsonText.FormInfo;
if (childformdata == undefined) {
Unibase.Platform.Forms.Managers.FormManager.Instance().getForm(ControlJsonText.ChildFormId).then(function (response) {
var forminfo = response.result;
var formviewerObj = {
FormId: 0,
AppConfigurationId: 0,
Pk_Value: 0,
PortletWidgetId: 0,
OnSuccess: null,
OnFail: null,
OnLoad: null,
FormContainer: null,
};
var subformhtml = Unibase.Platform.Forms.Components.FormViewer.instance.loadFormHtml(forminfo, true, "container-subform-0", formviewerObj, null);
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(subformhtml.JsFiles, function () {
$("#divSubForm_" + prop.UniqueId).html(subformhtml.TotalFormHtml);
});
});
}
else {
if (parentPkid != 0) {
var forminfos = childformdata;
for (var i = 0; i < forminfos.length; i++) {
var forminfo = forminfos[i];
var childPkid = forminfos[i].Pk_Value;
Unibase.Forms.Controls.SubForm.Instance().addButtonClick(forminfo, prop.UniqueId, ControlJsonText.SubFormName, ControlJsonText.ChildFormId, childPkid);
}
}
}
$("#btnAddSubForm_" + prop.UniqueId).attr("data-subformcount", 1);
}
if (ControlJsonText.EnableListFormSettings == true) {
var childformdata = ControlJsonText.FormInfo;
if (childformdata == undefined) {
Unibase.Platform.Forms.Managers.FormManager.Instance().getForm(ControlJsonText.ChildFormId).then(function (response) {
var forminfo = response.result;
var formviewerObj = {
FormId: 0,
AppConfigurationId: 0,
Pk_Value: 0,
PortletWidgetId: 0,
OnSuccess: null,
OnFail: null,
OnLoad: null,
FormContainer: null,
};
var subformhtml = Unibase.Platform.Forms.Components.FormViewer.instance.loadFormHtml(forminfo, true, "container-subformlist-1", formviewerObj, null);
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(subformhtml.JsFiles, function () {
var listhtml = '<div class="divSubFormList_' + prop.UniqueId + '">' + subformhtml.TotalFormHtml + '</div>';
listhtml += '<div class="col-sm-3 div_SubFormList" id="div_subformlist">' +
'<a href="javascript:;" class="btn btn-success text-white btnSubform_' + prop.UniqueId + '" id="btnAddSubFormList_' + prop.UniqueId + '" data-subformcount="1" data-islistsubform="true"/><span class="fa fa-plus"></span></a>' +
'</div><div id="divSubFormListData_' + prop.UniqueId + '" class="hidden"></div></div>';
$(".divNextSubForm_" + prop.UniqueId).after(listhtml);
$("#btnAddSubFormList_" + prop.UniqueId).click(function () {
Unibase.Forms.Controls.SubForm.Instance().addButtonClickForList(prop.UniqueId, 0, forminfos, ControlJsonText, prop);
});
});
});
}
else {
var forminfos = childformdata;
Unibase.Forms.Controls.SubForm.instance.loadSubformData(forminfos, ControlJsonText, prop);
}
}
}
loadSubformData(forminfos, ControlJsonText, prop) {
var instance = this;
for (var i = 0; i < forminfos.length; i++) {
var forminfo = forminfos[i];
var childPkid = forminfos[i].Pk_Value;
var formviewerObj = {
FormId: 0,
AppConfigurationId: 0,
Pk_Value: 0,
PortletWidgetId: 0,
OnSuccess: null,
OnFail: null,
OnLoad: null,
FormContainer: null,
};
var subformhtml = Unibase.Platform.Forms.Components.FormViewer.instance.loadFormHtml(forminfo, true, "container-subformlist-1", formviewerObj, null);
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(subformhtml.JsFiles, function () {
var listhtml = '<form id="subformformValidate_' + prop.UniqueId + '" data-validate="parsley"><div class="divSubFormList_' + prop.UniqueId + ' divSubFormList" >' + subformhtml.TotalFormHtml + '</div>';
listhtml += '<div class="div_SubFormList text-center" id="div_subformlist"></div></form>';
$(".divNextSubFormList_" + prop.UniqueId + ' .subformControlData').html(listhtml);
let issubFormListDivLoaded = $('.subformTableDataList').find("#divSubFormListData_" + prop.UniqueId);
if (issubFormListDivLoaded.length == 0) {
let addBtnHtml = '<a href="javascript:;" class="btn btn-success text-white btnSubform_' + prop.UniqueId + '" id="btnAddSubFormList_' + prop.UniqueId + '" data-subformcount="1" data-islistsubform="true"/>Add</a>';
$(".divNextSubFormList_" + prop.UniqueId + ' .subformBtnContainer').html(addBtnHtml);
let subformListHtml = '<div class="table-responsive"><table class="table sub-form-table hidden"><tbody id="divSubFormListData_' + prop.UniqueId + '"></tbody></table></div><div class="hidden subFormListFooter" id="subFormTableFooter_' + prop.UniqueId + '"><div class="d-flex flex-wrap justify-content-between align-items-center"><div class="checkListTotal"><span class="font-weight-500 text-dark">Total: </span><span class="visibleRowsCount"></span> of <span class="totalRowsCount"></span></div><div class="checkListMoreBtn hidden"><a href="javascript:;" onclick="Unibase.Forms.Controls.SubForm.Instance().loadMoreSubFormlist(' + prop.UniqueId + ');" class="btn btn-success btn-sm text-white loadMoreBtn">More</a></div></div></div>';
$(".divNextSubFormList_" + prop.UniqueId + ' .subformTableDataList').html(subformListHtml);
}
$("#btnAddSubFormList_" + prop.UniqueId).off().click(function () {
let formDivId = "subformformValidate_" + prop.UniqueId;
var viewererobj = new Unibase.Platform.Forms.Components.FormViewer();
let result = viewererobj.requiredFieldValidation(formDivId);
if (result == false) {
let requiredFieldsLength = $("#" + formDivId + " .form-group-required").length;
if (requiredFieldsLength == 1) {
let subFormPropertyName = $('.form-group-required').parents('.control-group').data('validatename');
MessageHelper.Instance().showError(subFormPropertyName + " is required", 'div_ErrorMessage_' + ControlJsonText.ParentFormId);
}
else {
MessageHelper.Instance().showError("Mandatory fields are missing", 'div_ErrorMessage_' + ControlJsonText.ParentFormId);
}
return false;
}
else {
Unibase.Forms.Controls.SubForm.Instance().addButtonClickForList(prop.UniqueId, childPkid, forminfos, ControlJsonText, prop);
}
});
});
}
}
addButtonClick(ChildFormData, FormPropertyId, SubFormName, ChildFormId, Pk_Value) {
$(".loadfirstsubformdata").addClass('hidden');
var Index = Number($("#btnAddSubForm_" + FormPropertyId).attr("data-subformcount"));
var namelength = Number($(".divNextSubForm_" + FormPropertyId + ".subformcls").length) + 1;
var subformname = SubFormName + '-' + namelength;
var CurrentContainer = $(".divNextSubForm_" + FormPropertyId);
var html = '<div class="subformcls divNextSubForm_' + FormPropertyId + ' card subform_' + Index + '" data-index="' + Index + '"><div class="card-header"><span class="pull-left subformname subforname_' + FormPropertyId + '">' + subformname + '</span><a class="ml-auto btn-xs pull-right btn btn-icon btn-icon-circle btn-pink btn-icon-style-3 remove-icon_' + FormPropertyId + '_' + Index + '" href="javascript:;" title="Remove row" onclick="Unibase.Forms.Controls.SubForm.Instance().SubFormRemove(' + FormPropertyId + "," + Index + ",\'" + SubFormName + '\');"><span class="btn-icon-wrap"><i class="fa fa-times remove-icon_ ' + FormPropertyId + '_' + Index + '"></i><span></span></span></a></div><div class="card-body divSubForm_' + FormPropertyId + '" id="divSubForm_' + FormPropertyId + '_' + Index + '"></div></div>';
$(CurrentContainer).last().after(html);
if (ChildFormData == undefined) {
Unibase.Platform.Forms.Managers.FormManager.Instance().getForm(ChildFormId).then(function (response) {
var forminfo = response.result;
var formviewerObj = {
FormId: 0,
AppConfigurationId: 0,
Pk_Value: 0,
PortletWidgetId: 0,
OnSuccess: null,
OnFail: null,
OnLoad: null,
FormContainer: null,
};
var subformhtml = Unibase.Platform.Forms.Components.FormViewer.instance.loadFormHtml(forminfo, true, "container-subform-" + Index, formviewerObj, null);
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(subformhtml.JsFiles, function () {
$("#divSubForm_" + FormPropertyId + '_' + Index).html(subformhtml.TotalFormHtml);
$("#btnAddSubForm_" + FormPropertyId).attr("data-subformcount", Index + 1);
});
});
}
else {
var forminfos = ChildFormData;
for (var i = 0; i < forminfos.length; i++) {
var forminfo = forminfos[i];
var childPkid = forminfos[i].Pk_Value;
var formviewerObj = {
FormId: 0,
AppConfigurationId: 0,
Pk_Value: childPkid,
PortletWidgetId: 0,
OnSuccess: null,
OnFail: null,
OnLoad: null,
FormContainer: null,
};
var subformhtml = Unibase.Platform.Forms.Components.FormViewer.instance.loadFormHtml(forminfo, true, "container-subform-" + Index, formviewerObj, null);
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(subformhtml.JsFiles, function () {
$("#divSubForm_" + FormPropertyId + '_' + Index).html(subformhtml.TotalFormHtml);
$("#btnAddSubForm_" + FormPropertyId).attr("data-subformcount", Index + 1);
});
}
}
}
addButtonClickForList(FormPropertyId, pk_value, forminfos, ControlJsonText, prop) {
var temp = $("#btnAddSubFormList_" + FormPropertyId).attr("data-subformcount");
var Index = temp;
var html = '';
var ItemRowLen = $('.CheckList-row-' + Index).length;
var isFormValid = true;
$(".divSubFormList_" + FormPropertyId).find(".value-control").each(function () {
let value = $(this).val();
value = $.trim(value);
if ((value == "" || value == null || value == "0" || value == undefined)) {
isFormValid = false;
}
else {
isFormValid = true;
return false;
}
});
if (isFormValid) {
if ($("#divSubFormListData_" + FormPropertyId + ' tr').length == 0) {
$("#divSubFormListData_" + FormPropertyId).closest('table').removeClass('hidden').addClass('mt-20');
html += `<tr class="bg-light">`;
$(".divSubFormList_" + FormPropertyId).find(".value-control").each(function () {
var formpropertyname = $(this).parents(".container-subformlist-1").attr("data-formpropertyname");
var controlname = $(this).parents(".container-subformlist-1").attr("data-controlname");
var placeholdernameAuto = $(this).parents(".container-subformlist-1").attr("data-validatename");
var placeholdername = $(this).parents(".container-subformlist-1").find(".value-control").attr("data-placeholder");
var hiddenitem = controlname == "HiddenField" ? "hidden" : "";
html += '<th ' + hiddenitem + '><div class="container-subform-list-' + Index + '" class="divsubformlist_placeholder" data-formpropertyname="' + formpropertyname + '"><input type="hidden" class="' + placeholdernameAuto + '" value="' + placeholdernameAuto + '"/><span class="CheckListItemName_placeholder" ' + hiddenitem + ' id="CheckListItemName_Placeholder' + Index + '" ><strong>' + placeholdernameAuto + '</strong></span>' +
'<input type="hidden" value=' + Index + ' class="CheckListId_placeholder">' +
'<input type="hidden" value=' + Index + ' class="hf_CheckListIndex_placeholder"></div></th>';
});
html += '<th class="font-weight-bold text-right">Delete</th></tr>';
}
let isHidden = "";
$("#subFormTableFooter_" + FormPropertyId).removeClass('hidden');
if ($("#divSubFormListData_" + FormPropertyId + ' tr').length >= 6) {
isHidden = "hidden";
$("#subFormTableFooter_" + FormPropertyId + " .checkListMoreBtn").removeClass('hidden');
}
html += '<tr class="' + isHidden + ' CheckList-item-row divSubForm_' + FormPropertyId + ' CheckList-row-' + Index + '" id="li_CheklistItem_' + Index + '" >' +
'<input type="hidden" class="hf_CheckListId" value="' + Index + '">';
var check = -1;
$(".divSubFormList_" + FormPropertyId).find(".value-control").each(function () {
if (($(this).val() == "") && ($(this).parents('.control-group').data('controlname') == 'NumberBox')) {
$(this).val('0');
}
$(this).parent('.floating-label-form-group').removeClass('floating-label-form-group-with-value');
var value = $(this).val();
if ((value == "" || value == null || value == "0" || value == undefined) && (check != 1)) {
check = 1;
}
else {
check = 0;
}
var formpropertyname = $(this).parents(".container-subformlist-1").attr("data-formpropertyname");
var controlname = $(this).parents(".container-subformlist-1").attr("data-controlname");
var hiddenitem = controlname == "HiddenField" ? "hidden" : "";
var text = "";
if (controlname == "AutoComplete") {
text = $("#" + $(this).attr("data-autotextid") + " option:selected").text();
}
else if (controlname == "DatePicker") {
text = $(this).siblings('.datepicker-input').val();
}
else if (controlname == "DropDown") {
text = $(this).find(":selected").text();
}
else if (controlname == "CascadingAutocomplete") {
text = $("#" + $(this).attr("data-autotextid") + " option:selected").text();
}
else if (controlname == "Select2") {
text = $(this).attr("data-text");
}
else {
text = $(this).val();
}
var Id = $(this).attr("id");
if (controlname == "HiddenField") {
$("#" + Id).val("0");
}
if (controlname == "AutoComplete") {
var autocompleteId = $(this).parent().find('select').attr("id");
$("#" + autocompleteId).empty();
}
html += '<td ' + hiddenitem + '><div class="container-subform-list-' + Index + '" class="divsubformlist" data-formpropertyname="' + formpropertyname + '"><input type="hidden" class="value-control" value="' + value + '"/><span class="CheckListItemName" ' + hiddenitem + ' id="CheckListItemName_' + Index + '" >' + text + '</span>' +
'<input type="hidden" value=' + Index + ' class="CheckListId" >' +
'<input type="hidden" value=' + Index + ' class="hf_CheckListIndex"></div></td>';
});
html += '<td class="text-right">' +
'<a class="btn-icon" href="javascript:;" onclick="Unibase.Forms.Controls.SubForm.Instance().removeChekList(' + Index + ',' + FormPropertyId + ');" >' +
'<i class="fa fa-trash-o text-danger" ></i></a>' +
'</td>' +
'</tr>';
$(".hf_CheckListId").val(Index);
$("#divSubFormListData_" + FormPropertyId).append(html);
$("#btnAddSubFormList_" + FormPropertyId).attr("data-subformcount", Number(Index) + 1);
let totalRowsCount = $("#divSubFormListData_" + FormPropertyId + ' tr').length - 1;
let visibleRowsCount = totalRowsCount - $("#divSubFormListData_" + FormPropertyId + ' tr.hidden').length;
$("#subFormTableFooter_" + FormPropertyId).find('span.totalRowsCount').text(totalRowsCount);
$("#subFormTableFooter_" + FormPropertyId).find('span.visibleRowsCount').text(visibleRowsCount);
Unibase.Forms.Controls.SubForm.instance.loadSubformData(forminfos, ControlJsonText, prop);
}
}
loadMoreSubFormlist(FormPropertyId) {
$("#divSubFormListData_" + FormPropertyId + " tr.hidden").each(function (index, item) {
if (index < 5) {
$(item).removeClass('hidden');
let totalRowsCount = $("#divSubFormListData_" + FormPropertyId + ' tr').length - 1;
let visibleRowsCount = totalRowsCount - $("#divSubFormListData_" + FormPropertyId + ' tr.hidden').length;
$("#subFormTableFooter_" + FormPropertyId).find('span.visibleRowsCount').text(visibleRowsCount);
if (visibleRowsCount == totalRowsCount) {
$("#subFormTableFooter_" + FormPropertyId + " .checkListMoreBtn").addClass('hidden');
}
}
});
}
loadControl_delete(containerid, prop) {
var Index = 0;
SubForm.instance.Subprops = [];
SubForm.instance.Subprops.push(prop);
let html = '';
var id = JSON.parse(prop.ControlJsonText);
SubForm.Instance().EnableListFormSettings = id.EnableListFormSettings;
SubForm.Instance().EnableSubFormSettings = id.EnableSubFormSettings;
Unibase.Forms.Controls.SubForm.instance.loadingjsfiles(id);
if ($('#EnableSubForm').length != 0 && $("#isclcikevent").val() == "true") {
var FormPropertyId = prop.FormPropertyId + Number($("#SubFormIndex").val());
html += '<div id="divSub_' + FormPropertyId + '" class="div_' + FormPropertyId + '"><input type="hidden" id="hdn_Containerid" value="' + containerid + '">';
html += '</div>';
}
else {
html += '<div id="div_' + prop.DocPropertyName + '_' + prop.FormPropertyId + '" class="div_' + prop.DocPropertyName + '_' + prop.FormPropertyId + '">';
html += '</div>';
}
if ($('#EnableSubForm').length == 0) {
html += '<input type="hidden" id="SubFormIndex" value="0">';
}
else if ($('#EnableSubForm').length != 0 && $("#isclcikevent").val() == "true") {
html += '<input type="hidden" id="IsSubFormExist" value="true">';
}
SubForm.instance.Index = moment().valueOf();
$("#" + containerid).html(html);
if ($('#EnableSubForm').length == 0) {
var html1 = '<div class="lastdiv"></div><div id="Subform_id"><input type="hidden" id="isclcikevent" value="false"><input type="hidden" id="SubformInstalledAppId" value="' + id.InstalledAppId + '"><input type="hidden" id="subform_FormPropertyId" value="' + prop.FormPropertyId + '"><input type="hidden" id="checkedevent" value="false"><input type="hidden" id="SubFormButtonText" value="' + id.ButtonName + '"><div class="row" id="EnableSubForm"></div>' +
'<input type="hidden" id="Subform_ChildFormId" value="' + id.ChildFormId + '"><input type="hidden" id="MultipleSubFormIndex" value="0"><input type="hidden" id="Subform_DocPropertyName" value="' + prop.DocPropertyName + '"><input type="hidden" id="Subform_SectionName" value=""><input type="hidden" id="Subform_SubFormName" value="' + id.SubFormName + '"><input type="hidden" id="Subform_SectionId" value="' + prop.SectionId + '">';
if (id.EnableSubFormSettings == true) {
html1 += '<div class="col-sm-3 div_SubFormdetails" id="div_subformsettings">' +
'<a href="javascript:;" class="btn btn-success text-white" onclick="Unibase.Forms.Controls.SubForm.Instance().subFormSettings(' + id.ChildFormId + ',Unibase.Forms.Controls.SubForm.Instance().Subprops[' + Index + '])"><span>' + id.ButtonName + '</span></a>' +
'</div>';
}
html1 += '</div>';
$("#" + containerid).append(html1);
var value = Number($('#MultipleSubFormIndex').val());
$('#MultipleSubFormIndex').val(value + 1);
}
}
LoadCheckListForm(Index) {
var len = $('.CheckList-row').length;
if (len == 0) {
len = 1;
}
let html = '<div class="card div_CheckListform col-sm-12"><div class="card-header"><span>Add Check Lists</span></div><div class="card-body CheckListform"><div class="CheckListform-row col-sm-2" id="CheckListform-row"></div><div class="CheckList-row added-row value-row card" id="div_Checklist_' + len + '">' +
'<ul id="ul_chekList_items">' +
'<li class="list-group-item" >' +
'<div class="row">' +
'<div class="col-11 ml-10" >' +
'<div class="floating-label-form-group" ><input type="text" maxlength="500" class="form-control floating-label-control CheckListItem" id="txt_CheckListItem_' + len + '" data-isdynamic="false" placeholder="Checklist Item *" data-placeholder="Checklist Item *" data-label="Checklist Item *">' +
'<input type="hidden" id="hf_CheckListId_' + len + '" ></div> ' +
'</div>' +
'<div class="row"><div class="col-6"><a id="btnAddItemPayout" href="javascript:;" onclick=" Unibase.Forms.Controls.SubForm.Instance().addNewCheckListItem(' + len + ')" class="btn-icon "><i class="fa fa-plus ml-25 mt-20"></i></a></div>' +
'</div ></div >' +
'</li>' +
'<li class="CheckList-row-' + len + '" id="hfli_ChecklistItem_' + len + '"></li>' +
'</ul></div>' +
'</div>';
$('#div_' + $("#Subform_DocPropertyName").val() + '_' + $("#subform_FormPropertyId").val() + '').after(html);
}
addNewCheckListItem(len) {
var currentindex = 0;
var formpropertyid = 0;
var Index = Number(currentindex);
var d = $(".hf_CheckListId").val();
var i = Number(d);
if (d == undefined) {
Index = Index + 1;
}
else {
Index = i + 1;
}
$("#SubFormIndex").val(Index);
var BasicaddNewCheckListItem_Template = Unibase.Forms.Controls.SubForm.Instance().GetCheckListItem(Index, formpropertyid);
var container_div = '<div class="container-subform-' + Index + '">' + BasicaddNewCheckListItem_Template + '</div>';
$('#div_' + $("#Subform_DocPropertyName").val() + '_' + $("#subform_FormPropertyId").val() + '').after(BasicaddNewCheckListItem_Template);
}
GetCheckListItem(len, formpropertyid) {
var temp = len;
var Index = temp;
var html = '';
var emptyformpropertyname = "";
var ItemRowLen = $('.CheckList-row-' + Index).length;
let formpropertid;
html += '<li class="list-group-item CheckList-item-row CheckList-row-' + Index + '" id="li_CheklistItem_' + Index + '">' +
'<input type="hidden" class="hf_CheckListId" value="' + Index + '">' +
'<div class="row" > ' +
'<div class="col-11 row">';
$(".container-subform-list-0").find(".value-control").each(function () {
var id = $(this).attr('id');
var FrmPropertyName = $(this).parents('.container-subform-list-0').data('formpropertyname');
var FrmPrtyid = $(this).parents('.container-subform-list-0').data('formpropertyid');
let formpropertyname = $("#" + id).val();
formpropertid = $("#" + id).val();
var cntrlclass = $(this).attr('class');
var cls = cntrlclass.split(' ');
var arraycontainsbycontrollername = (cls.indexOf("txtSeriesAutoComplete_" + FrmPropertyName) > -1);
if (arraycontainsbycontrollername == true) {
formpropertid = $("#" + id + " option:selected").val();
formpropertyname = $("#" + id + " option:selected").text();
var seriesautocompelete = $("#" + id + " option:selected").val();
if (seriesautocompelete == undefined || seriesautocompelete == "0") {
formpropertyname = "";
}
}
var Autocompletecontrollername = (cls.indexOf("txtAutoComplete_" + FrmPropertyName) > -1);
if (Autocompletecontrollername == true) {
formpropertid = $("#" + id + " option:selected").val();
formpropertyname = $("#" + id + " option:selected").text();
var autocompelete = $("#" + id + " option:selected").val();
if (autocompelete == undefined || seriesautocompelete == "0") {
formpropertyname = "";
}
}
var DropDowncontrollername = "ddl_" + FrmPropertyName + "_" + FrmPrtyid;
if (DropDowncontrollername == id) {
formpropertid = $("#" + id + " option:selected").val();
formpropertyname = $("#" + id + " option:selected").text();
var DropDown = $("#" + id + " option:selected").val();
if (DropDown == undefined || seriesautocompelete == "0") {
formpropertyname = "";
}
}
if (formpropertyname != "" && formpropertyname != null) {
if (formpropertid == "0") {
formpropertyname = "";
}
html += '<div class="container-subform-' + Index + '" data-formpropertyname="' + FrmPropertyName + '"><input type="hidden" class="value-control" value="' + formpropertid + '"/><span class="CheckListItemName pl-25 col-sm-3" id="CheckListItemName_' + Index + '" >' + formpropertyname + '</span>' +
'<input type="hidden" value=' + Index + ' class="CheckListId" >' +
'<input type="hidden" value=' + Index + ' class="hf_CheckListIndex"></div>';
$("#" + id).val(0);
$("#" + id + " option:selected").val(0);
$("#" + id + " option:selected").text('-- Select --');
}
emptyformpropertyname += formpropertyname;
});
html += '</div><div class="col-1 ml-md-2 pl-md-60">' +
'<a class="btn-icon" href="javascript:;" onclick="Unibase.Forms.Controls.SubForm.Instance().removeChekList(' + Index + ',' + formpropertyid + ');" >' +
'<i class="fa fa-trash-o text-danger" ></i></a>' +
'</div></div>' +
'</li>';
$(".hf_CheckListId").val(Index);
if (emptyformpropertyname == "" || emptyformpropertyname == "0") {
html = "";
}
return html;
}
removeChekList(CheckListIndex, formProperyId) {
let checkListItem = $('#divSubFormListData_' + formProperyId + ' #li_CheklistItem_' + CheckListIndex);
let tableDiv = $(checkListItem).closest('table');
let tableBody = $(checkListItem).parent('tbody');
let tableFooter = $(tableDiv).parent('.table-responsive').next('.subFormListFooter');
if ($(tableDiv).find('tr').length == 2) {
$(tableDiv).addClass('hidden').removeClass('mt-20');
$(tableFooter).addClass('hidden');
$(checkListItem).parent().html('');
}
$(checkListItem).remove();
let totalRowsCount = tableBody.find('tr').length - 1;
let visibleRowsCount = totalRowsCount - tableBody.find('tr.hidden').length;
if (visibleRowsCount <= 5) {
if ($(tableBody).find('tr.hidden').length > 0) {
$(tableBody).find('tr.hidden').first().removeClass('hidden');
visibleRowsCount += 1;
}
}
$(tableFooter).find('span.totalRowsCount').text(totalRowsCount);
$(tableFooter).find('span.visibleRowsCount').text(visibleRowsCount);
if (visibleRowsCount == totalRowsCount) {
tableFooter.find('.checkListMoreBtn').addClass('hidden');
}
}
loadControlSettings(controlsettingjson, formpropertyid) {
return ``;
}
loadPropertySettings(propertysettings, formpropertyid) {
return ``;
}
bindEditFormDetails(formpropertyid, propval, DocPropertyName) {
$("#txt_" + formpropertyid).val(propval);
}
subFormSettings(formid, prop) {
var setting = JSON.parse(prop.ControlJsonText);
var subformlistSetting = setting.EnableListFormSettings;
var containerClass = "container-subform-" + $("#SubFormIndex").val();
if (subformlistSetting == true) {
containerClass = "container-subform-list-" + $("#SubFormIndex").val();
}
var rowid = moment().valueOf();
$("#isclcikevent").val("true");
$("#Subform_id").addClass('hidden');
$(".div_SubFormdetails").addClass('hidden');
var sectionnanme = $("#section_" + prop.SectionId).text();
var value = Number($("#SubFormIndex").val()) + 1;
$("#SubFormIndex").val(value);
$("#Subform_SectionName").val(sectionnanme);
$("#Subform_SectionId").val(prop.SectionId);
SubForm.instance.Index = rowid;
var successCallBack = {
CallBack: function (id) {
Bizgaze.Apps.Transact.Managers.LedgerManager.Instance().getLedgerById(id).then(function (response) {
var rowid = Bizgaze.Forms.Controls.Tax.Instance().length;
Bizgaze.Forms.Controls.Tax.Instance().bindLedgers(rowid, response.result.LedgerId, response.result.LedgerName);
});
},
Parameters: null,
};
var formviewerObj = {
FormId: Number($("#Subform_ChildFormId").val()),
AppConfigurationId: 0,
Pk_Value: 0,
PortletWidgetId: 0,
OnSuccess: successCallBack,
OnFail: null,
OnLoad: null,
FormContainer: null,
};
var viewererobj = new Unibase.Platform.Forms.Components.FormViewer();
viewererobj.init(formviewerObj);
}
SubFormRemove(formpropertyid, Index, subformname) {
var totalcount = Number($("#btnAddSubForm_" + formpropertyid).data("subformcount"));
$("#btnAddSubForm_" + formpropertyid).data("subformcount", totalcount - 1);
$('.divNextSubForm_' + formpropertyid + '.subform_' + Index).remove();
SubForm.instance.refreshList(formpropertyid, subformname);
}
refreshList(formpropertyid, subformname) {
var index = 0;
$('.divNextSubForm_' + formpropertyid + '.subformcls').each(function () {
index++;
$(this).find(".subforname_" + formpropertyid).text(subformname + "-" + index);
});
}
loadhtml(Index, prop, RoleClass, SubformIndex) {
var html = "";
let subformlistSetting;
var setting = JSON.parse(prop.ControlJsonText);
if (setting != null) {
subformlistSetting = setting.EnableListFormSettings;
}
else {
subformlistSetting = false;
}
var containerClass = "container-subform-" + SubformIndex;
if (subformlistSetting == true) {
containerClass = "container-subform-list-" + SubformIndex;
}
if ($("#isclcikevent").val() == "true") {
html += '<div id="control-container-' + prop.UniqueId + '" class="control-group ' + containerClass + ' divCustomProperties_' + prop.DocPropertyName + ' controldata_' + prop.DocPropertyId + ' col-sm-' + prop.PropertyWidth + RoleClass + '" data-size="' + prop.PropertyWidth + '" data-propertyname="' + prop.DocPropertyName + '" data-propertyid="' + prop.DocPropertyId + '" data-doctypeid="' + prop.DocTypeId + '" data-level="' + prop.Level + '" data-doctypetable="' + prop.DocTypeTableName + '" data-doctypename="' + prop.DocTypeName + '" data-isdefault="' + prop.IsDefault + '" data-RowIndex="' + prop.RowIndex + '" data-formpropertyid="' + prop.FormPropertyId + '" data-controlname="' + prop.ControlName + '" data-formpropertyname="' + prop.FormPropertyName + '" data-validatename="' + prop.LabelName + '"></div>';
}
else if (prop.ControlName == "SubForm") {
html += '<div id="control-container-' + prop.FormPropertyId + '" class="control-group divCustomProperties divCustomProperties_' + prop.DocPropertyName + ' controldata_' + prop.DocPropertyId + ' col-sm-12' + RoleClass + '" data-size="' + prop.PropertyWidth + '" data-propertyname="' + prop.DocPropertyName + '" data-propertyid="' + prop.DocPropertyId + '" data-doctypeid="' + prop.DocTypeId + '" data-level="' + prop.Level + '" data-doctypetable="' + prop.DocTypeTableName + '" data-doctypename="' + prop.DocTypeName + '" data-isdefault="' + prop.IsDefault + '" data-RowIndex="' + prop.RowIndex + '" data-formpropertyid="' + prop.FormPropertyId + '" data-controlname="' + prop.ControlName + '" data-formpropertyname="' + prop.FormPropertyName + '" data-validatename="' + prop.LabelName + '"></div>';
}
return html;
}
finalhtml(html, totalform, prop, script, formcontainerclass) {
var Subtotalform = '<script type="text/javascript">' +
'$(document).ready(function () {' +
'var _fileCacheHelper = Unibase.Platform.Helpers.FileCacheHelper.Instance();' +
'_fileCacheHelper.loadJsFile("' + prop.JsUrl + '", function () {' + script +
prop.FormJsVariableName + '.Instance();';
if (prop.JsText != "" && prop.JsText != null) {
var RegExp_Prop = new RegExp("{{container}}", "gi");
var jstext = prop.JsText.replace(RegExp_Prop, formcontainerclass);
Subtotalform += jstext;
}
Subtotalform += '});});</script>';
if ($("#IsSubFormExist").val() == "true") {
$("#subform_FormPropertyId").val();
var Id = Number($("#subform_FormPropertyId").val()) + Number($("#SubFormIndex").val());
;
var Containerid1 = $("#hdn_Containerid").val();
var sub1 = html;
sub1 += Subtotalform;
$("#" + Containerid1).removeClass();
$("#" + Containerid1).addClass('control-group divCustomProperties controldata_ col-sm-12');
$("#" + Containerid1).find('#divSub_' + Id).append(sub1);
$("#IsSubFormExist").val("false");
}
else if ($("#isclcikevent").val() == "true") {
$(".div_SubFormdetai").empty();
$(".div_SubFormdetai").removeAttr("style");
var rowid1 = moment().valueOf();
var SectionName = $("#Subform_SectionName").val();
var SectionId = $("#Subform_SectionId").val();
var ChildFormId = Number($("#Subform_ChildFormId").val());
var index = SubForm.instance.Index;
var FormPropertyid = $("#subform_FormPropertyId").val();
var sub = '<div class="section_' + SectionName + ' card">';
sub += '<div class="card-header" id="section_' + SectionId + '">' + SectionName + '</div>';
sub = '<div class="dummy ' + formcontainerclass + '">' + html + '</div>';
sub += Subtotalform;
sub += '</div>';
sub += '<div class="lastdiv"></div><div class="col-sm-3 div_SubFormdetai" style="padding-bottom:20px" id="div_subformsettings' + index + '">' +
'<a href="javascript:;" class="btn btn-success text-white" title="Delete Item" onclick="Unibase.Forms.Controls.SubForm.Instance().subFormSettings(' + ChildFormId + ',Unibase.Forms.Controls.SubForm.Instance().Subprops[0])"><span>' + $("#SubFormButtonText").val() + '</span></a>' +
'</div>';
$(".lastdiv:last").after(sub);
$("#IsSubFormExist").val("false");
}
else {
$('#div_' + $("#Subform_DocPropertyName").val() + '_' + $("#subform_FormPropertyId").val() + '').append(totalform);
}
}
loadingjsfiles(props) {
Unibase.Platform.Forms.Managers.FormManager.Instance().getForm(props.ChildFormId).then(function (response) {
var data = response.result;
var json = JSON.parse(data.FormJson);
for (var k = 0; k < json.Sections.length; k++) {
var section = json.Sections[k];
for (var j = 0; j < section.FormProperties.length; j++) {
var prop = section.FormProperties[j];
if (prop != undefined) {
if (prop.PropertyType != "Section") {
var controljsurl = prop.ControlJsUrl;
controljsurl = controljsurl;
var _fileCacheHelper = Unibase.Platform.Helpers.FileCacheHelper.Instance();
_fileCacheHelper.loadJsFile(controljsurl, function () { });
}
}
}
}
var subformlistSetting = props.EnableListFormSettings;
var containerClass = "container-subform-" + $("#SubFormIndex").val();
if (subformlistSetting == true) {
containerClass = "container-subform-list-" + $("#SubFormIndex").val();
}
var successCallBack = {
CallBack: function (id) {
Bizgaze.Apps.Transact.Managers.LedgerManager.Instance().getLedgerById(id).then(function (response) {
var rowid = Bizgaze.Forms.Controls.Tax.Instance().length;
Bizgaze.Forms.Controls.Tax.Instance().bindLedgers(rowid, response.result.LedgerId, response.result.LedgerName);
});
},
Parameters: null,
};
var formviewerObj = {
FormId: props.ChildFormId,
AppConfigurationId: 0,
Pk_Value: 0,
PortletWidgetId: 0,
OnSuccess: successCallBack,
OnFail: null,
OnLoad: null,
FormContainer: null,
};
var viewererobj = new Unibase.Platform.Forms.Components.FormViewer();
viewererobj.init(formviewerObj);
});
}
removeRequiredclass(container) {
$("." + container).find('.type-control').each(function () {
var id = $(this).attr('id');
var viewererobj = new Unibase.Platform.Forms.Components.FormViewer();
viewererobj.removeRequiredClass("#" + id);
});
}
static Instance() {
if (this.instance === undefined) {
this.instance = new SubForm();
}
return this.instance;
}
}
Controls.SubForm = SubForm;
class SubFormSetting {
}
Controls.SubFormSetting = SubFormSetting;
})(Controls = Forms.Controls || (Forms.Controls = {}));
})(Forms = Unibase.Forms || (Unibase.Forms = {}));
})(Unibase || (Unibase = {}));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,234 @@
var Unibase;
(function (Unibase) {
let Forms;
(function (Forms) {
let Controls;
(function (Controls) {
class SubForm_Setting {
constructor() {
this.SubFormName = '';
this.ChildFormId = 0;
this.RelationPropertyId = 0;
}
loadSettingHtml(Container) {
let html = `<div class="card div_subform"><div class="card-header"><span>SubForm</span></div><div class="card-body subform"><div class="subform-row col-sm-2" id="subform-row"></div>
<div class="row"> <div class="col-sm-6"><div class="floating-label-form-group floating-label-form-group-with-value"><label for="lbl" id="lblSubFormName" class="font-bold">SuB Form<span class="text-danger" id="spnIsRequired_Section"> *</span></label><input type="text" id="txtSuBFormName" class="form-control value-control required floating-label-control" data-isdefault="true" placeholder="SuBFormName *" data-placeholder="Enter SuB Form Name" data-label="SuBFormName *"></div> </div></div><div class="row mt-20"><div class="col-sm-6"><label id="lblFormName" class="font-bold">Form Name <span class="text-danger" id="spnIsRequired_Section"> *</span></label><select name="FormName" id="txtFormNames" class="form-control value-control required" data-isdynamic="true"><option value="0">-- Select --</option></select></div><div id="div_RelationProperty" class="col-sm-6"><label for="lbl" id="lbl_RelationProperty" style="color:grey">Relation Property</label><select id="txtAutoComplete_RelationProperty" class="txtAutoComplete_RelationProperty form-control text-control" data-isdefault="true" style="width:100%;"><option value="0">-- Select --</option></select></div></div><div class="col-sm-12 row" ><div class="col-sm-6" id="EnableSubFormSettings" style="margin-top:50px"><strong>Enable SubForm Settings</strong><label class="switch pull-right"><input id="chkEnableSubFormSettings" data-group="" style="margin-top:50px" type="checkbox"><span></span> </label></div><div class="col-sm-6" id="EnableListFormSettings" style="margin-top:50px"><strong>Enable ListForm Settings</strong><label class="switch pull-right"><input id="chkEnableListFormSettings" data-group="" style="margin-top:50px" type="checkbox"><span></span> </label></div></div><div class="row hidden" id="AddButtonName"> <div class="col-sm-6"><div class="floating-label-form-group floating-label-form-group-with-value"><label for="lbl" id="lblButtonName" class="font-bold">Button Name<span class="text-danger" id="spnIsRequired_Section"> *</span></label><input type="text" id="txtButtonName" class="form-control value-control floating-label-control" data-isdefault="true" placeholder="ButtonName *" data-placeholder="Enter Button Name" data-label="Button Name *"></div> </div></div>
</div></div>`;
$(Container).html(html);
SubForm_Setting.Instance().FormsAutocomplete();
$("#chkEnableSubFormSettings").unbind("click").click(function () {
var changable = $("#chkEnableSubFormSettings").prop('checked');
if (changable) {
$("#chksubformsettingsEnable").prop("checked", true);
$("#AddButtonName").removeClass('hidden');
}
else {
$("#chksubformsettingsEnable").prop("checked", false);
$("#AddButtonName").addClass('hidden');
}
});
$("#chkEnableListFormSettings").unbind("click").click(function () {
var changable = $("#chkEnableListFormSettings").prop('checked');
if (changable) {
$("#chkEnableListFormSettings").prop("checked", true);
$("#chkEnableListFormSettings").val("true");
$(".div_CheckListform").removeClass('hidden');
}
else {
$("#chkEnableListFormSettings").prop("checked", false);
$("#chkEnableListFormSettings").val("false");
$(".div_CheckListform").addClass('hidden');
}
});
}
FormsAutocomplete() {
var _fileCacheHelper = Unibase.Platform.Helpers.FileCacheHelper.Instance();
var userinfo = Unibase.Platform.Membership.Infos.Identity.getCurrentUser();
var term = "";
if (term == undefined || term == "") {
term = undefined;
}
_fileCacheHelper.loadJsFile('/platform/forms/managers/formmanager.js', function () {
Unibase.Platform.Forms.Managers.FormManager.Instance().getFormsAutoComplete(term, userinfo.sessionId).then(function (response) {
var data = response.result;
var FormsData = [];
for (let i = 0; i < data.length; i++) {
var roles = data[i];
FormsData.push({ id: roles.Value, text: roles.SelectText });
}
$('#txtFormNames').select2({
placeholder: 'Select Form',
data: FormsData,
});
$("#txtFormNames").on("change", function () {
if ($("#txtFormNames").val() != null) {
var Formid = $("#txtFormNames option:selected").val().toString();
SubForm_Setting.Instance().GetDocPropertyAutocompleteDetails(Number(Formid));
}
});
});
});
}
GetDocPropertyAutocompleteDetails(FormId) {
$('#txtAutoComplete_RelationProperty').empty();
Unibase.Platform.Forms.Managers.FormManager.Instance().getFormProperties(FormId).then(function (response) {
for (let i = 0; i < response.result.length; i++) {
$('#txtAutoComplete_RelationProperty').append('<option value="' + response.result[i].DocPropertyId + '">' + response.result[i].DocPropertyName + '</option>');
}
});
}
bindControlData(controldatajson) {
var data = controldatajson;
$("#hdnAutocompletePropertyId").val(data.AutoCompletePropertyId);
var selectDatalistname = new Option(data.DataListName, data.DataListId, true);
$("#loadDatalist").append(selectDatalistname);
var selectIdColumn = new Option(data.AutoCompleteIdColumn, data.AutoCompleteIdColumn, true);
$("#loadDatalistIdColumns").append(selectIdColumn);
var selectTextColumn = new Option(data.AutoCompleteTextColumn, data.AutoCompleteTextColumn, true);
$("#txtPropertyName").val(data.FormPropertyName);
$("#loadDatalistTextColumns").append(selectTextColumn);
$("#hfloadDatalistId").val(data.DataListId);
$("#txtSuBFormName").val(data.SubFormName);
$('select#txtFormNames option:selected').text(data.ChildFormName);
$('select#txtFormNames option:selected').val(data.ChildFormId);
$('select#txtAutoComplete_RelationProperty option:selected').text(data.RelationPropertyName);
$('select#txtAutoComplete_RelationProperty option:selected').val(data.RelationPropertyId);
if (data.EnableSubFormSettings == true) {
$('#chkEnableSubFormSettings').prop("checked", true);
$('#chkEnableSubFormSettings').val('true');
$("#AddButtonName").removeClass('hidden');
$("#txtButtonName").val(data.ButtonName);
}
else {
$('#chkEnableSubFormSettings').prop("checked", false);
$('#chkEnableSubFormSettings').val('false');
$("#AddButtonName").addClass('hidden');
}
if (data.EnableListFormSettings == true) {
$("#chkEnableListFormSettings").prop("checked", true);
$("#chkEnableListFormSettings").val("true");
$(".div_CheckListform").removeClass('hidden');
}
else {
$("#chkEnableListFormSettings").prop("checked", false);
$("#chkEnableListFormSettings").val("false");
$(".div_CheckListform").addClass('hidden');
}
$("#chkIsTagSelect").prop('checked', data.IsTagSelect);
$("#hdnIsTagSelect").val(data.IsTagSelect);
$("#hdnFormId").val(data.FormId);
$("#hdnAutocompleteFilterColumn").val(data.AutocompleteFilterColumn);
$("#hdnAppConfigId").val(data.AppConfigId);
$("#txt_FormUniqueId").val(Unibase.Platform.Forms.Components.FormBuilder.Instance().FormUniqueId).toString();
}
SaveControlData(controldatajson) {
var chkenblesetting;
var chkenbleListsetting;
var changable = $("#chkEnableSubFormSettings").prop('checked');
if (changable) {
$("#chkEnableSubFormSettings").prop("checked", true);
$("#chkEnableSubFormSettings").val("true");
$("#AddButtonName").removeClass('hidden');
chkenblesetting = true;
}
else {
$("#chkEnableSubFormSettings").prop("checked", false);
$("#chkEnableSubFormSettings").val("false");
chkenblesetting = false;
$("#AddButtonName").addClass('hidden');
}
var Listchangable = $("#chkEnableListFormSettings").prop('checked');
if (Listchangable) {
$("#chkEnableListFormSettings").prop("checked", true);
$("#chkEnableListFormSettings").val("true");
chkenbleListsetting = true;
$(".div_CheckListform").removeClass('hidden');
}
else {
$("#chkEnableListFormSettings").prop("checked", false);
$("#chkEnableListFormSettings").val("false");
chkenbleListsetting = false;
$(".div_CheckListform").addClass('hidden');
}
let SubFormName = $("#txtSuBFormName").val();
let ChildFormId = Number($('select#txtFormNames option:selected').val());
let RelationPropertyId = Number($('select#txtAutoComplete_RelationProperty option:selected').val());
SubForm_Setting.instance.SubFormName = SubFormName;
SubForm_Setting.instance.ChildFormId = Number(ChildFormId);
SubForm_Setting.instance.RelationPropertyId = Number(RelationPropertyId);
var controldatajson1 = [];
if (controldatajson != null && controldatajson != "") {
controldatajson1[0] = {
DocPropertyId: Number(0),
DataListId: Number($("#loadDatalist option:selected").val()),
IsIncludeAllOption: false,
IsMultiSelect: false,
SubFormName: controldatajson.SubFormName,
ChildFormId: Number(controldatajson.ChildFormId),
ChildFormName: controldatajson.ChildFormName,
RelationPropertyId: Number(controldatajson.RelationPropertyId),
RelationPropertyName: controldatajson.RelationPropertyName,
EnableSubFormSettings: controldatajson.EnableSubFormSettings,
EnableListFormSettings: controldatajson.EnableListFormSettings,
ButtonName: controldatajson.ButtonName,
ParentFormId: Number(controldatajson.ParentFormId),
IsTagSelect: $("#chkIsTagSelect").prop('checked'),
FormId: Number(controldatajson.FormId),
AppConfigId: Number($("#hdnAppConfigId").val()),
Parameters: null,
DataListName: $("#loadDatalist option:selected").text(),
FormUniqueId: controldatajson.FormUniqueId,
ParentFormUniqueId: controldatajson.ParentFormUniqueId,
ChildFormUniqueId: controldatajson.ChildFormUniqueId,
FormPropertyName: $("#txtPropertyName").val(),
};
}
else {
controldatajson1[0] = {
DocPropertyId: Number(Unibase.Platform.Forms.Components.PropertyEditor.Instance().DocPropertyId),
DataListId: Number($("#loadDatalist option:selected").val()),
IsIncludeAllOption: false,
IsMultiSelect: false,
SubFormName: $("#txtSuBFormName").val(),
ChildFormId: Number($('select#txtFormNames option:selected').val()),
ChildFormName: $('select#txtFormNames option:selected').text(),
RelationPropertyId: Number($('select#txtAutoComplete_RelationProperty option:selected').val()),
RelationPropertyName: $('select#txtAutoComplete_RelationProperty option:selected').text(),
EnableSubFormSettings: chkenblesetting,
EnableListFormSettings: chkenbleListsetting,
ButtonName: $("#txtButtonName").val(),
ParentFormId: Number(0),
IsTagSelect: $("#chkIsTagSelect").prop('checked'),
FormId: Number(Unibase.Platform.Forms.Components.FormBuilder.Instance().FormId),
AppConfigId: Number($("#hdnAppConfigId").val()),
Parameters: null,
DataListName: $("#loadDatalist option:selected").text(),
FormUniqueId: Unibase.Platform.Forms.Components.FormBuilder.Instance().FormUniqueId,
FormPropertyName: $("#txtPropertyName").val(),
};
controldatajson = JSON.stringify(controldatajson1[0]);
}
return controldatajson;
}
loadControlPropertiesHtml(controlpropList, container) {
return ``;
}
bindPropertySettings(prop) {
var propertySettings = prop.PropertySettings;
return "";
}
savePropertySettings(prop) {
var propertySettings = prop.PropertySettings;
return "";
}
static Instance() {
if (this.instance === undefined) {
this.instance = new SubForm_Setting();
}
return this.instance;
}
}
Controls.SubForm_Setting = SubForm_Setting;
})(Controls = Forms.Controls || (Forms.Controls = {}));
})(Forms = Unibase.Forms || (Unibase.Forms = {}));
})(Unibase || (Unibase = {}));
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long