|
|
@@ -5,7 +5,10 @@
|
|
|
<head lang="en">
|
|
|
<meta charset="UTF-8">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0, user-scalable=no">
|
|
|
+ <link rel="stylesheet" href="${CPATH}/static/plugins/toastr/toastr.css">
|
|
|
<script type="text/javascript" src="${CTPATH}/assets/js/jquery.min.js"></script>
|
|
|
+ <script type="text/javascript" src="${CPATH}/static/plugins/jquery/jquery.form.min.js"></script>
|
|
|
+ <script src="${CPATH}/static/plugins/toastr/toastr.js"></script>
|
|
|
<script src="${CPATH}/counter?cid=${content.id!}"></script>
|
|
|
<title></title>
|
|
|
<style>
|
|
|
@@ -249,6 +252,16 @@
|
|
|
background: #5078cb;
|
|
|
color: #fff;
|
|
|
}
|
|
|
+
|
|
|
+ .toast-title {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 24px;
|
|
|
+ }
|
|
|
+ .toast-message {
|
|
|
+ -ms-word-wrap: break-word;
|
|
|
+ word-wrap: break-word;
|
|
|
+ font-size: 24px;
|
|
|
+ }
|
|
|
</style>
|
|
|
<script>
|
|
|
</script>
|
|
|
@@ -282,8 +295,8 @@
|
|
|
<div class="footer-header">
|
|
|
<div class="infoMessage"><span>写留言</span><img src="${CPATH}/static/jpress/admin/image/pen.png" alt=""/></div>
|
|
|
<div class="writeMessage">
|
|
|
- <textarea name="text" id="" cols="30" rows="10"></textarea>
|
|
|
- <div><button class="cancel">取消</button><button type="submit">提交</button></div>
|
|
|
+ <textarea name="text" id="textareaUas" cols="30" rows="10"></textarea>
|
|
|
+ <div><button class="cancel">取消</button><button class="submitUas" type="button" onclick="doSubmit()">提交</button></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</form>
|
|
|
@@ -363,6 +376,8 @@
|
|
|
userId = "${userId!0}"
|
|
|
uuUserId = "${userid!0}";
|
|
|
$('.voted').attr("src","${CPATH}/static/jpress/admin/image/support.png");
|
|
|
+
|
|
|
+ initToast();
|
|
|
});
|
|
|
|
|
|
var scrollResultMessage = "初始化状态";
|
|
|
@@ -411,5 +426,53 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ function doSubmit(){
|
|
|
+ var text = $('#textareaUas').val();
|
|
|
+ if (text != null && "" != text.trim(text)) {
|
|
|
+ $("#comment").ajaxSubmit({
|
|
|
+ type : "post",
|
|
|
+ dataType : "json",
|
|
|
+ success : function(data) {
|
|
|
+ if(data.errorCode == 0){
|
|
|
+ toastr.success('等待管理员审核!','留言成功');
|
|
|
+ $('.footer-header').css('display','none');
|
|
|
+ }else if(data.errorCode == 1){
|
|
|
+ toastr.error('您已经留言,不能重复留言!','留言失败');
|
|
|
+ $('.footer-header').css('display','none');
|
|
|
+ }else{
|
|
|
+ toastr.error(data.message,'留言失败');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error : function() {
|
|
|
+ toastr.error("留言提交失败,可能是网络错误或者服务器没有响应",'操作失败');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ toastr.info('您输入的信息为空!');
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ function initToast(){
|
|
|
+ toastr.options = {
|
|
|
+ "closeButton": true,
|
|
|
+ "debug": false,
|
|
|
+ "newestOnTop": false,
|
|
|
+ "progressBar": true,
|
|
|
+ "positionClass": "toast-top-center",
|
|
|
+ "preventDuplicates": false,
|
|
|
+ "onclick": null,
|
|
|
+ "showDuration": "300",
|
|
|
+ "hideDuration": "1000",
|
|
|
+ "timeOut": "2000",
|
|
|
+ "extendedTimeOut": "1000",
|
|
|
+ "showEasing": "swing",
|
|
|
+ "hideEasing": "linear",
|
|
|
+ "showMethod": "fadeIn",
|
|
|
+ "hideMethod": "fadeOut"
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
</script>
|
|
|
</html>
|