/hsweb-platform-ui-miniui/src/main/resources/static/ui/plugins/crontool/index.html

https://github.com/hs-web/hsweb-platform · HTML · 737 lines · 723 code · 14 blank · 0 comment · 0 complexity · 627dd4dee373987570467c372edf8b14 MD5 · raw file

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Be Cron - 在线Cron表达式生成器</title>
  5. <meta name="description" content="通过这个生成器,您可以在线生成任务调度比如Quartz的Cron表达式,对Quartz Cron 表达式的可视化双向解析和生成."/>
  6. <meta name="keywords" content="cron creater,generate Cron Expression,Cron Expression online,Quartz Cron Expresssion,cron在线生成工具"/>
  7. <meta name="baidu-tc-cerfication" content="52031c379393b942ce0d59195791f366"/>
  8. <link href="Cron/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
  9. <link href="Cron/themes/icon.css" rel="stylesheet" type="text/css"/>
  10. <link href="Cron/icon.css" rel="stylesheet" type="text/css"/>
  11. <script src="Cron/jquery-1.6.2.min.js" type="text/javascript"></script>
  12. <script src="Cron/jquery.easyui.min.js" type="text/javascript"></script>
  13. <script src="Cron/cron.js" type="text/javascript"></script>
  14. <style type="text/css">
  15. .line {
  16. height: 25px;
  17. line-height: 25px;
  18. margin: 3px;
  19. }
  20. .imp {
  21. padding-left: 25px;
  22. }
  23. .col {
  24. width: 95px;
  25. }
  26. </style>
  27. </head>
  28. <body>
  29. <div class="easyui-layout" style="width:830px;height:460px;margin: auto; border: 1px rgb(202, 196, 196) solid;
  30. border-radius: 5px;">
  31. <div style="height: 100%;">
  32. <div class="easyui-tabs" data-options="fit:true,border:false">
  33. <div title="秒">
  34. <div class="line">
  35. <input type="radio" checked="checked" name="second" onclick="everyTime(this)">
  36. 每秒 允许的通配符[, - * /]
  37. </div>
  38. <div class="line">
  39. <input type="radio" name="second" onclick="cycle(this)">
  40. 周期从
  41. <input class="numberspinner" style="width: 60px;" data-options="min:1,max:58" value="1"
  42. id="secondStart_0">
  43. -
  44. <input class="numberspinner" style="width: 60px;" data-options="min:2,max:59" value="2"
  45. id="secondEnd_0">
  46. </div>
  47. <div class="line">
  48. <input type="radio" name="second" onclick="startOn(this)">
  49. <input class="numberspinner" style="width: 60px;" data-options="min:0,max:59" value="0"
  50. id="secondStart_1">
  51. 秒开始,
  52. <input class="numberspinner" style="width: 60px;" data-options="min:1,max:59" value="1"
  53. id="secondEnd_1">
  54. 秒执行一次
  55. </div>
  56. <div class="line">
  57. <input type="radio" name="second" id="sencond_appoint">
  58. 指定
  59. </div>
  60. <div class="imp secondList">
  61. <input type="checkbox" value="1">01
  62. <input type="checkbox" value="2">02
  63. <input type="checkbox" value="3">03
  64. <input type="checkbox" value="4">04
  65. <input type="checkbox" value="5">05
  66. <input type="checkbox" value="6">06
  67. <input type="checkbox" value="7">07
  68. <input type="checkbox" value="8">08
  69. <input type="checkbox" value="9">09
  70. <input type="checkbox" value="10">10
  71. </div>
  72. <div class="imp secondList">
  73. <input type="checkbox" value="11">11
  74. <input type="checkbox" value="12">12
  75. <input type="checkbox" value="13">13
  76. <input type="checkbox" value="14">14
  77. <input type="checkbox" value="15">15
  78. <input type="checkbox" value="16">16
  79. <input type="checkbox" value="17">17
  80. <input type="checkbox" value="18">18
  81. <input type="checkbox" value="19">19
  82. <input type="checkbox" value="20">20
  83. </div>
  84. <div class="imp secondList">
  85. <input type="checkbox" value="21">21
  86. <input type="checkbox" value="22">22
  87. <input type="checkbox" value="23">23
  88. <input type="checkbox" value="24">24
  89. <input type="checkbox" value="25">25
  90. <input type="checkbox" value="26">26
  91. <input type="checkbox" value="27">27
  92. <input type="checkbox" value="28">28
  93. <input type="checkbox" value="29">29
  94. <input type="checkbox" value="30">30
  95. </div>
  96. <div class="imp secondList">
  97. <input type="checkbox" value="31">31
  98. <input type="checkbox" value="32">32
  99. <input type="checkbox" value="33">33
  100. <input type="checkbox" value="34">34
  101. <input type="checkbox" value="35">35
  102. <input type="checkbox" value="36">36
  103. <input type="checkbox" value="37">37
  104. <input type="checkbox" value="38">38
  105. <input type="checkbox" value="39">39
  106. <input type="checkbox" value="40">40
  107. </div>
  108. <div class="imp secondList">
  109. <input type="checkbox" value="41">41
  110. <input type="checkbox" value="42">42
  111. <input type="checkbox" value="43">43
  112. <input type="checkbox" value="44">44
  113. <input type="checkbox" value="45">45
  114. <input type="checkbox" value="46">46
  115. <input type="checkbox" value="47">47
  116. <input type="checkbox" value="48">48
  117. <input type="checkbox" value="49">49
  118. <input type="checkbox" value="50">50
  119. </div>
  120. <div class="imp secondList">
  121. <input type="checkbox" value="51">51
  122. <input type="checkbox" value="52">52
  123. <input type="checkbox" value="53">53
  124. <input type="checkbox" value="54">54
  125. <input type="checkbox" value="55">55
  126. <input type="checkbox" value="56">56
  127. <input type="checkbox" value="57">57
  128. <input type="checkbox" value="58">58
  129. <input type="checkbox" value="59">59
  130. </div>
  131. </div>
  132. <div title="分钟">
  133. <div class="line">
  134. <input type="radio" checked="checked" name="min" onclick="everyTime(this)">
  135. 分钟 允许的通配符[, - * /]
  136. </div>
  137. <div class="line">
  138. <input type="radio" name="min" onclick="cycle(this)">
  139. 周期从
  140. <input class="numberspinner" style="width: 60px;" data-options="min:1,max:58" value="1"
  141. id="minStart_0">
  142. -
  143. <input class="numberspinner" style="width: 60px;" data-options="min:2,max:59" value="2"
  144. id="minEnd_0">
  145. 分钟
  146. </div>
  147. <div class="line">
  148. <input type="radio" name="min" onclick="startOn(this)">
  149. <input class="numberspinner" style="width: 60px;" data-options="min:0,max:59" value="0"
  150. id="minStart_1">
  151. 分钟开始,
  152. <input class="numberspinner" style="width: 60px;" data-options="min:1,max:59" value="1"
  153. id="minEnd_1">
  154. 分钟执行一次
  155. </div>
  156. <div class="line">
  157. <input type="radio" name="min" id="min_appoint">
  158. 指定
  159. </div>
  160. <div class="imp minList">
  161. <input type="checkbox" value="1">01
  162. <input type="checkbox" value="2">02
  163. <input type="checkbox" value="3">03
  164. <input type="checkbox" value="4">04
  165. <input type="checkbox" value="5">05
  166. <input type="checkbox" value="6">06
  167. <input type="checkbox" value="7">07
  168. <input type="checkbox" value="8">08
  169. <input type="checkbox" value="9">09
  170. <input type="checkbox" value="10">10
  171. </div>
  172. <div class="imp minList">
  173. <input type="checkbox" value="11">11
  174. <input type="checkbox" value="12">12
  175. <input type="checkbox" value="13">13
  176. <input type="checkbox" value="14">14
  177. <input type="checkbox" value="15">15
  178. <input type="checkbox" value="16">16
  179. <input type="checkbox" value="17">17
  180. <input type="checkbox" value="18">18
  181. <input type="checkbox" value="19">19
  182. <input type="checkbox" value="20">20
  183. </div>
  184. <div class="imp minList">
  185. <input type="checkbox" value="21">21
  186. <input type="checkbox" value="22">22
  187. <input type="checkbox" value="23">23
  188. <input type="checkbox" value="24">24
  189. <input type="checkbox" value="25">25
  190. <input type="checkbox" value="26">26
  191. <input type="checkbox" value="27">27
  192. <input type="checkbox" value="28">28
  193. <input type="checkbox" value="29">29
  194. <input type="checkbox" value="30">30
  195. </div>
  196. <div class="imp minList">
  197. <input type="checkbox" value="31">31
  198. <input type="checkbox" value="32">32
  199. <input type="checkbox" value="33">33
  200. <input type="checkbox" value="34">34
  201. <input type="checkbox" value="35">35
  202. <input type="checkbox" value="36">36
  203. <input type="checkbox" value="37">37
  204. <input type="checkbox" value="38">38
  205. <input type="checkbox" value="39">39
  206. <input type="checkbox" value="40">40
  207. </div>
  208. <div class="imp minList">
  209. <input type="checkbox" value="41">41
  210. <input type="checkbox" value="42">42
  211. <input type="checkbox" value="43">43
  212. <input type="checkbox" value="44">44
  213. <input type="checkbox" value="45">45
  214. <input type="checkbox" value="46">46
  215. <input type="checkbox" value="47">47
  216. <input type="checkbox" value="48">48
  217. <input type="checkbox" value="49">49
  218. <input type="checkbox" value="50">50
  219. </div>
  220. <div class="imp minList">
  221. <input type="checkbox" value="51">51
  222. <input type="checkbox" value="52">52
  223. <input type="checkbox" value="53">53
  224. <input type="checkbox" value="54">54
  225. <input type="checkbox" value="55">55
  226. <input type="checkbox" value="56">56
  227. <input type="checkbox" value="57">57
  228. <input type="checkbox" value="58">58
  229. <input type="checkbox" value="59">59
  230. </div>
  231. </div>
  232. <div title="小时">
  233. <div class="line">
  234. <input type="radio" checked="checked" name="hour" onclick="everyTime(this)">
  235. 小时 允许的通配符[, - * /]
  236. </div>
  237. <div class="line">
  238. <input type="radio" name="hour" onclick="cycle(this)">
  239. 周期从
  240. <input class="numberspinner" style="width: 60px;" data-options="min:0,max:23" value="0"
  241. id="hourStart_0">
  242. -
  243. <input class="numberspinner" style="width: 60px;" data-options="min:2,max:23" value="2"
  244. id="hourEnd_1">
  245. 小时
  246. </div>
  247. <div class="line">
  248. <input type="radio" name="hour" onclick="startOn(this)">
  249. <input class="numberspinner" style="width: 60px;" data-options="min:0,max:23" value="0"
  250. id="hourStart_1">
  251. 小时开始,
  252. <input class="numberspinner" style="width: 60px;" data-options="min:1,max:23" value="1"
  253. id="hourEnd_1">
  254. 小时执行一次
  255. </div>
  256. <div class="line">
  257. <input type="radio" name="hour" id="hour_appoint">
  258. 指定
  259. </div>
  260. <div class="imp hourList">
  261. AM:
  262. <input type="checkbox" value="0">00
  263. <input type="checkbox" value="1">01
  264. <input type="checkbox" value="2">02
  265. <input type="checkbox" value="3">03
  266. <input type="checkbox" value="4">04
  267. <input type="checkbox" value="5">05
  268. <input type="checkbox" value="6">06
  269. <input type="checkbox" value="7">07
  270. <input type="checkbox" value="8">08
  271. <input type="checkbox" value="9">09
  272. <input type="checkbox" value="10">10
  273. <input type="checkbox" value="11">11
  274. </div>
  275. <div class="imp hourList">
  276. PM:
  277. <input type="checkbox" value="12">12
  278. <input type="checkbox" value="13">13
  279. <input type="checkbox" value="14">14
  280. <input type="checkbox" value="15">15
  281. <input type="checkbox" value="16">16
  282. <input type="checkbox" value="17">17
  283. <input type="checkbox" value="18">18
  284. <input type="checkbox" value="19">19
  285. <input type="checkbox" value="20">20
  286. <input type="checkbox" value="21">21
  287. <input type="checkbox" value="22">22
  288. <input type="checkbox" value="23">23
  289. </div>
  290. </div>
  291. <div title="日">
  292. <div class="line">
  293. <input type="radio" checked="checked" name="day" onclick="everyTime(this)">
  294. 允许的通配符[, - * / L W]
  295. </div>
  296. <div class="line">
  297. <input type="radio" name="day" onclick="unAppoint(this)">
  298. 不指定
  299. </div>
  300. <div class="line">
  301. <input type="radio" name="day" onclick="cycle(this)">
  302. 周期从
  303. <input class="numberspinner" style="width: 60px;" data-options="min:1,max:31" value="1"
  304. id="dayStart_0">
  305. -
  306. <input class="numberspinner" style="width: 60px;" data-options="min:2,max:31" value="2"
  307. id="dayEnd_0">
  308. </div>
  309. <div class="line">
  310. <input type="radio" name="day" onclick="startOn(this)">
  311. <input class="numberspinner" style="width: 60px;" data-options="min:1,max:31" value="1"
  312. id="dayStart_1">
  313. 日开始,
  314. <input class="numberspinner" style="width: 60px;" data-options="min:1,max:31" value="1"
  315. id="dayEnd_1">
  316. 天执行一次
  317. </div>
  318. <div class="line">
  319. <input type="radio" name="day" onclick="workDay(this)">
  320. 每月
  321. <input class="numberspinner" style="width: 60px;" data-options="min:1,max:31" value="1"
  322. id="dayStart_2">
  323. 号最近的那个工作日
  324. </div>
  325. <div class="line">
  326. <input type="radio" name="day" onclick="lastDay(this)">
  327. 本月最后一天
  328. </div>
  329. <div class="line">
  330. <input type="radio" name="day" id="day_appoint">
  331. 指定
  332. </div>
  333. <div class="imp dayList">
  334. <input type="checkbox" value="1">1
  335. <input type="checkbox" value="2">2
  336. <input type="checkbox" value="3">3
  337. <input type="checkbox" value="4">4
  338. <input type="checkbox" value="5">5
  339. <input type="checkbox" value="6">6
  340. <input type="checkbox" value="7">7
  341. <input type="checkbox" value="8">8
  342. <input type="checkbox" value="9">9
  343. <input type="checkbox" value="10">10
  344. <input type="checkbox" value="11">11
  345. <input type="checkbox" value="12">12
  346. <input type="checkbox" value="13">13
  347. <input type="checkbox" value="14">14
  348. <input type="checkbox" value="15">15
  349. <input type="checkbox" value="16">16
  350. </div>
  351. <div class="imp dayList">
  352. <input type="checkbox" value="17">17
  353. <input type="checkbox" value="18">18
  354. <input type="checkbox" value="19">19
  355. <input type="checkbox" value="20">20
  356. <input type="checkbox" value="21">21
  357. <input type="checkbox" value="22">22
  358. <input type="checkbox" value="23">23
  359. <input type="checkbox" value="24">24
  360. <input type="checkbox" value="25">25
  361. <input type="checkbox" value="26">26
  362. <input type="checkbox" value="27">27
  363. <input type="checkbox" value="28">28
  364. <input type="checkbox" value="29">29
  365. <input type="checkbox" value="30">30
  366. <input type="checkbox" value="31">31
  367. </div>
  368. </div>
  369. <div title="月">
  370. <div class="line">
  371. <input type="radio" checked="checked" name="mouth" onclick="everyTime(this)">
  372. 允许的通配符[, - * /]
  373. </div>
  374. <div class="line">
  375. <input type="radio" name="mouth" onclick="unAppoint(this)">
  376. 不指定
  377. </div>
  378. <div class="line">
  379. <input type="radio" name="mouth" onclick="cycle(this)">
  380. 周期从
  381. <input class="numberspinner" style="width: 60px;" data-options="min:1,max:12" value="1"
  382. id="mouthStart_0">
  383. -
  384. <input class="numberspinner" style="width: 60px;" data-options="min:2,max:12" value="2"
  385. id="mouthEnd_0">
  386. </div>
  387. <div class="line">
  388. <input type="radio" name="mouth" onclick="startOn(this)">
  389. <input class="numberspinner" style="width: 60px;" data-options="min:1,max:12" value="1"
  390. id="mouthStart_1">
  391. 日开始,
  392. <input class="numberspinner" style="width: 60px;" data-options="min:1,max:12" value="1"
  393. id="mouthEnd_1">
  394. 月执行一次
  395. </div>
  396. <div class="line">
  397. <input type="radio" name="mouth" id="mouth_appoint">
  398. 指定
  399. </div>
  400. <div class="imp mouthList">
  401. <input type="checkbox" value="1">1
  402. <input type="checkbox" value="2">2
  403. <input type="checkbox" value="3">3
  404. <input type="checkbox" value="4">4
  405. <input type="checkbox" value="5">5
  406. <input type="checkbox" value="6">6
  407. <input type="checkbox" value="7">7
  408. <input type="checkbox" value="8">8
  409. <input type="checkbox" value="9">9
  410. <input type="checkbox" value="10">10
  411. <input type="checkbox" value="11">11
  412. <input type="checkbox" value="12">12
  413. </div>
  414. </div>
  415. <div title="周">
  416. <div class="line">
  417. <input type="radio" checked="checked" name="week" onclick="everyTime(this)">
  418. 允许的通配符[, - * / L #]
  419. </div>
  420. <div class="line">
  421. <input type="radio" name="week" onclick="unAppoint(this)">
  422. 不指定
  423. </div>
  424. <div class="line">
  425. <input type="radio" name="week" onclick="startOn(this)">
  426. 周期 从星期<input class="numberspinner" style="width: 60px;" data-options="min:1,max:7"
  427. id="weekStart_0" value="1">
  428. -
  429. <input class="numberspinner" style="width: 60px;" data-options="min:2,max:7" value="2"
  430. id="weekEnd_0"></div>
  431. <div class="line">
  432. <input type="radio" name="week" onclick="weekOfDay(this)">
  433. <input class="numberspinner" style="width: 60px;" data-options="min:1,max:4" value="1"
  434. id="weekStart_1">
  435. 的星期<input class="numberspinner" style="width: 60px;" data-options="min:1,max:7"
  436. id="weekEnd_1" value="1"></div>
  437. <div class="line">
  438. <input type="radio" name="week" onclick="lastWeek(this)">
  439. 本月最后一个星期<input class="numberspinner" style="width: 60px;" data-options="min:1,max:7"
  440. id="weekStart_2" value="1"></div>
  441. <div class="line">
  442. <input type="radio" name="week" id="week_appoint">
  443. 指定
  444. </div>
  445. <div class="imp weekList">
  446. <input type="checkbox" value="1">1
  447. <input type="checkbox" value="2">2
  448. <input type="checkbox" value="3">3
  449. <input type="checkbox" value="4">4
  450. <input type="checkbox" value="5">5
  451. <input type="checkbox" value="6">6
  452. <input type="checkbox" value="7">7
  453. </div>
  454. </div>
  455. <div title="年">
  456. <div class="line">
  457. <input type="radio" checked="checked" name="year" onclick="unAppoint(this)">
  458. 不指定 允许的通配符[, - * /] 非必填
  459. </div>
  460. <div class="line">
  461. <input type="radio" name="year" onclick="everyTime(this)">
  462. 每年
  463. </div>
  464. <div class="line">
  465. <input type="radio" name="year" onclick="cycle(this)">周期
  466. <input class="numberspinner" style="width: 90px;" data-options="min:2013,max:3000"
  467. id="yearStart_0" value="2013">
  468. -
  469. <input class="numberspinner" style="width: 90px;" data-options="min:2014,max:3000"
  470. id="yearEnd_0" value="2014"></div>
  471. </div>
  472. </div>
  473. </div>
  474. <div data-options="region:'south',border:false" style="height:150px">
  475. <fieldset style="border-radius: 3px; height: 116px;">
  476. <legend>表达式</legend>
  477. <table style="height: 100px;">
  478. <tbody>
  479. <tr>
  480. <td>
  481. </td>
  482. <td align="center">
  483. </td>
  484. <td align="center">
  485. 分钟
  486. </td>
  487. <td align="center">
  488. 小时
  489. </td>
  490. <td align="center">
  491. </td>
  492. <td align="center">
  493. <br/>
  494. </td>
  495. <td align="center">
  496. 星期
  497. </td>
  498. <td align="center">
  499. </td>
  500. </tr>
  501. <tr>
  502. <td>
  503. 表达式字段:
  504. </td>
  505. <td>
  506. <input type="text" name="v_second" class="col" value="*" readonly="readonly"/>
  507. </td>
  508. <td>
  509. <input type="text" name="v_min" class="col" value="*" readonly="readonly"/>
  510. </td>
  511. <td>
  512. <input type="text" name="v_hour" class="col" value="*" readonly="readonly"/>
  513. </td>
  514. <td>
  515. <input type="text" name="v_day" class="col" value="*" readonly="readonly"/>
  516. </td>
  517. <td>
  518. <input type="text" name="v_mouth" class="col" value="*" readonly="readonly"/>
  519. </td>
  520. <td>
  521. <input type="text" name="v_week" class="col" value="?" readonly="readonly"/>
  522. </td>
  523. <td>
  524. <input type="text" name="v_year" class="col" readonly="readonly"/>
  525. </td>
  526. </tr>
  527. <tr>
  528. <td>Cron 表达式:</td>
  529. <td colspan="5"><input type="text" name="cron" style="width: 100%;" value="* * * * * ?" id="cron"
  530. /></td>
  531. <td colspan="2">
  532. <input type="button" value="反解析到UI" id="btnFan" onclick="btnFan()"/>
  533. <input type="button" value="确定选择" id="ok" onclick="ok()"/>
  534. </td>
  535. </tr>
  536. </tbody>
  537. </table>
  538. </fieldset>
  539. <div style="text-align: center; margin-top: 5px;">
  540. <script type="text/javascript">
  541. /*killIe*/
  542. $.parser.parse($("body"));
  543. var cpro_id = "u1331261";
  544. function btnFan() {
  545. //获取参数中表达式的值
  546. var txt = $("#cron").val();
  547. if (txt) {
  548. var regs = txt.split(' ');
  549. $("input[name=v_second]").val(regs[0]);
  550. $("input[name=v_min]").val(regs[1]);
  551. $("input[name=v_hour]").val(regs[2]);
  552. $("input[name=v_day]").val(regs[3]);
  553. $("input[name=v_mouth]").val(regs[4]);
  554. $("input[name=v_week]").val(regs[5]);
  555. initObj(regs[0], "second");
  556. initObj(regs[1], "min");
  557. initObj(regs[2], "hour");
  558. initDay(regs[3]);
  559. initMonth(regs[4]);
  560. initWeek(regs[5]);
  561. if (regs.length > 6) {
  562. $("input[name=v_year]").val(regs[6]);
  563. initYear(regs[6]);
  564. }
  565. }
  566. }
  567. function initObj(strVal, strid) {
  568. var ary = null;
  569. var objRadio = $("input[name='" + strid + "'");
  570. if (strVal == "*") {
  571. objRadio.eq(0).attr("checked", "checked");
  572. } else if (strVal.split('-').length > 1) {
  573. ary = strVal.split('-');
  574. objRadio.eq(1).attr("checked", "checked");
  575. $("#" + strid + "Start_0").numberspinner('setValue', ary[0]);
  576. $("#" + strid + "End_0").numberspinner('setValue', ary[1]);
  577. } else if (strVal.split('/').length > 1) {
  578. ary = strVal.split('/');
  579. objRadio.eq(2).attr("checked", "checked");
  580. $("#" + strid + "Start_1").numberspinner('setValue', ary[0]);
  581. $("#" + strid + "End_1").numberspinner('setValue', ary[1]);
  582. } else {
  583. objRadio.eq(3).attr("checked", "checked");
  584. if (strVal != "?") {
  585. ary = strVal.split(",");
  586. for (var i = 0; i < ary.length; i++) {
  587. $("." + strid + "List input[value='" + ary[i] + "']").attr("checked", "checked");
  588. }
  589. }
  590. }
  591. }
  592. function initDay(strVal) {
  593. var ary = null;
  594. var objRadio = $("input[name='day']");
  595. if (strVal == "*") {
  596. objRadio.eq(0).attr("checked", "checked");
  597. } else if (strVal == "?") {
  598. objRadio.eq(1).attr("checked", "checked");
  599. } else if (strVal.split('-').length > 1) {
  600. ary = strVal.split('-');
  601. objRadio.eq(2).attr("checked", "checked");
  602. $("#dayStart_0").numberspinner('setValue', ary[0]);
  603. $("#dayEnd_0").numberspinner('setValue', ary[1]);
  604. } else if (strVal.split('/').length > 1) {
  605. ary = strVal.split('/');
  606. objRadio.eq(3).attr("checked", "checked");
  607. $("#dayStart_1").numberspinner('setValue', ary[0]);
  608. $("#dayEnd_1").numberspinner('setValue', ary[1]);
  609. } else if (strVal.split('W').length > 1) {
  610. ary = strVal.split('W');
  611. objRadio.eq(4).attr("checked", "checked");
  612. $("#dayStart_2").numberspinner('setValue', ary[0]);
  613. } else if (strVal == "L") {
  614. objRadio.eq(5).attr("checked", "checked");
  615. } else {
  616. objRadio.eq(6).attr("checked", "checked");
  617. ary = strVal.split(",");
  618. for (var i = 0; i < ary.length; i++) {
  619. $(".dayList input[value='" + ary[i] + "']").attr("checked", "checked");
  620. }
  621. }
  622. }
  623. function initMonth(strVal) {
  624. var ary = null;
  625. var objRadio = $("input[name='mouth']");
  626. if (strVal == "*") {
  627. objRadio.eq(0).attr("checked", "checked");
  628. } else if (strVal == "?") {
  629. objRadio.eq(1).attr("checked", "checked");
  630. } else if (strVal.split('-').length > 1) {
  631. ary = strVal.split('-');
  632. objRadio.eq(2).attr("checked", "checked");
  633. $("#mouthStart_0").numberspinner('setValue', ary[0]);
  634. $("#mouthEnd_0").numberspinner('setValue', ary[1]);
  635. } else if (strVal.split('/').length > 1) {
  636. ary = strVal.split('/');
  637. objRadio.eq(3).attr("checked", "checked");
  638. $("#mouthStart_1").numberspinner('setValue', ary[0]);
  639. $("#mouthEnd_1").numberspinner('setValue', ary[1]);
  640. } else {
  641. objRadio.eq(4).attr("checked", "checked");
  642. ary = strVal.split(",");
  643. for (var i = 0; i < ary.length; i++) {
  644. $(".mouthList input[value='" + ary[i] + "']").attr("checked", "checked");
  645. }
  646. }
  647. }
  648. function initWeek(strVal) {
  649. var ary = null;
  650. var objRadio = $("input[name='week']");
  651. if (strVal == "*") {
  652. objRadio.eq(0).attr("checked", "checked");
  653. } else if (strVal == "?") {
  654. objRadio.eq(1).attr("checked", "checked");
  655. } else if (strVal.split('/').length > 1) {
  656. ary = strVal.split('/');
  657. objRadio.eq(2).attr("checked", "checked");
  658. $("#weekStart_0").numberspinner('setValue', ary[0]);
  659. $("#weekEnd_0").numberspinner('setValue', ary[1]);
  660. } else if (strVal.split('-').length > 1) {
  661. ary = strVal.split('-');
  662. objRadio.eq(3).attr("checked", "checked");
  663. $("#weekStart_1").numberspinner('setValue', ary[0]);
  664. $("#weekEnd_1").numberspinner('setValue', ary[1]);
  665. } else if (strVal.split('L').length > 1) {
  666. ary = strVal.split('L');
  667. objRadio.eq(4).attr("checked", "checked");
  668. $("#weekStart_2").numberspinner('setValue', ary[0]);
  669. } else {
  670. objRadio.eq(5).attr("checked", "checked");
  671. ary = strVal.split(",");
  672. for (var i = 0; i < ary.length; i++) {
  673. $(".weekList input[value='" + ary[i] + "']").attr("checked", "checked");
  674. }
  675. }
  676. }
  677. function initYear(strVal) {
  678. var ary = null;
  679. var objRadio = $("input[name='year']");
  680. if (strVal == "*") {
  681. objRadio.eq(1).attr("checked", "checked");
  682. } else if (strVal.split('-').length > 1) {
  683. ary = strVal.split('-');
  684. objRadio.eq(2).attr("checked", "checked");
  685. $("#yearStart_0").numberspinner('setValue', ary[0]);
  686. $("#yearEnd_0").numberspinner('setValue', ary[1]);
  687. }
  688. }
  689. </script>
  690. <div>
  691. </div>
  692. </div>
  693. </div>
  694. <div>
  695. </div>
  696. </div>
  697. </body>
  698. </html>
  699. <script type="text/javascript">
  700. function ok() {
  701. var cron = $('#cron').val();
  702. closeWindow(cron);
  703. }
  704. window.setCron = function (cron) {
  705. $('#cron').val(cron);
  706. btnFan();
  707. }
  708. function closeWindow(action) {
  709. if (window.CloseOwnerWindow) return window.CloseOwnerWindow(action);
  710. else window.close();
  711. }
  712. </script>