|
@@ -6,7 +6,7 @@
|
|
|
|
|
|
.tableImage_l{
|
|
|
border-radius:2px;
|
|
|
- width:57px;
|
|
|
+ width: 73px;
|
|
|
height: 32px;
|
|
|
}
|
|
|
</style>
|
|
@@ -38,10 +38,10 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="btn-group-sm" id="toolbar" role="group">
|
|
|
- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="wxportal:banner:add">
|
|
|
+ <a class="btn btn-success" onclick="addNew()" shiro:hasPermission="wxportal:banner:add">
|
|
|
<i class="fa fa-plus"></i> 添加
|
|
|
</a>
|
|
|
- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="wxportal:banner:edit">
|
|
|
+ <a class="btn btn-primary single disabled" onclick="editBanner()" shiro:hasPermission="wxportal:banner:edit">
|
|
|
<i class="fa fa-edit"></i> 修改
|
|
|
</a>
|
|
|
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="wxportal:banner:remove">
|
|
@@ -89,7 +89,7 @@
|
|
|
}else{
|
|
|
str = ctx+value;
|
|
|
}
|
|
|
- return $.table.imageView(str,200,600,"tableImage_l img-view");
|
|
|
+ return $.table.imageView(str,390,730,"tableImage_l img-view");
|
|
|
|
|
|
}
|
|
|
},
|
|
@@ -110,7 +110,7 @@
|
|
|
align: 'center',
|
|
|
formatter: function(value, row, index) {
|
|
|
var actions = [];
|
|
|
- actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.bannerId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
|
|
+ actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="editBanner(\'' + row.bannerId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
|
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.bannerId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
|
|
return actions.join('');
|
|
|
}
|
|
@@ -118,6 +118,23 @@
|
|
|
};
|
|
|
$.table.init(options);
|
|
|
});
|
|
|
+ function addNew(){
|
|
|
+ $.modal.open("添加" + $.table._option.modalName, $.operate.addUrl(0),950,700);
|
|
|
+
|
|
|
+ }
|
|
|
+ function editBanner(id){
|
|
|
+ if($.common.isEmpty(id) && $.table._option.type == table_type.bootstrapTreeTable) {
|
|
|
+ var row = $.bttTable.bootstrapTreeTable('getSelections')[0];
|
|
|
+ if ($.common.isEmpty(row)) {
|
|
|
+ $.modal.alertWarning("请至少选择一条记录");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var url = $.table._option.updateUrl.replace("{id}", row[$.table._option.uniqueId]);
|
|
|
+ $.modal.open("修改" + $.table._option.modalName, url,950,750);
|
|
|
+ } else {
|
|
|
+ $.modal.open("修改" + $.table._option.modalName, $.operate.editUrl(id),950,750);
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|
|
|
</body>
|
|
|
</html>
|