12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- var Bizgaze;
- (function (Bizgaze) {
- let Apps;
- (function (Apps) {
- let Crm;
- (function (Crm) {
- let Components;
- (function (Components) {
- class DistrictAuto {
- init(formpropertyid, prop, callback) {
- var instance = this;
- var url = _appsettings.server_url() + '/apis/v4/bizgaze/crm/cities/districtsautotext';
- AutoCompleteHelper.getHelper().Create("#autocomplete_districts", "#hfAutoComplete_DistrictId", url, function (response) {
- });
- if (callback != null)
- callback();
- }
- loadControl(containerid, prop) {
- var html = '<div id="div_districtautotext">' +
- '<label for= "lblDistrict" class= "font-bold">Districts</label><span class="text-danger" id="spnIsRequired_districtautotext"> *</span>' +
- '<select id ="autocomplete_districts" class="form-control text-control" style ="width:100%" placeholder=" Select District" data-placeholder="Select District"></select>' +
- '<input type ="hidden" id ="hfAutoComplete_DistrictId" class="hfAutoComplete_DistrictId form-control value-control" data-isdynamic="true"></div>';
- $("#" + containerid).html(html);
- }
- loadControlSettings(controlsettingjson, formpropertyid) {
- return [];
- }
- loadPropertySettings(propertysettings, formpropertyid, DocPropertyName) {
- return [];
- }
- bindEditFormDetails(formpropertyid, propval, DocPropertyName) {
- if (propval != "null") {
- var instance = this;
- var InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
- var IdValue = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_districtid").Value;
- var TextValue = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_districtname").Value;
- var selectedOptions = new Option(TextValue, IdValue, true);
- if (IdValue != "0") {
- $("#autocomplete_districts").append(selectedOptions);
- jQuery("#autocomplete_districts").val(IdValue).trigger("change");
- }
- }
- }
- static Instance() {
- if (this.instance === undefined) {
- this.instance = new DistrictAuto();
- }
- return this.instance;
- }
- }
- Components.DistrictAuto = DistrictAuto;
- })(Components = Crm.Components || (Crm.Components = {}));
- })(Crm = Apps.Crm || (Apps.Crm = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|