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.

districtauto.js 3.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. var Bizgaze;
  2. (function (Bizgaze) {
  3. let Apps;
  4. (function (Apps) {
  5. let Crm;
  6. (function (Crm) {
  7. let Components;
  8. (function (Components) {
  9. class DistrictAuto {
  10. init(formpropertyid, prop, callback) {
  11. var instance = this;
  12. var url = _appsettings.server_url() + '/apis/v4/bizgaze/crm/cities/districtsautotext';
  13. AutoCompleteHelper.getHelper().Create("#autocomplete_districts", "#hfAutoComplete_DistrictId", url, function (response) {
  14. });
  15. if (callback != null)
  16. callback();
  17. }
  18. loadControl(containerid, prop) {
  19. var html = '<div id="div_districtautotext">' +
  20. '<label for= "lblDistrict" class= "font-bold">Districts</label><span class="text-danger" id="spnIsRequired_districtautotext"> *</span>' +
  21. '<select id ="autocomplete_districts" class="form-control text-control" style ="width:100%" placeholder=" Select District" data-placeholder="Select District"></select>' +
  22. '<input type ="hidden" id ="hfAutoComplete_DistrictId" class="hfAutoComplete_DistrictId form-control value-control" data-isdynamic="true"></div>';
  23. $("#" + containerid).html(html);
  24. }
  25. loadControlSettings(controlsettingjson, formpropertyid) {
  26. return [];
  27. }
  28. loadPropertySettings(propertysettings, formpropertyid, DocPropertyName) {
  29. return [];
  30. }
  31. bindEditFormDetails(formpropertyid, propval, DocPropertyName) {
  32. if (propval != "null") {
  33. var instance = this;
  34. var InstalledAppId = Unibase.Themes.Providers.DetailHelper.installedAppId;
  35. var IdValue = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_districtid").Value;
  36. var TextValue = Unibase.Themes.Providers.Detail_Settings.Instance().InputParameters.find(x => x.Key == "hf_" + InstalledAppId + "_districtname").Value;
  37. var selectedOptions = new Option(TextValue, IdValue, true);
  38. if (IdValue != "0") {
  39. $("#autocomplete_districts").append(selectedOptions);
  40. jQuery("#autocomplete_districts").val(IdValue).trigger("change");
  41. }
  42. }
  43. }
  44. static Instance() {
  45. if (this.instance === undefined) {
  46. this.instance = new DistrictAuto();
  47. }
  48. return this.instance;
  49. }
  50. }
  51. Components.DistrictAuto = DistrictAuto;
  52. })(Components = Crm.Components || (Crm.Components = {}));
  53. })(Crm = Apps.Crm || (Apps.Crm = {}));
  54. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  55. })(Bizgaze || (Bizgaze = {}));