webinfo_initpanel.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
  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. <LINK rel="Bookmark" href="/favicon.ico" >
  10. <LINK rel="Shortcut Icon" href="/favicon.ico" />
  11. <script type="text/javascript">
  12. var ctx="${ctx}";
  13. </script>
  14. <!--[if lt IE 9]>
  15. <script type="text/javascript" src="${ctx}/assets/lib/html5.js"></script>
  16. <script type="text/javascript" src="${ctx}/assets/lib/respond.min.js"></script>
  17. <script type="text/javascript" src="${ctx}/assets/lib/PIE_IE678.js"></script>
  18. <![endif]-->
  19. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui/css/H-ui.min.css" />
  20. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/H-ui.admin.css" />
  21. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/Hui-iconfont/1.0.7/iconfont.css" />
  22. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/icheck/icheck.css" />
  23. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/skin/default/skin.css" id="skin" />
  24. <link rel="stylesheet" type="text/css" href="${ctx}/assets/static/h-ui.admin/css/style.css" />
  25. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/webuploader/0.1.5/webuploader.css" />
  26. <link rel="stylesheet" type="text/css" media="screen" href="${ctx}/assets/lib/jqueryui/jquery-ui.css" />
  27. <!--_footer 作为公共模版分离出去-->
  28. <script type="text/javascript" src="${ctx}/assets/lib/jquery/1.9.1/jquery.min.js"></script>
  29. <script type="text/javascript" src="${ctx}/assets/lib/layer/3.0.3/layer.js"></script>
  30. <script type="text/javascript" src="${ctx}/assets/lib/icheck/jquery.icheck.min.js"></script>
  31. <script type="text/javascript" src="${ctx}/assets/lib/jquery.validation/1.14.0/jquery.validate.min.js"></script>
  32. <script type="text/javascript" src="${ctx}/assets/lib/jquery.validation/1.14.0/validate-methods.js"></script>
  33. <script type="text/javascript" src="${ctx}/assets/lib/jquery.validation/1.14.0/messages_zh.min.js"></script>
  34. <script type="text/javascript" src="${ctx}/assets/static/h-ui/js/H-ui.js"></script>
  35. <script type="text/javascript" src="${ctx}/assets/static/h-ui.admin/js/H-ui.admin.js"></script>
  36. <script type="text/ecmascript" src="${ctx}/assets/lib/jqueryui/jquery-ui.js"></script>
  37. <!--/_footer /作为公共模版分离出去-->
  38. <!--请在下方写此页面业务相关的脚本-->
  39. <script type="text/javascript" src="${ctx}/assets/lib/My97DatePicker/WdatePicker.js"></script>
  40. <script type="text/javascript" src="${ctx}/assets/lib/webuploader/0.1.5/webuploader.min.js"></script>
  41. <script type="text/javascript" src="${ctx}/assets/lib/jquery.form/jquery.form.min.js"></script>
  42. <link href="${ctx}/assets/lib/jquery.sumoselect/sumoselect.css" rel="stylesheet" />
  43. <script type="text/javascript" src="${ctx}/assets/lib/jquery.sumoselect/jquery.sumoselect.min.js"></script>
  44. <script type="text/javascript" src="${ctx}/assets/js/base.js"></script>
  45. <!--[if IE 6]>
  46. <script type="text/javascript" src="${ctx}/assets/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
  47. <script>DD_belatedPNG.fix('*');</script>
  48. <![endif]-->
  49. <!--/meta 作为公共模版分离出去-->
  50. <script type="text/javascript">
  51. var contextPath="${ctx}";
  52. var serverURL="${serverURL}";
  53. var sessionID="${sessionID}";
  54. </script>
  55. <script type="text/javascript" src="${ctx}/assets/lib/ueditor/1.4.3/ueditor.config.js"></script>
  56. <script type="text/javascript" src="${ctx}/assets/lib/ueditor/1.4.3/ueditor.all.js"> </script>
  57. <script type="text/javascript" src="${ctx}/assets/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>
  58. <link rel="stylesheet" type="text/css" href="${ctx}/assets/lib/colorpicker/evol-colorpicker.css" />
  59. <link href="${ctx}/assets/lib/design/bootstrap.css" rel="stylesheet">
  60. <script type="text/javascript" src="${ctx}/assets/lib/design/bootstrap.min.js"></script>
  61. <script type="text/javascript" src="${ctx}/assets/lib/colorpicker/evol-colorpicker.js"></script>
  62. <style type="text/css">
  63. .margintop{margin-bottom:5px;}
  64. .placeholder{height:14px;}
  65. </style>
  66. <script type="text/javascript">
  67. window.onbeforeunload = function(e) {
  68. return '确定要关闭窗口吗?';
  69. };
  70. var layerIndex = null;
  71. $(function(){
  72. $('.optgroup').SumoSelect({placeholder: '请选择',outputAsCSV:true});
  73. $('#editor').css('height',document.body.clientHeight-245);
  74. $('.skin-minimal input').iCheck({
  75. checkboxClass: 'icheckbox-blue',
  76. radioClass: 'iradio-blue',
  77. increaseArea: '20%'
  78. });
  79. //初始化上传组件
  80. initUploader();
  81. var strKeyID=$("#keyid").val();
  82. if(strKeyID=='')
  83. {
  84. $("#iscritic").val('true');
  85. $("#issign").val('true');
  86. }
  87. else
  88. {
  89. //初始化支持评论checkbox
  90. var strIscritic=$("#iscritic").val();
  91. if(strIscritic=='true')
  92. {
  93. $("#iscritic").iCheck('check');
  94. }
  95. //初始化签收checkbox
  96. var strIssign=$("#issign").val();
  97. if(strIssign=='true')
  98. {
  99. $("#issign").iCheck('check');
  100. }
  101. }
  102. var ue = UE.getEditor('editor');
  103. contentWidth=${contentWidth};//模板中内容区域宽度
  104. ue.addListener( 'ready', function( editor ) {
  105. function autobg(){
  106. if(contentWidth!="" && contentWidth!="0"){
  107. var borderLR=($("#ueditor_0").width()-contentWidth)/2;
  108. var borderTB=1;
  109. if(borderLR<=0){
  110. borderTB=0;
  111. }
  112. $("#ueditor_0").contents().find("html").css("background-color","#FDFDFD");
  113. $("#ueditor_0").contents().find("body").css("min-height","700px").css("height","auto").css("background-color","white").css("margin","8px "+borderLR+"px");
  114. }
  115. }
  116. window.setInterval(autobg,500);
  117. } );
  118. //信息发布
  119. $('.btn-release').click(function(){
  120. var bFlag=true;
  121. ue.sync();
  122. var strTitle=$("#title").val();
  123. if(strTitle=='')
  124. {
  125. alert("标题不能为空!");
  126. bFlag=false;
  127. }
  128. else
  129. {
  130. if(highlight())
  131. {
  132.   if(confirm("发布的内容有敏感字,是否继续发布?"))
  133. {
  134. clearHighlight();
  135. }
  136. else
  137. {
  138. bFlag=false;
  139. clearHighlight();
  140. }
  141. }
  142. }
  143. if(bFlag)
  144. {
  145. var listTitle=$("#listTitle").val();
  146. if(listTitle==""){
  147. listTitle=$("#title").val();
  148. }
  149. listTitle=listTitle.replace(/\'/g,"’").replace(/\"/g,"”");
  150. $("#listTitle").val(listTitle);
  151. var title=$("#title").val();
  152. title=title.replace(/\'/g,"’").replace(/\"/g,"”");
  153. $("#title").val(title);
  154. $('#form-article').attr('action','${ctx}/myconsole/webinfo/release?Oper=${Oper}');
  155. //$('#resourcesOptions',parent.document).val('成品箱');
  156. if($('#form-article').valid()){
  157. layerIndex = layer.load(1);
  158. $('#form-article').ajaxSubmit(resultHandle);
  159. }
  160. }
  161. });
  162. //信息保存
  163. $('.btn-save').click(function(){
  164. var bFlag=true;
  165. ue.sync();
  166. var strTitle=$("#title").val();
  167. if(strTitle=='')
  168. {
  169. alert("标题不能为空!");
  170. bFlag=false;
  171. }
  172. else
  173. {
  174. if(highlight())
  175. {
  176.   if(confirm("发布的内容有敏感字,是否继续发布?"))
  177. {
  178. clearHighlight();
  179. }
  180. else
  181. {
  182. bFlag=false;
  183. clearHighlight();
  184. }
  185. }
  186. }
  187. if(bFlag)
  188. {
  189. var listTitle=$("#listTitle").val();
  190. if(listTitle==""){
  191. listTitle=$("#title").val();
  192. }
  193. listTitle=listTitle.replace(/\'/g,"’").replace(/\"/g,"”");
  194. $("#listTitle").val(listTitle);
  195. var title=$("#title").val();
  196. title=title.replace(/\'/g,"’").replace(/\"/g,"”");
  197. $("#title").val(title);
  198. $('#form-article').attr('action','${ctx}/myconsole/webinfo/save?Oper=${Oper}');
  199. //$('#resourcesOptions',parent.document).val('草稿箱');
  200. if($('#form-article').valid()){
  201. layerIndex = layer.load(1);
  202. $('#form-article').ajaxSubmit(resultHandle);
  203. }
  204. }
  205. });
  206. //信息预览
  207. $('.btn-preview').click(function(){
  208. var bFlag=true;
  209. ue.sync();
  210. var strTitle=$("#title").val();
  211. if(strTitle=='')
  212. {
  213. alert("标题不能为空!");
  214. bFlag=false;
  215. }
  216. else
  217. {
  218. if(highlight())
  219. {
  220.   if(confirm("发布的内容有敏感字,是否继续发布?"))
  221. {
  222. clearHighlight();
  223. }
  224. else
  225. {
  226. bFlag=false;
  227. clearHighlight();
  228. }
  229. }
  230. }
  231. if(bFlag)
  232. {
  233. var listTitle=$("#listTitle").val();
  234. if(listTitle==""){
  235. listTitle=$("#title").val();
  236. }
  237. listTitle=listTitle.replace(/\'/g,"’").replace(/\"/g,"”");
  238. $("#listTitle").val(listTitle);
  239. var title=$("#title").val();
  240. title=title.replace(/\'/g,"’").replace(/\"/g,"”");
  241. $("#title").val(title);
  242. $('#form-article').attr('action','${ctx}/myconsole/webinfo/save?Oper=${Oper}');
  243. //$('#resourcesOptions',parent.document).val('草稿箱');
  244. if($('#form-article').valid()){
  245. layerIndex = layer.load(1);
  246. $('#form-article').ajaxSubmit(resultPreview);
  247. }
  248. }
  249. });
  250. //相关信息展示 韩林平2016-12-11
  251. $('.btn-relating').click(function(){
  252. var strRelatingInfoID=$("#relatinginfoid").val();
  253. var strKeyID=$("#keyid").val();
  254. if(strRelatingInfoID=='')
  255. {
  256. layer.alert('没有相关信息可查看', {
  257. skin: 'layui-layer-molv' //样式类名
  258. ,closeBtn: 0
  259. }, function(){layer.closeAll('dialog');});
  260. }
  261. else
  262. {
  263. window.open('${ctx}/myconsole/webinfo/showRelatingInfo?KeyID='+strKeyID+'&RelatingInfoID='+strRelatingInfoID,'Derek','height=700,width=900,status=no,toolbar=no,menubar=no,location=no');
  264. }
  265. });
  266. //选择相关信息 韩林平2016-12-12
  267. $('.btn-select').click(function(){
  268. var strRelatingInfoID=$("#relatinginfoid").val();
  269. var strKeyID=$("#keyid").val();
  270. window.open('${ctx}/myconsole/webinfo/selectRelatingInfo?KeyID='+strKeyID+'&RelatingInfoID='+strRelatingInfoID,'Derek','height=700,width=900,status=no,toolbar=no,menubar=no,location=no');
  271. });
  272. //初始化编辑器内容
  273. ue.ready(function() {
  274. ue.setContent($("#content").val());
  275. });
  276. //临时保存文章内容
  277. function tempSave()
  278. {
  279. var bFlag=true;
  280. ue.sync();
  281. var strTitle=$("#title").val();
  282. if(strTitle=='')
  283. {
  284. bFlag=false;
  285. }
  286. else
  287. {
  288. var strContent=ue.getContent();
  289. if(strContent=='')
  290. {
  291. bFlag=false;
  292. }
  293. }
  294. if(bFlag)
  295. {
  296.   
  297. $('#form-article').attr('action','${ctx}/myconsole/webinfo/tempSave/');
  298. if($('#form-article').valid())
  299. {
  300. layerIndex = layer.load(1);
  301. $('#form-article').ajaxSubmit(resultHandle);
  302. }
  303. }
  304. }
  305. setInterval(tempSave,180000);// 注意函数名没有引号和括弧! 3分钟保存一次
  306. //过滤敏感字
  307. function highlight()
  308. {
  309.        var bReturn=false;
  310.   
  311.         var strTabooS = '${TabooS}';//获取敏感字;
  312. var arrTaboo = strTabooS.split(',');
  313.   for(var i in arrTaboo)
  314. {
  315.   var strTabooText=arrTaboo[i];
  316. var strContent=ue.getContent();  
  317.             if(strContent.search(strTabooText)>0)
  318.             {
  319. bReturn=true;                
  320. var html = strContent;
  321. var reg = new RegExp(strTabooText,"g");
  322.                 var newHtml = html.replace(reg, '<span style="color:red">'+strTabooText+'</span>');//将找到的关键字替换,加上highlight属性;  
  323.                 ue.setContent(newHtml);
  324. ue.sync();
  325.             }
  326. }
  327. return bReturn;
  328. }
  329. //取消敏感字变红
  330. function clearHighlight()
  331. {
  332.        var bReturn=false;
  333.      
  334.         var strTabooS = '${TabooS}';//获取敏感字;
  335. var arrTaboo = strTabooS.split(',');
  336.   for(var i in arrTaboo)
  337. {
  338.   var strTabooText=arrTaboo[i];
  339. var strContent=ue.getContent();
  340.             if(strContent.search(strTabooText)>0)
  341.             {
  342. bReturn=true;  
  343.               
  344. var html = strContent;
  345. var strNew='<span style="color:red">'+strTabooText+'</span>';
  346. var reg = new RegExp(strNew,"g");
  347.                 var newHtml = html.replace(reg,strTabooText);//将找到的关键字替换,加上highlight属性;  
  348.                 ue.setContent(newHtml);
  349. ue.sync();
  350.             }
  351. }
  352. return bReturn;
  353. }
  354. });
  355. //处理信息提交后的返回结果,成功则关闭本页面刷新列表
  356. function resultHandle(data){
  357. //console.log(data);
  358. layer.close(layerIndex);
  359. if(data.status == 'y'){
  360. layer.alert(data.message, {
  361. skin: 'layui-layer-molv' //样式类名
  362. ,closeBtn: 1
  363. },
  364. function(){
  365. $(".layui-layer-close").trigger("click");
  366. window.onbeforeunload = null;
  367. window.close();
  368. });
  369. if(opener!=null){
  370. opener.reload();
  371. }
  372. //parent.zTreeClick(null, null, parent.treeObj.getSelectedNodes()[0]);
  373. //var index = parent.layer.getFrameIndex(window.name);
  374. }else{
  375. if(data.status == 'n')
  376. {
  377. layer.alert(data.message, {
  378. skin: 'layui-layer-molv' //样式类名
  379. ,closeBtn: 0
  380. }, function(){
  381. window.onbeforeunload = null;
  382. window.close();
  383. });
  384. }
  385. }
  386. }
  387. //预览处理信息提交后的返回结果
  388. function resultPreview(data){
  389. layer.close(layerIndex);
  390. if(data.status == 'y'){
  391. $("#PreviewState").val('true');
  392. var url=data.htmlurl;
  393. // if(url.indexOf("html")!=-1){
  394. //url= '${ctx}/${web.siteid}'+data.htmlurl;
  395. url= '${ctx}/myconsole/complaint/repository/browseDetil?strContentId=${web.contentID}';
  396. // }
  397. window.open(url,'Derek','resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no');
  398. if(opener!=null){
  399. opener.reload();
  400. }
  401. }else{
  402. if(data.status == 'n')
  403. {
  404. layer.alert('信息无法保存,预览失败', {
  405. skin: 'layui-layer-molv' //样式类名
  406. ,closeBtn: 0
  407. }, function(){});
  408. }
  409. }
  410. }
  411. function initUploader(){
  412. var config;
  413. $.ajax({
  414. type:"get",
  415. dataType:"json",
  416. url:"${ctx}/myconsole/ueditor/getConfig",
  417. async:false,
  418. success:function(data){
  419. config=eval(data);
  420. //console.log(config);
  421. }
  422. })
  423. var layerIndex;
  424. var imageUploader = WebUploader.create({
  425. // 选完文件后,是否自动上传。
  426. auto: true,
  427. // swf文件路径
  428. swf: '${ctx}/assets/lib/webuploader/0.1.5/Uploader.swf',
  429. // 文件接收服务端。
  430. server: '${ctx}/myconsole/ueditor/?action=uploadimage',
  431. // 选择文件的按钮。可选。
  432. // 内部根据当前运行是创建,可能是input元素,也可能是flash.
  433. pick: '#image-up',
  434. fileNumLimit : 1,
  435. // 只允许选择图片文件。
  436. accept: {
  437. title: 'Images',
  438. extensions: 'gif,jpg,jpeg,bmp,png',
  439. mimeTypes: 'image/*'
  440. }
  441. });
  442. // 当有文件添加进来的时候
  443. imageUploader.on( 'fileQueued', function( file ) {
  444. layerIndex = layer.load();
  445. });
  446. // 文件上传成功,给item添加成功class, 用样式标记上传成功。
  447. imageUploader.on( 'uploadSuccess', function(file,response ) {
  448. layer.close(layerIndex);
  449. if(response.state == "SUCCESS"){
  450. layer.msg('上传成功',{icon: 6,time:1500});
  451. imageUploader.reset();
  452. //标题图片和附件不保存项目名,模板引擎会@{}自动加上,不能直接删除,防止分服务器存储,不能全部处理,编辑器内附件地址不需处理
  453. var prefix=config.imageUrlPrefix;
  454. var imageURL = prefix+response.url;
  455. $('#titlepicurl').val(imageURL);
  456. }else{
  457. layer.msg(response.state,{icon: 5,time:1500});
  458. }
  459. });
  460. // 文件上传失败,显示上传出错。
  461. imageUploader.on( 'uploadError', function( file ) {
  462. layer.close(layerIndex);
  463. layer.msg('上传失败',{icon: 5,time:1500});
  464. });
  465. //************************************************************
  466. //标题附件上传
  467. var uploader = WebUploader.create({
  468. auto: true,
  469. // swf文件路径
  470. swf: '${ctx}/assets/lib/webuploader/0.1.5/Uploader.swf',
  471. // 文件接收服务端。
  472. server: '${ctx}/myconsole/ueditor/?action=uploadfile',
  473. // 选择文件的按钮。可选。
  474. // 内部根据当前运行是创建,可能是input元素,也可能是flash.
  475. pick: '#file-up',
  476. fileNumLimit : 1,
  477. // 不压缩image, 默认如果是jpeg,文件上传前会压缩一把再上传!
  478. resize: false
  479. });
  480. uploader.on( 'fileQueued', function( file ) {
  481. layerIndex = layer.load();
  482. });
  483. // 文件上传成功,给item添加成功class, 用样式标记上传成功。
  484. uploader.on( 'uploadSuccess', function(file,response ) {
  485. layer.close(layerIndex);
  486. if(response.state == "SUCCESS"){
  487. layer.msg('上传成功',{icon: 6,time:1500});
  488. uploader.reset();
  489. //标题图片和附件不保存项目名,模板引擎会@{}自动加上,不能直接删除,防止分服务器存储,不能全部处理,编辑器内附件地址不需处理
  490. var prefix=config.fileUrlPrefix;
  491. var imageURL =prefix+ response.url;
  492. $('#titlefileurl').val(imageURL);
  493. }else{
  494. layer.msg(response.state,{icon: 5,time:1500});
  495. }
  496. });
  497. // 文件上传失败,显示上传出错。
  498. uploader.on( 'uploadError', function( file ) {
  499. layer.close(layerIndex);
  500. layer.msg('上传失败',{icon: 5,time:1500});
  501. });
  502. }
  503. function checkClickDo(strFieldID)
  504. {
  505. if($('#'+strFieldID).is(':checked'))
  506. {
  507. $('#'+strFieldID).val('true');
  508. }
  509. else
  510. {
  511. $('#'+strFieldID).val('false');
  512. };
  513. }
  514. $(function(){
  515. //当前窗口时刷新session
  516. $(window).focus(function() {
  517. $.get("${ctx}/myconsole/webinfo/refreshSession",{"keyID":$("#keyid").val(),"columnID":$("#columnid").val()},function(data){
  518. //myconsole.log(data);
  519. })
  520. });
  521. $(".btn-startProcess").click(function(){
  522. var listTitle=$("#listTitle").val();
  523. if(listTitle==""){
  524. listTitle=$("#title").val();
  525. }
  526. listTitle=listTitle.replace(/\'/g,"’").replace(/\"/g,"”");
  527. $("#listTitle").val(listTitle);
  528. var title=$("#title").val();
  529. title=title.replace(/\'/g,"’").replace(/\"/g,"”");
  530. $("#title").val(title);
  531. $('#form-article').attr('action','${ctx}/myconsole/webinfo/process?Oper=${Oper}');
  532. $('#form-article').ajaxSubmit(function(data){
  533. //myconsole.log(data);
  534. layer.alert(data.message, {
  535. skin: 'layui-layer-molv' //样式类名
  536. ,closeBtn: 0
  537. }, function(){
  538. window.onbeforeunload = null;
  539. window.close();
  540. if(opener!=null){
  541. opener.reload();
  542. }
  543. });
  544. });
  545. })
  546. })
  547. //选择标题颜色板初始化
  548. function selectColor()
  549. {
  550. $("#titlecolor").colorpicker({
  551.      defaultPalette: 'theme',
  552. strings: "主题颜色,标准颜色,web颜色,主题颜色,返回调色板,历史记录, 没有历史记录.",
  553. initialHistory: ['#ff0000','#000000','red', 'purple']
  554. });
  555. }
  556. function setColor()
  557. {
  558. var strCol=$("#titlecolor").val();
  559.  $('#title').css('color', strCol);
  560. }
  561. //选择标题颜色板初始化
  562. function selectListColor()
  563. {
  564. $("#listtitlecolor").colorpicker({
  565.      defaultPalette: 'theme',
  566. strings: "主题颜色,标准颜色,web颜色,主题颜色,返回调色板,历史记录, 没有历史记录.",
  567. initialHistory: ['#ff0000','#000000','red', 'purple']
  568. });
  569. }
  570. function setListColor()
  571. {
  572. var strCol=$("#listtitlecolor").val();
  573.  $('#listTitle').css('color', strCol);
  574. }
  575. function setListWidth()
  576. {
  577. var strCol=$("#listtitlewidth").val();
  578.  $('#listTitle').css('font-weight', strCol);
  579. }
  580. function showCoords(c){
  581. // variables can be accessed here as
  582. // c.x, c.y, c.x2, c.y2, c.w, c.h
  583. };
  584. $(function(){
  585. $("#image-crop").click(function(){
  586. var imgsrc=$("#titlepicurl").val();
  587. if(imgsrc!=""){
  588. layer.open({
  589. type: 2,
  590. title: '裁剪图片',
  591. skin: 'layui-layer-rim', //加上边框
  592. area: ['800px','600px'], //宽高
  593. content: '${ctx}/myconsole/cropimg?imgSrc='+imgsrc+"&rnd="+Math.random()
  594. });
  595. }
  596. });
  597. })
  598. </script>
  599. <!--/请在上方写此页面业务相关的脚本-->
  600. <title>信息编辑</title>
  601. <meta name="keywords" content="">
  602. <meta name="description" content="">
  603. </head>
  604. <body style="line-height:1;">
  605. <div class="container-fluid" style="margin-top:0px;">
  606. <div >
  607. <form id="form-article" method="post">
  608. <div style="display: none">
  609. <textarea type="hidden" id="content">${web.webcontent!}</textarea>
  610. <input type="hidden" id="siteid" name="web.siteid" value="${web.siteid!''}"/>
  611. <input type="hidden" id="keyid" name="web.keyid" value="${web.keyid!''}"/>
  612. <input type="hidden" id="columnid" name="web.columnid" value="${web.columnID!''}"/>
  613. <input type="hidden" id="columnname" name="web.columnname" value="${web.columnName!''}"/>
  614. <input type="hidden" id="relatinginfoid" name="web.relatinginfoid" value="${web.relatinginfoid!''}"/>
  615. <input type="hidden" id="PreviewState" name="PreviewState" value="false"/>
  616. </div>
  617. <div class="col-md-9">
  618.   <div >
  619.   <div class="row cl">
  620. <div class="formControls col-md-9" data-role="fieldcontain">
  621. <table>
  622. <tr>
  623. <td style="width:70px"><label class="form-label" for="web.title">文章标题:</label></td>
  624. <td><input type="text" class="input-text required" style="color:${web.titlecolor!}" value="${web.title!}" placeholder="" id="title" name="web.title" ></td>
  625. </tr>
  626. </table>
  627. </div>
  628. <!-- <div class="formControls col-md-3" data-role="fieldcontain">
  629. <table>
  630. <tr>
  631. <td style="width:70px"><label class="form-label">标题颜色:</label></td>
  632. <td><input class="input-text" type="text" name="web.titlecolor" id="titlecolor" value="${web.titlecolor!}" onclick=selectColor() onchange=setColor() style="width:120px" readonly></td>
  633. </tr>
  634. </table>
  635. </div> -->
  636. </div>
  637.  </div>
  638. <div >
  639. <div class="row cl">
  640. <div class="formControls col-md-12">
  641. <script id="editor" type="text/plain" style="width:100%;height:300px;"></script>
  642. </div>
  643. </div>
  644.  </div>
  645. </div>
  646. <div class="col-md-3">
  647.   <div class="row cl">
  648. <div class="formControls col-md-3">
  649. </div>
  650. <div class="formControls col-md-9">
  651. <a class="btn btn-secondary btn-save r" style="border-color:#ffffff;" type="button"><i class="Hui-iconfont">&#xe632;</i> 保存</a>
  652. <#if btn_release><a class="btn btn-success btn-release r" style="border-color:#ffffff;" type="button"><i class="Hui-iconfont">&#xe603;</i> 发布</a></#if>
  653. <#if btn_startProcess><a class="btn btn-success btn-startProcess r" style="border-color:#ffffff;" type="button"><i class="Hui-iconfont">&#xe603;</i> 提交审批</a></#if>
  654. <a class="btn btn-secondary btn-preview r" style="border-color:#ffffff;" type="button"><i class="Hui-iconfont">&#xe632;</i> 预览</a>
  655. </div>
  656. </div>
  657. <div class="row cl margintop">
  658. <label class="form-label col-md-3">列表页标题</label>
  659. <div class="formControls col-md-9">
  660. <input type="text" class="input-text" value="${web.listtitle!}" placeholder="" id="listTitle" name="web.listtitle" style="color:${web.listtitlecolor!};font-weight:${web.listtitlewidth!};" >
  661. </div>
  662. </div>
  663. <div class="row cl margintop">
  664. <label class="form-label col-md-3">列表页标题颜色</label>
  665. <div class="formControls col-md-9">
  666. <input class="input-text" type="text" name="web.listtitlecolor" id="listtitlecolor" value="${web.listtitlecolor!}" onclick=selectListColor() onchange=setListColor() style="width:120px" readonly>
  667. </div>
  668. </div>
  669. <div class="row cl margintop">
  670. <label class="form-label col-md-3">列表页标题宽度</label>
  671. <div class="formControls col-md-9">
  672. <select class="input-text" onchange=setListWidth() id="listtitlewidth" name="web.listtitlewidth" >
  673. <option value="normal">标准</option>
  674. <option value="bold">加粗</option>
  675. </select>
  676. <script type="text/javascript">$(function(){$("#listtitlewidth").val("${web.listtitlewidth!}");})</script>
  677. </div>
  678. </div>
  679.   <!-- <div class="row cl margintop">
  680. <label class="form-label col-md-3" title="副标题通常位于主标题下方,是对主标题的补充">副标题</label>
  681. <div class="formControls col-md-9">
  682. <input type="text" class="input-text" value="${web.subhead!}" placeholder="" id="subhead" name="web.subhead">
  683. </div>
  684. </div>
  685. <div class="row cl margintop">
  686. <label class="form-label col-md-3">引题</label>
  687. <div class="formControls col-md-9">
  688. <input type="text" class="input-text" value="${web.bgtitle!}" placeholder="" id="" name="web.bgtitle">
  689. </div>
  690. </div>
  691. -->
  692. <!-- <div class="row cl margintop">
  693. <label class="form-label col-md-3">文章来源</label>
  694. <div class="formControls col-md-9">
  695. <input type="text" class="input-text" value="${web.infosource!}" placeholder="" id="infosource" name="web.infosource">
  696. </div>
  697. </div>
  698. <div class="row cl margintop">
  699. <label class="form-label col-md-3">过期时间</label>
  700. <div class="formControls col-md-9">
  701. <input type="text" value="${web.endtime!}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'endtime\')}'})" id="endtime" name="web.endtime" class="input-text Wdate readyonly">
  702. </div>
  703. </div>
  704.   <div class="row cl margintop">
  705. <label class="form-label col-md-3">标题图片</label>
  706. <div class="formControls col-md-9">
  707. <input class="input-text" type="text" name="web.titlepicurl" id="titlepicurl" value="${web.titlepicurl!}" style="width:173px">
  708. <a id="image-up">选择</a> &nbsp; <a id="image-crop">裁剪</a> &nbsp;
  709. </div>
  710. </div>
  711. <div class="row cl margintop">
  712. <label class="form-label col-md-3">标题文件</label>
  713. <div class="formControls col-md-9">
  714. <input class="input-text" type="text" name="web.titlefileurl" id="titlefileurl" value="${web.titlefileurl!}" style="width:173px">
  715. <a id="file-up">选择</a>
  716. </div>
  717. </div>
  718.   <div class="row cl margintop">
  719. <label class="form-label col-md-3">转向链接</label>
  720. <div class="formControls col-md-9">
  721. <select name="web.urlpriority" id="urlpriority" class="form-control">
  722. <option value="">无</option>
  723. <option value="linkurl">链接地址</option>
  724. <option value="titlefile">标题附件</option>
  725. <option value="titledoc">标题文档</option>
  726. </select>
  727. <script type="text/javascript">$(function(){$("#urlpriority").val("${web.urlpriority!}");})</script>
  728. </div>
  729. </div>-->
  730. <!--
  731.   <div class="row cl margintop">
  732. <label class="form-label col-md-3">关键词</label>
  733. <div class="formControls col-md-9">
  734. <input type="text" class="input-text" value="${web.keyword!}" placeholder="" id="keyword" name="web.keyword">
  735. </div>
  736. </div>
  737.   <div class="row cl margintop">
  738. <label class="form-label col-md-3">摘要</label>
  739. <div class="formControls col-md-9">
  740. <textarea name="web.infosummary" cols="" rows="" class="textarea" datatype="*10-100" dragonfly="true" onKeyUp="textarealength(this,1500)">${web.infosummary!}</textarea>
  741. <p class="textarea-numberbar"><em class="textarea-length"><#if web.infosummary?exists> ${web.infosummary?length }<#else>0</#if></em>/1500</p>
  742. </div>
  743. </div> -->
  744.  
  745.   <div class="row cl margintop">
  746. <label class="form-label col-md-3">作者</label>
  747. <div class="formControls col-md-9">
  748. <input type="text" class="input-text" value="${web.author!user.username}" placeholder="" id="author" name="web.author">
  749. </div>
  750. </div>
  751. <div class="row cl margintop">
  752. <label class="form-label col-md-3">发布时间</label>
  753. <div class="formControls col-md-9">
  754. <input type="text" value="${web.releasetime!}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" id="releasetime" name="web.releasetime" class="input-text Wdate readyonly">
  755. </div>
  756. </div>
  757. <#if watermarkFlag>
  758.   <div class="row cl margintop">
  759. <label class="form-label col-md-3">文字水印</label>
  760. <div class="formControls col-md-9">
  761. <input type="text" class="input-text" value="${watermark!}" placeholder="" id="watermark" name="web.watermark">
  762. </div>
  763. </div>
  764. <script>
  765. $(function(){
  766. $.post("${ctx}/myconsole/webinfo/refreshWatermark",{watermark:$("#watermark").val()},function(){});
  767. $("#watermark").change(function(){
  768. $.post("${ctx}/myconsole/webinfo/refreshWatermark",{watermark:$("#watermark").val()},function(){});
  769. })
  770. })
  771. </script>
  772. </#if>
  773.   <!-- <div class="row cl margintop">
  774. <label class="form-label col-md-3"></label>
  775. <div class="formControls col-md-9">
  776. <div class="check-box">
  777. 支持评论 <input type="checkbox" id="iscritic" name="web.iscritic" value="${web.iscritic!}" Onclick=checkClickDo('iscritic') >
  778. <label for="checkbox-pinglun">&nbsp;</label>
  779. 支持签收 <input type="checkbox" id="issign" name="web.issign" value="${web.issign!}" Onclick=checkClickDo('issign') >
  780. <label for="checkbox-pinglun">&nbsp;</label>
  781. </div>
  782. </div>
  783. </div> -->
  784.   <div class="row cl margintop">
  785. <label class="form-label col-md-3">相关信息</label>
  786. <div class="formControls col-md-9">
  787. <a class="btn btn-warning btn-select r" style="border-color:#ffffff;" type="button"> 编辑相关信息</a>
  788. <a class="btn btn-warning btn-relating r" style="border-color:#ffffff;" type="button"> 查看信息</a>
  789. </div>
  790. </div>
  791. ${extendModelForm}
  792. </div> <!--右边列结束 -->
  793. </form>
  794.  </div> <!--整个行结束 -->
  795. </div> <!--容器结束 -->
  796. </body>
  797. </html>