fastui 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.md +53 -0
- data/Rakefile +40 -0
- data/app/assets/images/fastui/application/application.png +0 -0
- data/app/assets/images/fastui/application/application_add.png +0 -0
- data/app/assets/images/fastui/application/application_cascade.png +0 -0
- data/app/assets/images/fastui/application/application_delete.png +0 -0
- data/app/assets/images/fastui/application/application_double.png +0 -0
- data/app/assets/images/fastui/application/application_edit.png +0 -0
- data/app/assets/images/fastui/application/application_error.png +0 -0
- data/app/assets/images/fastui/application/application_form.png +0 -0
- data/app/assets/images/fastui/application/application_form_add.png +0 -0
- data/app/assets/images/fastui/application/application_form_delete.png +0 -0
- data/app/assets/images/fastui/application/application_form_edit.png +0 -0
- data/app/assets/images/fastui/application/application_form_magnify.png +0 -0
- data/app/assets/images/fastui/application/application_get.png +0 -0
- data/app/assets/images/fastui/application/application_go.png +0 -0
- data/app/assets/images/fastui/application/application_home.png +0 -0
- data/app/assets/images/fastui/application/application_key.png +0 -0
- data/app/assets/images/fastui/application/application_lightning.png +0 -0
- data/app/assets/images/fastui/application/application_link.png +0 -0
- data/app/assets/images/fastui/application/application_osx.png +0 -0
- data/app/assets/images/fastui/application/application_osx_terminal.png +0 -0
- data/app/assets/images/fastui/application/application_put.png +0 -0
- data/app/assets/images/fastui/application/application_side_boxes.png +0 -0
- data/app/assets/images/fastui/application/application_side_contract.png +0 -0
- data/app/assets/images/fastui/application/application_side_expand.png +0 -0
- data/app/assets/images/fastui/application/application_side_list.png +0 -0
- data/app/assets/images/fastui/application/application_side_tree.png +0 -0
- data/app/assets/images/fastui/application/application_split.png +0 -0
- data/app/assets/images/fastui/application/application_tile_horizontal.png +0 -0
- data/app/assets/images/fastui/application/application_tile_vertical.png +0 -0
- data/app/assets/images/fastui/application/application_view_columns.png +0 -0
- data/app/assets/images/fastui/application/application_view_detail.png +0 -0
- data/app/assets/images/fastui/application/application_view_gallery.png +0 -0
- data/app/assets/images/fastui/application/application_view_icons.png +0 -0
- data/app/assets/images/fastui/application/application_view_list.png +0 -0
- data/app/assets/images/fastui/application/application_view_tile.png +0 -0
- data/app/assets/images/fastui/application/application_xp.png +0 -0
- data/app/assets/images/fastui/application/application_xp_terminal.png +0 -0
- data/app/assets/images/fastui/arrow/accept.png +0 -0
- data/app/assets/images/fastui/arrow/add.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_branch.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_divide.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_down.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_in.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_inout.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_join.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_left.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_merge.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_out.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_redo.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_refresh.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_refresh_small.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_rotate_anticlockwise.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_rotate_clockwise.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_switch.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_turn_left.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_turn_right.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_undo.png +0 -0
- data/app/assets/images/fastui/arrow/arrow_up.png +0 -0
- data/app/assets/images/fastui/arrow/cross.png +0 -0
- data/app/assets/images/fastui/cross.png +0 -0
- data/app/assets/images/fastui/key_go.png +0 -0
- data/app/assets/images/fastui/list1211.png +0 -0
- data/app/assets/images/fastui/loading.gif +0 -0
- data/app/assets/images/fastui/lock.png +0 -0
- data/app/assets/images/fastui/locked.png +0 -0
- data/app/assets/images/fastui/table/help.png +0 -0
- data/app/assets/images/fastui/table/table.png +0 -0
- data/app/assets/images/fastui/table/table_add.png +0 -0
- data/app/assets/images/fastui/table/table_delete.png +0 -0
- data/app/assets/images/fastui/table/table_edit.png +0 -0
- data/app/assets/images/fastui/table/table_save.png +0 -0
- data/app/assets/images/fastui/upload.png +0 -0
- data/app/assets/javascripts/fastui/app/Ctx.js +33 -0
- data/app/assets/javascripts/fastui/app/Env.js +38 -0
- data/app/assets/javascripts/fastui/app/Evaluator.js +6 -0
- data/app/assets/javascripts/fastui/app/inflection.js +656 -0
- data/app/assets/javascripts/fastui/app/store/MListMgr.js +34 -0
- data/app/assets/javascripts/fastui/app/store/MWindowMgr.js +27 -0
- data/app/assets/javascripts/fastui/app/view/FormFactory.js +11 -0
- data/app/assets/javascripts/fastui/app/view/Rest.js +40 -0
- data/app/assets/javascripts/fastui/app/view/VCommentForm.js +53 -0
- data/app/assets/javascripts/fastui/app/view/VCriteria.js +25 -0
- data/app/assets/javascripts/fastui/app/view/VCustomForm.js +34 -0
- data/app/assets/javascripts/fastui/app/view/VCustomTab.js +266 -0
- data/app/assets/javascripts/fastui/app/view/VForm.js +117 -0
- data/app/assets/javascripts/fastui/app/view/VGrid.js +172 -0
- data/app/assets/javascripts/fastui/app/view/VHelpWindow.js +21 -0
- data/app/assets/javascripts/fastui/app/view/VLoginForm.js +101 -0
- data/app/assets/javascripts/fastui/app/view/VLoginWindow.js +73 -0
- data/app/assets/javascripts/fastui/app/view/VMenu.js +75 -0
- data/app/assets/javascripts/fastui/app/view/VSearchWindow.js +102 -0
- data/app/assets/javascripts/fastui/app/view/VTab.js +293 -0
- data/app/assets/javascripts/fastui/app/view/VToolbar.js +23 -0
- data/app/assets/javascripts/fastui/app/view/VTreeGrid.js +158 -0
- data/app/assets/javascripts/fastui/app/view/VVWindow.js +72 -0
- data/app/assets/javascripts/fastui/app/view/VWindow.js +52 -0
- data/app/assets/javascripts/fastui/app/view/Viewport.js +54 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VCheckBox.js +19 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VCheckboxGroup.js +19 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VDate.js +19 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VFieldFactory.js +77 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VFile.js +22 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VHtmlEditor.js +19 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VLongComboBox.js +19 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VLookup.js +45 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VMultipleChoice.js +46 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VNumber.js +18 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VSexSelect.js +30 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VSingleChoice.js +35 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VText.js +17 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VTextArea.js +19 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VTree.js +17 -0
- data/app/assets/javascripts/fastui/app/view/vfield/VYesOrNo.js +30 -0
- data/app/assets/javascripts/fastui/application.js +18 -0
- data/app/assets/javascripts/fastui/data/mwindows.json +7 -0
- data/app/assets/javascripts/fastui/data/updateMWindows.json +4 -0
- data/app/assets/javascripts/fastui/extjs4/locale/ext-lang-zh_CN.js +304 -0
- data/app/assets/javascripts/fastui/fastui.js +23 -0
- data/app/assets/stylesheets/fastui/admin.css +95 -0
- data/app/assets/stylesheets/fastui/application.css +14 -0
- data/app/controllers/fastui/admin_controller.rb +9 -0
- data/app/controllers/fastui/application_controller.rb +19 -0
- data/app/controllers/fastui/m_list_items_controller.rb +64 -0
- data/app/controllers/fastui/m_lists_controller.rb +58 -0
- data/app/controllers/fastui/m_menu_items_controller.rb +69 -0
- data/app/controllers/fastui/m_menus_controller.rb +58 -0
- data/app/controllers/fastui/m_orgs_controller.rb +62 -0
- data/app/controllers/fastui/m_people_controller.rb +89 -0
- data/app/controllers/fastui/m_roles_controller.rb +61 -0
- data/app/controllers/fastui/m_views_controller.rb +18 -0
- data/app/controllers/fastui/sessions_controller.rb +42 -0
- data/app/helpers/fastui/admin_helper.rb +4 -0
- data/app/helpers/fastui/application_helper.rb +4 -0
- data/app/models/fastui/acl.rb +21 -0
- data/app/models/fastui/ctx.rb +15 -0
- data/app/models/fastui/env.rb +16 -0
- data/app/models/fastui/m_acl_entry.rb +5 -0
- data/app/models/fastui/m_list.rb +6 -0
- data/app/models/fastui/m_list_item.rb +8 -0
- data/app/models/fastui/m_menu.rb +10 -0
- data/app/models/fastui/m_menu_item.rb +11 -0
- data/app/models/fastui/m_object.rb +41 -0
- data/app/models/fastui/m_org.rb +16 -0
- data/app/models/fastui/m_person.rb +21 -0
- data/app/models/fastui/m_relationship.rb +9 -0
- data/app/models/fastui/m_role.rb +11 -0
- data/app/models/fastui/user_authenticator.rb +18 -0
- data/app/views/fastui/admin/index.html.erb +2 -0
- data/app/views/layouts/fastui/application.html.erb +22 -0
- data/config/routes.rb +19 -0
- data/db/migrate/20121017013727_create_fastui_m_menu_items.rb +28 -0
- data/db/migrate/20121017014112_create_fastui_m_menus.rb +20 -0
- data/db/migrate/20121017024943_create_fastui_m_orgs.rb +26 -0
- data/db/migrate/20121017025014_create_fastui_m_people.rb +24 -0
- data/db/migrate/20121204021053_create_fastui_m_roles.rb +22 -0
- data/db/migrate/20121204061207_create_fastui_m_relationships.rb +25 -0
- data/db/migrate/20121211062955_create_fastui_m_lists.rb +23 -0
- data/db/migrate/20121211074436_create_fastui_m_list_items.rb +21 -0
- data/db/migrate/20121217020606_create_fastui_m_acl_entries.rb +22 -0
- data/lib/fastui/engine.rb +8 -0
- data/lib/fastui/m_model.rb +26 -0
- data/lib/fastui/tab.rb +26 -0
- data/lib/fastui/version.rb +3 -0
- data/lib/fastui/view.rb +32 -0
- data/lib/fastui/window.rb +43 -0
- data/lib/fastui.rb +8 -0
- data/lib/generators/fastui/USAGE +21 -0
- data/lib/generators/fastui/install_generator.rb +31 -0
- data/lib/generators/fastui/templates/fastui_config.erb +77 -0
- data/lib/tasks/create_sys_data.rake +11 -0
- data/lib/tasks/fastui_tasks.rake +707 -0
- data/lib/tasks/loading_data.rake +28 -0
- metadata +276 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VDate',{
|
2
|
+
extend: 'Ext.form.field.Date',
|
3
|
+
format: 'Y-m-d',
|
4
|
+
valueObject: {},
|
5
|
+
winCtx:{},
|
6
|
+
winId:0,
|
7
|
+
rest:{},
|
8
|
+
|
9
|
+
initComponent:function(){
|
10
|
+
this.fieldLabel = this.getFValue('title');
|
11
|
+
this.name = this.rest.getTableName() + '[' + this.getFValue('m_property').name + ']';
|
12
|
+
this.disabled = this.getFValue('is_readonly');
|
13
|
+
this.allowBlank = true;
|
14
|
+
this.callParent();
|
15
|
+
},
|
16
|
+
getFValue:function (key) {
|
17
|
+
return this.valueObject[key];
|
18
|
+
}
|
19
|
+
});
|
@@ -0,0 +1,77 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VFieldFactory', {
|
2
|
+
singleton: true,
|
3
|
+
|
4
|
+
VType: {
|
5
|
+
VText: 'Fastui::MText',
|
6
|
+
VTree: 'Fastui::MTree',
|
7
|
+
VDate: 'Fastui::MDate',
|
8
|
+
VHtmlEditor: 'Fastui::MHtmlEditor',
|
9
|
+
VCombobox: 'Fastui::MCombobox',
|
10
|
+
VMultiCombobox: 'Fastui::MMultiCombobox',
|
11
|
+
VLongCombobox: 'Fastui::MLongCombobox',
|
12
|
+
VTextArea: 'Fastui::MTextArea',
|
13
|
+
VNumber: 'Fastui::MNumber',
|
14
|
+
VCheckbox: 'Fastui::MCheckbox',
|
15
|
+
VCheckboxGroup: 'Fastui::MCheckboxGroup',
|
16
|
+
VSexSelect: 'Fastui::MSexSelect',
|
17
|
+
VFile: 'Fastui::MFile',
|
18
|
+
VYesOrNo: 'Fastui::MYesOrNo',
|
19
|
+
VGridColumnXtypeCombo: 'Fastui::MGridColumnXtypeCombo',
|
20
|
+
VList: 'Fastui::MList',
|
21
|
+
VLookup: 'Fastui::MRelation'
|
22
|
+
},
|
23
|
+
|
24
|
+
buildField: function (field, winCtx, winId, rest) {
|
25
|
+
var dt = field.datatype;
|
26
|
+
switch (field.datatype) {
|
27
|
+
case 'VText':
|
28
|
+
return Ext.create('FastUI.view.vfield.VText', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
29
|
+
break;
|
30
|
+
case 'VTree':
|
31
|
+
return Ext.create('FastUI.view.vfield.VTree', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
32
|
+
break;
|
33
|
+
case 'VDate':
|
34
|
+
return Ext.create('FastUI.view.vfield.VDate', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
35
|
+
break;
|
36
|
+
case 'VHtmlEditor':
|
37
|
+
return Ext.create('FastUI.view.vfield.VHtmlEditor', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
38
|
+
break;
|
39
|
+
case 'VSingleChoice':
|
40
|
+
return Ext.create('FastUI.view.vfield.VSingleChoice', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
41
|
+
break;
|
42
|
+
case 'VMultipleChoice':
|
43
|
+
return Ext.create('FastUI.view.vfield.VMultipleChoice', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
44
|
+
break;
|
45
|
+
case this.VType.VLongCombobox:
|
46
|
+
return Ext.create('FastUI.view.vfield.VLongCombobox', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
47
|
+
break;
|
48
|
+
case 'VTextArea':
|
49
|
+
return Ext.create('FastUI.view.vfield.VTextArea', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
50
|
+
break;
|
51
|
+
case 'VNumber':
|
52
|
+
return Ext.create('FastUI.view.vfield.VNumber', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
53
|
+
break;
|
54
|
+
case 'VCheckbox':
|
55
|
+
return Ext.create('FastUI.view.vfield.VCheckbox', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
56
|
+
break;
|
57
|
+
case 'VCheckboxGroup':
|
58
|
+
return Ext.create('FastUI.view.vfield.VCheckboxGroup', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
59
|
+
break;
|
60
|
+
case 'VSexSelect':
|
61
|
+
return Ext.create('FastUI.view.vfield.VSexSelect', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
62
|
+
break;
|
63
|
+
case 'VFile':
|
64
|
+
return Ext.create('FastUI.view.vfield.VFile', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
65
|
+
break;
|
66
|
+
case 'VYesOrNo':
|
67
|
+
return Ext.create('FastUI.view.vfield.VYesOrNo', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
68
|
+
break;
|
69
|
+
case 'VList':
|
70
|
+
return Ext.create('FastUI.view.vfield.VCombobox', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
71
|
+
break;
|
72
|
+
case 'VLookup':
|
73
|
+
return Ext.create('FastUI.view.vfield.VLookup', {valueObject: field, winCtx: winCtx, winId: winId, rest: rest});
|
74
|
+
break;
|
75
|
+
}
|
76
|
+
}
|
77
|
+
});
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VFile',{
|
2
|
+
extend: 'Ext.form.field.File',
|
3
|
+
|
4
|
+
valueObject: {},
|
5
|
+
winCtx:{},
|
6
|
+
winId:0,
|
7
|
+
rest:{},
|
8
|
+
buttonText: '',
|
9
|
+
buttonConfig: {
|
10
|
+
iconCls: 'fastui-upload'
|
11
|
+
},
|
12
|
+
initComponent:function(){
|
13
|
+
this.fieldLabel = this.getFValue('title');
|
14
|
+
this.name = this.rest.getTableName() + '[' + this.getFValue('m_property').name + ']';
|
15
|
+
this.disabled = this.getFValue('is_readonly');
|
16
|
+
this.allowBlank = true;
|
17
|
+
this.callParent();
|
18
|
+
},
|
19
|
+
getFValue:function (key) {
|
20
|
+
return this.valueObject[key];
|
21
|
+
}
|
22
|
+
});
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VHtmlEditor',{
|
2
|
+
extend: 'Ext.form.field.HtmlEditor',
|
3
|
+
|
4
|
+
valueObject: {},
|
5
|
+
winCtx:{},
|
6
|
+
winId:0,
|
7
|
+
rest:{},
|
8
|
+
|
9
|
+
initComponent:function(){
|
10
|
+
this.fieldLabel = this.getFValue('title');
|
11
|
+
this.name = this.rest.getTableName() + '[' + this.getFValue('m_property').name + ']';
|
12
|
+
this.disabled = this.getFValue('is_readonly');
|
13
|
+
this.allowBlank = true;
|
14
|
+
this.callParent();
|
15
|
+
},
|
16
|
+
getFValue:function (key) {
|
17
|
+
return this.valueObject[key];
|
18
|
+
}
|
19
|
+
});
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VLongCombobox',{
|
2
|
+
extend: 'Ext.form.field.ComboBox',
|
3
|
+
|
4
|
+
valueObject: {},
|
5
|
+
winCtx:{},
|
6
|
+
winId:0,
|
7
|
+
rest:{},
|
8
|
+
|
9
|
+
initComponent:function(){
|
10
|
+
this.fieldLabel = this.getFValue('title');
|
11
|
+
this.name = this.rest.getTableName() + '[' + this.getFValue('m_property').name + ']';
|
12
|
+
this.disabled = this.getFValue('is_readonly');
|
13
|
+
this.allowBlank = true;
|
14
|
+
this.callParent();
|
15
|
+
},
|
16
|
+
getFValue:function (key) {
|
17
|
+
return this.valueObject[key];
|
18
|
+
}
|
19
|
+
});
|
@@ -0,0 +1,45 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VLookup', {
|
2
|
+
extend:'Ext.form.field.ComboBox',
|
3
|
+
alias:'widget.vlookupwindow',
|
4
|
+
valueObject: {},
|
5
|
+
winCtx:{},
|
6
|
+
winId:0,
|
7
|
+
rest:{},
|
8
|
+
|
9
|
+
editable:false,
|
10
|
+
displayField:'title',
|
11
|
+
valueField:'id',
|
12
|
+
initComponent:function () {
|
13
|
+
this.fieldLabel = this.getFValue('title');
|
14
|
+
this.name = this.rest.getTableName() + '[' + this.getFValue('name') + ']';
|
15
|
+
this.disabled = this.getFValue('readonly');
|
16
|
+
this.allowBlank = true;
|
17
|
+
this.store = Ext.create('Ext.data.ArrayStore', {
|
18
|
+
fields:['id', 'title'],
|
19
|
+
data:[]
|
20
|
+
});
|
21
|
+
this.callParent();
|
22
|
+
},
|
23
|
+
getDefaultValue: function(){
|
24
|
+
return this.getFValue('default_logic');
|
25
|
+
},
|
26
|
+
getFValue:function (key) {
|
27
|
+
return this.valueObject[key];
|
28
|
+
},
|
29
|
+
setValue:function(value){
|
30
|
+
if(value && value.id && value.title){
|
31
|
+
this.store.add(value);
|
32
|
+
this.setValue(value.id);
|
33
|
+
}else{
|
34
|
+
this.callParent(arguments);
|
35
|
+
}
|
36
|
+
},
|
37
|
+
|
38
|
+
onTriggerClick:function () {
|
39
|
+
this.loadWindow();
|
40
|
+
},
|
41
|
+
loadWindow:function () {
|
42
|
+
this.window = Ext.create('FastUI.view.VSearchWindow',{vlookup:this});
|
43
|
+
this.window.show();
|
44
|
+
}
|
45
|
+
});
|
@@ -0,0 +1,46 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VMultipleChoice', {
|
2
|
+
extend:'Ext.form.field.ComboBox',
|
3
|
+
valueObject: {},
|
4
|
+
winCtx:{},
|
5
|
+
winId:0,
|
6
|
+
rest:{},
|
7
|
+
|
8
|
+
valueField:'id',
|
9
|
+
displayField:"title",
|
10
|
+
forceSelection:true,
|
11
|
+
multiSelect: true,
|
12
|
+
triggerAction:'all',
|
13
|
+
editable:false,
|
14
|
+
selectOnFocus:true,
|
15
|
+
|
16
|
+
initComponent:function () {
|
17
|
+
this.fieldLabel = this.getFValue('title');
|
18
|
+
this.name = this.rest.getTableName() + '[' + this.getFValue('m_property').name.pluralize()+'][]';
|
19
|
+
this.disabled = this.getFValue('readonly');
|
20
|
+
this.allowBlank = true;
|
21
|
+
this.store = this.getStore();
|
22
|
+
this.callParent();
|
23
|
+
},
|
24
|
+
getStore:function () {
|
25
|
+
var rest = Ext.create('FastUI.view.Rest', this.getMEntity().name);
|
26
|
+
return new Ext.data.JsonStore({
|
27
|
+
autoLoad:{start:0, limit:2},
|
28
|
+
fields:['id', 'title'],
|
29
|
+
proxy:{
|
30
|
+
type:'ajax',
|
31
|
+
url:rest.indexPath(),
|
32
|
+
reader:{
|
33
|
+
type:'json',
|
34
|
+
root:'rows',
|
35
|
+
totalProperty:"totalCount"
|
36
|
+
}
|
37
|
+
}
|
38
|
+
});
|
39
|
+
},
|
40
|
+
getMEntity:function(){
|
41
|
+
return this.valueObject.m_property.m_datatype.m_entity;
|
42
|
+
},
|
43
|
+
getFValue:function (key) {
|
44
|
+
return this.valueObject[key];
|
45
|
+
}
|
46
|
+
});
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VNumber',{
|
2
|
+
extend: 'Ext.form.field.Number',
|
3
|
+
valueObject: {},
|
4
|
+
winCtx:{},
|
5
|
+
winId:0,
|
6
|
+
rest:{},
|
7
|
+
|
8
|
+
initComponent:function(){
|
9
|
+
this.fieldLabel = this.getFValue('title');
|
10
|
+
this.name = this.rest.getTableName() + '[' + this.getFValue('name') + ']';
|
11
|
+
this.disabled = this.getFValue('readonly');
|
12
|
+
this.allowBlank = true;
|
13
|
+
this.callParent();
|
14
|
+
},
|
15
|
+
getFValue:function (key) {
|
16
|
+
return this.valueObject[key];
|
17
|
+
}
|
18
|
+
});
|
@@ -0,0 +1,30 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VSexSelect',{
|
2
|
+
extend: 'Ext.form.field.ComboBox',
|
3
|
+
valueObject: {},
|
4
|
+
winCtx:{},
|
5
|
+
winId:0,
|
6
|
+
rest:{},
|
7
|
+
|
8
|
+
valueField:"sex_bool",
|
9
|
+
displayField:"name",
|
10
|
+
forceSelection: true,
|
11
|
+
triggerAction: 'all',
|
12
|
+
selectOnFocus:true,
|
13
|
+
queryMode:"local",
|
14
|
+
hiddenName:this.name,
|
15
|
+
|
16
|
+
initComponent:function(){
|
17
|
+
this.fieldLabel = this.getFValue('title');
|
18
|
+
this.name = this.rest.getTableName() + '[' + this.getFValue('m_property').name + ']';
|
19
|
+
this.disabled = this.getFValue('readonly');
|
20
|
+
this.allowBlank = true;
|
21
|
+
this.store = Ext.create('Ext.data.ArrayStore',{
|
22
|
+
fields: ["name","sex_bool"],
|
23
|
+
data:[['男',true],['女',false]]
|
24
|
+
});
|
25
|
+
this.callParent();
|
26
|
+
},
|
27
|
+
getFValue:function (key) {
|
28
|
+
return this.valueObject[key];
|
29
|
+
}
|
30
|
+
});
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VSingleChoice', {
|
2
|
+
extend:'Ext.form.field.ComboBox',
|
3
|
+
requires:['FastUI.store.MListMgr'],
|
4
|
+
valueObject: {},
|
5
|
+
winCtx:{},
|
6
|
+
winId:0,
|
7
|
+
rest:{},
|
8
|
+
|
9
|
+
valueField:'name',
|
10
|
+
displayField:"title",
|
11
|
+
forceSelection:true,
|
12
|
+
triggerAction:'all',
|
13
|
+
editable:false,
|
14
|
+
selectOnFocus:true,
|
15
|
+
|
16
|
+
initComponent:function () {
|
17
|
+
this.fieldLabel = this.getFValue('title');
|
18
|
+
this.name = this.rest.getTableName() + '[' + this.getFValue('name') + ']';
|
19
|
+
this.disabled = this.getFValue('readonly');
|
20
|
+
this.allowBlank = true;
|
21
|
+
this.store = FastUI.store.MListMgr.getStore(this.getFValue('name'));
|
22
|
+
this.callParent();
|
23
|
+
},
|
24
|
+
getFValue:function (key) {
|
25
|
+
return this.valueObject[key];
|
26
|
+
},
|
27
|
+
setValue:function (value) {
|
28
|
+
if(value && value.name && value.title){
|
29
|
+
this.setValue(value.name);
|
30
|
+
}else{
|
31
|
+
this.callParent(arguments);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
});
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VText',{
|
2
|
+
extend: 'Ext.form.field.Text',
|
3
|
+
valueObject: {},
|
4
|
+
winCtx:{},
|
5
|
+
winId:0,
|
6
|
+
rest:{},
|
7
|
+
initComponent:function(){
|
8
|
+
this.fieldLabel = this.getFValue('title');
|
9
|
+
this.name = this.rest.getTableName() + '[' + this.getFValue('name') + ']';
|
10
|
+
this.disabled = this.getFValue('readonly');
|
11
|
+
this.allowBlank = true;
|
12
|
+
this.callParent();
|
13
|
+
},
|
14
|
+
getFValue:function (key) {
|
15
|
+
return this.valueObject[key];
|
16
|
+
}
|
17
|
+
});
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VTextArea',{
|
2
|
+
extend: 'Ext.form.field.TextArea',
|
3
|
+
|
4
|
+
valueObject: {},
|
5
|
+
winCtx:{},
|
6
|
+
winId:0,
|
7
|
+
rest:{},
|
8
|
+
|
9
|
+
initComponent:function(){
|
10
|
+
this.fieldLabel = this.getFValue('title');
|
11
|
+
this.name = this.rest.getTableName() + '[' + this.getFValue('name') + ']';
|
12
|
+
this.disabled = this.getFValue('readonly');
|
13
|
+
this.allowBlank = true;
|
14
|
+
this.callParent();
|
15
|
+
},
|
16
|
+
getFValue:function (key) {
|
17
|
+
return this.valueObject[key];
|
18
|
+
}
|
19
|
+
});
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VTree',{
|
2
|
+
extend: 'Ext.form.field.Text',
|
3
|
+
valueObject: {},
|
4
|
+
winCtx:{},
|
5
|
+
winId:0,
|
6
|
+
rest:{},
|
7
|
+
initComponent:function(){
|
8
|
+
this.fieldLabel = this.getFValue('title');
|
9
|
+
this.name = this.rest.getTableName() + '[' + this.getFValue('name') + ']';
|
10
|
+
this.disabled = this.getFValue('readonly');
|
11
|
+
this.allowBlank = true;
|
12
|
+
this.callParent();
|
13
|
+
},
|
14
|
+
getFValue:function (key) {
|
15
|
+
return this.valueObject[key];
|
16
|
+
}
|
17
|
+
});
|
@@ -0,0 +1,30 @@
|
|
1
|
+
Ext.define('FastUI.view.vfield.VYesOrNo',{
|
2
|
+
extend: 'Ext.form.field.ComboBox',
|
3
|
+
valueObject: {},
|
4
|
+
winCtx:{},
|
5
|
+
winId:0,
|
6
|
+
rest:{},
|
7
|
+
|
8
|
+
valueField:"bool",
|
9
|
+
displayField:"name",
|
10
|
+
forceSelection: true,
|
11
|
+
triggerAction: 'all',
|
12
|
+
selectOnFocus:true,
|
13
|
+
queryMode:"local",
|
14
|
+
hiddenName:this.name,
|
15
|
+
|
16
|
+
initComponent:function(){
|
17
|
+
this.fieldLabel = this.getFValue('title');
|
18
|
+
this.name = this.rest.getTableName() + '[' + this.getFValue('name') + ']';
|
19
|
+
this.disabled = this.getFValue('readonly');
|
20
|
+
this.allowBlank = true;
|
21
|
+
this.store = Ext.create('Ext.data.ArrayStore',{
|
22
|
+
fields: ["name","bool"],
|
23
|
+
data:[['否',false],['是',true]]
|
24
|
+
});
|
25
|
+
this.callParent();
|
26
|
+
},
|
27
|
+
getFValue:function (key) {
|
28
|
+
return this.valueObject[key];
|
29
|
+
}
|
30
|
+
});
|
@@ -0,0 +1,18 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
// require ./extjs4/ext-all
|
14
|
+
//= require ./extjs4/locale/ext-lang-zh_CN
|
15
|
+
//= require ./app/inflection
|
16
|
+
//= require ./fastui
|
17
|
+
|
18
|
+
|