rss.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="Cache-Control" content="no-siteapp" />
  9. <!--[if lt IE 9]>
  10. <script type="text/javascript" src="${ctx}/assets/lib/html5.js"></script>
  11. <script type="text/javascript" src="${ctx}/assets/lib/respond.min.js"></script>
  12. <script type="text/javascript" src="${ctx}/assets/lib/PIE_IE678.js"></script>
  13. <![endif]-->
  14. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui/css/H-ui.min.css" />
  15. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/H-ui.admin.css" />
  16. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/Hui-iconfont/1.0.7/iconfont.css" />
  17. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/icheck/icheck.css" />
  18. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/skin/default/skin.css" id="skin" />
  19. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/style.css" />
  20. <script type="text/ecmascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.js"></script>
  21. <script type="text/javascript" src="${ctx}/assets/static/h-ui/js/H-ui.js"></script>
  22. <script type="text/javascript" src="${ctx}/assets/lib/layer/3.0.3/layer.js"></script>
  23. <link type="text/css" href="${ctx}/assets/lib/codemirror/lib/codemirror.css" rel="stylesheet" />
  24. <script type="text/javascript" src="${ctx}/assets/lib/codemirror/lib/codemirror.js"></script>
  25. <script src="${ctx}/assets/lib/codemirror/mode/xml/xml.js"></script>
  26. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/webuploader/0.1.5/webuploader.css">
  27. <script type="text/javascript" src="${ctx}/assets/lib/webuploader/0.1.5/webuploader.js"></script>
  28. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
  29. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqgrid/css/ui.jqgrid.css" />
  30. <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
  31. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/i18n/grid.locale-cn.js"></script>
  32. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/jquery.jqGrid.min.js"></script>
  33. <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
  34. <!--[if IE 6]>
  35. <script type="text/javascript" src="${ctx}/assets/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
  36. <script>DD_belatedPNG.fix('*');</script>
  37. <![endif]-->
  38. <style type="text/css">
  39. .CodeMirror {
  40. border: 1px solid #eee;
  41. height: auto;
  42. }
  43. </style>
  44. <script type="text/javascript">
  45. $(function() {
  46. $(window).resize(function(){
  47. $("#jqGridGroup").setGridWidth($(window).width()-40); 
  48. $("#jqGrid").setGridWidth($(window).width()-40);
  49. });
  50. $("#jqGridGroup").jqGrid({
  51. url : '${ctx}/myconsole/rssgroup/getByPage',
  52. editurl:"${ctx}/myconsole/rssgroup/saveOrUpdate2",
  53. mtype : "POST",
  54. datatype : "json",
  55. sortname: 'sortid',
  56. caption:'订阅组管理',
  57. prmNames : {
  58. id: "keyid", 
  59. oper:"oper",    
  60. addoper:"add",
  61. editoper:"edit",
  62. deloper:"del" 
  63. },
  64. colModel : [ {
  65. label : '订阅组编号',
  66. name : 'keyid',
  67. hidden : true,
  68. key : true,
  69. width : 80
  70. }, {
  71. label : '订阅组名称',
  72. name : 'groupname',
  73. editable: true,
  74. width : 80,
  75. formoptions:{
  76. elmsuffix:'*'
  77. },
  78. editoptions: {
  79. maxlength: 15
  80. },
  81. editrules:{required:true}
  82. }, {
  83. label : '排序值',
  84. name : 'sortid',
  85. editable: true,
  86. width : 80,
  87. align:"center",
  88. formoptions:{
  89. elmsuffix:'*'
  90. },
  91. editoptions: {
  92. maxlength: 15
  93. },
  94. editrules:{required:true,integer:true}
  95. }, {
  96. label : '更新时间',
  97. name : 'updatetime',
  98. editable: false,
  99. width : 80
  100. }],
  101. rownumbers : true,//添加左侧行号
  102. viewrecords : true,//是否在浏览导航栏显示记录总数
  103. rowNum : 10,//每页显示记录数
  104. rowList : [10,15,20,30,40,50 ],//用于改变显示行数的下拉列表框的元素数组。
  105. autowidth : true,
  106. height : 'auto',
  107. onSelectRow : function( rowid ) {
  108. if(rowid.length>10){
  109. var row = $(this).getRowData(rowid);
  110. $("#jqGrid").setColProp('rssgroupkeyid',{editoptions:{value:rowid+":a"}});
  111. $("#jqGrid").setCaption("订阅管理--"+row.groupname);
  112. $("#jqGrid").jqGrid('setGridParam',{url: "${ctx}/myconsole/rss/getByPage?rssGroupKeyID="+rowid});
  113. $("#jqGrid").trigger("reloadGrid");
  114. }
  115. },
  116. pager : "#jqGridPagerGroup"
  117. });
  118. $('#jqGridGroup').navGrid('#jqGridPagerGroup',
  119. // the buttons to appear on the toolbar of the grid
  120. {
  121. edit : true,
  122. add : true,
  123. del : true,
  124. search : true,
  125. refresh : true,
  126. view : false,
  127. position : "left",
  128. cloneToTop : true
  129. },
  130. // options for the Edit Dialog
  131. {
  132. recreateForm : true,
  133. checkOnUpdate : true,
  134. checkOnSubmit : true,
  135. closeAfterEdit : true,
  136. onInitializeForm:function(formid) {
  137. },
  138. serializeEditData: function(postdata) {
  139. //myconsole.log(postdata);
  140. $.each(postdata,function (index, value) {
  141. //myconsole.log(index);
  142. if(index!="jqGrid_id" && index!="oper" && index!="id"){
  143. modifyJosnKey(postdata,index,"rssGroup."+index);
  144. }
  145. if(index=="id"){
  146. postdata["rssGroup."+index]=value;
  147. }
  148. })
  149. //myconsole.log(postdata);
  150. return postdata;
  151. },
  152. afterSubmit: function(r, data) {
  153. var messageString = r.responseText;
  154. var mesObj = eval('(' + messageString + ')');
  155. return [mesObj.state, mesObj.msg];
  156. },
  157. errorTextFormat : function(data) {
  158. return 'Error: ' + data.responseText;
  159. }
  160. },
  161. // options for the Add Dialog
  162. {
  163. closeAfterAdd : true,
  164. recreateForm : true,
  165. beforeSubmit: function(postdata, formid){
  166. $.each(postdata,function (index, value) {
  167. if(index!="jqGrid_id" && index!="oper"){
  168. modifyJosnKey(postdata,index,"rssGroup."+index);
  169. }
  170. })
  171. return[true,''];
  172. },
  173. afterSubmit: function(r, data) {
  174. var messageString = r.responseText;
  175. var mesObj = eval('(' + messageString + ')');
  176. return [mesObj.state, mesObj.msg];
  177. },
  178. errorTextFormat : function(data) {
  179. return 'Error: ' + data.responseText;
  180. }
  181. },
  182. // options for the Delete Dailog
  183. {
  184. errorTextFormat : function(data) {
  185. return 'Error: ' + data.responseText;
  186. }
  187. },{
  188. // search options 这里支持多条件查询
  189. multipleSearch: true,
  190. sopt:['eq','ne','cn','nc','lt','le','gt','ge'],
  191. afterSubmit: function(r, data) {
  192. var messageString = r.responseText;
  193. var mesObj = eval('(' + messageString + ')');
  194. return [mesObj.state, mesObj.message];
  195. }
  196. }
  197. );
  198. ///////////////////////////////////////////
  199. $("#jqGrid").jqGrid({
  200. url : '${ctx}/myconsole/rss/getByPage',
  201. editurl:"${ctx}/myconsole/rss/saveOrUpdate",
  202. mtype : "POST",
  203. datatype : "json",
  204. sortname: 'sortid',
  205. caption:'订阅管理',
  206. prmNames : {
  207. id: "keyid", 
  208. oper:"oper",    
  209. addoper:"add",
  210. editoper:"edit",
  211. deloper:"del" 
  212. },
  213. colModel : [ {
  214. label : '订阅编号',
  215. name : 'keyid',
  216. hidden : true,
  217. key : true,
  218. width : 50
  219. }, {
  220. label : '订阅组编号',
  221. name : 'rssgroupkeyid',
  222. hidden : true,
  223. editable : true,
  224. edittype :"select",
  225. editoptions:{value:"a:a"}
  226. }, {
  227. label : '订阅名称',
  228. name : 'rssname',
  229. editable: true,
  230. width : 80,
  231. formoptions:{
  232. elmsuffix:'*'
  233. },
  234. editoptions: {
  235. maxlength: 15
  236. },
  237. editrules:{required:true}
  238. }, {
  239. label : '订阅描述',
  240. name : 'rssdesc',
  241. editable: true,
  242. width : 80,
  243. formoptions:{
  244. elmsuffix:'*'
  245. },
  246. editoptions: {
  247. maxlength: 15
  248. },
  249. editrules:{required:true}
  250. },{
  251. label : '选择栏目',
  252. name : 'columnid',
  253. editable: true,
  254. width : 50,
  255. editrules:{required:true},
  256. edittype :"select",
  257. formatter:"select",
  258. editoptions:{value:"${columnOptions}"},
  259. formoptions:{
  260. elmsuffix:'*'
  261. },
  262. editrules:{required:true}
  263. }, {
  264. label : '排序值',
  265. name : 'sortid',
  266. editable: true,
  267. width : 80,
  268. align:"center",
  269. formoptions:{
  270. elmsuffix:'*'
  271. },
  272. editoptions: {
  273. maxlength: 15
  274. },
  275. editrules:{required:true,integer:true}
  276. }, {
  277. label : '更新时间',
  278. name : 'updatetime',
  279. editable: false,
  280. width : 80
  281. }],
  282. rownumbers : true,//添加左侧行号
  283. viewrecords : true,//是否在浏览导航栏显示记录总数
  284. rowNum : 10,//每页显示记录数
  285. rowList : [10,15,20,30,40,50 ],//用于改变显示行数的下拉列表框的元素数组。
  286. autowidth : true,
  287. height : 'auto',
  288. pager : "#jqGridPager"
  289. });
  290. $('#jqGrid').navGrid('#jqGridPager',
  291. //the buttons to appear on the toolbar of the grid
  292. {
  293. edit : true,
  294. add : true,
  295. del : true,
  296. search : true,
  297. refresh : true,
  298. view : false,
  299. position : "left",
  300. cloneToTop : true
  301. },
  302. //options for the Edit Dialog
  303. {
  304. recreateForm : true,
  305. checkOnUpdate : true,
  306. checkOnSubmit : true,
  307. closeAfterEdit : true,
  308. onInitializeForm:function(formid) {
  309. },
  310. serializeEditData: function(postdata) {
  311. //myconsole.log(postdata);
  312. $.each(postdata,function (index, value) {
  313. //myconsole.log(index);
  314. if(index!="jqGrid_id" && index!="oper" && index!="id"){
  315. modifyJosnKey(postdata,index,"rss."+index);
  316. }
  317. if(index=="id"){
  318. postdata["rss."+index]=value;
  319. }
  320. })
  321. //myconsole.log(postdata);
  322. return postdata;
  323. },
  324. afterSubmit: function(r, data) {
  325. var messageString = r.responseText;
  326. var mesObj = eval('(' + messageString + ')');
  327. return [mesObj.state, mesObj.msg];
  328. },
  329. errorTextFormat : function(data) {
  330. return 'Error: ' + data.responseText;
  331. }
  332. },
  333. //options for the Add Dialog
  334. {
  335. closeAfterAdd : true,
  336. recreateForm : true,
  337. beforeSubmit: function(postdata, formid){
  338. $.each(postdata,function (index, value) {
  339. if(index!="jqGrid_id" && index!="oper"){
  340. modifyJosnKey(postdata,index,"rss."+index);
  341. }
  342. })
  343. return[true,''];
  344. },
  345. afterSubmit: function(r, data) {
  346. var messageString = r.responseText;
  347. var mesObj = eval('(' + messageString + ')');
  348. return [mesObj.state, mesObj.msg];
  349. },
  350. errorTextFormat : function(data) {
  351. return 'Error: ' + data.responseText;
  352. }
  353. },
  354. //options for the Delete Dailog
  355. {
  356. errorTextFormat : function(data) {
  357. return 'Error: ' + data.responseText;
  358. }
  359. },{
  360. // search options 这里支持多条件查询
  361. multipleSearch: true,
  362. sopt:['eq','ne','cn','nc','lt','le','gt','ge'],
  363. afterSubmit: function(r, data) {
  364. var messageString = r.responseText;
  365. var mesObj = eval('(' + messageString + ')');
  366. return [mesObj.state, mesObj.message];
  367. }
  368. }
  369. );
  370. })
  371. </script>
  372. <title>我的桌面</title>
  373. </head>
  374. <body>
  375. <div class="page-container">
  376. <table id="jqGridGroup"></table>
  377. <div id="jqGridPagerGroup"></div>
  378. <div>&nbsp;</div>
  379. <table id="jqGrid"></table>
  380. <div id="jqGridPager"></div>
  381. <div>&nbsp;</div>
  382. </div>
  383. <footer class="footer mt-20">
  384. <div class="container">
  385. <p></p>
  386. </div>
  387. </footer>
  388. </body>
  389. </html>