Advertisement
Guest User

Untitled

a guest
Aug 31st, 2020
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.72 KB | None | 0 0
  1. function PresetFields() {
  2. this.syncAnnotScan()
  3. }
  4. var visible_field = new Array();
  5. var visible_fields = 0;
  6.  
  7. function Hide_When_Down() {
  8. event.target.hidden = true
  9. }
  10.  
  11. function Hide_Field(Name) {
  12. var v = this.getField(Name);
  13. if (v) {
  14. v.hidden = true;
  15. v.readonly = true;
  16. this.dirty = false;
  17. }
  18. }
  19.  
  20. function Do_Vide_Field(Name, Closable) {
  21. var v = this.getField(Name);
  22. if (v) {
  23. ++visible_fields;
  24. visible_field[visible_fields] = Name;
  25. v.hidden = false;
  26. if (Closable) {
  27. v.readonly = false;
  28. v.value = "On"
  29. }
  30. this.dirty = false;
  31. }
  32. }
  33.  
  34. function Vide_Field(Name) {
  35. Do_Vide_Field(Name, false);
  36. }
  37.  
  38. function Vide_Hide_Field(Name) {
  39. Do_Vide_Field(Name, true);
  40. }
  41.  
  42. function Hide_Fields() {
  43. while (visible_fields > 0) {
  44. Hide_Field(visible_field[visible_fields]);
  45. --visible_fields
  46. }
  47. }
  48.  
  49. function Vide_Fields(Name) {
  50. Hide_Fields();
  51. Vide_Field(Name);
  52. }
  53.  
  54. function Vide_Hide_Fields(Name) {
  55. Hide_Fields();
  56. Vide_Hide_Field(Name);
  57. }
  58.  
  59. function Toggle_Hide(Name) {
  60. var v = this.getField(Name);
  61. if (v) {
  62. v.hidden = !v.hidden;
  63. this.dirty = false;
  64. }
  65. }
  66.  
  67. function Field_On(Name) {
  68. v = this.getField(Name);
  69. if (v) {
  70. v.value = "On";
  71. this.dirty = false
  72. }
  73. }
  74.  
  75. function Field_Off(Name) {
  76. var v = this.getField(Name);
  77. if (v) {
  78. v.value = "Off";
  79. this.dirty = false
  80. }
  81. }
  82.  
  83. function Toggle_Value(Name) {
  84. var v = this.getField(Name);
  85. if (v) {
  86. if (v.value == "On") {
  87. v.value = "Off"
  88. } else {
  89. v.value = "On"
  90. }
  91. }
  92. this.dirty = false
  93. }
  94.  
  95. function Toggle_Read(Name) {
  96. var v = this.getField(Name);
  97. if (v) {
  98. v.readonly = !v.readonly
  99. }
  100. }
  101.  
  102. function Flip_Fields(Name) {
  103. var Names = Name.split(",");
  104. for (var i = 0; i < Names.length; i++) {
  105. v = this.getField(Names[i]);
  106. if (v) {
  107. v.hidden = !v.hidden;
  108. v.value = "On"
  109. }
  110. }
  111. }
  112.  
  113. function Forget_Changes() {
  114. this.dirty = false
  115. }
  116.  
  117. function Reset_Fields(FieldSet) {
  118. var i = 1;
  119. while (true) {
  120. v = this.getField(FieldSet + ":" + i);
  121. if (!v) {
  122. break
  123. } else {
  124. v.value = "Off"
  125. }
  126. i++
  127. }
  128. }
  129.  
  130. function Set_Fields(FieldSet) {
  131. var i = 1;
  132. while (true) {
  133. v = this.getField(FieldSet + ":" + i);
  134. if (!v) {
  135. break
  136. } else {
  137. v.value = "On"
  138. }
  139. i++
  140. }
  141. }
  142.  
  143. function Set_Field(FieldSet, FieldName) {
  144. Reset_Fields(FieldSet);
  145. v = this.getField(FieldSet + ":" + FieldName);
  146. if (v) {
  147. v.value = "On"
  148. }
  149. }
  150.  
  151. function Reset_Field(FieldSet, FieldName) {
  152. Set_Fields(FieldSet);
  153. v = this.getField(FieldSet + ":" + FieldName);
  154. if (v) {
  155. v.value = "Off"
  156. }
  157. }
  158.  
  159. function Walk_Field(FieldSet) {
  160. var i = 1;
  161. while (true) {
  162. v = this.getField(FieldSet + ":" + i);
  163. if (v) {
  164. if (v.value == "On") {
  165. v.value = "Off";
  166. var ii = i;
  167. ii++;
  168. v = this.getField(FieldSet + ":" + ii);
  169. if (!v) {
  170. v = this.getField(FieldSet + ":" + 1)
  171. }
  172. if (v) {
  173. v.value = "On"
  174. }
  175. break
  176. }
  177. i++
  178. } else {
  179. break
  180. }
  181. }
  182. }
  183.  
  184. Link Annotation Activated:
  185. Walk_Field("euroconstruction")
  186.  
  187. Link Annotation Activated:
  188. Set_Field("euroconstruction", "1")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement