Built files from Bizgaze WebServer
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

textbox.settings.js 3.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. var Unibase;
  2. (function (Unibase) {
  3. let Forms;
  4. (function (Forms) {
  5. let Controls;
  6. (function (Controls) {
  7. class TextBox_Setting {
  8. loadSettingHtml() {
  9. return ``;
  10. }
  11. bindControlData(controldatajson) {
  12. return "";
  13. }
  14. SaveControlData(controldatajson) {
  15. return "";
  16. }
  17. loadControlPropertiesHtml(Container) {
  18. var html = `<section class="">` +
  19. `<div class="card PropertySettings">` +
  20. `<div class="card-header"><h6><b>Property Settings</b></h6></div>` +
  21. `<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>` +
  22. `</div></section>`;
  23. $(Container).html(html);
  24. $("#divPropSetting").removeClass('hidden');
  25. }
  26. bindPropertySettings(prop) {
  27. var propertySettings = prop.PropertySettings;
  28. if (propertySettings.length > 0 && propertySettings != null && propertySettings != undefined) {
  29. var i = 0;
  30. $(".Controlproperties-Element").each(function () {
  31. if (propertySettings[i].ControlPropertyName == "MaxLength") {
  32. $(this).attr("data-controlpropertyid", propertySettings[i].ControlPropertyId);
  33. $(this).attr("data-controlpropertyname", propertySettings[i].ControlPropertyName);
  34. $(this).attr("data-propertysettingid", propertySettings[i].PropertySettingId);
  35. $("#MaxLength").val(propertySettings[i].ControlPropertyValue);
  36. }
  37. i += 1;
  38. });
  39. }
  40. }
  41. savePropertySettings(prop) {
  42. var propertySettings = prop.PropertySettings;
  43. var propSettingReq = [];
  44. $(".Controlproperties-Element").each(function () {
  45. if ($(this).children().closest("input").val().toString()) {
  46. var data = {
  47. FormPropertyId: Number(prop.FormPropertyId),
  48. ControlPropertyId: Number($(this).attr('data-controlpropertyid')),
  49. ControlPropertyValue: $(this).children().closest("input").val().toString(),
  50. ControlPropertyName: $(this).attr('data-controlpropertyname'),
  51. ControlId: Number(prop.ControlId),
  52. PropertySettingId: Number($(this).attr("data-propertysettingid")),
  53. };
  54. propSettingReq.push(data);
  55. }
  56. });
  57. return propSettingReq;
  58. }
  59. static Instance() {
  60. if (this.instance === undefined) {
  61. this.instance = new TextBox_Setting();
  62. }
  63. return this.instance;
  64. }
  65. }
  66. Controls.TextBox_Setting = TextBox_Setting;
  67. })(Controls = Forms.Controls || (Forms.Controls = {}));
  68. })(Forms = Unibase.Forms || (Unibase.Forms = {}));
  69. })(Unibase || (Unibase = {}));