Built files from Bizgaze WebServer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

subform.settings.min.js 9.2KB

123
  1. var Unibase;(function(n){let t;(function(t){let i;(function(t){class i{constructor(){this.SubFormName="";this.ChildFormId=0;this.RelationPropertyId=0}loadSettingHtml(n){let t=`<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>
  2. <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>
  3. </div></div>`;$(n).html(t);i.Instance().FormsAutocomplete();$("#chkEnableSubFormSettings").unbind("click").click(function(){var n=$("#chkEnableSubFormSettings").prop("checked");n?($("#chksubformsettingsEnable").prop("checked",!0),$("#AddButtonName").removeClass("hidden")):($("#chksubformsettingsEnable").prop("checked",!1),$("#AddButtonName").addClass("hidden"))});$("#chkEnableListFormSettings").unbind("click").click(function(){var n=$("#chkEnableListFormSettings").prop("checked");n?($("#chkEnableListFormSettings").prop("checked",!0),$("#chkEnableListFormSettings").val("true"),$(".div_CheckListform").removeClass("hidden")):($("#chkEnableListFormSettings").prop("checked",!1),$("#chkEnableListFormSettings").val("false"),$(".div_CheckListform").addClass("hidden"))})}FormsAutocomplete(){var r=n.Platform.Helpers.FileCacheHelper.Instance(),u=n.Platform.Membership.Infos.Identity.getCurrentUser(),t="";(t==undefined||t=="")&&(t=undefined);r.loadJsFile("/platform/forms/managers/formmanager.js",function(){n.Platform.Forms.Managers.FormManager.Instance().getFormsAutoComplete(t,u.sessionId).then(function(n){var r=n.result,u=[],t;for(let n=0;n<r.length;n++)t=r[n],u.push({id:t.Value,text:t.SelectText});$("#txtFormNames").select2({placeholder:"Select Form",data:u});$("#txtFormNames").on("change",function(){if($("#txtFormNames").val()!=null){var n=$("#txtFormNames option:selected").val().toString();i.Instance().GetDocPropertyAutocompleteDetails(Number(n))}})})})}GetDocPropertyAutocompleteDetails(t){$("#txtAutoComplete_RelationProperty").empty();n.Platform.Forms.Managers.FormManager.Instance().getFormProperties(t).then(function(n){for(let t=0;t<n.result.length;t++)$("#txtAutoComplete_RelationProperty").append('<option value="'+n.result[t].DocPropertyId+'">'+n.result[t].DocPropertyName+"<\/option>")})}bindControlData(t){var i=t,r,u,f;$("#hdnAutocompletePropertyId").val(i.AutoCompletePropertyId);r=new Option(i.DataListName,i.DataListId,!0);$("#loadDatalist").append(r);u=new Option(i.AutoCompleteIdColumn,i.AutoCompleteIdColumn,!0);$("#loadDatalistIdColumns").append(u);f=new Option(i.AutoCompleteTextColumn,i.AutoCompleteTextColumn,!0);$("#txtPropertyName").val(i.FormPropertyName);$("#loadDatalistTextColumns").append(f);$("#hfloadDatalistId").val(i.DataListId);$("#txtSuBFormName").val(i.SubFormName);$("select#txtFormNames option:selected").text(i.ChildFormName);$("select#txtFormNames option:selected").val(i.ChildFormId);$("select#txtAutoComplete_RelationProperty option:selected").text(i.RelationPropertyName);$("select#txtAutoComplete_RelationProperty option:selected").val(i.RelationPropertyId);i.EnableSubFormSettings==!0?($("#chkEnableSubFormSettings").prop("checked",!0),$("#chkEnableSubFormSettings").val("true"),$("#AddButtonName").removeClass("hidden"),$("#txtButtonName").val(i.ButtonName)):($("#chkEnableSubFormSettings").prop("checked",!1),$("#chkEnableSubFormSettings").val("false"),$("#AddButtonName").addClass("hidden"));i.EnableListFormSettings==!0?($("#chkEnableListFormSettings").prop("checked",!0),$("#chkEnableListFormSettings").val("true"),$(".div_CheckListform").removeClass("hidden")):($("#chkEnableListFormSettings").prop("checked",!1),$("#chkEnableListFormSettings").val("false"),$(".div_CheckListform").addClass("hidden"));$("#chkIsTagSelect").prop("checked",i.IsTagSelect);$("#hdnIsTagSelect").val(i.IsTagSelect);$("#hdnFormId").val(i.FormId);$("#hdnAutocompleteFilterColumn").val(i.AutocompleteFilterColumn);$("#hdnAppConfigId").val(i.AppConfigId);$("#txt_FormUniqueId").val(n.Platform.Forms.Components.FormBuilder.Instance().FormUniqueId).toString()}SaveControlData(t){var u,f,o=$("#chkEnableSubFormSettings").prop("checked"),e,r;o?($("#chkEnableSubFormSettings").prop("checked",!0),$("#chkEnableSubFormSettings").val("true"),$("#AddButtonName").removeClass("hidden"),u=!0):($("#chkEnableSubFormSettings").prop("checked",!1),$("#chkEnableSubFormSettings").val("false"),u=!1,$("#AddButtonName").addClass("hidden"));e=$("#chkEnableListFormSettings").prop("checked");e?($("#chkEnableListFormSettings").prop("checked",!0),$("#chkEnableListFormSettings").val("true"),f=!0,$(".div_CheckListform").removeClass("hidden")):($("#chkEnableListFormSettings").prop("checked",!1),$("#chkEnableListFormSettings").val("false"),f=!1,$(".div_CheckListform").addClass("hidden"));let s=$("#txtSuBFormName").val(),h=Number($("select#txtFormNames option:selected").val()),c=Number($("select#txtAutoComplete_RelationProperty option:selected").val());return i.instance.SubFormName=s,i.instance.ChildFormId=Number(h),i.instance.RelationPropertyId=Number(c),r=[],t!=null&&t!=""?r[0]={DocPropertyId:Number(0),DataListId:Number($("#loadDatalist option:selected").val()),IsIncludeAllOption:!1,IsMultiSelect:!1,SubFormName:t.SubFormName,ChildFormId:Number(t.ChildFormId),ChildFormName:t.ChildFormName,RelationPropertyId:Number(t.RelationPropertyId),RelationPropertyName:t.RelationPropertyName,EnableSubFormSettings:t.EnableSubFormSettings,EnableListFormSettings:t.EnableListFormSettings,ButtonName:t.ButtonName,ParentFormId:Number(t.ParentFormId),IsTagSelect:$("#chkIsTagSelect").prop("checked"),FormId:Number(t.FormId),AppConfigId:Number($("#hdnAppConfigId").val()),Parameters:null,DataListName:$("#loadDatalist option:selected").text(),FormUniqueId:t.FormUniqueId,ParentFormUniqueId:t.ParentFormUniqueId,ChildFormUniqueId:t.ChildFormUniqueId,FormPropertyName:$("#txtPropertyName").val()}:(r[0]={DocPropertyId:Number(n.Platform.Forms.Components.PropertyEditor.Instance().DocPropertyId),DataListId:Number($("#loadDatalist option:selected").val()),IsIncludeAllOption:!1,IsMultiSelect:!1,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:u,EnableListFormSettings:f,ButtonName:$("#txtButtonName").val(),ParentFormId:Number(0),IsTagSelect:$("#chkIsTagSelect").prop("checked"),FormId:Number(n.Platform.Forms.Components.FormBuilder.Instance().FormId),AppConfigId:Number($("#hdnAppConfigId").val()),Parameters:null,DataListName:$("#loadDatalist option:selected").text(),FormUniqueId:n.Platform.Forms.Components.FormBuilder.Instance().FormUniqueId,FormPropertyName:$("#txtPropertyName").val()},t=JSON.stringify(r[0])),t}loadControlPropertiesHtml(){return``}bindPropertySettings(n){var t=n.PropertySettings;return""}savePropertySettings(n){var t=n.PropertySettings;return""}static Instance(){return this.instance===undefined&&(this.instance=new i),this.instance}}t.SubForm_Setting=i})(i=t.Controls||(t.Controls={}))})(t=n.Forms||(n.Forms={}))})(Unibase||(Unibase={}));