framework.js 129 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171
  1. var parentTopHeight;
  2. var parentBottomHeight;
  3. var parentTopHeight_left;
  4. var parentBottomHeight_left;
  5. var parentTopHeight_middle;
  6. var parentBottomHeight_middle;
  7. var fixHeight;
  8. var skinName;
  9. var themeColor = "blue";
  10. var broswerFlag;
  11. var fontSize = 12;
  12. var prePath = "../../";
  13. var exitVtab = 0;
  14. var vtabIdx = 0;
  15. var hasIframe = 0;
  16. var parentScrollHeight;
  17. var boxWhiteBg = false;
  18. var hasScrollContent = true;
  19. var splitMode = false;
  20. var positionTarget = "";
  21. var box2Custom = false;
  22. var box3Custom = false;
  23. var box4Custom = false;
  24. var boxIe6Flag = 0;
  25. var boxIe7Flag = 0;
  26. var isHeadFixMode = 0;
  27. var headFixExcude = 0;
  28. var headFixExcude2 = 0;
  29. var depth = 500;
  30. $(function () {
  31. closeProgress();
  32. _initComplete();
  33. });
  34. (function (a) {
  35. a.fn.render = function () {
  36. if (a(this).hasClass("spliter")) {
  37. try {
  38. a(this).spliterRender()
  39. } catch (b) {
  40. alert("分隔条出错,注意脚本的引入:spliter.js")
  41. }
  42. }
  43. if (a(this).is("input")) {
  44. if (a(this).attr("type") == "text") {
  45. if (a(this).hasClass("autoComplete")) {
  46. if (a(this).attr("keepDefaultStyle") == "true" || a(this).attr("keepDefaultStyle") == true) {} else {
  47. a(this).textInputStyleRender()
  48. }
  49. try {
  50. a(this).attr("trueType", "autoComplete");
  51. a(this).autoCompleteRender()
  52. } catch (b) {
  53. alert("自动完成框出错,注意脚本的引入:autoComplete.js")
  54. }
  55. }
  56. if (a(this).hasClass("autoCompleteIcon")) {
  57. a(this).attr("trueType", "autoComplete");
  58. a(this).textInputStyleRender()
  59. } else {
  60. if (a(this).hasClass("color")) {
  61. if (a(this).attr("keepDefaultStyle") == "true" || a(this).attr("keepDefaultStyle") == true) {} else {
  62. a(this).textInputStyleRender()
  63. }
  64. try {
  65. a(this).attr("trueType", "color");
  66. a(this).colorRender()
  67. } catch (b) {
  68. alert("颜色选择器出错,注意脚本的引入:color.js")
  69. }
  70. } else {
  71. if (a(this).hasClass("date")) {
  72. if (a(this).attr("keepDefaultStyle") == "true" || a(this).attr("keepDefaultStyle") == true) {} else {
  73. a(this).attr("trueType", "date");
  74. a(this).dateRender()
  75. }
  76. } else {
  77. if (a(this).hasClass("dateIcon")) {
  78. a(this).attr("trueType", "date");
  79. a(this).textInputStyleRender()
  80. } else {
  81. if (a(this).hasClass("keypad")) {
  82. if (a(this).attr("keepDefaultStyle") == "true" || a(this).attr("keepDefaultStyle") == true) {} else {
  83. a(this).textInputStyleRender()
  84. }
  85. try {
  86. a(this).attr("trueType", "keypad");
  87. a(this).keypadRender()
  88. } catch (b) {
  89. alert("软键盘控件出错,注意脚本的引入:keypad.js")
  90. }
  91. } else {
  92. if (a(this).hasClass("stepper")) {
  93. if (a(this).attr("keepDefaultStyle") == "true" || a(this).attr("keepDefaultStyle") == true) {} else {
  94. a(this).textInputStyleRender()
  95. }
  96. try {
  97. a(this).attr("trueType", "stepper");
  98. a(this).stepperRender()
  99. } catch (b) {
  100. alert("数字步进器出错,注意脚本的引入:stepper.js")
  101. }
  102. } else {
  103. if (a(this).attr("keepDefaultStyle") == "true" || a(this).attr("keepDefaultStyle") == true) {} else {
  104. a(this).attr("trueType", "textinput");
  105. a(this).textinputRender()
  106. }
  107. }
  108. }
  109. }
  110. }
  111. }
  112. }
  113. } else {
  114. if (a(this).attr("type") == "button" || a(this).attr("type") == "submit" || a(this).attr("type") == "reset") {
  115. if (a(this).attr("keepDefaultStyle") == "true" || a(this).attr("keepDefaultStyle") == true) {} else {
  116. a(this).buttonInputRender()
  117. }
  118. } else {
  119. if (a(this).attr("type") == "file") {
  120. if (a(this).attr("keepDefaultStyle") == "true" || a(this).attr("keepDefaultStyle") == true) {} else {
  121. a(this).attr("trueType", "file");
  122. a(this).fileRender()
  123. }
  124. } else {
  125. if (a(this).attr("type") == "password") {
  126. if (a(this).attr("keepDefaultStyle") == "true" || a(this).attr("keepDefaultStyle") == true) {} else {
  127. a(this).attr("trueType", "password");
  128. a(this).passInputRender()
  129. }
  130. if (a(this).hasClass("keypad")) {
  131. if (a(this).attr("keepDefaultStyle") == "true" || a(this).attr("keepDefaultStyle") == true) {} else {
  132. a(this).textInputStyleRender()
  133. }
  134. try {
  135. a(this).attr("trueType", "keypad");
  136. a(this).keypadRender()
  137. } catch (b) {
  138. alert("软键盘控件出错,注意脚本的引入:keypad.js")
  139. }
  140. }
  141. } else {
  142. if (a(this).attr("type") == "radio") {
  143. a(this).attr("trueType", "radio")
  144. } else {
  145. if (a(this).attr("type") == "checkbox") {
  146. a(this).attr("trueType", "checkbox")
  147. } else {
  148. if (a(this).attr("type") == "hidden") {
  149. a(this).attr("trueType", "hidden")
  150. }
  151. }
  152. }
  153. }
  154. }
  155. }
  156. }
  157. } else {
  158. if (a(this).is("button")) {
  159. if (a(this).attr("keepDefaultStyle") == "true" || a(this).attr("keepDefaultStyle") == true) {} else {
  160. a(this).buttonRender()
  161. }
  162. } else {
  163. if (a(this).is("textarea")) {
  164. if (a(this).attr("keepDefaultStyle") == "true" || a(this).attr("keepDefaultStyle") == true) {} else {
  165. a(this).attr("trueType", "textarea");
  166. a(this).textareaRender()
  167. }
  168. } else {
  169. if (a(this).is("select")) {
  170. if (a(this).attr("keepDefaultStyle") == "true" || a(this).attr("keepDefaultStyle") == true) {} else {
  171. a(this).attr("trueType", "select");
  172. a(this).prev(".mainCon").attr("trueType", "q_select");
  173. a(this).selectRender()
  174. }
  175. } else {
  176. if (a(this).is("table")) {
  177. if (a(this).hasClass("tableStyle")) {
  178. a(this).tableRender()
  179. } else {
  180. if (a(this).hasClass("treeTable")) {
  181. try {
  182. a(this).treeTableRender()
  183. } catch (b) {
  184. alert("table树形表格出错,注意脚本的引入:treeTable.js")
  185. }
  186. } else {
  187. if (a(this).hasClass("detailTable")) {
  188. try {
  189. a(this).addClass("tableStyle");
  190. a(this).tableRender();
  191. a(this).detailTableRender()
  192. } catch (b) {
  193. alert("table父子表格出错,注意脚本的引入:detailTable.js")
  194. }
  195. }
  196. }
  197. }
  198. } else {
  199. if (a(this).is("a")) {
  200. if (a(this).hasClass("imgPreview")) {
  201. try {
  202. a(this).imagePreviewRender()
  203. } catch (b) {
  204. alert("图片预览出错,注意脚本的引入:imgPreview.js")
  205. }
  206. } else {
  207. if (a(this).hasClass("imgZoom")) {
  208. try {
  209. a(this).imgZoomRender()
  210. } catch (b) {
  211. alert("图片区域放大出错,注意脚本的引入:imgZoom.js")
  212. }
  213. }
  214. }
  215. } else {
  216. if (a(this).is("img")) {
  217. if (a(this).hasClass("imgFrame")) {
  218. try {
  219. a(this).imgFrameRender()
  220. } catch (b) {
  221. alert("图片边框渲染出错,注意脚本的引入:imgFrame.js")
  222. }
  223. } else {
  224. if (a(this).hasClass("imgFade")) {
  225. try {
  226. a(this).imgFadeRender()
  227. } catch (b) {
  228. alert("图片渐显出错,注意脚本的引入:imgFade.js")
  229. }
  230. }
  231. }
  232. } else {
  233. if (a(this).is("div")) {
  234. if (a(this).hasClass("box1")) {
  235. a(this).box1Render()
  236. } else {
  237. if (a(this).hasClass("box2")) {
  238. a(this).box2Render()
  239. } else {
  240. if (a(this).hasClass("box3")) {
  241. a(this).box3Render()
  242. } else {
  243. if (a(this).hasClass("box4")) {
  244. a(this).box4Render()
  245. } else {
  246. if (a(this).hasClass("floatPanel")) {
  247. try {
  248. a(this).floatPanelRender()
  249. } catch (b) {
  250. alert("浮动面板出错,注意脚本的引入:floatPanel.js")
  251. }
  252. } else {
  253. if (a(this).hasClass("selectTree")) {
  254. try {
  255. a(this).attr("trueType", "selectTree");
  256. a(this).selectTreeRender()
  257. } catch (b) {
  258. alert("树形下拉框出错,注意脚本的引入:selectTree.js,ztree.js和ztree.css")
  259. }
  260. } else {
  261. if (a(this).hasClass("filter")) {
  262. try {
  263. a(this).attr("trueType", "filter");
  264. a(this).filterRender()
  265. } catch (b) {
  266. alert("条件过滤器出错,注意脚本的引入:filter.js")
  267. }
  268. } else {
  269. if (a(this).hasClass("lister")) {
  270. try {
  271. a(this).attr("trueType", "lister");
  272. a(this).listerRender()
  273. } catch (b) {
  274. alert("双向选择器出错,注意脚本的引入:lister.js")
  275. }
  276. } else {
  277. if (a(this).hasClass("listerTree")) {
  278. try {
  279. a(this).attr("trueType", "listerTree");
  280. a(this).listerTreeRender()
  281. } catch (b) {
  282. alert("树形双选器出错,注意脚本的引入:listerTree.js")
  283. }
  284. } else {
  285. if (a(this).hasClass("rating")) {
  286. try {
  287. a(this).attr("trueType", "rating");
  288. a(this).ratingRender()
  289. } catch (b) {
  290. alert("评星级控件出错,注意脚本的引入:rating.js")
  291. }
  292. } else {
  293. if (a(this).hasClass("popupMenu")) {
  294. a(this).popupMenuRender()
  295. } else {
  296. if (a(this).hasClass("basicTab")) {
  297. try {
  298. a(this).basicTabRender()
  299. } catch (b) {
  300. alert("基本选项卡出错,注意脚本的引入:basicTab.js")
  301. }
  302. } else {
  303. if (a(this).hasClass("verticalTab")) {
  304. try {
  305. a(this).verticalTabRender()
  306. } catch (b) {
  307. alert("纵向选项卡出错,注意脚本的引入:verticalTab.js")
  308. }
  309. } else {
  310. if (a(this).hasClass("singleNav")) {
  311. a(this).singleNavRender()
  312. } else {
  313. if (a(this).hasClass("singleNavMin")) {
  314. a(this).singleNavMinRender()
  315. } else {
  316. if (a(this).hasClass("accordition")) {
  317. try {
  318. a(this).accorditionRender()
  319. } catch (b) {
  320. alert("抽屉容器出错,注意脚本的引入:accordion.js")
  321. }
  322. } else {
  323. if (a(this).hasClass("navIcon")) {
  324. a(this).hover(function () {
  325. a(this).addClass("navIcon_hover")
  326. }, function () {
  327. a(this).removeClass("navIcon_hover")
  328. })
  329. } else {
  330. if (a(this).hasClass("navIconSmall")) {
  331. a(this).hover(function () {
  332. a(this).addClass("navIconSmall_hover")
  333. }, function () {
  334. a(this).removeClass("navIconSmall_hover")
  335. })
  336. } else {
  337. if (a(this).hasClass("pageNumber")) {
  338. try {
  339. a(this).pageNumberRender()
  340. } catch (b) {
  341. alert("数字分页组件出错,注意脚本的引入:pageNumber.js")
  342. }
  343. } else {
  344. if (a(this).hasClass("pageArrow")) {
  345. try {
  346. a(this).pageArrowRender()
  347. } catch (b) {
  348. alert("箭头分页组件出错,注意脚本的引入:pageArrow.js")
  349. }
  350. }
  351. }
  352. }
  353. }
  354. }
  355. }
  356. }
  357. }
  358. }
  359. }
  360. }
  361. }
  362. }
  363. }
  364. }
  365. }
  366. }
  367. }
  368. }
  369. }
  370. }
  371. }
  372. }
  373. }
  374. }
  375. }
  376. }
  377. }
  378. };
  379. a.fn.setValue = function (c) {
  380. var b = a(this);
  381. if (b.attr("trueType") == "select") {
  382. b.attr("selectedValue", c);
  383. b.render()
  384. } else {
  385. if (b.attr("trueType") == "selectTree") {
  386. b.attr("selectedValue", c);
  387. b.render()
  388. } else {
  389. if (b.attr("trueType") == "lister") {
  390. b.listerSetValue(c)
  391. } else {
  392. if (b.attr("trueType") == "listerTree") {
  393. b.listerTreeSetValue(c)
  394. } else {
  395. if (b.attr("trueType") == "filter") {
  396. b.attr("selectedValue", c);
  397. b.render()
  398. }
  399. }
  400. }
  401. }
  402. }
  403. };
  404. a.fn.resetValue = function () {
  405. var b = a(this);
  406. if (b.attr("trueType") == "select") {
  407. b.render()
  408. } else {
  409. if (b.attr("trueType") == "selectTree") {
  410. b.render()
  411. } else {
  412. if (b.attr("trueType") == "lister") {
  413. b.render()
  414. } else {
  415. if (b.attr("trueType") == "listerTree") {
  416. b.render()
  417. } else {
  418. if (b.attr("trueType") == "filter") {
  419. b.render()
  420. }
  421. }
  422. }
  423. }
  424. }
  425. };
  426. a.fn.addItem = function (c) {
  427. var b = a(this);
  428. if (b.attr("trueType") == "select") {
  429. b.selectAddItem(c)
  430. } else {
  431. if (b.attr("trueType") == "selectTree") {
  432. b.selectTreeAddItem(c)
  433. } else {
  434. if (b.attr("trueType") == "lister") {
  435. b.listerAddItem(c)
  436. } else {
  437. if (b.attr("trueType") == "listerTree") {
  438. b.listerTreeAddItem(c)
  439. }
  440. }
  441. }
  442. }
  443. };
  444. a.fn.removeItem = function (c) {
  445. var b = a(this);
  446. if (b.attr("trueType") == "select") {
  447. b.selectRemoveItem(c)
  448. } else {
  449. if (b.attr("trueType") == "selectTree") {
  450. b.selectTreeRemoveItem(c)
  451. } else {
  452. if (b.attr("trueType") == "lister") {
  453. b.listerRemoveItem(c)
  454. } else {
  455. if (b.attr("trueType") == "listerTree") {
  456. b.listerTreeRemoveItem(c)
  457. }
  458. }
  459. }
  460. }
  461. };
  462. a.fn.selectValue = function (c) {
  463. var b = a(this);
  464. if (b.attr("trueType") == "lister") {
  465. b.listerSelectValue(c)
  466. } else {
  467. if (b.attr("trueType") == "listerTree") {
  468. b.listerTreeSelectValue(c)
  469. }
  470. }
  471. };
  472. a.fn.unSelectValue = function (c) {
  473. var b = a(this);
  474. if (b.attr("trueType") == "lister") {
  475. b.listerUnSelectValue(c)
  476. } else {
  477. if (b.attr("trueType") == "listerTree") {
  478. b.listerTreeUnSelectValue(c)
  479. }
  480. }
  481. };
  482. a.fn.box1Render = function () {
  483. var b;
  484. if (a(this).find(".boxContent").length > 0) {} else {
  485. b = a(this).html();
  486. a(this).empty();
  487. if (a(this).attr("whiteBg") == "true" || a(this).attr("whiteBg") == true || hasScrollContent == false || boxWhiteBg == true) {
  488. a("<div class='box1_topcenter2'><div class='box1_topleft2'><div class='box1_topright2'></div></div></div>").appendTo(a(this));
  489. a("<div class='box1_middlecenter'><div class='box1_middleleft2'><div class='box1_middleright2'><div class='boxContent'></div></div></div></div>").appendTo(a(this));
  490. a("<div class='box1_bottomcenter2'><div class='box1_bottomleft2'><div class='box1_bottomright2'></div></div></div>").appendTo(a(this))
  491. } else {
  492. a("<div class='box1_topcenter'><div class='box1_topleft'><div class='box1_topright'></div></div></div>").appendTo(a(this));
  493. a("<div class='box1_middlecenter'><div class='box1_middleleft'><div class='box1_middleright'><div class='boxContent'></div></div></div></div>").appendTo(a(this));
  494. a("<div class='box1_bottomcenter'><div class='box1_bottomleft'><div class='box1_bottomright'></div></div></div>").appendTo(a(this))
  495. }
  496. a(this).find(".boxContent").html(b)
  497. }
  498. a(this).box1Build()
  499. };
  500. a.fn.box1Build = function () {
  501. if (a(this).attr("panelWidth") != null) {
  502. var d = a(this).attr("panelWidth");
  503. var c = d.substr(d.length - 1, 1);
  504. if (c == "%") {
  505. a(this).width(d)
  506. } else {
  507. var e = Number(a(this).attr("panelWidth"));
  508. a(this).width(e)
  509. }
  510. }
  511. if (a(this).attr("panelHeight") != null) {
  512. var b;
  513. if (a(this).attr("whiteBg") == "true" || a(this).attr("whiteBg") == true) {
  514. a(this).find(".box1_topcenter2").height(20);
  515. a(this).find(".box1_bottomcenter2").height(22);
  516. b = Number(a(this).attr("panelHeight")) - a(this).find(".box1_topcenter2").outerHeight() - a(this).find(".box1_bottomcenter2").outerHeight()
  517. } else {
  518. a(this).find(".box1_topcenter").height(20);
  519. a(this).find(".box1_bottomcenter").height(22);
  520. b = Number(a(this).attr("panelHeight")) - a(this).find(".box1_topcenter").outerHeight() - a(this).find(".box1_bottomcenter").outerHeight()
  521. }
  522. a(this).find(".boxContent").height(b)
  523. }
  524. if (a(this).attr("overflow") == "true" || a(this).attr("overflow") == true) {
  525. a(this).find(".boxContent").css({
  526. overflow: "auto"
  527. })
  528. } else {
  529. if (a(this).attr("overflow") == "false" || a(this).attr("overflow") == false) {
  530. a(this).find(".boxContent").css({
  531. overflow: "hidden"
  532. })
  533. } else {
  534. a(this).find(".boxContent").css({
  535. overflow: "visible"
  536. })
  537. }
  538. }
  539. if (a(this).attr("position") == "center") {
  540. a(this).addClass("center")
  541. } else {
  542. a(this).removeClass("center")
  543. }
  544. };
  545. a.fn.box2Render = function () {
  546. var b;
  547. if (a(this).find(".boxContent").length > 0) {} else {
  548. b = a(this).html();
  549. a(this).empty();
  550. if (box2Custom) {
  551. a("<div class='box2_topcenter2' id='box2_topcenter'><div class='box2_topleft2'><div class='box2_topright2'><div class='title'></div><div class='status'><span class='ss'><a></a></span></div><div class='clear'></div></div></div></div>").appendTo(a(this));
  552. a("<div class='box2_middlecenter2'><div class='box2_middleleft2'><div class='box2_middleright2'><div class='boxContent'></div></div></div></div>").appendTo(a(this));
  553. a("<div class='box2_bottomcenter2' id='box2_bottomcenter'><div class='box2_bottomleft2'><div class='box2_bottomright2'></div></div></div>").appendTo(a(this))
  554. } else {
  555. a("<div class='box2_topcenter' id='box2_topcenter'><div class='box2_topleft'><div class='box2_topright'><div class='title'></div><div class='status'><span class='ss'><a></a></span></div><div class='clear'></div></div></div></div>").appendTo(a(this));
  556. a("<div class='box2_middlecenter'><div class='box2_middleleft'><div class='box2_middleright'><div class='boxContent'></div></div></div></div>").appendTo(a(this));
  557. a("<div class='box2_bottomcenter' id='box2_bottomcenter'><div class='box2_bottomleft'><div class='box2_bottomright'></div></div></div>").appendTo(a(this))
  558. }
  559. a(this).find(".boxContent").html(b)
  560. }
  561. a(this).box2Build()
  562. };
  563. a.fn.box2Build = function () {
  564. var f = a(this);
  565. if (a(this).attr("panelTitle") != null) {
  566. a(this).find(".title").text(a(this).attr("panelTitle"))
  567. }
  568. if (a(this).attr("panelWidth") != null) {
  569. var c = a(this).attr("panelWidth");
  570. var l = c.substr(c.length - 1, 1);
  571. if (l == "%") {
  572. a(this).width(c)
  573. } else {
  574. var b = Number(a(this).attr("panelWidth"));
  575. a(this).width(b)
  576. }
  577. }
  578. if (a(this).attr("panelHeight") != null) {
  579. var m = Number(a(this).attr("panelHeight")) - a(this).find("#box2_topcenter").outerHeight() - a(this).find("#box2_bottomcenter").outerHeight();
  580. a(this).find(".boxContent").height(m)
  581. }
  582. if (a(this).attr("overflow") == "true" || a(this).attr("overflow") == true) {
  583. a(this).find(".boxContent").css({
  584. overflow: "auto"
  585. })
  586. } else {
  587. if (a(this).attr("overflow") == "false" || a(this).attr("overflow") == false) {
  588. a(this).find(".boxContent").css({
  589. overflow: "hidden"
  590. })
  591. } else {
  592. a(this).find(".boxContent").css({
  593. overflow: "visible"
  594. })
  595. }
  596. }
  597. var e = "true";
  598. if (a(this).attr("showStatus") != null) {
  599. e = a(this).attr("showStatus")
  600. }
  601. var i = "javascript:;";
  602. if (a(this).attr("panelUrl") != null) {
  603. i = a(this).attr("panelUrl")
  604. }
  605. var h = "_self";
  606. if (a(this).attr("panelTarget") != null) {
  607. h = a(this).attr("panelTarget")
  608. }
  609. var d = "收缩";
  610. if (a(this).attr("statusText") != null) {
  611. d = a(this).attr("statusText")
  612. }
  613. a(this).find(".ss").unbind("click");
  614. var n;
  615. if (d == "收缩" && e == "true") {
  616. a(this).find(".ss").text(d);
  617. a(this).find(".ss").toggle(function () {
  618. var o = a(this).parents(".box2").find(".boxContent");
  619. n = o.height();
  620. if (window.navigator.userAgent.indexOf("MSIE") >= 1) {
  621. o.fadeOut(300, function () {
  622. resetHeight();
  623. f.trigger("stateChange", "hide")
  624. })
  625. } else {
  626. o.hide(300, function () {
  627. resetHeight();
  628. f.trigger("stateChange", "hide")
  629. })
  630. }
  631. a(this).text("展开")
  632. }, function () {
  633. var o = a(this).parents(".box2").find(".boxContent");
  634. o.height(n);
  635. if (window.navigator.userAgent.indexOf("MSIE") >= 1) {
  636. o.fadeIn(300, function () {
  637. resetHeight();
  638. f.trigger("stateChange", "show")
  639. })
  640. } else {
  641. o.show(300, function () {
  642. resetHeight();
  643. f.trigger("stateChange", "show")
  644. })
  645. }
  646. if (a(this).parents(".box2").attr("panelHeight") == null) {
  647. setTimeout(function () {
  648. o.css({
  649. height: "auto"
  650. })
  651. }, 500)
  652. }
  653. a(this).text("收缩")
  654. })
  655. } else {
  656. if (d == "展开" && e == "true") {
  657. a(this).find(".ss").text(d);
  658. var g = a(this).find(".boxContent");
  659. n = g.height();
  660. g.hide();
  661. a(this).find(".ss").toggle(function () {
  662. var o = a(this).parents(".box2").find(".boxContent");
  663. o.height(n);
  664. if (window.navigator.userAgent.indexOf("MSIE") >= 1) {
  665. o.fadeIn(300, function () {
  666. resetHeight();
  667. f.trigger("stateChange", "show")
  668. })
  669. } else {
  670. o.show(300, function () {
  671. resetHeight();
  672. f.trigger("stateChange", "show")
  673. })
  674. }
  675. if (a(this).parents(".box2").attr("panelHeight") == null) {
  676. setTimeout(function () {
  677. o.css({
  678. height: "auto"
  679. })
  680. }, 500)
  681. }
  682. a(this).text("收缩")
  683. }, function () {
  684. if (window.navigator.userAgent.indexOf("MSIE") >= 1) {
  685. g.fadeOut(300, function () {
  686. resetHeight();
  687. f.trigger("stateChange", "hide")
  688. })
  689. } else {
  690. g.hide(300, function () {
  691. resetHeight();
  692. f.trigger("stateChange", "hide")
  693. })
  694. }
  695. a(this).text("展开")
  696. })
  697. } else {
  698. if (e == "true" || a(this).attr("statusText") != null) {
  699. a(this).find(".ss").find("a").attr("href", i);
  700. a(this).find(".ss").find("a").attr("target", h);
  701. a(this).find(".ss").find("a").text(d)
  702. } else {
  703. a(this).find(".ss").hide()
  704. }
  705. }
  706. }
  707. };
  708. a.fn.box3Render = function () {
  709. var b;
  710. if (a(this).find(".boxContent").length > 0) {} else {
  711. b = a(this).html();
  712. a(this).empty();
  713. if (box3Custom) {
  714. a("<div class='box3_topcenter2' id='box3_topcenter'><div class='box3_topleft2'><div class='box3_topright2'><div class='title'></div><div class='status'><span class='ss'><a></a></span></div><div class='clear'></div></div></div></div>").appendTo(a(this));
  715. a("<div class='box3_middlecenter2'><div class='box3_middleleft2'><div class='box3_middleright2'><div class='boxContent'></div></div></div></div>").appendTo(a(this));
  716. a("<div class='box3_bottomcenter2' id='box3_bottomcenter'><div class='box3_bottomleft2'><div class='box3_bottomright2'></div></div></div>").appendTo(a(this))
  717. } else {
  718. a("<div class='box3_topcenter' id='box3_topcenter'><div class='box3_topleft'><div class='box3_topright'><div class='title'></div><div class='status'><span class='ss'><a></a></span></div><div class='clear'></div></div></div></div>").appendTo(a(this));
  719. a("<div class='box3_middlecenter'><div class='box3_middleleft'><div class='box3_middleright'><div class='boxContent'></div></div></div></div>").appendTo(a(this));
  720. a("<div class='box3_bottomcenter' id='box3_bottomcenter'><div class='box3_bottomleft'><div class='box3_bottomright'></div></div></div>").appendTo(a(this))
  721. }
  722. a(this).find(".boxContent").html(b)
  723. }
  724. a(this).box3Build()
  725. };
  726. a.fn.box3Build = function () {
  727. var f = a(this);
  728. if (a(this).attr("panelTitle") != null) {
  729. a(this).find(".title").text(a(this).attr("panelTitle"))
  730. }
  731. if (a(this).attr("panelWidth") != null) {
  732. var c = a(this).attr("panelWidth");
  733. var l = c.substr(c.length - 1, 1);
  734. if (l == "%") {
  735. a(this).width(c)
  736. } else {
  737. var b = Number(a(this).attr("panelWidth"));
  738. a(this).width(b)
  739. }
  740. }
  741. if (a(this).attr("panelHeight") != null) {
  742. a(this).find("#box3_topcenter").height(29);
  743. a(this).find("#box3_bottomcenter").height(2);
  744. var m = Number(a(this).attr("panelHeight")) - a(this).find("#box3_topcenter").outerHeight() - a(this).find("#box3_bottomcenter").outerHeight();
  745. a(this).find(".boxContent").height(m)
  746. }
  747. if (a(this).attr("overflow") == "true" || a(this).attr("overflow") == true) {
  748. a(this).find(".boxContent").css({
  749. overflow: "auto"
  750. })
  751. } else {
  752. if (a(this).attr("overflow") == "false" || a(this).attr("overflow") == false) {
  753. a(this).find(".boxContent").css({
  754. overflow: "hidden"
  755. })
  756. } else {
  757. a(this).find(".boxContent").css({
  758. overflow: "visible"
  759. })
  760. }
  761. }
  762. var e = "false";
  763. if (a(this).attr("showStatus") != null) {
  764. e = a(this).attr("showStatus")
  765. }
  766. var i = "javscript:;";
  767. if (a(this).attr("panelUrl") != null) {
  768. i = a(this).attr("panelUrl")
  769. }
  770. var h = "_self";
  771. if (a(this).attr("panelTarget") != null) {
  772. h = a(this).attr("panelTarget")
  773. }
  774. var d = "更多>>";
  775. if (a(this).attr("statusText") != null) {
  776. d = a(this).attr("statusText")
  777. }
  778. a(this).find(".ss").unbind("click");
  779. var n;
  780. if (d == "收缩") {
  781. a(this).find(".ss").text(d);
  782. a(this).find(".ss").toggle(function () {
  783. var o = a(this).parents(".box3").find(".boxContent");
  784. n = o.height();
  785. if (window.navigator.userAgent.indexOf("MSIE") >= 1) {
  786. o.fadeOut(300, function () {
  787. resetHeight();
  788. f.trigger("stateChange", "hide")
  789. })
  790. } else {
  791. o.hide(300, function () {
  792. resetHeight();
  793. f.trigger("stateChange", "hide")
  794. })
  795. }
  796. if (a(this).parents(".box3").attr("panelHeight") == null) {
  797. setTimeout(function () {
  798. o.css({
  799. height: "auto"
  800. })
  801. }, 500)
  802. }
  803. a(this).text("展开")
  804. }, function () {
  805. var o = a(this).parents(".box3").find(".boxContent");
  806. o.height(n);
  807. if (window.navigator.userAgent.indexOf("MSIE") >= 1) {
  808. o.fadeIn(300, function () {
  809. resetHeight();
  810. f.trigger("stateChange", "show")
  811. })
  812. } else {
  813. o.show(300, function () {
  814. resetHeight();
  815. f.trigger("stateChange", "show")
  816. })
  817. }
  818. a(this).text("收缩")
  819. })
  820. } else {
  821. if (d == "展开") {
  822. a(this).find(".ss").text(d);
  823. var g = a(this).find(".boxContent");
  824. n = g.height();
  825. g.hide();
  826. a(this).find(".ss").toggle(function () {
  827. var o = a(this).parents(".box3").find(".boxContent");
  828. o.height(n);
  829. if (window.navigator.userAgent.indexOf("MSIE") >= 1) {
  830. o.fadeIn(300, function () {
  831. resetHeight();
  832. f.trigger("stateChange", "show")
  833. })
  834. } else {
  835. o.show(300, function () {
  836. resetHeight();
  837. f.trigger("stateChange", "show")
  838. })
  839. }
  840. if (a(this).parents(".box3").attr("panelHeight") == null) {
  841. setTimeout(function () {
  842. o.css({
  843. height: "auto"
  844. })
  845. }, 500)
  846. }
  847. a(this).text("收缩")
  848. }, function () {
  849. if (window.navigator.userAgent.indexOf("MSIE") >= 1) {
  850. g.fadeOut(300, function () {
  851. resetHeight();
  852. f.trigger("stateChange", "hide")
  853. })
  854. } else {
  855. g.hide(300, function () {
  856. resetHeight();
  857. f.trigger("stateChange", "hide")
  858. })
  859. }
  860. a(this).text("展开")
  861. })
  862. } else {
  863. if (e == "true" || a(this).attr("statusText") != null) {
  864. a(this).find(".ss").find("a").attr("href", i);
  865. a(this).find(".ss").find("a").attr("target", h);
  866. a(this).find(".ss").find("a").text(d)
  867. } else {
  868. a(this).find(".ss").hide()
  869. }
  870. }
  871. }
  872. };
  873. a.fn.box4Render = function () {
  874. var b;
  875. if (a(this).find(".boxContent").length > 0) {} else {
  876. b = a(this).html();
  877. a(this).empty();
  878. if (box4Custom) {
  879. a("<div class='box4_topcenter_notitle2' id='box4_notitle'><div class='box4_topleft_notitle2'><div class='box4_topright_notitle2'></div></div></div>").appendTo(a(this));
  880. a("<div class='box4_topcenter2' id='box4_hastitle'><div class='box4_topleft2'><div class='box4_topright2'><div class='title'></div></div></div></div>").appendTo(a(this));
  881. a("<div class='box4_middlecenter2'><div class='box4_middleleft2'><div class='box4_middleright2'><div class='boxContent'></div></div></div></div>").appendTo(a(this));
  882. a("<div class='box4_bottomcenter2' id='box4_bottomcenter'><div class='box4_bottomleft2'><div class='box4_bottomright2'></div></div></div>").appendTo(a(this))
  883. } else {
  884. a("<div class='box4_topcenter_notitle' id='box4_notitle'><div class='box4_topleft_notitle'><div class='box4_topright_notitle'></div></div></div>").appendTo(a(this));
  885. a("<div class='box4_topcenter' id='box4_hastitle'><div class='box4_topleft'><div class='box4_topright'><div class='title'></div></div></div></div>").appendTo(a(this));
  886. a("<div class='box4_middlecenter'><div class='box4_middleleft'><div class='box4_middleright'><div class='boxContent'></div></div></div></div>").appendTo(a(this));
  887. a("<div class='box4_bottomcenter' id='box4_bottomcenter'><div class='box4_bottomleft'><div class='box4_bottomright'></div></div></div>").appendTo(a(this))
  888. }
  889. a(this).find(".boxContent").html(b)
  890. }
  891. a(this).box4Build()
  892. };
  893. a.fn.box4Build = function () {
  894. if (a(this).attr("panelTitle") != null) {
  895. a(this).find(".title").text(a(this).attr("panelTitle"))
  896. }
  897. var f = a(this).find("#box4_notitle");
  898. var b = a(this).find("#box4_hastitle");
  899. f.hide();
  900. b.hide();
  901. if (a(this).attr("noTitle") == "true" || a(this).attr("noTitle") == true) {
  902. f.show()
  903. } else {
  904. b.show()
  905. }
  906. if (a(this).attr("panelWidth") != null) {
  907. var g = a(this).attr("panelWidth");
  908. var d = g.substr(g.length - 1, 1);
  909. if (d == "%") {
  910. a(this).width(g)
  911. } else {
  912. var h = Number(a(this).attr("panelWidth"));
  913. a(this).width(h)
  914. }
  915. }
  916. if (a(this).attr("panelHeight") != null) {
  917. a(this).find(".box4_topcenter").height(27);
  918. a(this).find(".box4_bottomcenter").height(5);
  919. var c;
  920. if (a(this).attr("noTitle") == "true" || a(this).attr("noTitle") == true) {
  921. c = Number(a(this).attr("panelHeight")) - a(this).find("#box4_notitle").outerHeight() - a(this).find("#box4_bottomcenter").outerHeight()
  922. } else {
  923. c = Number(a(this).attr("panelHeight")) - a(this).find("#box4_hastitle").outerHeight() - a(this).find("#box4_bottomcenter").outerHeight()
  924. }
  925. a(this).find(".boxContent").height(c)
  926. }
  927. if (a(this).attr("overflow") == "true" || a(this).attr("overflow") == true) {
  928. a(this).find(".boxContent").css({
  929. overflow: "auto"
  930. })
  931. } else {
  932. if (a(this).attr("overflow") == "false" || a(this).attr("overflow") == false) {
  933. a(this).find(".boxContent").css({
  934. overflow: "hidden"
  935. })
  936. } else {
  937. a(this).find(".boxContent").css({
  938. overflow: "visible"
  939. })
  940. }
  941. }
  942. var e = a(this);
  943. e.find("li a").unbind("click");
  944. e.find("li a").each(function (l) {
  945. a(this).click(function () {
  946. e.find("li a").removeClass("current");
  947. a(this).addClass("current")
  948. })
  949. })
  950. };
  951. a.fn.textinputRender = function () {
  952. if (a(this).attr("inputMode")) {
  953. var e = a(this).attr("inputMode");
  954. if (e == "numberOnly") {
  955. var d = a(this)[0];
  956. var c = function () {
  957. d.value = d.value.replace(/\D/g, "");
  958. if (!validateInput(d.value, "^(0|[1-9][0-9]*)$")) {
  959. d.value = d.value.substring(1)
  960. }
  961. };
  962. a(this)[0].onkeyup = function () {
  963. c()
  964. };
  965. a(this)[0].onafterpaste = function () {
  966. c()
  967. }
  968. }
  969. }
  970. if (a(this).attr("class") == "keypad") {
  971. return
  972. }
  973. a(this).addClass("textinput");
  974. var b = null;
  975. a(this).hover(function () {
  976. if (b != a(this)[0]) {
  977. a(this).removeClass("textinput");
  978. a(this).addClass("textinput_hover")
  979. }
  980. }, function () {
  981. if (b != a(this)[0]) {
  982. a(this).removeClass("textinput_hover");
  983. a(this).addClass("textinput")
  984. }
  985. });
  986. a(this).focus(function () {
  987. b = a(this)[0];
  988. a(this).removeClass("textinput");
  989. a(this).removeClass("textinput_hover");
  990. a(this).addClass("textinput_click")
  991. });
  992. a(this).blur(function () {
  993. b = null;
  994. a(this).removeClass("textinput_click");
  995. a(this).addClass("textinput")
  996. });
  997. if (a(this).attr("clearable") == "true") {
  998. a(this).clearableTextField()
  999. }
  1000. if (a(this).attr("maxNum") != null) {
  1001. a(this).maxlength({
  1002. maxCharacters: parseInt(a(this).attr("maxNum"))
  1003. })
  1004. }
  1005. if (a(this).attr("watermark") != null) {
  1006. a(this).watermark("watermark", a(this).attr("watermark"))
  1007. }
  1008. };
  1009. a.fn.textInputStyleRender = function () {
  1010. var b = null;
  1011. if (a(this).attr("inputMode")) {
  1012. var c = a(this).attr("inputMode");
  1013. if (c == "numberOnly") {
  1014. a(this)[0].onkeyup = function () {
  1015. a(this)[0].value = a(this)[0].value.replace(/\D/g, "")
  1016. };
  1017. a(this)[0].onafterpaste = function () {
  1018. a(this)[0].value = a(this)[0].value.replace(/\D/g, "")
  1019. }
  1020. }
  1021. }
  1022. a(this).hover(function () {
  1023. if (b != a(this)[0]) {
  1024. a(this).addClass("date_hover")
  1025. }
  1026. }, function () {
  1027. if (b != a(this)[0]) {
  1028. a(this).removeClass("date_hover")
  1029. }
  1030. });
  1031. a(this).focus(function () {
  1032. b = a(this)[0];
  1033. a(this).removeClass("date_hover");
  1034. a(this).addClass("date_click")
  1035. });
  1036. a(this).blur(function () {
  1037. b = null;
  1038. a(this).removeClass("date_click")
  1039. })
  1040. };
  1041. a.fn.passInputRender = function () {
  1042. var b = null;
  1043. a(this).addClass("textinput");
  1044. if (a(this).attr("inputMode")) {
  1045. var c = a(this).attr("inputMode");
  1046. if (c == "numberOnly") {
  1047. a(this)[0].onkeyup = function () {
  1048. a(this)[0].value = a(this)[0].value.replace(/\D/g, "")
  1049. };
  1050. a(this)[0].onafterpaste = function () {
  1051. a(this)[0].value = a(this)[0].value.replace(/\D/g, "")
  1052. }
  1053. }
  1054. }
  1055. a(this).hover(function () {
  1056. if (b != a(this)[0]) {
  1057. a(this).removeClass("textinput");
  1058. a(this).addClass("textinput_hover")
  1059. }
  1060. }, function () {
  1061. if (b != a(this)[0]) {
  1062. a(this).removeClass("textinput_hover");
  1063. a(this).addClass("textinput")
  1064. }
  1065. });
  1066. a(this).focus(function () {
  1067. b = a(this)[0];
  1068. a(this).removeClass("textinput");
  1069. a(this).removeClass("textinput_hover");
  1070. a(this).addClass("textinput_click")
  1071. });
  1072. a(this).blur(function () {
  1073. b = null;
  1074. a(this).removeClass("textinput_click");
  1075. a(this).addClass("textinput")
  1076. });
  1077. if (a(this).attr("clearable") == "true") {
  1078. a(this).clearableTextField()
  1079. }
  1080. if (a(this).attr("maxNum") != null) {
  1081. a(this).maxlength({
  1082. maxCharacters: parseInt(a(this).attr("maxNum"))
  1083. })
  1084. }
  1085. if (a(this).attr("checkStrength") == "true") {
  1086. a(this).password_strength()
  1087. }
  1088. a(this).caps(function (d) {
  1089. if (jQuery.browser.safari) {
  1090. return
  1091. }
  1092. if (d) {
  1093. a.cursorMessage("注意:大写键开启了")
  1094. } else {}
  1095. })
  1096. };
  1097. a.fn.textareaRender = function () {
  1098. var b = null;
  1099. a(this).addClass("textarea");
  1100. if (a(this).attr("maxNum") != null) {
  1101. a(this).maxlength({
  1102. maxCharacters: parseInt(a(this).attr("maxNum"))
  1103. })
  1104. }
  1105. if (a(this).attr("resize") == "true") {
  1106. a(this).TextAreaResizer()
  1107. }
  1108. if (a(this).attr("autoHeight") == "true") {
  1109. a(this).css({
  1110. height: "auto"
  1111. });
  1112. a(this).attr("rows", 5);
  1113. a(this).autoGrow()
  1114. }
  1115. if (a(this).attr("watermark") != null) {
  1116. a(this).watermark("watermark", a(this).attr("watermark"))
  1117. }
  1118. a(this).hover(function () {
  1119. if (b != a(this)[0]) {
  1120. a(this).removeClass("textarea");
  1121. a(this).addClass("textarea_hover")
  1122. }
  1123. }, function () {
  1124. if (b != a(this)[0]) {
  1125. a(this).removeClass("textarea_hover");
  1126. a(this).addClass("textarea")
  1127. }
  1128. });
  1129. a(this).focus(function () {
  1130. b = a(this)[0];
  1131. a(this).removeClass("textarea");
  1132. a(this).removeClass("textarea_hover");
  1133. a(this).addClass("textarea_click")
  1134. });
  1135. a(this).blur(function () {
  1136. b = null;
  1137. a(this).removeClass("textarea_click");
  1138. a(this).addClass("textarea")
  1139. })
  1140. };
  1141. a.fn.buttonInputRender = function () {
  1142. a(this).addClass("button");
  1143. var b = _getStrLength(a(this).val());
  1144. if (b < 5) {
  1145. a(this).width(60)
  1146. }
  1147. a(this).hover(function () {
  1148. a(this).removeClass("button");
  1149. a(this).addClass("button_hover")
  1150. }, function () {
  1151. a(this).removeClass("button_hover");
  1152. a(this).addClass("button")
  1153. });
  1154. a(this).focus(function () {
  1155. a(this).removeClass("button");
  1156. a(this).addClass("button_hover")
  1157. });
  1158. a(this).blur(function () {
  1159. a(this).removeClass("button_hover");
  1160. a(this).addClass("button")
  1161. })
  1162. };
  1163. a.fn.buttonRender = function () {
  1164. a(this).addClass("button");
  1165. var c = _getStrLength(a(this).text());
  1166. var b = 0;
  1167. var d = 50;
  1168. b = _getStrLength(a(this).filter(":has(span)").find("span").text());
  1169. if (b != 0) {
  1170. d = 20 + 7 * b + 10
  1171. }
  1172. if (broswerFlag == "Firefox" || broswerFlag == "Opera" || broswerFlag == "Safari") {
  1173. a(this).filter(":has(span)").css({
  1174. paddingLeft: "5px",
  1175. width: d + 8 + "px"
  1176. })
  1177. } else {
  1178. a(this).filter(":has(span)").css({
  1179. paddingLeft: "5px",
  1180. width: d + "px"
  1181. })
  1182. }
  1183. if (c < 5) {
  1184. a(this).width(66)
  1185. }
  1186. a(this).filter(":has(span)").find("span").css({
  1187. cursor: "default"
  1188. });
  1189. a(this).hover(function () {
  1190. a(this).removeClass("button");
  1191. a(this).addClass("button_hover")
  1192. }, function () {
  1193. a(this).removeClass("button_hover");
  1194. a(this).addClass("button")
  1195. });
  1196. a(this).focus(function () {
  1197. a(this).removeClass("button");
  1198. a(this).addClass("button_hover")
  1199. });
  1200. a(this).blur(function () {
  1201. a(this).removeClass("button_hover");
  1202. a(this).addClass("button")
  1203. })
  1204. };
  1205. a.fn.dateRender = function () {
  1206. var d = null;
  1207. var c = "yyyy-MM-dd";
  1208. if (a(this).attr("dateFmt") != null) {
  1209. c = a(this).attr("dateFmt")
  1210. }
  1211. var b = false;
  1212. if (a(this).attr("doubleCal") == true || a(this).attr("doubleCal") == "true") {
  1213. b = true
  1214. }
  1215. a(this).hover(function () {
  1216. if (d != a(this)[0]) {
  1217. a(this).addClass("date_hover")
  1218. }
  1219. }, function () {
  1220. if (d != a(this)[0]) {
  1221. a(this).removeClass("date_hover")
  1222. }
  1223. });
  1224. a(this).focus(function () {
  1225. try {
  1226. WdatePicker({
  1227. skin: themeColor,
  1228. isShowClear: true,
  1229. dateFmt: c,
  1230. doubleCalendar: b,
  1231. onpicked: function (e) {
  1232. a(this).blur()
  1233. }
  1234. })
  1235. } catch (f) {
  1236. alert("日期选择框出错,注意脚本的引入:WdatePicker.js")
  1237. }
  1238. d = a(this)[0];
  1239. a(this).removeClass("date_hover");
  1240. a(this).addClass("date_click")
  1241. });
  1242. a(this).blur(function () {
  1243. d = null;
  1244. a(this).removeClass("date_click")
  1245. })
  1246. };
  1247. a.fn.popupMenuRender = function () {
  1248. a(this).hover(function () {
  1249. a(this).find(".popupMenu_con").show()
  1250. }, function () {
  1251. a(this).find(".popupMenu_con").hide()
  1252. })
  1253. };
  1254. a.fn.singleNavRender = function () {
  1255. var b = a(this);
  1256. b.find(">div span").each(function () {
  1257. a(this).click(function () {
  1258. b.find(">div").removeClass("current");
  1259. a(this).parent("div").addClass("current")
  1260. });
  1261. a(this).hover(function () {
  1262. a(this).animate({
  1263. paddingLeft: "40px"
  1264. }, "fast")
  1265. }, function () {
  1266. a(this).animate({
  1267. paddingLeft: "20px"
  1268. })
  1269. })
  1270. })
  1271. };
  1272. a.fn.singleNavMinRender = function () {
  1273. var b = a(this);
  1274. b.find(">div span").each(function () {
  1275. a(this).click(function () {
  1276. b.find(">div").removeClass("current");
  1277. a(this).parent("div").addClass("current")
  1278. });
  1279. a(this).hover(function () {
  1280. a(this).animate({
  1281. paddingLeft: "30px"
  1282. }, "fast")
  1283. }, function () {
  1284. a(this).animate({
  1285. paddingLeft: "10px"
  1286. })
  1287. })
  1288. })
  1289. };
  1290. a.fn.tableRender = function () {
  1291. return this.each(function () {
  1292. if (a(this).attr("thTrueWidth") == "true" || a(this).attr("thTrueWidth") == true) {
  1293. a("#scrollContent").css({
  1294. overflowX: "auto"
  1295. });
  1296. var b = 0;
  1297. a(this).find("tr").eq(0).find("th").each(function () {
  1298. var e = Number(a(this).attr("trueWidth"));
  1299. b = b + e;
  1300. a(this).width(e)
  1301. });
  1302. a(this).width(b)
  1303. } else {
  1304. if (a(this).attr("tdTrueWidth") == "true" || a(this).attr("tdTrueWidth") == true) {
  1305. a("#scrollContent").css({
  1306. overflowX: "auto"
  1307. });
  1308. var g = 0;
  1309. a(this).find("tr").eq(0).find("td").each(function () {
  1310. var e = Number(a(this).attr("trueWidth"));
  1311. g = g + e;
  1312. a(this).width(e)
  1313. });
  1314. a(this).width(g)
  1315. }
  1316. }
  1317. a(this).find("th").addClass("th");
  1318. if (a(this).find("tr").eq(1).find("td").eq(0).find('input[type="checkbox"]').length == 1) {
  1319. if (a(this).attr("useCheckBox") != "false") {
  1320. a(this).attr("useCheckBox", "true")
  1321. }
  1322. if (a(this).attr("useMultColor") != "false") {
  1323. a(this).attr("useMultColor", "true")
  1324. }
  1325. }
  1326. if (a(this).find("tr").eq(1).find("td").eq(0).find('input[type="radio"]').length == 1) {
  1327. if (a(this).attr("useRadio") != "false") {
  1328. a(this).attr("useRadio", "true")
  1329. }
  1330. }
  1331. if (a(this).attr("formMode") == "line") {
  1332. a(this).attr("useColor", "false");
  1333. a(this).attr("useHover", "false");
  1334. a(this).attr("useClick", "false");
  1335. a(this).find("th").css({
  1336. fontWeight: "bold",
  1337. "text-align": "center"
  1338. });
  1339. a(this).find("tr").find("td:even").css("text-align", "right");
  1340. if (a(this).attr("footer") != null) {
  1341. if (a(this).attr("footer") == "left") {
  1342. a(this).find("tr:last").find("td").css("text-align", "left")
  1343. } else {
  1344. if (a(this).attr("footer") == "right") {
  1345. a(this).find("tr:last").find("td").css("text-align", "right")
  1346. } else {
  1347. if (a(this).attr("footer") == "center") {
  1348. a(this).find("tr:last").find("td").css("text-align", "center")
  1349. } else {
  1350. if (a(this).attr("footer") == "normal") {
  1351. a(this).find("tr:last").find("td:even").css("text-align", "right")
  1352. }
  1353. }
  1354. }
  1355. }
  1356. } else {
  1357. var h = a(this).find("tr:last").find("td").eq(0).attr("colspan");
  1358. if (h) {
  1359. if (h.toString() != "1") {
  1360. a(this).find("tr:last").find("td").css("text-align", "center")
  1361. }
  1362. }
  1363. }
  1364. a(this).find("td").css({
  1365. paddingTop: "3px",
  1366. paddingBottom: "3px"
  1367. })
  1368. } else {
  1369. if (a(this).attr("formMode") == "transparent") {
  1370. a(this).attr("useColor", "false");
  1371. a(this).attr("useHover", "false");
  1372. a(this).attr("useClick", "false");
  1373. a(this).find("th").css({
  1374. fontWeight: "bold",
  1375. "text-align": "center"
  1376. });
  1377. a(this).css({
  1378. border: "none",
  1379. backgroundColor: "transparent"
  1380. });
  1381. a(this).find("tr").css({
  1382. border: "none",
  1383. backgroundColor: "transparent"
  1384. });
  1385. a(this).find("tr").find("td:even").css("text-align", "right");
  1386. if (a(this).attr("footer") != null) {
  1387. if (a(this).attr("footer") == "left") {
  1388. a(this).find("tr:last").find("td").css("text-align", "left")
  1389. } else {
  1390. if (a(this).attr("footer") == "right") {
  1391. a(this).find("tr:last").find("td").css("text-align", "right")
  1392. } else {
  1393. if (a(this).attr("footer") == "center") {
  1394. a(this).find("tr:last").find("td").css("text-align", "center")
  1395. } else {
  1396. if (a(this).attr("footer") == "normal") {
  1397. a(this).find("tr:last").find("td:even").css("text-align", "right")
  1398. }
  1399. }
  1400. }
  1401. }
  1402. } else {
  1403. var f = a(this).find("tr:last").find("td").eq(0).attr("colspan");
  1404. if (f) {
  1405. if (f.toString() != "1") {
  1406. a(this).find("tr:last").find("td").css("text-align", "center")
  1407. }
  1408. }
  1409. }
  1410. a(this).find("td").css({
  1411. paddingTop: "3px",
  1412. paddingBottom: "3px",
  1413. border: "none"
  1414. })
  1415. } else {
  1416. if (a(this).attr("formMode") == "view") {
  1417. a(this).attr("useColor", "false");
  1418. a(this).attr("useHover", "false");
  1419. a(this).attr("useClick", "false");
  1420. a(this).find("th").css({
  1421. fontWeight: "bold",
  1422. "text-align": "center"
  1423. });
  1424. a(this).find("tr").find("td:even").css({
  1425. textAlign: "right",
  1426. backgroundColor: "#eeeeee"
  1427. });
  1428. if (a(this).attr("footer") != null) {
  1429. if (a(this).attr("footer") == "left") {
  1430. a(this).find("tr:last").find("td").css({
  1431. textAlign: "left",
  1432. backgroundColor: "#ffffff"
  1433. })
  1434. } else {
  1435. if (a(this).attr("footer") == "right") {
  1436. a(this).find("tr:last").find("td").css({
  1437. textAlign: "right",
  1438. backgroundColor: "#ffffff"
  1439. })
  1440. } else {
  1441. if (a(this).attr("footer") == "center") {
  1442. a(this).find("tr:last").find("td").css({
  1443. textAlign: "center",
  1444. backgroundColor: "#ffffff"
  1445. })
  1446. } else {
  1447. if (a(this).attr("footer") == "normal") {
  1448. a(this).find("tr:last").find("td:even").css({
  1449. textAlign: "right",
  1450. backgroundColor: "#ffffff"
  1451. })
  1452. }
  1453. }
  1454. }
  1455. }
  1456. } else {
  1457. var h = a(this).find("tr:last").find("td").eq(0).attr("colspan");
  1458. if (h) {
  1459. if (h.toString() != "1") {
  1460. a(this).find("tr:last").find("td").css({
  1461. textAlign: "center",
  1462. backgroundColor: "#ffffff"
  1463. })
  1464. }
  1465. }
  1466. }
  1467. a(this).find("td").css({
  1468. paddingTop: "6px",
  1469. paddingBottom: "6px"
  1470. })
  1471. }
  1472. }
  1473. }
  1474. if (a(this).attr("useColor") != "false") {
  1475. a(this).find("tr:even").addClass("odd")
  1476. }
  1477. if (a(this).attr("useHover") != "false") {
  1478. a(this).find("tr").hover(function () {
  1479. a(this).addClass("highlight")
  1480. }, function () {
  1481. a(this).removeClass("highlight")
  1482. })
  1483. }
  1484. if (a(this).attr("sortMode") == "true") {
  1485. a(this).find("th").filter(":has(span)").hover(function () {
  1486. a(this).removeClass("th");
  1487. a(this).addClass("th_over")
  1488. }, function () {
  1489. a(this).removeClass("th_over");
  1490. a(this).addClass("th")
  1491. });
  1492. a(this).find("th span").addClass("sort_off");
  1493. a(this).find("th").click(function () {})
  1494. }
  1495. if (a(this).attr("useClick") != "false") {
  1496. a(this).attr("useClick", "true")
  1497. }
  1498. if (a(this).attr("useClick") == "true" && a(this).attr("useMultColor") == "true") {
  1499. a(this).attr("useClick", "false")
  1500. }
  1501. if (a(this).attr("useRadio") != "true") {
  1502. a(this).attr("useRadio", "false")
  1503. }
  1504. if (a(this).attr("useCheckBox") != "true") {
  1505. a(this).attr("useCheckBox", "false")
  1506. }
  1507. if (a(this).attr("useClick") != "false") {
  1508. if (a(this).attr("useRadio") == "false") {
  1509. a(this).find("tr").click(function () {
  1510. a(this).siblings().removeClass("selected");
  1511. a(this).addClass("selected")
  1512. })
  1513. } else {
  1514. a(this).find('input[type="radio"]:checked').parents("tr").addClass("selected");
  1515. a(this).find("tr").click(function () {
  1516. a(this).siblings().removeClass("selected");
  1517. a(this).addClass("selected");
  1518. a(this).find('input[type="radio"]').attr("checked", "checked")
  1519. })
  1520. }
  1521. }
  1522. if (a(this).attr("useMultColor") == "true") {
  1523. if (a(this).attr("useCheckBox") == "false") {
  1524. a(this).find("tr").click(function () {
  1525. a(this).toggleClass("selected")
  1526. })
  1527. } else {
  1528. a(this).find('input[type="checkbox"]:checked').parents("tr").addClass("selected");
  1529. if (a(this).find("th").length > 0) {
  1530. var c = a("<img src=" + prePath + 'libs/icons/checkAllOff.gif title="点击全选" class="hand"></span>');
  1531. a(this).find("th").eq(0).addClass("ali02").html("").append(c);
  1532. try {
  1533. enableTooltips()
  1534. } catch (d) {}
  1535. if (a(this).attr("headFixMode") == "true") {
  1536. c.toggle(function () {
  1537. a("table:[class=tableStyle]").find("tr").each(function () {
  1538. a(this).addClass("selected");
  1539. a(this).find('input[type="checkbox"]').attr("checked", "checked")
  1540. });
  1541. a(this).attr("src", prePath + "libs/icons/checkAllOn.gif");
  1542. a(this).attr("title", "取消全选");
  1543. try {
  1544. hideTooltip();
  1545. enableTooltips()
  1546. } catch (i) {}
  1547. }, function () {
  1548. a("table:[class=tableStyle]").find("tr").each(function () {
  1549. if (a(this).hasClass("selected")) {
  1550. a(this).removeClass("selected");
  1551. a(this).find('input[type="checkbox"]').removeAttr("checked")
  1552. }
  1553. });
  1554. a(this).attr("src", prePath + "libs/icons/checkAllOff.gif");
  1555. a(this).attr("title", "点击全选");
  1556. try {
  1557. hideTooltip();
  1558. enableTooltips()
  1559. } catch (i) {}
  1560. })
  1561. } else {
  1562. c.toggle(function () {
  1563. a(this).parents("table").find("tr").each(function () {
  1564. a(this).addClass("selected");
  1565. a(this).find('input[type="checkbox"]').attr("checked", "checked")
  1566. });
  1567. a(this).attr("src", prePath + "libs/icons/checkAllOn.gif");
  1568. a(this).attr("title", "取消全选");
  1569. try {
  1570. hideTooltip();
  1571. enableTooltips()
  1572. } catch (i) {}
  1573. }, function () {
  1574. a(this).parents("table").find("tr").each(function () {
  1575. if (a(this).hasClass("selected")) {
  1576. a(this).removeClass("selected");
  1577. a(this).find('input[type="checkbox"]').removeAttr("checked")
  1578. }
  1579. });
  1580. a(this).attr("src", prePath + "libs/icons/checkAllOff.gif");
  1581. a(this).attr("title", "点击全选");
  1582. try {
  1583. hideTooltip();
  1584. enableTooltips()
  1585. } catch (i) {}
  1586. })
  1587. }
  1588. }
  1589. if (a(this).attr("selectRowButtonOnly") == false || a(this).attr("selectRowButtonOnly") == "false") {
  1590. a(this).find("tr:has(td)").each(function () {
  1591. a(this).find("td").eq(0).addClass("ali02");
  1592. a(this).unbind("click");
  1593. a(this).bind("click", function () {
  1594. if (a(this).hasClass("selected")) {
  1595. a(this).removeClass("selected");
  1596. a(this).find("td").eq(0).find('input[type="checkbox"]').attr("checked", false)
  1597. } else {
  1598. a(this).addClass("selected");
  1599. a(this).find("td").eq(0).find('input[type="checkbox"]').attr("checked", true)
  1600. }
  1601. })
  1602. })
  1603. } else {
  1604. a(this).find("tr:has(td)").find('input[type="checkbox"]').each(function () {
  1605. a(this).parents("td").addClass("ali02");
  1606. a(this).unbind("click");
  1607. a(this).bind("click", function () {
  1608. if (a(this).parents("tr").hasClass("selected")) {
  1609. a(this).parents("tr").removeClass("selected")
  1610. } else {
  1611. a(this).parents("tr").addClass("selected")
  1612. }
  1613. })
  1614. })
  1615. }
  1616. }
  1617. }
  1618. })
  1619. }
  1620. })(jQuery);
  1621. function getPosition(c, d) {
  1622. var a = -1;
  1623. for (var b = 0; b < d.length; b++) {
  1624. if (c == d[b]) {
  1625. a = b;
  1626. break
  1627. }
  1628. }
  1629. return a
  1630. }
  1631. jQuery.fn.extend({
  1632. selectRender: function () {
  1633. return this.each(function () {
  1634. if ($(this).prev("div").hasClass("mainCon")) {
  1635. $(this).prev("div").remove()
  1636. }
  1637. new jQuery.SelectBox(this)
  1638. })
  1639. },
  1640. selectAddItem: function (a) {
  1641. this.each(function () {
  1642. var b = $(this).data("data");
  1643. var c = "list";
  1644. if ($(this).attr("dataRoot")) {
  1645. c = $(this).attr("dataRoot")
  1646. }
  1647. b[c].push(a);
  1648. $(this).data("data", b);
  1649. $(this).prev(".mainCon").remove();
  1650. new jQuery.SelectBox(this)
  1651. })
  1652. },
  1653. selectRemoveItem: function (a) {
  1654. this.each(function () {
  1655. var b = $(this).data("data");
  1656. var c = -1;
  1657. var d = "list";
  1658. if ($(this).attr("dataRoot")) {
  1659. d = $(this).attr("dataRoot")
  1660. }
  1661. $.each(b[d], function (e, f) {
  1662. if (f.value.toString() == a) {
  1663. c = e
  1664. }
  1665. });
  1666. if (c != -1) {
  1667. b[d].splice(c, 1)
  1668. }
  1669. $(this).data("data", b);
  1670. $(this).prev(".mainCon").remove();
  1671. new jQuery.SelectBox(this)
  1672. })
  1673. }
  1674. });
  1675. if (!window.console) {
  1676. var console = {
  1677. log: function (a) {}
  1678. }
  1679. }
  1680. var elm_id = 1;
  1681. jQuery.SelectBox = function (H) {
  1682. var i = {};
  1683. i.inputClass = i.inputClass || "selectbox";
  1684. i.containerClass = i.containerClass || "selectbox-wrapper";
  1685. i.hoverClass = i.hoverClass || "current";
  1686. i.currentClass = i.selectedClass || "selected";
  1687. i.debug = i.debug || false;
  1688. elm_id++;
  1689. var g = "0_input";
  1690. var x = "0_button";
  1691. var G = 0;
  1692. var u = false;
  1693. var s = 0;
  1694. var K = $(H);
  1695. var b = t(i);
  1696. var n = e();
  1697. var w = J(i);
  1698. var E = false;
  1699. var m = false;
  1700. var y = 1;
  1701. var q;
  1702. var l;
  1703. var c = 0;
  1704. var L = 0;
  1705. if (window.navigator.userAgent.indexOf("Windows") > -1) {
  1706. c = 1
  1707. }
  1708. l = K.width();
  1709. if (l == "0") {
  1710. l = 116
  1711. }
  1712. var p;
  1713. p = $("<input type='button' value=' ' class='selBtn'/>");
  1714. p.attr("id", elm_id + "_button");
  1715. var r = $("<div class='loader'>数据加载中...</div>");
  1716. if (K.attr("colNum") != null) {
  1717. y = parseInt(K.attr("colNum"))
  1718. }
  1719. if (K.attr("colWidth") != null) {
  1720. q = Number(K.attr("colWidth"))
  1721. } else {
  1722. q = 100
  1723. }
  1724. var h = 99;
  1725. if (K.attr("selWidth") != null) {
  1726. h = Number(K.attr("selWidth")) - 22
  1727. }
  1728. w.width(h);
  1729. K.hide().before(n);
  1730. var O = $('<table cellspacing="0" cellpadding="0" style="border-style:none;"><tr><td class="ali01" style="border-style:none;padding:0;margin:0;"></td><td class="ali01" style="border-style:none;;padding:0;margin:0;"></td></tr></table>');
  1731. O.find("td").eq(0).append(w);
  1732. O.find("td").eq(1).append(p);
  1733. n.append(O);
  1734. n.append(b);
  1735. n.append(r);
  1736. r.hide();
  1737. if (K.attr("disabled") == "disabled" || K.attr("disabled") == "true" || K.attr("disabled") == true) {
  1738. p.attr("disabled", true);
  1739. p.addClass("selBtn_disabled");
  1740. w.addClass("selectbox_disabled")
  1741. }
  1742. I();
  1743. if (K.attr("editable") != null) {
  1744. if (K.attr("editable") == "true") {
  1745. m = true
  1746. } else {
  1747. m = false
  1748. }
  1749. }
  1750. if (!m) {
  1751. w.css({
  1752. cursor: "pointer"
  1753. });
  1754. w.click(function (Q) {
  1755. g = $(Q.target).attr("id");
  1756. B();
  1757. if (b.attr("hasfocus") == 0) {
  1758. o()
  1759. } else {
  1760. a()
  1761. }
  1762. }).keydown(function (Q) {
  1763. switch (Q.keyCode) {
  1764. case 38:
  1765. Q.preventDefault();
  1766. A(-1);
  1767. break;
  1768. case 40:
  1769. Q.preventDefault();
  1770. A(1);
  1771. break;
  1772. case 13:
  1773. Q.preventDefault();
  1774. $("li." + i.hoverClass).trigger("click");
  1775. break;
  1776. case 27:
  1777. a();
  1778. break
  1779. }
  1780. })
  1781. } else {
  1782. w.css({
  1783. cursor: "text"
  1784. });
  1785. w.change(function () {
  1786. K.attr("editValue", $(this).val())
  1787. })
  1788. }
  1789. p.click(function (Q) {
  1790. x = $(Q.target).attr("id");
  1791. B();
  1792. if (b.attr("hasfocus") == 0) {
  1793. o()
  1794. } else {
  1795. a()
  1796. }
  1797. }).keydown(function (Q) {
  1798. switch (Q.keyCode) {
  1799. case 38:
  1800. Q.preventDefault();
  1801. A(-1);
  1802. break;
  1803. case 40:
  1804. Q.preventDefault();
  1805. A(1);
  1806. break;
  1807. case 13:
  1808. Q.preventDefault();
  1809. $("li." + i.hoverClass).trigger("click");
  1810. break;
  1811. case 27:
  1812. a();
  1813. break
  1814. }
  1815. });
  1816. function B() {
  1817. var V;
  1818. var R = b.find("li").length;
  1819. if (y == 1) {
  1820. V = R * 26
  1821. } else {
  1822. if (R % y == 0) {
  1823. V = R * 26 / y
  1824. } else {
  1825. V = (R - R % y) * 26 / y + 26
  1826. }
  1827. }
  1828. b.height(V);
  1829. var Q = 200;
  1830. if (parentTopHeight > 0) {
  1831. var S = window.top.document.documentElement.clientHeight;
  1832. Q = S - parentTopHeight - parentBottomHeight - n.offset().top - 30
  1833. } else {
  1834. Q = window.document.documentElement.clientHeight - (n.offset().top - $(window).scrollTop()) - 30
  1835. }
  1836. var U;
  1837. if (!K.attr("boxWidth")) {
  1838. U = b.width()
  1839. }
  1840. b.css({
  1841. overflowY: "auto",
  1842. overflowX: "hidden"
  1843. });
  1844. if (y != 1) {
  1845. b.width((q + 6) * y)
  1846. } else {
  1847. if (!K.attr("boxWidth")) {
  1848. b.width(U)
  1849. } else {
  1850. b.width(Number(K.attr("boxWidth")) + 1)
  1851. }
  1852. }
  1853. var T = 0;
  1854. if (K.attr("boxHeight")) {
  1855. T = Number(K.attr("boxHeight"))
  1856. }
  1857. if (T != 0) {
  1858. b.height(T);
  1859. if (K.attr("openDirection") == "top") {
  1860. b.css({
  1861. top: -T
  1862. })
  1863. } else {
  1864. if (K.attr("openDirection") == "bottom") {
  1865. b.css({
  1866. top: 24
  1867. })
  1868. } else {
  1869. if (Q < T) {
  1870. if (n.offset().top > T) {
  1871. b.css({
  1872. top: -T
  1873. })
  1874. } else {
  1875. if (Q < 100 && n.offset().top > Q && n.offset().top > 100) {
  1876. b.css({
  1877. top: -T
  1878. })
  1879. } else {
  1880. b.css({
  1881. top: 24
  1882. })
  1883. }
  1884. }
  1885. } else {
  1886. b.css({
  1887. top: 24
  1888. })
  1889. }
  1890. }
  1891. }
  1892. } else {
  1893. if (K.attr("openDirection") == "top") {
  1894. if (n.offset().top > V) {
  1895. b.css({
  1896. top: -V
  1897. })
  1898. } else {
  1899. b.height(n.offset().top);
  1900. b.css({
  1901. top: -V
  1902. })
  1903. }
  1904. } else {
  1905. if (K.attr("openDirection") == "bottom") {
  1906. if (Q < V) {
  1907. b.css({
  1908. top: 24
  1909. });
  1910. b.height(Q)
  1911. } else {
  1912. b.css({
  1913. top: 24
  1914. })
  1915. }
  1916. } else {
  1917. if (Q < V) {
  1918. if (n.offset().top > V) {
  1919. b.css({
  1920. top: -V
  1921. })
  1922. } else {
  1923. if (Q < 100 && n.offset().top > Q && n.offset().top > 100) {
  1924. b.height(n.offset().top);
  1925. b.css({
  1926. top: -V
  1927. })
  1928. } else {
  1929. b.css({
  1930. top: 24
  1931. });
  1932. b.height(Q)
  1933. }
  1934. }
  1935. } else {
  1936. b.css({
  1937. top: 24
  1938. })
  1939. }
  1940. }
  1941. }
  1942. }
  1943. if (!K.attr("boxWidth")) {
  1944. if (b.width() < h + 24) {
  1945. b.width(h + 24)
  1946. }
  1947. }
  1948. }
  1949. function a() {
  1950. b.attr("hasfocus", 0);
  1951. b.hide();
  1952. $("body").unbind("mousedown", M)
  1953. }
  1954. function o() {
  1955. b.attr("hasfocus", 1);
  1956. depth++;
  1957. n.css({
  1958. zIndex: depth
  1959. });
  1960. b.show();
  1961. $("body").bind("mousedown", M)
  1962. }
  1963. function M(Q) {
  1964. if ($(Q.target).attr("id") == g || $(Q.target).attr("id") == x || $(Q.target).parent().attr("class") == "selectbox-wrapper" || $(Q.target).attr("class") == "selectbox-wrapper" || $(Q.target).parents(".selectbox-wrapper").length > 0) {} else {
  1965. a()
  1966. }
  1967. }
  1968. function I() {
  1969. b.append(C(w.attr("id"))).hide();
  1970. var Q = w.css("width")
  1971. }
  1972. function e() {
  1973. var Q = $("<div></div>");
  1974. Q.addClass("mainCon");
  1975. return Q
  1976. }
  1977. function t(Q) {
  1978. var R = $("<div></div>");
  1979. R.attr("id", elm_id + "_container");
  1980. R.addClass(Q.containerClass);
  1981. R.css({});
  1982. R.attr("hasfocus", 0);
  1983. return R
  1984. }
  1985. function J(R) {
  1986. var Q = document.createElement("input");
  1987. var T = $(Q);
  1988. T.attr("id", elm_id + "_input");
  1989. T.attr("type", "text");
  1990. T.addClass(R.inputClass);
  1991. if (broswerFlag == "IE8") {
  1992. T.addClass("selectboxFont")
  1993. }
  1994. T.attr("autocomplete", "off");
  1995. var S = false;
  1996. if (K.attr("editable") != null) {
  1997. if (K.attr("editable") == "true") {
  1998. S = true
  1999. } else {
  2000. S = false
  2001. }
  2002. }
  2003. if (!S) {
  2004. if (broswerFlag == "Firefox") {
  2005. T.attr("contenteditable", false)
  2006. } else {
  2007. T.attr("readonly", "readonly")
  2008. }
  2009. } else {
  2010. T.attr("readonly", false)
  2011. }
  2012. T.attr("tabIndex", K.attr("tabindex"));
  2013. if (K.attr("disabled") == "disabled" || K.attr("disabled") == "true" || K.attr("disabled") == true) {
  2014. T.attr("disabled", true);
  2015. T.addClass("inputDisabled")
  2016. }
  2017. return T
  2018. }
  2019. function A(R) {
  2020. var Q = $("li", b);
  2021. if (!Q || Q.length == 0) {
  2022. return false
  2023. }
  2024. G += R;
  2025. if (G < 0) {
  2026. G = Q.size()
  2027. } else {
  2028. if (G > Q.size()) {
  2029. G = 0
  2030. }
  2031. }
  2032. F(Q, G);
  2033. Q.removeClass(i.hoverClass);
  2034. $(Q[G]).addClass(i.hoverClass)
  2035. }
  2036. function F(R, S) {
  2037. var Q = $(R[S]).get(0);
  2038. var R = b.get(0);
  2039. if (Q.offsetTop + Q.offsetHeight > R.scrollTop + R.clientHeight) {
  2040. R.scrollTop = Q.offsetTop + Q.offsetHeight - R.clientHeight
  2041. } else {
  2042. if (Q.offsetTop < R.scrollTop) {
  2043. R.scrollTop = Q.offsetTop
  2044. }
  2045. }
  2046. }
  2047. function f() {
  2048. var Q = $("li." + i.currentClass, b).get(0);
  2049. var R = (Q.id).split("_");
  2050. var T = R[0].length + R[1].length + 2;
  2051. var U = Q.id;
  2052. var S = U.substr(T, U.length);
  2053. K.val(S);
  2054. K.attr("relText", $(Q).text());
  2055. K.attr("relValue", S);
  2056. var U = $(Q).html().trim();
  2057. w.val(U);
  2058. if (m == true) {
  2059. K.attr("editValue", w.val())
  2060. }
  2061. K.focus();
  2062. return true
  2063. }
  2064. function d() {
  2065. return K.val()
  2066. }
  2067. function P() {
  2068. return w.val()
  2069. }
  2070. function C(U) {
  2071. var W = new Array();
  2072. var aa = document.createElement("ul");
  2073. var R = [];
  2074. var ab = 0;
  2075. var af;
  2076. if (K.attr("childId") != null) {
  2077. af = true
  2078. }
  2079. var ae;
  2080. if (K.attr("editable") != null) {
  2081. if (K.attr("editable") == "true") {
  2082. ae = true
  2083. } else {
  2084. ae = false
  2085. }
  2086. }
  2087. var Q = false;
  2088. var Y = K.attr("url");
  2089. var S = K.attr("data");
  2090. var T = K.data("data");
  2091. if (Y != null || S != null || T != null) {
  2092. Q = true
  2093. }
  2094. if (Q == true) {
  2095. var ad = "list";
  2096. if (K.attr("dataRoot")) {
  2097. ad = K.attr("dataRoot")
  2098. }
  2099. var ac = K.attr("params");
  2100. var X;
  2101. if (ac) {
  2102. try {
  2103. X = JSON.parse(ac)
  2104. } catch (Z) {
  2105. X = "";
  2106. alert("参数格式有误!(提示:放在标签中的json数据的属性和名称必须以双引号包围)")
  2107. }
  2108. } else {
  2109. X = ""
  2110. }
  2111. if (T) {
  2112. D(T, U, y, q, ae, af, aa, ad)
  2113. } else {
  2114. if (S) {
  2115. var V;
  2116. try {
  2117. V = JSON.parse(S)
  2118. } catch (Z) {
  2119. V = "";
  2120. alert("参数格式有误!(提示:json数据key与value必须以双引号包围)")
  2121. }
  2122. K.data("data", V);
  2123. D(V, U, y, q, ae, af, aa, ad)
  2124. } else {
  2125. if (Y) {
  2126. $.ajax({
  2127. url: K.attr("url"),
  2128. dataType: "json",
  2129. data: X,
  2130. error: function () {
  2131. alert("单选下拉框数据源出错,请检查url路径")
  2132. },
  2133. success: function (ag) {
  2134. K.data("data", ag);
  2135. D(ag, U, y, q, ae, af, aa, ad)
  2136. }
  2137. })
  2138. }
  2139. }
  2140. }
  2141. } else {
  2142. K.find("option").each(function () {
  2143. R.push($(this)[0]);
  2144. var ag = document.createElement("li");
  2145. ag.setAttribute("id", U + "_" + $(this).val());
  2146. ag.innerHTML = $(this).html();
  2147. if ($(this).is(":selected")) {
  2148. if (ae == true) {
  2149. w.val($(this).html());
  2150. $(ag).addClass(i.currentClass)
  2151. } else {
  2152. var ai = $(this).html().trim();
  2153. w.val(ai);
  2154. $(ag).addClass(i.currentClass)
  2155. }
  2156. }
  2157. if (y != 1) {
  2158. $(ag).addClass("li_left");
  2159. if (q != null) {
  2160. $(ag).width(q)
  2161. } else {
  2162. var ah = Number(l);
  2163. $(ag).width(ah)
  2164. }
  2165. }
  2166. aa.appendChild(ag);
  2167. $(ag).mouseover(function (aj) {
  2168. s = 1;
  2169. if (i.debug) {
  2170. console.log("over on : " + this.id)
  2171. }
  2172. jQuery(aj.target, b).addClass(i.hoverClass)
  2173. }).mouseout(function (aj) {
  2174. s = -1;
  2175. if (i.debug) {
  2176. console.log("out on : " + this.id)
  2177. }
  2178. jQuery(aj.target, b).removeClass(i.hoverClass)
  2179. }).click(function (ak) {
  2180. var al = $("li." + i.hoverClass, b).get(0);
  2181. if (i.debug) {
  2182. console.log("click on :" + this.id)
  2183. }
  2184. var aj = $(this).attr("id").split("_");
  2185. $("#" + aj[0] + "_container li." + i.currentClass).removeClass(i.currentClass);
  2186. $(this).addClass(i.currentClass);
  2187. f();
  2188. K.get(0).blur();
  2189. a();
  2190. try {
  2191. K.trigger("change")
  2192. } catch (am) {}
  2193. w.removeClass("tipColor");
  2194. if (af) {
  2195. z(K, K.val())
  2196. }
  2197. });
  2198. if (K.attr("editValue") != null) {
  2199. w.val(K.attr("editValue"))
  2200. }
  2201. })
  2202. }
  2203. K.find("optgroup").each(function () {
  2204. var ah = getPosition($(this).children("option").eq(0)[0], R);
  2205. var ag = $(this).attr("label");
  2206. $(aa).find("li").eq(ah + ab).before("<li class='group'>" + ag + "</li>");
  2207. ab++
  2208. });
  2209. return aa
  2210. }
  2211. function D(V, T, R, W, ac, ad, Z, aa, X) {
  2212. if (!V) {
  2213. return
  2214. }
  2215. var Q = "请选择";
  2216. if (K.attr("prompt") != null) {
  2217. if (K.attr("prompt") == "") {
  2218. Q = "请选择"
  2219. } else {
  2220. Q = K.attr("prompt")
  2221. }
  2222. }
  2223. var U = -1;
  2224. var Y = "";
  2225. if (K.attr("selectedIdx")) {
  2226. U = Number(K.attr("selectedIdx"))
  2227. }
  2228. if (K.attr("selectedValue")) {
  2229. Y = K.attr("selectedValue")
  2230. }
  2231. K.attr("length", 10);
  2232. if (K.attr("prompt") != null) {
  2233. var ab = document.createElement("li");
  2234. ab.setAttribute("id", T + "_");
  2235. ab.innerHTML = Q;
  2236. if (U == -1 && Y == "") {
  2237. $(ab).addClass(i.currentClass);
  2238. w.val(ab.innerHTML)
  2239. }
  2240. Z.appendChild(ab);
  2241. K[0].options.length = 0;
  2242. K[0].options[K[0].options.length] = new Option(Q, "");
  2243. if (R != 1) {
  2244. $(ab).addClass("li_left");
  2245. if (W != null) {
  2246. $(ab).width(W)
  2247. } else {
  2248. var S = Number(l);
  2249. $(ab).width(S)
  2250. }
  2251. }
  2252. $(ab).mouseover(function (ae) {
  2253. s = 1;
  2254. if (i.debug) {
  2255. console.log("over on : " + this.id)
  2256. }
  2257. jQuery(ae.target, b).addClass(i.hoverClass)
  2258. }).mouseout(function (ae) {
  2259. s = -1;
  2260. if (i.debug) {
  2261. console.log("out on : " + this.id)
  2262. }
  2263. jQuery(ae.target, b).removeClass(i.hoverClass)
  2264. }).click(function (af) {
  2265. var ag = $("li." + i.hoverClass, b).get(0);
  2266. if (i.debug) {
  2267. console.log("click on :" + this.id)
  2268. }
  2269. var ae = $(this).attr("id").split("_");
  2270. $("#" + ae[0] + "_container li." + i.currentClass).removeClass(i.currentClass);
  2271. $(this).addClass(i.currentClass);
  2272. f();
  2273. K.get(0).blur();
  2274. a();
  2275. K.trigger("change");
  2276. w.removeClass("tipColor")
  2277. })
  2278. }
  2279. if (K.attr("prompt") == null) {
  2280. if (U == -1 && Y == "") {
  2281. U = 0
  2282. }
  2283. }
  2284. $.each(V[aa], function (af, ah) {
  2285. var ae = document.createElement("li");
  2286. ae.setAttribute("id", T + "_" + ah.value);
  2287. ae.innerHTML = ah.key;
  2288. K[0].options[K[0].options.length] = new Option(ah.key, ah.value);
  2289. if (U == af) {
  2290. if (ac == true) {
  2291. $(ae).addClass(i.currentClass);
  2292. w.val(ae.innerHTML);
  2293. K.val(ah.value);
  2294. K.attr("relText", ah.key);
  2295. K.attr("editValue", ah.key)
  2296. } else {
  2297. $(ae).addClass(i.currentClass);
  2298. w.val(ae.innerHTML.trim());
  2299. K.val(ah.value);
  2300. K.attr("relText", ah.key);
  2301. K.attr("relValue", ah.value)
  2302. }
  2303. } else {
  2304. if (Y != "") {
  2305. if (Y == ah.value.toString()) {
  2306. if (ac == true) {
  2307. $(ae).addClass(i.currentClass);
  2308. w.val(ae.innerHTML);
  2309. K.val(ah.value);
  2310. K.attr("relText", ah.key);
  2311. K.attr("editValue", ah.key)
  2312. } else {
  2313. $(ae).addClass(i.currentClass);
  2314. w.val(ae.innerHTML.trim());
  2315. K.val(ah.value);
  2316. K.attr("relText", ah.key);
  2317. K.attr("relValue", ah.value)
  2318. }
  2319. }
  2320. }
  2321. }
  2322. if (R != 1) {
  2323. $(ae).addClass("li_left");
  2324. if (W != null) {
  2325. $(ae).width(W)
  2326. } else {
  2327. var ag = Number(l);
  2328. $(ae).width(ag)
  2329. }
  2330. }
  2331. $(ae).mouseover(function (ai) {
  2332. s = 1;
  2333. if (i.debug) {
  2334. console.log("over on : " + this.id)
  2335. }
  2336. jQuery(ai.target, b).addClass(i.hoverClass)
  2337. }).mouseout(function (ai) {
  2338. s = -1;
  2339. if (i.debug) {
  2340. console.log("out on : " + this.id)
  2341. }
  2342. jQuery(ai.target, b).removeClass(i.hoverClass)
  2343. }).click(function (aj) {
  2344. var ak = $("li." + i.hoverClass, b).get(0);
  2345. if (i.debug) {
  2346. console.log("click on :" + this.id)
  2347. }
  2348. var ai = $(this).attr("id").split("_");
  2349. $("#" + ai[0] + "_container li." + i.currentClass).removeClass(i.currentClass);
  2350. $(this).addClass(i.currentClass);
  2351. f();
  2352. K.get(0).blur();
  2353. a();
  2354. try {
  2355. K.trigger("change")
  2356. } catch (al) {}
  2357. w.removeClass("tipColor");
  2358. if (ad) {
  2359. z(K, K.val())
  2360. }
  2361. });
  2362. Z.appendChild(ae);
  2363. if (K.attr("editValue") != null) {
  2364. w.val(K.attr("editValue"))
  2365. }
  2366. });
  2367. K.attr("finished", "true")
  2368. }
  2369. function z(S, R) {
  2370. if (R != "") {
  2371. var T = S.attr("childId");
  2372. var Q = $("#" + T).prev().find("div[class=loader]");
  2373. Q.show();
  2374. window.setTimeout(function () {
  2375. N(S, R)
  2376. }, 200)
  2377. }
  2378. }
  2379. function N(S, R) {
  2380. var Q;
  2381. if (S.attr("childDataType") == null) {
  2382. Q = S.attr("childDataPath") + R
  2383. } else {
  2384. if (S.attr("childActionType") == "local") {
  2385. Q = S.attr("childDataPath") + R + "." + S.attr("childDataType")
  2386. } else {
  2387. Q = S.attr("childDataPath") + R
  2388. }
  2389. }
  2390. if (S.attr("childDataType") == "xml") {
  2391. $.ajax({
  2392. url: Q,
  2393. error: function () {
  2394. try {
  2395. top.Dialog.alert("数据加载失败,请检查childDataPath是否正确")
  2396. } catch (T) {
  2397. alert("数据加载失败,请检查childDataPath是否正确")
  2398. }
  2399. },
  2400. success: function (W) {
  2401. var T = S.attr("childId");
  2402. var ab = $("#" + T).prev().find("div[class=loader]");
  2403. ab.hide();
  2404. var Z = $("#" + T).prev().find("ul");
  2405. var V = $("#" + T).prev().find(">div").attr("id").split("_")[0];
  2406. var U = $("#" + T).prev().find("input:text");
  2407. var X = $("#" + T)[0];
  2408. Z.html("");
  2409. X.options.length = 0;
  2410. $(W).find("node").each(function () {
  2411. var ae = $(this).attr("text");
  2412. var ad = $(this).attr("value");
  2413. var ac = document.createElement("li");
  2414. $(ac).text(ae);
  2415. $(ac).attr("relValue", ad);
  2416. Z.append($(ac));
  2417. X.options[X.options.length] = new Option(ae, ad);
  2418. $(ac).mouseover(function (af) {
  2419. jQuery(af.target).addClass(i.hoverClass)
  2420. });
  2421. $(ac).mouseout(function (af) {
  2422. jQuery(af.target).removeClass(i.hoverClass)
  2423. });
  2424. $(ac).mousedown(function (ag) {
  2425. $("#" + V + "_container li." + i.currentClass).removeClass(i.currentClass);
  2426. $(this).addClass(i.currentClass);
  2427. $("#" + T).attr("relText", $(this).text());
  2428. $("#" + T).attr("relValue", $(this).attr("relValue"));
  2429. $("#" + T).val($(this).attr("relValue"));
  2430. U.val($(this).html());
  2431. $("#" + T).prev().find(">div").hide();
  2432. $("#" + T).focus();
  2433. if ($("#" + T).attr("onchange") != null) {}
  2434. try {
  2435. $("#" + T).trigger("change")
  2436. } catch (ah) {}
  2437. var af;
  2438. if ($("#" + T).attr("childId") != null) {
  2439. af = true
  2440. }
  2441. if (af) {
  2442. z($("#" + T), $("#" + T).val())
  2443. }
  2444. })
  2445. });
  2446. if ($(W).find("node").length == 0) {
  2447. var aa = document.createElement("li");
  2448. $(aa).text("无内容");
  2449. Z.append($(aa))
  2450. }
  2451. var Y = Z.find("li").eq(0);
  2452. U.val(Y.text());
  2453. Y.addClass(i.currentClass);
  2454. $("#" + T).val(Y.attr("relValue"));
  2455. $("#" + T).attr("relValue", Y.attr("relValue"));
  2456. $("#" + T).attr("relText", Y.text());
  2457. $("#" + T).trigger("ajaxInit")
  2458. }
  2459. })
  2460. } else {
  2461. $.getJSON(Q, function (V) {
  2462. var W = S.attr("childId");
  2463. var Y = $("#" + W).prev().find("div[class=loader]");
  2464. Y.hide();
  2465. var ae = $("#" + W).prev().find("ul");
  2466. var X = $("#" + W).prev().find(">div").attr("id").split("_")[0];
  2467. var ac = $("#" + W).prev().find("input:text");
  2468. var T = $("#" + W)[0];
  2469. ae.html("");
  2470. T.options.length = 0;
  2471. var Z = "list";
  2472. if ($("#" + W).attr("dataRoot")) {
  2473. Z = $("#" + W).attr("dataRoot")
  2474. }
  2475. if ($("#" + W).attr("prompt")) {
  2476. var aa = document.createElement("li");
  2477. var ab = $("#" + W).attr("prompt");
  2478. $(aa).text(ab);
  2479. $(aa).attr("relValue", "");
  2480. ae.append($(aa));
  2481. T.options[T.options.length] = new Option(ab, "");
  2482. $(aa).mouseover(function (af) {
  2483. jQuery(af.target).addClass(i.hoverClass)
  2484. });
  2485. $(aa).mouseout(function (af) {
  2486. jQuery(af.target).removeClass(i.hoverClass)
  2487. });
  2488. $(aa).mousedown(function (af) {
  2489. $("#" + X + "_container li." + i.currentClass).removeClass(i.currentClass);
  2490. $(this).addClass(i.currentClass);
  2491. $("#" + W).attr("relText", $(this).text());
  2492. $("#" + W).attr("relValue", $(this).attr("relValue"));
  2493. $("#" + W).val($(this).attr("relValue"));
  2494. ac.val($(this).html());
  2495. $("#" + W).prev().find(">div").hide();
  2496. $("#" + W).focus();
  2497. if ($("#" + W).attr("onchange") != null) {}
  2498. try {
  2499. $("#" + W).trigger("change")
  2500. } catch (ag) {}
  2501. })
  2502. }
  2503. $.each(V[Z], function (af, ai) {
  2504. var ag = ai.key;
  2505. var ah = ai.value;
  2506. var aj = document.createElement("li");
  2507. $(aj).text(ag);
  2508. $(aj).attr("relValue", ah);
  2509. ae.append($(aj));
  2510. T.options[T.options.length] = new Option(ag, ah);
  2511. $(aj).mouseover(function (ak) {
  2512. jQuery(ak.target).addClass(i.hoverClass)
  2513. });
  2514. $(aj).mouseout(function (ak) {
  2515. jQuery(ak.target).removeClass(i.hoverClass)
  2516. });
  2517. $(aj).mousedown(function (ak) {
  2518. $("#" + X + "_container li." + i.currentClass).removeClass(i.currentClass);
  2519. $(this).addClass(i.currentClass);
  2520. $("#" + W).attr("relText", $(this).text());
  2521. $("#" + W).attr("relValue", $(this).attr("relValue"));
  2522. $("#" + W).val($(this).attr("relValue"));
  2523. ac.val($(this).html());
  2524. $("#" + W).prev().find(">div").hide();
  2525. $("#" + W).focus();
  2526. if ($("#" + W).attr("onchange") != null) {}
  2527. try {
  2528. $("#" + W).trigger("change")
  2529. } catch (al) {}
  2530. var am;
  2531. if ($("#" + W).attr("childId") != null) {
  2532. am = true
  2533. }
  2534. if (am) {
  2535. z($("#" + W), $("#" + W).val())
  2536. }
  2537. })
  2538. });
  2539. if (V.length == 0) {
  2540. var ad = document.createElement("li");
  2541. $(ad).text("无内容");
  2542. ae.append($(ad))
  2543. }
  2544. var U = ae.find("li").eq(0);
  2545. ac.val(U.text());
  2546. U.addClass(i.currentClass);
  2547. $("#" + W).val(U.attr("relValue"));
  2548. $("#" + W).attr("relValue", U.attr("relValue"));
  2549. $("#" + W).attr("relText", U.text());
  2550. $("#" + W).trigger("ajaxInit")
  2551. })
  2552. }
  2553. }
  2554. };
  2555. var tipDirection = "down";
  2556. function enableTooltips(e) {
  2557. var b, a, c, d;
  2558. if (!document.getElementById || !document.getElementsByTagName) {
  2559. return
  2560. }
  2561. AddCss();
  2562. d = document.createElement("span");
  2563. d.id = "btc";
  2564. d.setAttribute("id", "btc");
  2565. d.style.position = "absolute";
  2566. d.style.zIndex = 9999;
  2567. $("body").append($(d));
  2568. $("a[title],span[title],input[title],textarea[title],img[title],div[title]").each(function () {
  2569. if ($(this).attr("keepDefaultStyle") == "true" || $(this).attr("keepDefaultStyle") == true || $(this).parents(".selectbox-tree").length > 0) {} else {
  2570. Prepare($(this)[0])
  2571. }
  2572. })
  2573. }
  2574. function _getStrLength(c) {
  2575. var b;
  2576. var a;
  2577. for (b = 0, a = 0; b < c.length; b++) {
  2578. if (c.charCodeAt(b) < 128) {
  2579. a++
  2580. } else {
  2581. a = a + 2
  2582. }
  2583. }
  2584. return a
  2585. }
  2586. function Prepare(f) {
  2587. var g, d, a, e, c;
  2588. d = f.getAttribute("title");
  2589. if (d == " ") {
  2590. f.removeAttribute("title");
  2591. f.onmouseover = null;
  2592. f.onmouseout = null;
  2593. f.onmousemove = null;
  2594. return
  2595. }
  2596. if (d != null && d.length != 0) {
  2597. f.removeAttribute("title");
  2598. if (_getStrLength(d) > 37 || _getStrLength(d) == 37) {
  2599. g = CreateEl("span", "tooltip")
  2600. } else {
  2601. if (_getStrLength(d) > 10 && _getStrLength(d) < 37) {
  2602. g = CreateEl("span", "tooltip_mid")
  2603. } else {
  2604. g = CreateEl("span", "tooltip_min")
  2605. }
  2606. }
  2607. e = CreateEl("span", "top");
  2608. $(e).html(d);
  2609. g.appendChild(e);
  2610. a = CreateEl("b", "bottom");
  2611. g.appendChild(a);
  2612. setOpacity(g);
  2613. f.tooltip = g;
  2614. f.onmouseover = showTooltip;
  2615. f.onmouseout = hideTooltip;
  2616. f.onmousemove = Locate2
  2617. }
  2618. }
  2619. function hideTip(a) {
  2620. var b = document.getElementById("btc");
  2621. if (b.childNodes.length > 0) {
  2622. b.removeChild(b.firstChild)
  2623. }
  2624. }
  2625. function showTooltip(a) {
  2626. document.getElementById("btc").appendChild(this.tooltip);
  2627. Locate(a)
  2628. }
  2629. function hideTooltip() {
  2630. var a = document.getElementById("btc");
  2631. if (a.childNodes.length > 0) {
  2632. a.removeChild(a.firstChild)
  2633. }
  2634. }
  2635. function setOpacity(a) {
  2636. a.style.filter = "alpha(opacity:95)";
  2637. a.style.KHTMLOpacity = "0.95";
  2638. a.style.MozOpacity = "0.95";
  2639. a.style.opacity = "0.95"
  2640. }
  2641. function CreateEl(b, d) {
  2642. var a = document.createElement(b);
  2643. a.className = d;
  2644. a.style.display = "block";
  2645. return (a)
  2646. }
  2647. function AddCss() {}
  2648. function Locate(g) {
  2649. var a = 0,
  2650. i = 0;
  2651. if (g == null) {
  2652. g = window.event
  2653. }
  2654. if (g.pageX || g.pageY) {
  2655. a = g.pageX;
  2656. i = g.pageY
  2657. } else {
  2658. if (g.clientX || g.clientY) {
  2659. if (document.documentElement.scrollTop) {
  2660. a = g.clientX + document.documentElement.scrollLeft;
  2661. i = g.clientY + document.documentElement.scrollTop
  2662. } else {
  2663. a = g.clientX + document.body.scrollLeft;
  2664. i = g.clientY + document.body.scrollTop
  2665. }
  2666. }
  2667. }
  2668. var h = window.document.documentElement.clientWidth;
  2669. var c = window.document.documentElement.clientHeight;
  2670. var b = $("#btc").width();
  2671. var f = $("#btc").height();
  2672. var d = $("#btc >span")[0].className;
  2673. if (h - b < a - 20) {
  2674. document.getElementById("btc").style.left = (h - b) + "px";
  2675. if (d == "tooltip") {
  2676. $("#btc >span")[0].className = "tooltip_s"
  2677. } else {
  2678. if (d == "tooltip_min") {
  2679. $("#btc >span")[0].className = "tooltip_min_s"
  2680. } else {
  2681. if (d == "tooltip_mid") {
  2682. $("#btc >span")[0].className = "tooltip_mid_s"
  2683. }
  2684. }
  2685. }
  2686. } else {
  2687. document.getElementById("btc").style.left = (a - 20) + "px"
  2688. }
  2689. if ($(window).scrollTop() + c - f < i) {
  2690. document.getElementById("btc").style.top = (i - f - 10) + "px";
  2691. if (d == "tooltip") {
  2692. $("#btc >span")[0].className = "tooltip_r"
  2693. } else {
  2694. if (d == "tooltip_min") {
  2695. $("#btc >span")[0].className = "tooltip_min_r"
  2696. } else {
  2697. if (d == "tooltip_mid") {
  2698. $("#btc >span")[0].className = "tooltip_mid_r"
  2699. }
  2700. }
  2701. }
  2702. tipDirection = "up"
  2703. } else {
  2704. document.getElementById("btc").style.top = (i + 10) + "px";
  2705. if (d == "tooltip_r") {
  2706. $("#btc >span")[0].className = "tooltip"
  2707. } else {
  2708. if (d == "tooltip_min_r") {
  2709. $("#btc >span")[0].className = "tooltip_min"
  2710. } else {
  2711. if (d == "tooltip_mid_r") {
  2712. $("#btc >span")[0].className = "tooltip_mid"
  2713. }
  2714. }
  2715. }
  2716. tipDirection = "down"
  2717. }
  2718. }
  2719. function Locate2(f) {
  2720. var a = 0,
  2721. h = 0;
  2722. if (f == null) {
  2723. f = window.event
  2724. }
  2725. if (f.pageX || f.pageY) {
  2726. a = f.pageX;
  2727. h = f.pageY
  2728. } else {
  2729. if (f.clientX || f.clientY) {
  2730. if (document.documentElement.scrollTop) {
  2731. a = f.clientX + document.documentElement.scrollLeft;
  2732. h = f.clientY + document.documentElement.scrollTop
  2733. } else {
  2734. a = f.clientX + document.body.scrollLeft;
  2735. h = f.clientY + document.body.scrollTop
  2736. }
  2737. }
  2738. }
  2739. var g = window.document.documentElement.clientWidth;
  2740. var c = window.document.documentElement.clientHeight;
  2741. var b = $("#btc").width();
  2742. var d = $("#btc").height();
  2743. if (g - b < a - 20) {
  2744. document.getElementById("btc").style.left = (g - b) + "px"
  2745. } else {
  2746. document.getElementById("btc").style.left = (a - 20) + "px"
  2747. }
  2748. if (tipDirection == "up") {
  2749. document.getElementById("btc").style.top = (h - d - 10) + "px"
  2750. } else {
  2751. document.getElementById("btc").style.top = (h + 10) + "px"
  2752. }
  2753. }(function (c) {
  2754. var h, i;
  2755. var d = 0;
  2756. var a = 32;
  2757. var e;
  2758. c.fn.TextAreaResizer = function () {
  2759. return this.each(function () {
  2760. h = c(this).addClass("processed"),
  2761. i = null;
  2762. c(this).wrap('<div class="resizable-textarea"><span></span></div>').parent().append(c('<div class="grippie"></div>').bind("mousedown", {
  2763. el: this
  2764. }, b)).wrap('<table cellspacing="0" cellpadding="0" style="border-style:none;"><tr><td class="ali01" style="border-style:none;padding:0;margin:0;"></td></tr></table>');
  2765. var m = c("div.grippie", c(this).parent())
  2766. })
  2767. };
  2768. function b(m) {
  2769. h = c(m.data.el);
  2770. h.blur();
  2771. d = l(m).y;
  2772. i = h.height() - d;
  2773. h.css("opacity", 0.25);
  2774. c(document).mousemove(g).mouseup(f);
  2775. return false
  2776. }
  2777. function g(o) {
  2778. var m = l(o).y;
  2779. var n = i + m;
  2780. if (d >= (m)) {
  2781. n -= 5
  2782. }
  2783. d = m;
  2784. n = Math.max(a, n);
  2785. h.height(n + "px");
  2786. if (n < a) {
  2787. f(o)
  2788. }
  2789. return false
  2790. }
  2791. function f(m) {
  2792. c(document).unbind("mousemove", g).unbind("mouseup", f);
  2793. h.css("opacity", 1);
  2794. h.focus();
  2795. h = null;
  2796. i = null;
  2797. d = 0
  2798. }
  2799. function l(m) {
  2800. return {
  2801. x: m.clientX + document.documentElement.scrollLeft,
  2802. y: m.clientY + document.documentElement.scrollTop
  2803. }
  2804. }
  2805. })(jQuery);
  2806. (function (a) {
  2807. a.fn.watermark = function (b, c) {
  2808. return this.each(function () {
  2809. var e = a(this),
  2810. d;
  2811. e.focus(function () {
  2812. d && !(d = 0) && e.removeClass(b).data("w", 0).val("")
  2813. }).blur(function () {
  2814. !e.val() && (d = 1) && e.addClass(b).data("w", 1).val(c)
  2815. }).closest("form").submit(function () {
  2816. d && e.val("")
  2817. });
  2818. e.blur()
  2819. })
  2820. };
  2821. a.fn.removeWatermark = function () {
  2822. return this.each(function () {
  2823. a(this).data("w") && a(this).val("")
  2824. })
  2825. }
  2826. })(jQuery);
  2827. if (jQuery) {
  2828. (function (a) {
  2829. a.cursorMessageData = {};
  2830. a(window).ready(function (b) {
  2831. if (a("#cursorMessageDiv").length == 0) {
  2832. a("body").append('<div id="cursorMessageDiv">&nbsp;</div>');
  2833. a("#cursorMessageDiv").hide()
  2834. }
  2835. a("body").mousemove(function (c) {
  2836. a.cursorMessageData.mouseX = c.pageX;
  2837. a.cursorMessageData.mouseY = c.pageY;
  2838. if (a.cursorMessageData.options != undefined) {
  2839. a._showCursorMessage()
  2840. }
  2841. })
  2842. });
  2843. a.extend({
  2844. cursorMessage: function (c, b) {
  2845. if (b == undefined) {
  2846. b = {}
  2847. }
  2848. if (b.offsetX == undefined) {
  2849. b.offsetX = 5
  2850. }
  2851. if (b.offsetY == undefined) {
  2852. b.offsetY = 5
  2853. }
  2854. if (b.hideTimeout == undefined) {
  2855. b.hideTimeout = 3000
  2856. }
  2857. a("#cursorMessageDiv").html(c).fadeIn("slow");
  2858. if (jQuery.cursorMessageData.hideTimeoutId != undefined) {
  2859. clearTimeout(jQuery.cursorMessageData.hideTimeoutId)
  2860. }
  2861. if (b.hideTimeout > 0) {
  2862. jQuery.cursorMessageData.hideTimeoutId = setTimeout(a.hideCursorMessage, b.hideTimeout)
  2863. }
  2864. jQuery.cursorMessageData.options = b;
  2865. a._showCursorMessage()
  2866. },
  2867. hideCursorMessage: function () {
  2868. a("#cursorMessageDiv").fadeOut("slow")
  2869. },
  2870. _showCursorMessage: function () {
  2871. a("#cursorMessageDiv").css({
  2872. top: (a.cursorMessageData.mouseY + a.cursorMessageData.options.offsetY) + "px",
  2873. left: (a.cursorMessageData.mouseX + a.cursorMessageData.options.offsetX)
  2874. })
  2875. }
  2876. })
  2877. })(jQuery)
  2878. }
  2879. jQuery.fn.caps = function (a) {
  2880. return this.keypress(function (f) {
  2881. var b = f.which ? f.which : (f.keyCode ? f.keyCode : -1);
  2882. var d = f.shiftKey ? f.shiftKey : (f.modifiers ? !! (f.modifiers & 4) : false);
  2883. var g = ((b >= 65 && b <= 90) && !d) || ((b >= 97 && b <= 122) && d);
  2884. a.call(this, g)
  2885. })
  2886. };
  2887. function iframeHeight(b) {
  2888. var a = document.getElementById(b);
  2889. a.style.height = a.contentWindow.document.body.scrollHeight + "px"
  2890. }
  2891. function winScrollContent(c) {
  2892. var b = $(top.document.getElementById("_Container_" + c)).height();
  2893. $(top.document.getElementById("_DialogFrame_" + c)).attr("scrolling", "no");
  2894. $("#winScrollContent").css({
  2895. overflowY: "auto",
  2896. overflowX: "hidden"
  2897. });
  2898. var a = 0;
  2899. $("#winScrollContent").parent().find(">div").not("#winScrollContent").each(function () {
  2900. if ($(this).css("display") != "none") {
  2901. a = a + $(this).outerHeight();
  2902. if ($(this).css("marginBottom") != "auto") {
  2903. a = a + parseInt($(this).css("marginBottom"))
  2904. }
  2905. if ($(this).css("marginTop") != "auto") {
  2906. a = a + parseInt($(this).css("marginTop"))
  2907. }
  2908. }
  2909. });
  2910. if (window.navigator.userAgent.indexOf("MSIE") >= 1) {
  2911. $("#winScrollContent").height(b - a - 10)
  2912. } else {
  2913. $("#winScrollContent").height(b - a + 5)
  2914. }
  2915. }(function (a) {
  2916. a.fileRender = {
  2917. defaults: {
  2918. button_text: " ",
  2919. class_container: "fileupload-rebrush",
  2920. class_field: "fileupload-rebrush-field",
  2921. class_button: "fileupload-rebrush-button"
  2922. }
  2923. };
  2924. a.fn.extend({
  2925. fileRender: function (d) {
  2926. a(this).attr("contenteditable", false);
  2927. d = a.extend({}, a.fileRender.defaults, d);
  2928. var e = ["padding-left", "padding-right", "margin-left", "margin-right", "border-left-width", "border-right-width"];
  2929. a(this).wrap('<div class="file-container"/>');
  2930. var g = a(this).parent();
  2931. g.prepend('<table cellspacing="0" cellpadding="0" style="border-style:none;"><tr><td class="ali01" style="border-style:none;padding:0;margin:0;"><input type="text" class="textinput" value="" readonly="readonly" /></td><td class="ali01" style="border-style:none;;padding:0;margin:0;"><input type="button" class="fileBtn" value="' + d.button_text + '" /></td></tr></table>');
  2932. var i = g.find("input[type=text]");
  2933. var b = g.find("input[type=button]");
  2934. var f = 0;
  2935. for (var h in e) {
  2936. var c = Math.round(parseFloat(i.css(e[h]) + 0)) + 0;
  2937. var l = Math.round(parseFloat(b.css(e[h]) + 0)) + 0;
  2938. f += (isNaN(c) ? 0 : c) + (isNaN(l) ? 0 : l)
  2939. }
  2940. f += Math.round(parseFloat(i.width())) + Math.round(parseFloat(b.width()));
  2941. if (a.browser.msie) {
  2942. a(this).width(180)
  2943. } else {
  2944. a(this).width(120)
  2945. }
  2946. a(this).height(25);
  2947. i.width(120);
  2948. g.css({
  2949. position: "relative",
  2950. overflow: "hidden"
  2951. });
  2952. a(this).css({
  2953. position: "absolute",
  2954. "z-index": 2,
  2955. "font-size": "12px",
  2956. opacity: "0",
  2957. left: "0px",
  2958. top: "0px"
  2959. });
  2960. a(this).change(function () {
  2961. a(this).parent().find("input[type=text]").val(a(this).val());
  2962. if (a(this).attr("showInfo") != "false") {
  2963. try {
  2964. a(this).attr("title", a(this).val());
  2965. enableTooltips()
  2966. } catch (m) {}
  2967. }
  2968. })
  2969. }
  2970. })
  2971. })(jQuery);
  2972. (function (d) {
  2973. d.fn.clearableTextField = function () {
  2974. if (d(this).length > 0) {
  2975. d(this).bind("keyup change paste cut", e);
  2976. for (var f = 0; f < d(this).length; f++) {
  2977. c(d(d(this)[f]))
  2978. }
  2979. }
  2980. };
  2981. function e() {
  2982. c(d(this))
  2983. }
  2984. function c(f) {
  2985. if (f.val().length > 0) {
  2986. b(f)
  2987. } else {
  2988. a(f)
  2989. }
  2990. }
  2991. function b(i) {
  2992. if (!i.next().hasClass("text_clear_button")) {
  2993. i.after("<div class='text_clear_button'></div>");
  2994. var f = i.next();
  2995. var g = f.outerHeight(),
  2996. m = f.outerHeight();
  2997. i.css("padding-right", parseInt(i.css("padding-right")) + g + 1);
  2998. i.width(i.width() - g - 1);
  2999. var o = i.position();
  3000. var l = {};
  3001. l.left = o.left + i.outerWidth(false) - (g + 2);
  3002. var n = Math.round((i.outerHeight(true) - m) / 2);
  3003. l.top = o.top + d("#scrollContent").scrollTop() + n;
  3004. f.css(l);
  3005. f.click(function () {
  3006. i.val("");
  3007. c(i)
  3008. })
  3009. }
  3010. }
  3011. function a(h) {
  3012. var f = h.next();
  3013. if (f.hasClass("text_clear_button")) {
  3014. f.remove();
  3015. var g = f.width();
  3016. h.css("padding-right", parseInt(h.css("padding-right")) - g - 1);
  3017. h.width(h.width() + g + 1)
  3018. }
  3019. }
  3020. })(jQuery);
  3021. (function (a) {
  3022. a.fn.maxlength = function (b) {
  3023. var c = jQuery.extend({
  3024. events: [],
  3025. maxCharacters: 10,
  3026. status: true,
  3027. statusClass: "maxNum",
  3028. statusText: "剩余字数",
  3029. notificationClass: "notification",
  3030. showAlert: false,
  3031. alertText: "输入字符超出限制.",
  3032. slider: true
  3033. }, b);
  3034. a.merge(c.events, ["keyup"]);
  3035. return this.each(function () {
  3036. var g = a(this);
  3037. var l = a(this).val().length;
  3038. function d() {
  3039. var m = c.maxCharacters - l;
  3040. if (m < 0) {
  3041. m = 0
  3042. }
  3043. g.next("div").html(c.statusText + " :" + m)
  3044. }
  3045. function e() {
  3046. var m = true;
  3047. if (l >= c.maxCharacters) {
  3048. m = false;
  3049. g.addClass(c.notificationClass);
  3050. g.val(g.val().substr(0, c.maxCharacters));
  3051. i()
  3052. } else {
  3053. if (g.hasClass(c.notificationClass)) {
  3054. g.removeClass(c.notificationClass)
  3055. }
  3056. }
  3057. if (c.status) {
  3058. d()
  3059. }
  3060. }
  3061. function i() {
  3062. if (c.showAlert) {
  3063. alert(c.alertText)
  3064. }
  3065. }
  3066. function f() {
  3067. var m = false;
  3068. if (g.is("textarea")) {
  3069. m = true
  3070. } else {
  3071. if (g.filter("input[type=text]")) {
  3072. m = true
  3073. } else {
  3074. if (g.filter("input[type=password]")) {
  3075. m = true
  3076. }
  3077. }
  3078. }
  3079. return m
  3080. }
  3081. if (!f()) {
  3082. return false
  3083. }
  3084. a.each(c.events, function (m, o) {
  3085. g.bind(o, function (n) {
  3086. l = g.val().length;
  3087. e()
  3088. })
  3089. });
  3090. if (c.status) {
  3091. g.after(a("<div/>").addClass(c.statusClass).html("-"));
  3092. d()
  3093. }
  3094. if (!c.status) {
  3095. var h = g.next("div." + c.statusClass);
  3096. if (h) {
  3097. h.remove()
  3098. }
  3099. }
  3100. if (c.slider) {
  3101. g.next().hide();
  3102. g.focus(function () {
  3103. g.next().slideDown("fast")
  3104. });
  3105. g.blur(function () {
  3106. g.next().slideUp("fast")
  3107. })
  3108. }
  3109. })
  3110. }
  3111. })(jQuery);
  3112. var colsDefault = 0;
  3113. var rowsDefault = 5;
  3114. function setDefaultValues(a) {
  3115. colsDefault = a.cols;
  3116. rowsDefault = $(a).attr("rows")
  3117. }
  3118. function bindEvents(a) {
  3119. a.onkeyup = function () {
  3120. grow(a)
  3121. }
  3122. }
  3123. function grow(d) {
  3124. var c = 0;
  3125. var a = d.value.split("\n");
  3126. for (var b = a.length - 1; b >= 0; --b) {
  3127. c += Math.floor((a[b].length / colsDefault) + 1)
  3128. }
  3129. if (c >= rowsDefault) {
  3130. d.rows = c + 1
  3131. } else {
  3132. d.rows = rowsDefault
  3133. }
  3134. }
  3135. jQuery.fn.autoGrow = function () {
  3136. return this.each(function () {
  3137. setDefaultValues(this);
  3138. bindEvents(this)
  3139. })
  3140. };
  3141. function closeProgress() {
  3142. try {
  3143. if (top.progressFlag == 1) {
  3144. top.Dialog.close();
  3145. top.progressFlag = 0
  3146. } else {
  3147. if (top.progressFlag == 2) {
  3148. top.hideSimpleProgress();
  3149. top.progressFlag = 0
  3150. }
  3151. }
  3152. } catch (a) {}
  3153. }
  3154. function _initComplete() {
  3155. try {
  3156. initComplete()
  3157. } catch (a) {}
  3158. }