Browse Source

添加选卡页同一页签打开&关闭指定demo&更换可操作样式

pull/108/head
RuoYi 5 years ago
parent
commit
7922cabb5b
  1. 11
      ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js
  2. 15
      ruoyi-admin/src/main/resources/templates/demo/modal/layer.html
  3. 6
      ruoyi-admin/src/main/resources/templates/demo/operate/table.html
  4. 2
      ruoyi-admin/src/main/resources/templates/demo/table/curd.html
  5. 4
      ruoyi-admin/src/main/resources/templates/demo/table/fixedColumns.html
  6. 2
      ruoyi-admin/src/main/resources/templates/monitor/logininfor/logininfor.html
  7. 2
      ruoyi-admin/src/main/resources/templates/monitor/online/online.html
  8. 2
      ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html
  9. 4
      ruoyi-admin/src/main/resources/templates/system/config/config.html
  10. 4
      ruoyi-admin/src/main/resources/templates/system/dict/data/data.html
  11. 4
      ruoyi-admin/src/main/resources/templates/system/dict/type/type.html
  12. 4
      ruoyi-admin/src/main/resources/templates/system/notice/notice.html
  13. 4
      ruoyi-admin/src/main/resources/templates/system/post/post.html
  14. 2
      ruoyi-admin/src/main/resources/templates/system/role/authUser.html
  15. 4
      ruoyi-admin/src/main/resources/templates/system/role/role.html
  16. 4
      ruoyi-admin/src/main/resources/templates/system/user/user.html
  17. 4
      ruoyi-generator/src/main/resources/vm/html/list.html.vm
  18. 4
      ruoyi-quartz/src/main/resources/templates/monitor/job/job.html
  19. 2
      ruoyi-quartz/src/main/resources/templates/monitor/job/jobLog.html

11
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js

@ -139,9 +139,10 @@
$.btTable.on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table load-success.bs.table", function () {
// 工具栏按钮控制
var rows = $.common.isEmpty($.table._option.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.uniqueId);
$('#' + $.table._option.toolbar + ' .btn-del').toggleClass('disabled', !rows.length);
$('#' + $.table._option.toolbar + ' .btn-edit').toggleClass('disabled', rows.length!=1);
$('#' + $.table._option.toolbar + ' .btn-detail').toggleClass('disabled', rows.length!=1);
// 非多个禁用
$('#' + $.table._option.toolbar + ' .multiple').toggleClass('disabled', !rows.length);
// 非单个禁用
$('#' + $.table._option.toolbar + ' .single').toggleClass('disabled', rows.length!=1);
});
// 绑定选中事件、取消事件、全部选中、全部取消
$.btTable.on("check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table", function (e, rows) {
@ -708,8 +709,8 @@
closeItem(dataId);
},
// 关闭选项卡
closeTab: function () {
closeItem();
closeTab: function (dataId) {
closeItem(dataId);
},
// 禁用按钮
disable: function() {

15
ruoyi-admin/src/main/resources/templates/demo/modal/layer.html

@ -85,8 +85,10 @@
</div>
<div class="ibox-content">
<p>通过调用<code>$.modal.openTab()</code>实现。 </p>
<button type="button" class="btn btn-primary" id="button-open-6">打开</button>
<button type="button" class="btn btn-warning" id="button-open-7">关闭</button>
<button type="button" class="btn btn-primary" id="button-open-6">新窗口打开</button>
<button type="button" class="btn btn-warning" id="button-open-7">关闭当前</button>
<button type="button" class="btn btn-primary" id="button-open-14">选卡页同一页签打开</button>
<button type="button" class="btn btn-warning" id="button-open-15">关闭指定</button>
</div>
</div>
</div>
@ -240,6 +242,15 @@
$("#button-open-13").click(function(){
layer.load(0, {shade: false}); // 0代表加载的风格,支持0-2
})
$("#button-open-14").click(function(){
$.modal.parentTab('添加用户', prefix + "/form");
})
$("#button-open-15").click(function(){
// 需要关闭窗口的url
$.modal.closeTab(prefix + "/form");
})
</script>
</body>
</html>

6
ruoyi-admin/src/main/resources/templates/demo/operate/table.html

@ -9,10 +9,10 @@
<a class="btn btn-success" onclick="$.operate.add()">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()">
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-info" onclick="$.table.importExcel()">
@ -21,7 +21,7 @@
<a class="btn btn-warning" onclick="$.table.exportExcel()">
<i class="fa fa-download"></i> 导出
</a>
<a class="btn btn-info btn-detail disabled" onclick="$.operate.detail()">
<a class="btn btn-info single disabled" onclick="$.operate.detail()">
<i class="fa fa-search"></i> 详细
</a>
<a class="btn btn-danger" onclick="$.operate.clean()">

2
ruoyi-admin/src/main/resources/templates/demo/table/curd.html

@ -9,7 +9,7 @@
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 新增行
</a>
<a class="btn btn-danger btn-del disabled" onclick="removeRow()">
<a class="btn btn-danger multiple disabled" onclick="removeRow()">
<i class="fa fa-remove"></i> 删除选择行
</a>
<a class="btn btn-danger" onclick="removeRowByUniqueId()">

4
ruoyi-admin/src/main/resources/templates/demo/table/fixedColumns.html

@ -10,10 +10,10 @@
<a class="btn btn-success">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled">
<a class="btn btn-primary single disabled">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled">
<a class="btn btn-danger multiple disabled">
<i class="fa fa-remove"></i> 删除
</a>
</div>

2
ruoyi-admin/src/main/resources/templates/monitor/logininfor/logininfor.html

@ -38,7 +38,7 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:logininfor:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:logininfor:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:logininfor:remove">

2
ruoyi-admin/src/main/resources/templates/monitor/online/online.html

@ -26,7 +26,7 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-danger btn-del disabled" onclick="javascript:batchForceLogout()" shiro:hasPermission="monitor:online:batchForceLogout">
<a class="btn btn-danger multiple disabled" onclick="javascript:batchForceLogout()" shiro:hasPermission="monitor:online:batchForceLogout">
<i class="fa fa-sign-out"></i> 强退
</a>
</div>

2
ruoyi-admin/src/main/resources/templates/monitor/operlog/operlog.html

@ -44,7 +44,7 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:operlog:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:operlog:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:operlog:remove">

4
ruoyi-admin/src/main/resources/templates/system/config/config.html

@ -41,10 +41,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:config:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:config:edit">
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:config:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:config:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:config:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:config:export">

4
ruoyi-admin/src/main/resources/templates/system/dict/data/data.html

@ -37,10 +37,10 @@
<a class="btn btn-success" onclick="add()" shiro:hasPermission="system:dict:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:dict:edit">
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:dict:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:dict:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:dict:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:dict:export">

4
ruoyi-admin/src/main/resources/templates/system/dict/type/type.html

@ -41,10 +41,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:dict:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:dict:edit">
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:dict:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:dict:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:dict:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:dict:export">

4
ruoyi-admin/src/main/resources/templates/system/notice/notice.html

@ -35,10 +35,10 @@
<a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="system:notice:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.editFull()" shiro:hasPermission="system:notice:edit">
<a class="btn btn-primary single disabled" onclick="$.operate.editFull()" shiro:hasPermission="system:notice:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:notice:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:notice:remove">
<i class="fa fa-remove"></i> 删除
</a>
</div>

4
ruoyi-admin/src/main/resources/templates/system/post/post.html

@ -35,10 +35,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:post:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:post:edit">
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:post:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:post:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:post:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:post:export">

2
ruoyi-admin/src/main/resources/templates/system/role/authUser.html

@ -30,7 +30,7 @@
<a class="btn btn-success" onclick="selectUser()" shiro:hasPermission="system:role:add">
<i class="fa fa-plus"></i> 添加用户
</a>
<a class="btn btn-danger btn-del disabled" onclick="cancelAuthUserAll()" shiro:hasPermission="system:role:remove">
<a class="btn btn-danger multiple disabled" onclick="cancelAuthUserAll()" shiro:hasPermission="system:role:remove">
<i class="fa fa-remove"></i> 批量取消授权
</a>
<a class="btn btn-warning" onclick="closeItem()">

4
ruoyi-admin/src/main/resources/templates/system/role/role.html

@ -41,10 +41,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:role:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:role:edit">
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:role:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:role:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:role:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export">

4
ruoyi-admin/src/main/resources/templates/system/user/user.html

@ -67,10 +67,10 @@
<a class="btn btn-success" onclick="$.operate.addTab()" shiro:hasPermission="system:user:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.editTab()" shiro:hasPermission="system:user:edit">
<a class="btn btn-primary single disabled" onclick="$.operate.editTab()" shiro:hasPermission="system:user:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:user:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:user:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="system:user:import">

4
ruoyi-generator/src/main/resources/vm/html/list.html.vm

@ -50,10 +50,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="${moduleName}:${classname}:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="${moduleName}:${classname}:edit">
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="${moduleName}:${classname}:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="${moduleName}:${classname}:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="${moduleName}:${classname}:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="${moduleName}:${classname}:export">

4
ruoyi-quartz/src/main/resources/templates/monitor/job/job.html

@ -38,10 +38,10 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="monitor:job:add">
<i class="fa fa-plus"></i> 新增
</a>
<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="monitor:job:edit">
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="monitor:job:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:job:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:job:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="monitor:job:export">

2
ruoyi-quartz/src/main/resources/templates/monitor/job/jobLog.html

@ -42,7 +42,7 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-danger btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:job:remove">
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="monitor:job:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-danger" onclick="$.operate.clean()" shiro:hasPermission="monitor:job:remove">

Loading…
Cancel
Save