framework.js 120 KB

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