combox.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <div style="background-color: #FFF; overflow: hidden">
  2. <div title="{{$.lp.base}}" class="MWFTab">
  3. <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
  4. <tr>
  5. <td class="editTableTitle">{{$.lp.id}}:</td>
  6. <td class="editTableValue"><input type="text" name="id" value="text{$.id}" class="editTableInput"/></td>
  7. </tr>
  8. <tr>
  9. <td class="editTableTitle">{{$.lp.name}}:</td>
  10. <td class="editTableValue"><input type="text" name="name" value="text{$.name}" class="editTableInput"/></td>
  11. </tr>
  12. <tr>
  13. <td class="editTableTitle">{{$.lp.description}}:</td>
  14. <td class="editTableValue"><input type="text" name="description" value="text{$.description}" class="editTableInput"/></td>
  15. </tr>
  16. <tr>
  17. <td class="editTableTitle">{{$.lp.readonly}}:</td>
  18. <td class="editTableValue">
  19. <input type="radio" name="isReadonly" value="true" text{($.isReadonly)?'checked':''}/>{{$.lp.yes}}
  20. <input type="radio" name="isReadonly" value="false" text{(!$.isReadonly)?'checked':''}/>{{$.lp.no}}
  21. </td>
  22. </tr>
  23. <tr>
  24. <td class="editTableTitle">{{$.lp.separator}}:</td>
  25. <td class="editTableValue"><input type="text" name="splitStr" value="text{$.splitStr}" class="editTableInput"/></td>
  26. </tr>
  27. <tr>
  28. <td class="editTableTitle">{{$.lp.showSeparator}}:</td>
  29. <td class="editTableValue"><input type="text" name="splitShow" value="text{$.splitShow}" class="editTableInput"/></td>
  30. </tr>
  31. <tr>
  32. <td class="editTableTitle">{{$.lp.canSelectCount}}:</td>
  33. <td class="editTableValue"><input title="0 表示不限制数量" type="text" name="count" value="text{$.count}" class="editTableInput"/></td>
  34. </tr>
  35. <tr>
  36. <td class="editTableTitle">{{$.lp.showOptions}}:</td>
  37. <td class="editTableValue">
  38. <input type="radio" name="showOptions" value="input" text{($.showOptions)!="focus"?'checked':''}/>{{$.lp.onInput}}
  39. <input type="radio" name="showOptions" value="focus" text{($.showOptions)=="focus"?'checked':''}/>{{$.lp.onFocus}}
  40. </td>
  41. </tr>
  42. <tr>
  43. <td class="editTableTitle">{{$.lp.options}}:</td>
  44. <td class="editTableValue">
  45. <input class="editTableRadio" onclick="if (this.checked){
  46. $('text{$.pid}selectEditItemValues').setStyle('display', 'block');
  47. $('text{$.pid}selectEditItemScript').setStyle('display', 'none');
  48. $('text{$.pid}selectEditItemDynamic').setStyle('display', 'none');
  49. $('text{$.pid}selectEditItemDict').setStyle('display', 'none');
  50. $('text{$.pid}selectEditItemView').setStyle('display', 'none');
  51. $('text{$.pid}selectEditItemStatement').setStyle('display', 'none');
  52. $('text{$.pid}selectFirstOption').setStyle('display', 'none');
  53. }" name="itemType" text{(!$.itemType || $.itemType=='values')?'checked':''} type="radio" value="values"/>{{$.lp.textValue}}
  54. <input class="editTableRadio" onclick="if (this.checked){
  55. $('text{$.pid}selectEditItemValues').setStyle('display', 'none');
  56. $('text{$.pid}selectEditItemScript').setStyle('display', 'block');
  57. $('text{$.pid}selectEditItemDynamic').setStyle('display', 'none');
  58. $('text{$.pid}selectEditItemDict').setStyle('display', 'none');
  59. $('text{$.pid}selectEditItemView').setStyle('display', 'none');
  60. $('text{$.pid}selectEditItemStatement').setStyle('display', 'none');
  61. $('text{$.pid}selectFirstOption').setStyle('display', 'none');
  62. }" name="itemType" text{($.itemType=='script')?'checked':''} type="radio" value="script"/>{{$.lp.script}}
  63. <input class="editTableRadio" onclick="if (this.checked){
  64. $('text{$.pid}selectEditItemValues').setStyle('display', 'none');
  65. $('text{$.pid}selectEditItemScript').setStyle('display', 'none');
  66. $('text{$.pid}selectEditItemDynamic').setStyle('display', 'block');
  67. $('text{$.pid}selectEditItemDict').setStyle('display', 'block');
  68. $('text{$.pid}selectEditItemView').setStyle('display', 'none');
  69. $('text{$.pid}selectEditItemStatement').setStyle('display', 'none');
  70. $('text{$.pid}selectFirstOption').setStyle('display', 'block');
  71. }" name="itemType" text{($.itemType=='dynamic')?'checked':''} type="radio" value="dynamic"/>{{$.lp.dynamic}} <br/>
  72. <input class="editTableRadio" onclick="if (this.checked){
  73. $('text{$.pid}selectEditItemValues').setStyle('display', 'none');
  74. $('text{$.pid}selectEditItemScript').setStyle('display', 'none');
  75. $('text{$.pid}selectEditItemDynamic').setStyle('display', 'none');
  76. $('text{$.pid}selectEditItemDict').setStyle('display', 'block');
  77. $('text{$.pid}selectEditItemView').setStyle('display', 'none');
  78. $('text{$.pid}selectEditItemStatement').setStyle('display', 'none');
  79. $('text{$.pid}selectFirstOption').setStyle('display', 'block');
  80. }" name="itemType" text{($.itemType=='dict')?'checked':''} type="radio" value="dict"/>{{$.lp.dict}}
  81. <input class="editTableRadio" onclick="if (this.checked){
  82. $('text{$.pid}selectEditItemValues').setStyle('display', 'none');
  83. $('text{$.pid}selectEditItemScript').setStyle('display', 'none');
  84. $('text{$.pid}selectEditItemDynamic').setStyle('display', 'none');
  85. $('text{$.pid}selectEditItemDict').setStyle('display', 'none');
  86. $('text{$.pid}selectEditItemView').setStyle('display', 'block');
  87. $('text{$.pid}selectEditItemStatement').setStyle('display', 'none');
  88. $('text{$.pid}selectFirstOption').setStyle('display', 'block');
  89. }" name="itemType" text{($.itemType=='view')?'checked':''} type="radio" value="view"/>{{$.lp.view}}
  90. <input class="editTableRadio" onclick="if (this.checked){
  91. $('text{$.pid}selectEditItemValues').setStyle('display', 'none');
  92. $('text{$.pid}selectEditItemScript').setStyle('display', 'none');
  93. $('text{$.pid}selectEditItemDynamic').setStyle('display', 'none');
  94. $('text{$.pid}selectEditItemDict').setStyle('display', 'none');
  95. $('text{$.pid}selectEditItemView').setStyle('display', 'none');
  96. $('text{$.pid}selectEditItemStatement').setStyle('display', 'block');
  97. $('text{$.pid}selectFirstOption').setStyle('display', 'block');
  98. }" name="itemType" text{($.itemType=='statement')?'checked':''} type="radio" value="statement"/>{{$.lp.statement}}
  99. </td>
  100. </tr>
  101. </table>
  102. <div id="text{$.pid}selectEditItemValues" style="display: text{($.itemType=='values')?'block':'none'}" class="MWFArraylist" name="itemValues" title="{{$.lp.options}}"></div>
  103. <div id="text{$.pid}selectEditItemScript" style="display: text{($.itemType=='script')?'block':'none'}" class="MWFScriptArea" name="itemScript" title="{{$.lp.optionScript}} (S)"></div>
  104. <div id="text{$.pid}selectEditItemDynamic" style="display: text{($.itemType=='dynamic')?'block':'none'}">
  105. <div style="line-height: 20px;padding:5px;">
  106. //动态计算指每次输入的时候(出现可选列表)都会重新计算可选值<br/>
  107. //可以通过this.event.value 获取当前输入的值<br/>
  108. //需要通过 this.event.callback( options ) 将选项回传给组件<br/>
  109. if( ( this.event.value || "" ).indexOf("a") > -1 ){<br/>
  110. &nbsp;&nbsp;this.event.callback( [{text:"文本1", value:"aaa"}, {text:"文本2", value:"aa"}] )<br/>
  111. }else{<br/>
  112. &nbsp;&nbsp;this.event.callback( [{text:"文本3", value:"bbb"}, {text:"文本4", value:"bb"}] )<br/>
  113. }
  114. </div>
  115. <div class="MWFScriptArea" name="itemDynamic" title="{{$.lp.optionDynamicScript}} (S)"></div>
  116. </div>
  117. <div id="text{$.pid}selectFirstOption" style="display: text{(['dict','view','statement'].contains($.itemType))?'block':'none'}">
  118. <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
  119. <tr>
  120. <td class="editTableTitle">{{$.lp.firstOptionEnable}}:</td>
  121. <td class="editTableValue">
  122. <input class="editTableRadio" onclick="if (this.checked){
  123. $('text{$.pid}firstOptionTextTr').setStyle('display', '');
  124. }" name="firstOptionEnable" text{($.firstOptionEnable)?'checked':''} type="radio" value="true"/>{{$.lp.yes}}
  125. <input class="editTableRadio" onclick="if (this.checked){
  126. $('text{$.pid}firstOptionTextTr').setStyle('display', 'none');
  127. }" name="firstOptionEnable" text{(!$.firstOptionEnable)?'checked':''} type="radio" value="false"/>{{$.lp.no}}
  128. </td>
  129. </tr>
  130. <tr id="text{$.pid}firstOptionTextTr" style="display: text{($.firstOptionEnable)?'':'none'}">
  131. <td class="editTableTitle">{{$.lp.firstOption}}:</td>
  132. <td class="editTableValue"><input type="text" name="firstOption" value="text{$.firstOption}" class="editTableInput"/></td>
  133. </tr>
  134. </table>
  135. </div>
  136. <div id="text{$.pid}selectEditItemDict" style="display: text{($.itemType=='dict')?'block':'none'}" class="MWFDictionaryItemContainer">
  137. <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
  138. <tr>
  139. <td class="editTableTitle">{{$.lp.dict}}:</td>
  140. <td class="editTableValue">
  141. <div class="MWFDictionaryNode" data-count=1 name="itemDict"></div>
  142. </td>
  143. </tr>
  144. <tr>
  145. <td class="editTableTitle">{{$.lp.dictPath}}:</td>
  146. <td class="editTableValue">
  147. <div class="MWFDictionaryItemNode" name="itemDictPath" data-dict="itemDict" title="{{$.lp.dict}}{{$.lp.dictPath}}"></div>
  148. </td>
  149. </tr>
  150. <tr>
  151. <td class="editTableValue" colspan="2">{{$.lp.dictKeyNote}}:</td>
  152. </tr>
  153. <tr>
  154. <td class="editTableTitle">{{$.lp.valueKey}}:</td>
  155. <td class="editTableValue">
  156. <input type="text" name="dictValueKey" value="text{$.dictValueKey}" class="editTableInput"/>
  157. </td>
  158. </tr>
  159. <tr>
  160. <td class="editTableTitle">{{$.lp.textKey}}:</td>
  161. <td class="editTableValue">
  162. <input type="text" name="dictTextKey" value="text{$.dictTextKey}" class="editTableInput"/>
  163. </td>
  164. </tr>
  165. </table>
  166. </div>
  167. <div id="text{$.pid}selectEditItemView" style="display: text{($.itemType=='view')?'block':'none'}" class="MWFQueryViewItemContainer">
  168. <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
  169. <tr>
  170. <td class="editTableTitle">{{$.lp.view}}:</td>
  171. <td class="editTableValue">
  172. <div class="MWFQueryViewNode" data-count=1 name="itemView"></div>
  173. </td>
  174. </tr>
  175. <tr>
  176. <td class="editTableTitle">{{$.lp.valueColumn}}:</td>
  177. <td class="editTableValue">
  178. <select class="MWFViewColumnSelect" name="viewValueColumn" style="max-width: 270px;"></select>
  179. </td>
  180. </tr>
  181. <tr>
  182. <td class="editTableTitle">{{$.lp.textColumn}}:</td>
  183. <td class="editTableValue">
  184. <select class="MWFViewColumnSelect" name="viewTextColumn" style="max-width: 270px;"></select>
  185. </td>
  186. </tr>
  187. </table>
  188. <div style="background-color: #eeeeee; height: 24px; line-height: 24px; text-align: center; cursor:pointer">{{$.lp.filter}}</div>
  189. <div class="MWFViewFilterWithTemplate"></div>
  190. </div>
  191. <div id="text{$.pid}selectEditItemStatement" style="display: text{($.itemType=='statement')?'block':'none'}" class="MWFQueryStatementItemContainer">
  192. <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
  193. <tr>
  194. <td class="editTableTitle">{{$.lp.statement}}:</td>
  195. <td class="editTableValue">
  196. <div class="MWFQueryStatementNode" data-count=1 name="itemStatement"></div>
  197. </td>
  198. </tr>
  199. <tr>
  200. <td class="editTableTitle">{{$.lp.valueColumn}}:</td>
  201. <td class="editTableValue">
  202. <select class="MWFStatementItemSelect" name="statementValueColumn" style="max-width: 270px;"></select>
  203. </td>
  204. </tr>
  205. <tr>
  206. <td class="editTableTitle">{{$.lp.textColumn}}:</td>
  207. <td class="editTableValue">
  208. <select class="MWFStatementItemSelect" name="statementTextColumn" style="max-width: 270px;"></select>
  209. </td>
  210. </tr>
  211. </table>
  212. <div style="background-color: #eeeeee; height: 24px; line-height: 24px; text-align: center; cursor:pointer">{{$.lp.filter}}</div>
  213. <div class="MWFStatementFilterWithTemplate" data-statement="itemStatement"></div>
  214. </div>
  215. <div class="MWFMaplist" name="styles" title="{{$.lp.style}}"></div>
  216. <div class="MWFMaplist" name="inputStyles" title="{{$.lp.inputStyle}}"></div>
  217. <div class="MWFMaplist" name="properties" title="{{$.lp.attribute}}"></div>
  218. <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
  219. <tr>
  220. <td class="editTableTitle">{{$.lp.compute}}:</td>
  221. <td class="editTableValue">
  222. <input type="radio" name="compute" value="create" text{($.compute.indexOf('create')!=-1)?'checked':''}/>{{$.lp.create}}
  223. <input type="radio" name="compute" value="save" text{($.compute.indexOf('save')!=-1)?'checked':''}/>{{$.lp.save}}
  224. <input type="radio" name="compute" value="show" text{($.compute.indexOf('show')!=-1)?'checked':''}/>{{$.lp.show}}
  225. </td>
  226. </tr>
  227. </table>
  228. <div class="MWFScriptArea" name="defaultValue" title="{{$.lp.defaultValue}} (S)"></div>
  229. <div class="MWFValidation" name="validationConfig"></div>
  230. <div class="MWFScriptArea" name="validation" title="{{$.lp.verificationScript}} (S)"></div>
  231. </div>
  232. <div title="{{$.lp.section}}" class="MWFTab">
  233. <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
  234. <tr>
  235. <td class="editTableTitle">{{$.lp.enableSection}}:</td>
  236. <td class="editTableValue">
  237. <input onclick="if (this.checked){
  238. $('text{$.pid}sectionByEditArea').setStyle('display', 'block');
  239. $('text{$.pid}sectionMergeArea').setStyle('display', 'none')
  240. }" type="radio" name="section" value="yes" text{($.section=='yes')?'checked':''}/>{{$.lp.yes}}
  241. <input onclick="if (this.checked){
  242. $('text{$.pid}sectionByEditArea').setStyle('display', 'none');
  243. $('text{$.pid}sectionMergeArea').setStyle('display', 'block')
  244. }" type="radio" name="section" value="no" text{($.section!='yes')?'checked':''}/>{{$.lp.no}}
  245. </td>
  246. </tr>
  247. </table>
  248. <div id="text{$.pid}sectionByEditArea" style="display: text{($.section=='yes')?'block':'none'};">
  249. <table width="100%" border="0" cellpadding="5" cellspacing="0" class="editTable">
  250. <tr>
  251. <td class="editTableTitle">{{$.lp.sectionBy}}:</td>
  252. <td class="editTableValue">
  253. <input class="editTableRadio" onclick="if (this.checked){ $('text{$.pid}sectionByScriptEditArea').setStyle('display', 'none');}" name="sectionBy" text{(($.sectionBy=='person') || ($.sectionBy!='unit' && $.sectionBy!='activity' && $.sectionBy!='script'))?'checked':''} type="radio" value="person"/>{{$.lp.handler}}<br/>
  254. <input class="editTableRadio" onclick="if (this.checked){ $('text{$.pid}sectionByScriptEditArea').setStyle('display', 'none');}" name="sectionBy" text{($.sectionBy=='unit')?'checked':''} type="radio" value="unit"/>{{$.lp.handlerUnit}}<br/>
  255. <input class="editTableRadio" onclick="if (this.checked){ $('text{$.pid}sectionByScriptEditArea').setStyle('display', 'none');}" name="sectionBy" text{($.sectionBy=='activity')?'checked':''} type="radio" value="activity"/>{{$.lp.activityId}}<br/>
  256. <input class="editTableRadio" onclick="if (this.checked){ $('text{$.pid}sectionByScriptEditArea').setStyle('display', 'none');}" name="sectionBy" text{($.sectionBy=='splitValue')?'checked':''} type="radio" value="splitValue"/>{{$.lp.splitValue}}<br/>
  257. <input class="editTableRadio" onclick="if (this.checked){ $('text{$.pid}sectionByScriptEditArea').setStyle('display', 'block');}" name="sectionBy" text{($.sectionBy=='script')?'checked':''} type="radio" value="script"/>{{$.lp.script}}<br/>
  258. </td>
  259. </tr>
  260. </table>
  261. <div id="text{$.pid}sectionByScriptEditArea" style="display: text{($.sectionBy=='script')?'block':'none'};">
  262. <div class="MWFScriptArea" name="sectionByScript" title="{{$.lp.sectionBy}} (S)"></div>
  263. </div>
  264. </div>
  265. <div id="text{$.pid}sectionMergeArea" class="MWFSectionMergeArea" style="display: text{($.section=='yes')?'none':''};"></div>
  266. </div>
  267. <div title="{{$.lp.event}}" class="MWFTab">
  268. <div class="MWFEventsArea" name="events"></div>
  269. </div>
  270. <div title="HTML" class="MWFTab">
  271. <div class="MWFHTMLArea" style="font-family: Verdana, Geneva, sans-serif; font-size:14px"></div>
  272. </div>
  273. <div title="JSON" class="MWFTab">
  274. <div class="MWFJSONArea" style="font-family: Verdana, Geneva, sans-serif; font-size:14px"></div>
  275. </div>
  276. </div>