活动管理-修改富文本框

This commit is contained in:
dy 2021-04-15 14:28:01 +08:00
parent 2e993dbc8f
commit 5785e6863f
2 changed files with 39 additions and 23 deletions

View File

@ -5,6 +5,7 @@
<th:block th:include="include :: datetimepicker-css"/> <th:block th:include="include :: datetimepicker-css"/>
<th:block th:include="include :: jquery-smartwizard-css"/> <th:block th:include="include :: jquery-smartwizard-css"/>
<th:block th:include="include :: jasny-bootstrap-css"/> <th:block th:include="include :: jasny-bootstrap-css"/>
<th:block th:include="include :: summernote-css" />
</head> </head>
<style type='text/css'> <style type='text/css'>
/* 如果要让工具栏固定在页面底部,使用下面的样式,不需要的可以注释 */ /* 如果要让工具栏固定在页面底部,使用下面的样式,不需要的可以注释 */
@ -209,7 +210,7 @@
</style> </style>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content" style="height: 100%;"> <div class="wrapper wrapper-content animated fadeInRight ibox-content" >
<form class="form-horizontal m" id="form-info-add"> <form class="form-horizontal m" id="form-info-add">
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
@ -333,7 +334,7 @@
<img id="activityTemplateimg" src="../../img/yun.jpg" width="60%" height="400px" style="display: none"> <img id="activityTemplateimg" src="../../img/yun.jpg" width="60%" height="400px" style="display: none">
</div> </div>
</div> </div>
<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3" style="height: 100%"> <div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3" style="height: 130%">
<div > <div >
<div class="leftarea"> <div class="leftarea">
<h4 class="form-header h4">第3步-配置展现内容</h4> <h4 class="form-header h4">第3步-配置展现内容</h4>
@ -418,18 +419,17 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row" style="height: 850">
<div class="col-sm-6"> <div class="form-group" style="float: left">
<div class="form-group"> <div style="width: 60%">
<label class="col-sm-4 control-label is-required">按钮2页面内容</label> <label class="col-sm-4 control-label is-required">按钮2页面内容</label>
<!-- <input name="actPageConfigGuide-btnLink2" placeholder="例如http//xx"--> </div>
<!-- class="form-control"--> <div class="col-sm-8">
<!-- type="text"--> <div class="summernote">
<!-- maxlength="30">--> 例如http//xx
<div class="col-xs-8">
<textarea name="actPageConfigGuide-btnLink2" maxlength="500" class="form-control" rows="5" aria-invalid="false" placeholder="例如http//xx"></textarea>
</div> </div>
</div> </div>
<textarea id="btnLink2" name="actPageConfigGuide-btnLink2" maxlength="500" class="form-control" rows="5" aria-invalid="false" placeholder="" style="display: none"></textarea>
</div> </div>
</div> </div>
@ -908,6 +908,7 @@
<th:block th:include="include :: datetimepicker-js"/> <th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: jquery-smartwizard-js"/> <th:block th:include="include :: jquery-smartwizard-js"/>
<th:block th:include="include :: jasny-bootstrap-js"/> <th:block th:include="include :: jasny-bootstrap-js"/>
<th:block th:include="include :: summernote-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "activity/info" var prefix = ctx + "activity/info"
@ -1002,11 +1003,17 @@
</script> </script>
<script th:inline="javascript"> <script th:inline="javascript">
$(document).ready(function () { $(document).ready(function () {
$('.summernote').summernote({
height:200,
lang: 'zh-CN'
});
// 工具栏按钮 // 工具栏按钮
var btnFinish = $('<a id="btn-finish"></a>').text('完成') var btnFinish = $('<a id="btn-finish"></a>').text('完成')
.addClass('btn btn-info') .addClass('btn btn-info')
.on('click', function () { .on('click', function () {
//添加保存逻辑 //添加保存逻辑
var markupStr = $('.summernote').summernote('code');
$("btnLink2").val(markupStr);
var data = customSerialize("form-info-add", true); var data = customSerialize("form-info-add", true);
$.ajax({ $.ajax({
url: prefix + "/add", url: prefix + "/add",

View File

@ -5,6 +5,7 @@
<th:block th:include="include :: datetimepicker-css"/> <th:block th:include="include :: datetimepicker-css"/>
<th:block th:include="include :: jquery-smartwizard-css"/> <th:block th:include="include :: jquery-smartwizard-css"/>
<th:block th:include="include :: jasny-bootstrap-css"/> <th:block th:include="include :: jasny-bootstrap-css"/>
<th:block th:include="include :: summernote-css" />
</head> </head>
<style type='text/css'> <style type='text/css'>
/*.sw>.toolbar-bottom{*/ /*.sw>.toolbar-bottom{*/
@ -207,7 +208,7 @@
</style> </style>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content" style="height: 100%;"> <div class="wrapper wrapper-content animated fadeInRight ibox-content" >
<form class="form-horizontal m" id="form-info-add" th:object="${vo}"> <form class="form-horizontal m" id="form-info-add" th:object="${vo}">
<input name="drawInfo-drawid" th:value="*{drawInfo.DRAWID}" type="hidden"> <input name="drawInfo-drawid" th:value="*{drawInfo.DRAWID}" type="hidden">
<input name="drawInfo-drawcode" th:value="*{drawInfo.DRAWCODE}" type="hidden"> <input name="drawInfo-drawcode" th:value="*{drawInfo.DRAWCODE}" type="hidden">
@ -332,7 +333,7 @@
<img id="activityTemplateimg" src="../../img/act/0.jpg" width="60%" height="400px"> <img id="activityTemplateimg" src="../../img/act/0.jpg" width="60%" height="400px">
</div> </div>
</div> </div>
<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3" style="height: 100%"> <div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3" style="height: 130%">
<div style=""> <div style="">
<div class="leftarea"> <div class="leftarea">
<h4 class="form-header h4">第3步-配置展现内容</h4> <h4 class="form-header h4">第3步-配置展现内容</h4>
@ -419,18 +420,17 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row" style="height: 850">
<div class="col-sm-6"> <div class="form-group" style="float: left">
<div class="form-group"> <div style="width: 60%">
<label class="col-sm-4 control-label is-required">按钮2页面内容</label> <label class="col-sm-4 control-label is-required">按钮2页面内容</label>
<!-- <input name="actPageConfigGuide-btnLink2" placeholder="例如http//xx"--> </div>
<!-- class="form-control"--> <div class="col-sm-8">
<!-- type="text"--> <div class="summernote">
<!-- maxlength="30">--> 例如http//xx
<div class="col-xs-8">
<textarea name="actPageConfigGuide-btnLink2" maxlength="500" class="form-control" rows="5" aria-invalid="false" placeholder="例如http//xx"></textarea>
</div> </div>
</div> </div>
<textarea id="btnLink2" type="text" th:value="*{actPageConfigGuide.btnLink2}" name="actPageConfigGuide-btnLink2" maxlength="500" class="form-control" rows="5" aria-invalid="false" placeholder="" style="display: none"></textarea>
</div> </div>
</div> </div>
@ -920,6 +920,7 @@
<th:block th:include="include :: datetimepicker-js"/> <th:block th:include="include :: datetimepicker-js"/>
<th:block th:include="include :: jquery-smartwizard-js"/> <th:block th:include="include :: jquery-smartwizard-js"/>
<th:block th:include="include :: jasny-bootstrap-js"/> <th:block th:include="include :: jasny-bootstrap-js"/>
<th:block th:include="include :: summernote-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "activity/info" var prefix = ctx + "activity/info"
@ -1038,6 +1039,8 @@
.addClass('btn btn-info') .addClass('btn btn-info')
.on('click', function () { .on('click', function () {
//添加保存逻辑 //添加保存逻辑
var markupStr = $('.summernote').summernote('code');
$("#btnLink2").val(markupStr);
var data = customSerialize("form-info-add", true); var data = customSerialize("form-info-add", true);
$.ajax({ $.ajax({
url: prefix + "/edit", url: prefix + "/edit",
@ -1114,6 +1117,12 @@
}else{ }else{
$("#btn2Pic").text("自定义按钮2"); $("#btn2Pic").text("自定义按钮2");
} }
$('.summernote').summernote({
height:200,
lang: 'zh-CN'
});
var linkvar = [[${vo.actPageConfigGuide.btnLink2}]];
$('.summernote').summernote('code',linkvar);
//加载步骤4数据 //加载步骤4数据
var val = $("#activityPlayval").val(); var val = $("#activityPlayval").val();
$("a[id = 'activityPlay']").each(function (){ $("a[id = 'activityPlay']").each(function (){