Skip to content

Commit

Permalink
move dir
Browse files Browse the repository at this point in the history
  • Loading branch information
devezhao committed Oct 22, 2018
1 parent 9cf69b5 commit 5dc396e
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.rebuild.web.admin.entityhub;
package com.rebuild.web.admin.entity;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.rebuild.web.admin.entityhub;
package com.rebuild.web.admin.entity;

import java.io.IOException;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.rebuild.web.admin.entityhub;
package com.rebuild.web.admin.entity;

import java.io.IOException;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.rebuild.web.admin.entityhub;
package com.rebuild.web.admin.entity;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html>
<head>
<%@ include file="/_include/Head.jsp"%>
<title>相关项</title>
<title>视图相关项</title>
</head>
<body class="dialog">
<div class="main-content">
Expand Down
27 changes: 10 additions & 17 deletions src/main/webapp/assets/js/rb-list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,7 @@ const RbListPage = {

// 列表快速查询
const QuickFilter = {
_ModalQFields: null,


// @el - 控件
// @entity - 实体
init(el, entity) {
Expand All @@ -437,6 +436,7 @@ const QuickFilter = {
this.initEvent()
this.loadFilter()
},

initEvent() {
let that = this
let btn = this.root.find('.J_search-btn').click(function(){
Expand All @@ -447,7 +447,7 @@ const QuickFilter = {
if (event.which == 13) btn.trigger('click')
})
this.root.find('.J_qfields').click(function(event){
that.showQFieldsModal()
that.__currentModal = rb.modal(`${rb.baseUrl}/page/general-entity/quick-fields?entity=${that.entity}`, '设置快速查询字段')
})
},

Expand All @@ -456,31 +456,24 @@ const QuickFilter = {
$.get(`${rb.baseUrl}/app/${this.entity}/advfilter/quick`, function(res){
that.filterExp = res.data || { items: [] }
let qFields = []
that.filterExp.items.forEach(function(item){
qFields.push(item.label)
})
that.filterExp.items.forEach(function(item){ qFields.push(item.label) })
that.root.find('.J_search-text').attr('placeholder', '搜索 ' + qFields.join('/'))
})
},
fireFilter(val) {
if (!this.filterExp || this.filterExp.items.length == 0){
rb.notice('请先设置查询字段')
let that = this
$setTimeout(function(){
that.showQFieldsModal()
}, 1500)
return
}

this.filterExp.values = { 1: val }
RbListPage._RbList.search(this.filterExp)
},

showQFieldsModal() {
if (this._ModalQFields) this._ModalQFields.show()
else this._ModalQFields = rb.modal(`${rb.baseUrl}/page/general-entity/quick-fields?entity=${this.entity}`, '设置查询字段')
},
hideQFieldsModal() {
if (this._ModalQFields) this._ModalQFields.hide()
// 隐藏当前 Modal
hideModal() {
if (this.__currentModal) {
this.__currentModal.hide(true)
this.__currentModal = null
}
}
};
2 changes: 1 addition & 1 deletion src/main/webapp/assets/js/rb-view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const RbViewPage = {
}

$('.vtab-settings').click(function(){
that.__currentModal = rb.modal(`${rb.baseUrl}/page/general-entity/viewtab-settings?entity=${that.__entity[1]}`, '设置视图相关项')
that.__currentModal = rb.modal(`${rb.baseUrl}/page/admin/entity/viewtab-config?entity=${that.__entity[1]}`, '设置视图相关项')
})
},

Expand Down
6 changes: 3 additions & 3 deletions src/main/webapp/general-entity/quick-fields.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<html>
<head>
<%@ include file="/_include/Head.jsp"%>
<title>查询字段</title>
<title>快速查询字段</title>
</head>
<body class="dialog">
<div class="main-content">
<div class="row m-0">
<div class="col-6 sortable-swap">
<h5 class="sortable-box-title">已设置</h5>
<h5 class="sortable-box-title">查询字段</h5>
<div class="sortable-box rb-scroller">
<ol class="dd-list J_config"></ol>
</div>
Expand All @@ -30,7 +30,7 @@
</label>
</div>
<button class="btn btn-primary J_save" type="button">保存</button>
<button class="btn btn-secondary" onclick="parent.QuickFilter.hideQFieldsModal()" type="button">取消</button>
<button class="btn btn-secondary" onclick="parent.QuickFilter.hideModal()" type="button">取消</button>
</div>
</div>
<%@ include file="/_include/Foot.jsp"%>
Expand Down

0 comments on commit 5dc396e

Please sign in to comment.