skin.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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 rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
  24. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqgrid/css/ui.jqgrid.css" />
  25. <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
  26. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/i18n/grid.locale-cn.js"></script>
  27. <script type="text/ecmascript" src="${ctx}/assets/lib/jqgrid/js/jquery.jqGrid.min.js"></script>
  28. <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
  29. <!--[if IE 6]>
  30. <script type="text/javascript" src="${ctx}/assets/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
  31. <script>DD_belatedPNG.fix('*');</script>
  32. <![endif]-->
  33. <script type="text/javascript">
  34. $(function() {
  35. $(window).resize(function(){
  36. $("#jqGrid").setGridWidth($(window).width()-40); 
  37. });
  38. $("#jqGrid").jqGrid({
  39. url : '${ctx}/myconsole/skin/getByPage?templateGroupKeyID=1',
  40. editurl:"${ctx}/myconsole/skin/saveOrUpdate",
  41. mtype : "POST",
  42. datatype : "json",
  43. prmNames:{id:"keyid"},
  44. caption:'皮肤管理',
  45. colModel : [ {
  46. label : '任务编号',
  47. name : 'keyid',
  48. hidden : true,
  49. key : true,
  50. width : 50,
  51. }, {
  52. label : '皮肤名称',
  53. name : 'templatename',
  54. editable: false,
  55. width : 80
  56. },{
  57. label : '皮肤说明',
  58. name : 'readme',
  59. editable: false,
  60. width : 80
  61. }, {
  62. label : '更新时间',
  63. name : 'updatetime',
  64. editable: false,
  65. width : 80
  66. },{
  67. label : '操作',
  68. name:'operMod',
  69. index:'operMod',
  70. align:"center",
  71. width:"80",
  72. formatter: function (cellvalue, options, rowdata) {
  73. var html = "<button class='btn btn-success radius size-S' onclick=edit('"+rowdata.filename+"')>使用</button>";
  74. return html;
  75. }
  76. } ],
  77. rownumbers : true,//添加左侧行号
  78. viewrecords : true,//是否在浏览导航栏显示记录总数
  79. rowNum : 10,//每页显示记录数
  80. rowList : [10,15,20,30,40,50 ],//用于改变显示行数的下拉列表框的元素数组。
  81. autowidth : true,
  82. height : 'auto',
  83. pager : "#jqGridPager"
  84. });
  85. $('#jqGrid').navGrid('#jqGridPager',
  86. // the buttons to appear on the toolbar of the grid
  87. {
  88. edit : false,
  89. add : false,
  90. del : false,
  91. search : true,
  92. refresh : true,
  93. view : false,
  94. position : "left",
  95. cloneToTop : true
  96. },
  97. // options for the Edit Dialog
  98. {
  99. recreateForm : true,
  100. checkOnUpdate : true,
  101. checkOnSubmit : true,
  102. closeAfterEdit : true,
  103. onInitializeForm:function(formid) {
  104. },
  105. serializeEditData: function(postdata) {
  106. //myconsole.log(postdata);
  107. $.each(postdata,function (index, value) {
  108. //myconsole.log(index);
  109. if(index!="jqGrid_id" && index!="oper" && index!="keyid"){
  110. modifyJosnKey(postdata,index,"fragmentInstance."+index);
  111. }
  112. if(index=="keyid"){
  113. postdata["fragmentInstance."+index]=value
  114. }
  115. })
  116. //myconsole.log(postdata);
  117. return postdata;
  118. },
  119. afterSubmit: function (response, postdata) {
  120. // console.log(response);
  121. var res=eval('(' + response.responseText + ')');
  122. layer.msg(res.msg);
  123. return [res.state,res.msg,''];
  124. },
  125. errorTextFormat : function(data) {
  126. return 'Error: ' + data.responseText
  127. }
  128. },
  129. // options for the Add Dialog
  130. {
  131. closeAfterAdd : true,
  132. recreateForm : true,
  133. beforeSubmit: function(postdata, formid){
  134. $.each(postdata,function (index, value) {
  135. if(index!="jqGrid_id" && index!="oper"){
  136. modifyJosnKey(postdata,index,"fragmentInstance."+index);
  137. }
  138. })
  139. return[true,''];
  140. },
  141. afterSubmit: function (response, postdata) {
  142. // console.log(response);
  143. var res=eval('(' + response.responseText + ')');
  144. alert(res.msg);
  145. return [res.state,res.msg,''];
  146. },
  147. errorTextFormat : function(data) {
  148. return 'Error: ' + data.responseText
  149. }
  150. },
  151. // options for the Delete Dailog
  152. {
  153. errorTextFormat : function(data) {
  154. return 'Error: ' + data.responseText
  155. }
  156. },{
  157. // search options 这里支持多条件查询
  158. multipleSearch: true,
  159. sopt:['eq','ne','cn','nc','lt','le','gt','ge'],
  160. afterSubmit: function(r, data) {
  161. var messageString = r.responseText;
  162. var mesObj = eval('(' + messageString + ')');
  163. return [mesObj.state, mesObj.message];
  164. }
  165. }
  166. );
  167. })
  168. function edit(skinID){
  169. $.post("${ctx}/myconsole/skin/set",{"skinID":skinID},function(data){
  170. layer.alert(data);
  171. })
  172. }
  173. </script>
  174. <title>我的桌面</title>
  175. </head>
  176. <body>
  177. <div class="page-container">
  178. <table id="jqGrid"></table>
  179. <div id="jqGridPager"></div>
  180. </div>
  181. <footer class="footer mt-20">
  182. <div class="container">
  183. <p>在模板组里上传时 在css文件夹下新建skin文件下,skin文件夹下的CSS文件会出现在模板管理中选中模板组,下面出现相应的皮肤样式管理,点击编辑为样式命名,命名后可在皮肤管理中使用。</p>
  184. </div>
  185. </footer>
  186. </body>
  187. </html>