fastui 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjUxNWM0MGZiYWNjZmE5NzVhNWEwNWNmYTk5NTYxYzU2NjQ0MWRhYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTJmZGZjNjhjYWEzNzE3ODEzNDNjYTRjNGU2MTU3NDQyODBiY2EzYQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmY5ZTM1NmQ1ZDJmYzBmYjA2YmNkYjE5OTdkODRmNzM3YWUxNjNlOTUxODVm
|
10
|
+
Yzk0OTQxNjY0MDYyYmEwZGE1ODQ5MTdmZmMwNmRiMzE2Njc5NmI4M2I1OTVi
|
11
|
+
MGI1MThhYmQ5ZmIyM2I2NThlZGY2MjUzYzM0MmYzMDVjMTU0NGI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2M1ZTI1NmQ0OTdmMDZmYTg3NzE4ODU1ZWJhZWYzMGIxYjE1ZjU4YjE3ZDZm
|
14
|
+
ODhlM2YwYzUzMTc3ZDg2MTNiZGEwZGY3NGJlN2M4NjQ3NGIyOTZlOGJiYmE0
|
15
|
+
MTNlZDgxNTQ5Y2Q1NDhiNzQzMzRhNzdmN2Y2ZTBjM2M2NTk0YjU=
|
@@ -7,7 +7,7 @@ module Fastui
|
|
7
7
|
def index
|
8
8
|
@m_roles = MRole.scoped
|
9
9
|
data = paginate(@m_roles)
|
10
|
-
respond_with(data.to_json({:include => :
|
10
|
+
respond_with(data.to_json({:include => :m_people,:methods => :m_person_ids}))
|
11
11
|
end
|
12
12
|
|
13
13
|
def show
|
@@ -17,7 +17,7 @@ module Fastui
|
|
17
17
|
|
18
18
|
def edit
|
19
19
|
@m_role = MRole.find(params[:id])
|
20
|
-
respond_with(@m_role.to_json({:include => :
|
20
|
+
respond_with(@m_role.to_json({:include => :m_people,:methods => :m_person_ids}))
|
21
21
|
end
|
22
22
|
|
23
23
|
def new
|
data/app/models/fastui/m_role.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
module Fastui
|
2
2
|
class MRole < MObject
|
3
3
|
# attr_accessible :title, :body
|
4
|
-
attr_accessible :
|
5
|
-
has_many :
|
6
|
-
has_many :
|
4
|
+
attr_accessible :m_person_ids
|
5
|
+
has_many :m_role_assignments, :foreign_key => 'm_role_id', :class_name => 'Fastui::MRoleAssignment'
|
6
|
+
has_many :m_people, :through => :m_role_assignments, :source => :m_person
|
7
7
|
|
8
8
|
|
9
9
|
|
data/lib/fastui/version.rb
CHANGED
@@ -5,73 +5,77 @@ Fastui::View.instance.config do |conf|
|
|
5
5
|
conf.copyright = 'Copyright 2007-2013 ChunTeng Co., Ltd.'
|
6
6
|
|
7
7
|
default = [
|
8
|
-
{name: 'entity_kind', title: '
|
9
|
-
{name: 'seq', title: '
|
10
|
-
{name: 'is_active', title: '
|
11
|
-
{name: 'note', title: '
|
12
|
-
{name: 'help', title: '
|
13
|
-
{name: 'createdbyorg_id', title: '
|
14
|
-
{name: 'createdby_id', title: '
|
15
|
-
{name: 'updatedby_id', title: '
|
8
|
+
{name: 'entity_kind', title: '实体种类', datatype: 'VRadio'},
|
9
|
+
{name: 'seq', title: '排序', datatype: 'VInteger'},
|
10
|
+
{name: 'is_active', title: '是否激活', datatype: 'VBoolean'},
|
11
|
+
{name: 'note', title: '备注', datatype: 'VText'},
|
12
|
+
{name: 'help', title: '帮助', datatype: 'VHtml', display: 'form'},
|
13
|
+
{name: 'createdbyorg_id', title: '创建组织', datatype: 'VTable', ref: {entity: 'Fastui::MOrg'},display: 'grid'},
|
14
|
+
{name: 'createdby_id', title: '创建人', datatype: 'VLookup', ref: {entity: 'Fastui::MPerson'}, display: 'grid'},
|
15
|
+
{name: 'updatedby_id', title: '更新人', datatype: 'VLookup', ref: {entity: 'Fastui::MPerson'}, display: 'grid'}
|
16
16
|
]
|
17
17
|
|
18
|
-
conf.win :m_menu, title: '
|
19
|
-
w.tab :m_menu, title: '
|
18
|
+
conf.win :m_menu, title: '菜单', window_kind: 'maintain' do |w|
|
19
|
+
w.tab :m_menu, title: '菜单', entity: 'Fastui::MMenu', readonly: true, members: [
|
20
20
|
{name: 'id', title: 'ID', datatype: 'VInter', readonly: true},
|
21
|
-
{name: 'title', title: '
|
22
|
-
{name: 'print_text', title: '
|
23
|
-
{name: 'name', title: '
|
21
|
+
{name: 'title', title: '标题', datatype: 'VString'},
|
22
|
+
{name: 'print_text', title: '打印文本', datatype: 'VString'},
|
23
|
+
{name: 'name', title: '标识', datatype: 'VString'}
|
24
24
|
] + default
|
25
|
-
w.tab :m_menu_item, title: '
|
25
|
+
w.tab :m_menu_item, title: '菜单项', entity: 'Fastui::MMenuItem', included_tab: 'm_menu', grid_kind: 'VTreeGrid', members: [
|
26
26
|
{name: 'id', title: 'ID', datatype: 'VInter', readonly: true},
|
27
|
-
{name: 'title', title: '
|
28
|
-
{name: 'print_text', title: '
|
29
|
-
{name: 'name', title: '
|
30
|
-
{name: 'm_menu_id', title: '
|
31
|
-
{name: 'window', title: '
|
32
|
-
{name: 'parent_id', title: '
|
27
|
+
{name: 'title', title: '标题', datatype: 'VTreeText'},
|
28
|
+
{name: 'print_text', title: '打印文本', datatype: 'VString'},
|
29
|
+
{name: 'name', title: '标识', datatype: 'VString'},
|
30
|
+
{name: 'm_menu_id', title: '对应菜单', datatype: 'VLookup', ref: {entity: 'Fastui::MMenu'}, default_logic: "{id:${m_menu_id},title:'${m_menu_title}'}"},
|
31
|
+
{name: 'window', title: '对应窗口', datatype: 'VString'},
|
32
|
+
{name: 'parent_id', title: '上级组织', datatype: 'VTree', ref: {entity: 'Fastui::MMenuItem'}}
|
33
33
|
] + default
|
34
34
|
end
|
35
35
|
|
36
|
-
conf.win :m_org, title: '
|
37
|
-
w.tab :m_org, title: '
|
36
|
+
conf.win :m_org, title: '组织', window_kind: 'maintain' do |w|
|
37
|
+
w.tab :m_org, title: '组织', entity: 'Fastui::MOrg', grid_kind: 'VTreeGrid', members: [
|
38
38
|
{name: 'id', title: 'ID', datatype: 'VInteger', readonly: true, },
|
39
|
-
{name: 'title', title: '
|
40
|
-
{name: 'print_text', title: '
|
41
|
-
{name: 'name', title: '
|
42
|
-
{name: 'parent_id', title: '
|
39
|
+
{name: 'title', title: '名称', datatype: 'VTreeText'},
|
40
|
+
{name: 'print_text', title: '打印文本', datatype: 'VString'},
|
41
|
+
{name: 'name', title: '标识', datatype: 'VString'},
|
42
|
+
{name: 'parent_id', title: '上级组织', datatype: 'VTree', ref: {entity: 'Fastui::MOrg'}, default_logic: "{id:${m_org_id},title:'${m_org_title}'}"}
|
43
43
|
] + default
|
44
44
|
end
|
45
45
|
|
46
|
-
conf.win :m_person, title: '
|
47
|
-
w.tab :m_person, title: '
|
46
|
+
conf.win :m_person, title: '人员', window_kind: 'maintain' do |w|
|
47
|
+
w.tab :m_person, title: '人员', entity: 'Fastui::MPerson', members: [
|
48
48
|
{name: 'id', title: 'ID', datatype: 'VInteger', readonly: true},
|
49
|
-
{name: 'title', title: '
|
50
|
-
{name: 'print_text', title: '
|
51
|
-
{name: 'name', title: '
|
52
|
-
{name: 'access_level', title: '
|
49
|
+
{name: 'title', title: '标题', datatype: 'VString'},
|
50
|
+
{name: 'print_text', title: '打印文本', datatype: 'VString', vtype:'url'},
|
51
|
+
{name: 'name', title: '标识', datatype: 'VString'},
|
52
|
+
{name: 'access_level', title: '访问级别', datatype: 'VList'}
|
53
53
|
] + default
|
54
|
-
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
conf.win :m_role, title:'角色', window_kind: 'maintain' do |w|
|
58
|
+
w.tab :m_role, title: '角色', entity: 'Fastui::MRole', members: [
|
55
59
|
{name: 'id', title: 'ID', datatype: 'VInteger', readonly: true},
|
56
|
-
{name: 'title', title: '
|
57
|
-
{name: 'print_text', title: '
|
58
|
-
{name: 'name', title: '
|
60
|
+
{name: 'title', title: '标题', datatype: 'VString'},
|
61
|
+
{name: 'print_text', title: '打印文本', datatype: 'VString'},
|
62
|
+
{name: 'name', title: '标识', datatype: 'VString'}
|
59
63
|
] + default
|
60
64
|
end
|
61
65
|
|
62
|
-
conf.win :m_list, title: '
|
63
|
-
w.tab :m_list, title: '
|
66
|
+
conf.win :m_list, title: '数据字典', window_kind: 'maintain' do |w|
|
67
|
+
w.tab :m_list, title: '枚举', entity: 'Fastui::MList', members: [
|
64
68
|
{name: 'id', title: 'ID', datatype: 'VInteger', readonly: true},
|
65
|
-
{name: 'title', title: '
|
66
|
-
{name: 'print_text', title: '
|
67
|
-
{name: 'name', title: '
|
69
|
+
{name: 'title', title: '标题', datatype: 'VString'},
|
70
|
+
{name: 'print_text', title: '打印文本', datatype: 'VString'},
|
71
|
+
{name: 'name', title: '标识', datatype: 'VString'}
|
68
72
|
] + default
|
69
|
-
w.tab :m_list_item, title: '
|
73
|
+
w.tab :m_list_item, title: '枚举项', entity: 'Fastui::MListItem', included_tab: 'm_list', members: [
|
70
74
|
{name: 'id', title: 'ID', datatype: 'VInteger', readonly: true},
|
71
|
-
{name:
|
72
|
-
{name:
|
73
|
-
{name: 'name', title: '
|
74
|
-
{name: 'm_list_id', title: '
|
75
|
+
{name:'title', title: '标题', datatype:'VString'},
|
76
|
+
{name:'print_text', title: '打印文本', datatype:'VString'},
|
77
|
+
{name: 'name', title: '标识', datatype: 'VString'},
|
78
|
+
{name: 'm_list_id', title: '所属枚举', datatype: 'VLookup', ref: {entity: 'Fastui::MList'}}
|
75
79
|
] + default
|
76
80
|
end
|
77
81
|
|