Skip to content

Commit

Permalink
build 00363: Disabled Column Order
Browse files Browse the repository at this point in the history
~ “操作”列禁止排序
* 编辑器锁定Bug
  • Loading branch information
SmallOyster committed Apr 1, 2018
1 parent fb6e8df commit bc9d2f9
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

▲ 开发商:生蚝科技

▲ 代码版本信息:***Build 00338 (2018-03-31 13:17)***
▲ 代码版本信息:***Build 00363 (2018-04-01 15:44)***

▲ 系统版本信息:***V1.0 Build***

Expand Down
20 changes: 10 additions & 10 deletions application/views/admin/notice/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @name V-编辑通知
* @author SmallOysyer <master@xshgzs.com>
* @since 2018-03-31
* @version V1.0 2018-03-31
* @version V1.0 2018-04-01
*/
?>

Expand Down Expand Up @@ -64,16 +64,21 @@
editor.create();
editor.txt.html("<?php echo $info['content']; ?>");

$(function(){
$('#tipsModal').on('hidden.bs.modal',function (){
$("#wangEditor_div").removeAttr("style");
});
});

function edit(){
lockScreen();
id=$("#noticeID").val();
title=$("#title").val();
content=editor.txt.html();
editor.$textElem.attr('contenteditable', false);

$("#wangEditor_div").attr("style","display:none;");
if(title==""){
unlockScreen();
editor.$textElem.attr('contenteditable', true)
$("#tips").html("请输入通知标题!");
$("#tipsModal").modal('show');
return false;
Expand All @@ -87,7 +92,6 @@ function edit(){
}
if(title.length<1 || title.length>50){
unlockScreen();
editor.$textElem.attr('contenteditable', true)
$("#tips").html("请输入 1-50字 的通知标题!");
$("#tipsModal").modal('show');
return false;
Expand All @@ -101,8 +105,7 @@ function edit(){
error:function(e){
console.log(JSON.stringify(e));
unlockScreen();
editor.$textElem.attr('contenteditable', true)
$("#tips").html("服务器错误!<hr>请联系技术支持并提交以下错误码:<br><font color='blue'>"+e.responseText+"</font>");
$("#tips").html("服务器错误!<hr>请联系技术支持并提交以下错误码:<br><font color='blue'>"+e.status+"</font>");
$("#tipsModal").modal('show');
return false;
},
Expand All @@ -114,17 +117,14 @@ function edit(){
history.go(-1);
return true;
}else if(ret.message=="updateFailed"){
editor.$textElem.attr('contenteditable', true)
$("#tips").html("编辑失败!!!");
$("#tipsModal").modal('show');
return false;
}else if(ret.code=="403"){
editor.$textElem.attr('contenteditable', true)
$("#tips").html("Token无效!<hr>Tips:请勿在提交前打开另一页面哦~");
$("#tipsModal").modal('show');
return false;
}else{
editor.$textElem.attr('contenteditable', true)
$("#tips").html("系统错误!<hr>请联系技术支持并提交以下错误码:<br><font color='blue'>"+ret.code+"</font>");
$("#tipsModal").modal('show');
return false;
Expand Down
11 changes: 8 additions & 3 deletions application/views/admin/notice/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @name V-通知管理
* @author SmallOysyer <master@xshgzs.com>
* @since 2018-03-28
* @version V1.0 2018-03-31
* @version V1.0 2018-04-01
*/
?>

Expand Down Expand Up @@ -48,8 +48,8 @@
<?php foreach($list as $info){ ?>
<tr>
<td><?php echo $info['title']; ?></td>
<td><?php echo $info['create_time']; ?></td>
<td><?php echo $info['create_user']; ?></td>
<td><?php echo $info['create_time']; ?></td>
<td>
<a href="<?php echo site_url('notice/detail/').$info['id']; ?>" class="btn btn-primary">详细</a>
<a href="<?php echo site_url('admin/notice/edit/').$info['id']; ?>" class="btn btn-info">编辑</a>
Expand All @@ -70,7 +70,12 @@
<script>
window.onload=function(){
$('#table').DataTable({
responsive: true
responsive: true,
"order":[[2,'desc']],
"columnDefs":[{
"targets":[3],
"orderable": false
}]
});
};

Expand Down
21 changes: 10 additions & 11 deletions application/views/admin/notice/pub.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @name V-发布新通知
* @author SmallOysyer <master@xshgzs.com>
* @since 2018-03-29
* @version V1.0 2018-03-31
* @version V1.0 2018-04-01
*/
?>

Expand Down Expand Up @@ -60,29 +60,32 @@
var editor = new E('#wangEditor_div');
editor.create();

$(function(){
$('#tipsModal').on('hidden.bs.modal',function (){
$("#wangEditor_div").removeAttr("style");
});
});

function publish(){
lockScreen();
title=$("#title").val();
content=editor.txt.html();
editor.$textElem.attr('contenteditable', false);

$("#wangEditor_div").attr("style","display:none;");
if(title==""){
unlockScreen();
editor.$textElem.attr('contenteditable', true)
$("#tips").html("请输入通知标题!");
$("#tipsModal").modal('show');
return false;
}
if(content==""){
unlockScreen();
editor.$textElem.attr('contenteditable', true)
$("#tips").html("请输入通知内容!");
$("#tipsModal").modal('show');
return false;
}
if(title.length<1 || title.length>50){
unlockScreen();
editor.$textElem.attr('contenteditable', true)
$("#tips").html("请输入 1-50字 的通知标题!");
$("#tipsModal").modal('show');
return false;
Expand All @@ -96,8 +99,7 @@ function publish(){
error:function(e){
console.log(JSON.stringify(e));
unlockScreen();
editor.$textElem.attr('contenteditable', true)
$("#tips").html("服务器错误!<hr>请联系技术支持并提交以下错误码:<br><font color='blue'>"+e.responseText+"</font>");
$("#tips").html("服务器错误!<hr>请联系技术支持并提交以下错误码:<br><font color='blue'>"+e.status+"</font>");
$("#tipsModal").modal('show');
return false;
},
Expand All @@ -109,17 +111,14 @@ function publish(){
history.go(-1);
return true;
}else if(ret.message=="publishFailed"){
editor.$textElem.attr('contenteditable', true)
$("#tips").html("发布失败!!!");
$("#tipsModal").modal('show');
return false;
}else if(ret.code=="403"){
editor.$textElem.attr('contenteditable', true)
$("#tips").html("Token无效!<hr>Tips:请勿在提交前打开另一页面哦~");
$("#tipsModal").modal('show');
return false;
}else{
editor.$textElem.attr('contenteditable', true)
$("#tips").html("系统错误!<hr>请联系技术支持并提交以下错误码:<br><font color='blue'>"+ret.code+"</font>");
$("#tipsModal").modal('show');
return false;
Expand Down
8 changes: 6 additions & 2 deletions application/views/admin/role/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @name V-角色列表
* @author SmallOysyer <master@xshgzs.com>
* @since 2018-02-09
* @version V1.0 2018-03-29
* @version V1.0 2018-04-01
*/
?>

Expand Down Expand Up @@ -68,7 +68,11 @@
<script>
window.onload=function(){
$('#table').DataTable({
responsive: true
responsive: true,
"columnDefs":[{
"targets":[1],
"orderable": false
}]
});
};

Expand Down
8 changes: 6 additions & 2 deletions application/views/admin/user/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @name V-用户列表
* @author SmallOysyer <master@xshgzs.com>
* @since 2018-02-14
* @version V1.0 2018-03-29
* @version V1.0 2018-04-01
*/
?>

Expand Down Expand Up @@ -75,7 +75,11 @@

window.onload=function(){
$('#table').DataTable({
responsive: true
responsive: true,
"columnDefs":[{
"targets":[3],
"orderable": false
}]
});
};

Expand Down

0 comments on commit bc9d2f9

Please sign in to comment.