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,304 @@
|
|
1
|
+
/*
|
2
|
+
This file is part of Ext JS 4.2
|
3
|
+
|
4
|
+
Copyright (c) 2011-2013 Sencha Inc
|
5
|
+
|
6
|
+
Contact: http://www.sencha.com/contact
|
7
|
+
|
8
|
+
GNU General Public License Usage
|
9
|
+
This file may be used under the terms of the GNU General Public License version 3.0 as
|
10
|
+
published by the Free Software Foundation and appearing in the file LICENSE included in the
|
11
|
+
packaging of this file.
|
12
|
+
|
13
|
+
Please review the following information to ensure the GNU General Public License version 3.0
|
14
|
+
requirements will be met: http://www.gnu.org/copyleft/gpl.html.
|
15
|
+
|
16
|
+
If you are unsure which license is appropriate for your use, please contact the sales department
|
17
|
+
at http://www.sencha.com/contact.
|
18
|
+
|
19
|
+
Build date: 2013-03-11 22:33:40 (aed16176e68b5e8aa1433452b12805c0ad913836)
|
20
|
+
*/
|
21
|
+
/**
|
22
|
+
* Simplified Chinese translation
|
23
|
+
* By DavidHu
|
24
|
+
* 09 April 2007
|
25
|
+
*
|
26
|
+
* update by andy_ghg
|
27
|
+
* 2009-10-22 15:00:57
|
28
|
+
*/
|
29
|
+
Ext.onReady(function() {
|
30
|
+
var cm = Ext.ClassManager,
|
31
|
+
exists = Ext.Function.bind(cm.get, cm),
|
32
|
+
parseCodes;
|
33
|
+
|
34
|
+
if (Ext.Updater) {
|
35
|
+
Ext.Updater.defaults.indicatorText = '<div class="loading-indicator">加载中...</div>';
|
36
|
+
}
|
37
|
+
|
38
|
+
if (Ext.Date) {
|
39
|
+
Ext.Date.monthNames = ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"];
|
40
|
+
|
41
|
+
Ext.Date.dayNames = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
|
42
|
+
|
43
|
+
Ext.Date.formatCodes.a = "(this.getHours() < 12 ? '上午' : '下午')";
|
44
|
+
Ext.Date.formatCodes.A = "(this.getHours() < 12 ? '上午' : '下午')";
|
45
|
+
|
46
|
+
parseCodes = {
|
47
|
+
g: 1,
|
48
|
+
c: "if (/(上午)/i.test(results[{0}])) {\n"
|
49
|
+
+ "if (!h || h == 12) { h = 0; }\n"
|
50
|
+
+ "} else { if (!h || h < 12) { h = (h || 0) + 12; }}",
|
51
|
+
s: "(上午|下午)",
|
52
|
+
calcAtEnd: true
|
53
|
+
};
|
54
|
+
|
55
|
+
Ext.Date.parseCodes.a = Ext.Date.parseCodes.A = parseCodes;
|
56
|
+
}
|
57
|
+
|
58
|
+
if (Ext.MessageBox) {
|
59
|
+
Ext.MessageBox.buttonText = {
|
60
|
+
ok: "确定",
|
61
|
+
cancel: "取消",
|
62
|
+
yes: "是",
|
63
|
+
no: "否"
|
64
|
+
};
|
65
|
+
}
|
66
|
+
|
67
|
+
if (exists('Ext.util.Format')) {
|
68
|
+
Ext.apply(Ext.util.Format, {
|
69
|
+
thousandSeparator: ',',
|
70
|
+
decimalSeparator: '.',
|
71
|
+
currencySign: '\u00a5',
|
72
|
+
// Chinese Yuan
|
73
|
+
dateFormat: 'y年m月d日'
|
74
|
+
});
|
75
|
+
}
|
76
|
+
|
77
|
+
if (exists('Ext.form.field.VTypes')) {
|
78
|
+
Ext.apply(Ext.form.field.VTypes, {
|
79
|
+
emailText: '该输入项必须是电子邮件地址,格式如: "user@example.com"',
|
80
|
+
urlText: '该输入项必须是URL地址,格式如: "http:/' + '/www.example.com"',
|
81
|
+
alphaText: '该输入项只能包含半角字母和_',
|
82
|
+
//update
|
83
|
+
alphanumText: '该输入项只能包含半角字母,数字和_' //update
|
84
|
+
});
|
85
|
+
}
|
86
|
+
});
|
87
|
+
|
88
|
+
Ext.define("Ext.locale.zh_CN.view.View", {
|
89
|
+
override: "Ext.view.View",
|
90
|
+
emptyText: ""
|
91
|
+
});
|
92
|
+
|
93
|
+
Ext.define("Ext.locale.zh_CN.grid.plugin.DragDrop", {
|
94
|
+
override: "Ext.grid.plugin.DragDrop",
|
95
|
+
dragText: "选择了 {0} 行"
|
96
|
+
});
|
97
|
+
|
98
|
+
Ext.define("Ext.locale.zh_CN.TabPanelItem", {
|
99
|
+
override: "Ext.TabPanelItem",
|
100
|
+
closeText: "关闭此标签"
|
101
|
+
});
|
102
|
+
|
103
|
+
Ext.define("Ext.locale.zh_CN.form.field.Base", {
|
104
|
+
override: "Ext.form.field.Base",
|
105
|
+
invalidText: "输入值非法"
|
106
|
+
});
|
107
|
+
|
108
|
+
// changing the msg text below will affect the LoadMask
|
109
|
+
Ext.define("Ext.locale.zh_CN.view.AbstractView", {
|
110
|
+
override: "Ext.view.AbstractView",
|
111
|
+
msg: "读取中..."
|
112
|
+
});
|
113
|
+
|
114
|
+
Ext.define("Ext.locale.zh_CN.picker.Date", {
|
115
|
+
override: "Ext.picker.Date",
|
116
|
+
todayText: "今天",
|
117
|
+
minText: "日期必须大于最小允许日期",
|
118
|
+
//update
|
119
|
+
maxText: "日期必须小于最大允许日期",
|
120
|
+
//update
|
121
|
+
disabledDaysText: "",
|
122
|
+
disabledDatesText: "",
|
123
|
+
monthNames: Ext.Date.monthNames,
|
124
|
+
dayNames: Ext.Date.dayNames,
|
125
|
+
nextText: '下个月 (Ctrl+Right)',
|
126
|
+
prevText: '上个月 (Ctrl+Left)',
|
127
|
+
monthYearText: '选择一个月 (Control+Up/Down 来改变年份)',
|
128
|
+
//update
|
129
|
+
todayTip: "{0} (空格键选择)",
|
130
|
+
format: "y年m月d日",
|
131
|
+
ariaTitle: '{0}',
|
132
|
+
ariaTitleDateFormat: 'Y\u5e74m\u6708d\u65e5',
|
133
|
+
longDayFormat: 'Y\u5e74m\u6708d\u65e5',
|
134
|
+
monthYearFormat: 'Y\u5e74m\u6708',
|
135
|
+
getDayInitial: function (value) {
|
136
|
+
// Grab the last character
|
137
|
+
return value.substr(value.length - 1);
|
138
|
+
}
|
139
|
+
});
|
140
|
+
|
141
|
+
Ext.define("Ext.locale.zh_CN.picker.Month", {
|
142
|
+
override: "Ext.picker.Month",
|
143
|
+
okText: "确定",
|
144
|
+
cancelText: "取消"
|
145
|
+
});
|
146
|
+
|
147
|
+
Ext.define("Ext.locale.zh_CN.toolbar.Paging", {
|
148
|
+
override: "Ext.PagingToolbar",
|
149
|
+
beforePageText: "第",
|
150
|
+
//update
|
151
|
+
afterPageText: "页,共 {0} 页",
|
152
|
+
//update
|
153
|
+
firstText: "第一页",
|
154
|
+
prevText: "上一页",
|
155
|
+
//update
|
156
|
+
nextText: "下一页",
|
157
|
+
lastText: "最后页",
|
158
|
+
refreshText: "刷新",
|
159
|
+
displayMsg: "显示 {0} - {1}条,共 {2} 条",
|
160
|
+
//update
|
161
|
+
emptyMsg: '没有数据'
|
162
|
+
});
|
163
|
+
|
164
|
+
Ext.define("Ext.locale.zh_CN.form.field.Text", {
|
165
|
+
override: "Ext.form.field.Text",
|
166
|
+
minLengthText: "该输入项的最小长度是 {0} 个字符",
|
167
|
+
maxLengthText: "该输入项的最大长度是 {0} 个字符",
|
168
|
+
blankText: "该输入项为必输项",
|
169
|
+
regexText: "",
|
170
|
+
emptyText: null
|
171
|
+
});
|
172
|
+
|
173
|
+
Ext.define("Ext.locale.zh_CN.form.field.Number", {
|
174
|
+
override: "Ext.form.field.Number",
|
175
|
+
minText: "该输入项的最小值是 {0}",
|
176
|
+
maxText: "该输入项的最大值是 {0}",
|
177
|
+
nanText: "{0} 不是有效数值"
|
178
|
+
});
|
179
|
+
|
180
|
+
Ext.define("Ext.locale.zh_CN.form.field.Date", {
|
181
|
+
override: "Ext.form.field.Date",
|
182
|
+
disabledDaysText: "禁用",
|
183
|
+
disabledDatesText: "禁用",
|
184
|
+
minText: "该输入项的日期必须在 {0} 之后",
|
185
|
+
maxText: "该输入项的日期必须在 {0} 之前",
|
186
|
+
invalidText: "{0} 是无效的日期 - 必须符合格式: {1}",
|
187
|
+
format: "y年m月d日"
|
188
|
+
});
|
189
|
+
|
190
|
+
Ext.define("Ext.locale.zh_CN.form.field.ComboBox", {
|
191
|
+
override: "Ext.form.field.ComboBox",
|
192
|
+
valueNotFoundText: undefined
|
193
|
+
}, function() {
|
194
|
+
Ext.apply(Ext.form.field.ComboBox.prototype.defaultListConfig, {
|
195
|
+
loadingText: "加载中..."
|
196
|
+
});
|
197
|
+
});
|
198
|
+
|
199
|
+
//add HTMLEditor's tips by andy_ghg
|
200
|
+
Ext.define("Ext.locale.zh_CN.form.field.HtmlEditor", {
|
201
|
+
override: "Ext.form.field.HtmlEditor",
|
202
|
+
createLinkText: '添加超级链接:'
|
203
|
+
}, function() {
|
204
|
+
Ext.apply(Ext.form.field.HtmlEditor.prototype, {
|
205
|
+
buttonTips: {
|
206
|
+
bold: {
|
207
|
+
title: '粗体 (Ctrl+B)',
|
208
|
+
text: '将选中的文字设置为粗体',
|
209
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
210
|
+
},
|
211
|
+
italic: {
|
212
|
+
title: '斜体 (Ctrl+I)',
|
213
|
+
text: '将选中的文字设置为斜体',
|
214
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
215
|
+
},
|
216
|
+
underline: {
|
217
|
+
title: '下划线 (Ctrl+U)',
|
218
|
+
text: '给所选文字加下划线',
|
219
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
220
|
+
},
|
221
|
+
increasefontsize: {
|
222
|
+
title: '增大字体',
|
223
|
+
text: '增大字号',
|
224
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
225
|
+
},
|
226
|
+
decreasefontsize: {
|
227
|
+
title: '缩小字体',
|
228
|
+
text: '减小字号',
|
229
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
230
|
+
},
|
231
|
+
backcolor: {
|
232
|
+
title: '以不同颜色突出显示文本',
|
233
|
+
text: '使文字看上去像是用荧光笔做了标记一样',
|
234
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
235
|
+
},
|
236
|
+
forecolor: {
|
237
|
+
title: '字体颜色',
|
238
|
+
text: '更改字体颜色',
|
239
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
240
|
+
},
|
241
|
+
justifyleft: {
|
242
|
+
title: '左对齐',
|
243
|
+
text: '将文字左对齐',
|
244
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
245
|
+
},
|
246
|
+
justifycenter: {
|
247
|
+
title: '居中',
|
248
|
+
text: '将文字居中对齐',
|
249
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
250
|
+
},
|
251
|
+
justifyright: {
|
252
|
+
title: '右对齐',
|
253
|
+
text: '将文字右对齐',
|
254
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
255
|
+
},
|
256
|
+
insertunorderedlist: {
|
257
|
+
title: '项目符号',
|
258
|
+
text: '开始创建项目符号列表',
|
259
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
260
|
+
},
|
261
|
+
insertorderedlist: {
|
262
|
+
title: '编号',
|
263
|
+
text: '开始创建编号列表',
|
264
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
265
|
+
},
|
266
|
+
createlink: {
|
267
|
+
title: '转成超级链接',
|
268
|
+
text: '将所选文本转换成超级链接',
|
269
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
270
|
+
},
|
271
|
+
sourceedit: {
|
272
|
+
title: '代码视图',
|
273
|
+
text: '以代码的形式展现文本',
|
274
|
+
cls: Ext.baseCSSPrefix + 'html-editor-tip'
|
275
|
+
}
|
276
|
+
}
|
277
|
+
});
|
278
|
+
});
|
279
|
+
|
280
|
+
Ext.define("Ext.locale.zh_CN.grid.header.Container", {
|
281
|
+
override: "Ext.grid.header.Container",
|
282
|
+
sortAscText: "正序",
|
283
|
+
//update
|
284
|
+
sortDescText: "倒序",
|
285
|
+
//update
|
286
|
+
lockText: "锁定列",
|
287
|
+
//update
|
288
|
+
unlockText: "解除锁定",
|
289
|
+
//update
|
290
|
+
columnsText: "列"
|
291
|
+
});
|
292
|
+
|
293
|
+
Ext.define("Ext.locale.zh_CN.grid.PropertyColumnModel", {
|
294
|
+
override: "Ext.grid.PropertyColumnModel",
|
295
|
+
nameText: "名称",
|
296
|
+
valueText: "值",
|
297
|
+
dateFormat: "y年m月d日"
|
298
|
+
});
|
299
|
+
|
300
|
+
// This is needed until we can refactor all of the locales into individual files
|
301
|
+
Ext.define("Ext.locale.zh_CN.Component", {
|
302
|
+
override: "Ext.Component"
|
303
|
+
});
|
304
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Ext.Loader.setConfig({
|
2
|
+
enabled:true,
|
3
|
+
paths:{
|
4
|
+
'Ext.ux':'/assets/fastui/extjs4/ux'
|
5
|
+
}
|
6
|
+
});
|
7
|
+
|
8
|
+
Ext.application({
|
9
|
+
// the global namespace
|
10
|
+
name:'FastUI',
|
11
|
+
appFolder:'/assets/fastui/app',
|
12
|
+
|
13
|
+
|
14
|
+
launch: function() {
|
15
|
+
|
16
|
+
//Ext.Viewport.setMasked(false);
|
17
|
+
// var win;
|
18
|
+
// if(!win){
|
19
|
+
// win = Ext.create('FastUI.view.VLoginWindow').show();
|
20
|
+
// }
|
21
|
+
},
|
22
|
+
autoCreateViewport:true
|
23
|
+
});
|
@@ -0,0 +1,95 @@
|
|
1
|
+
#fastui-loading {
|
2
|
+
position: absolute;
|
3
|
+
top: 50%;
|
4
|
+
width: 100%;
|
5
|
+
margin-top: -70px
|
6
|
+
}
|
7
|
+
|
8
|
+
#fastui-loading .title {
|
9
|
+
font-family: "Exo", sans-serif;
|
10
|
+
font-size: 2em;
|
11
|
+
color: gray;
|
12
|
+
text-align: center;
|
13
|
+
white-space: nowrap;
|
14
|
+
display: block
|
15
|
+
}
|
16
|
+
|
17
|
+
#fastui-loading .logo {
|
18
|
+
background: url(loading.gif) no-repeat center;
|
19
|
+
display: block;
|
20
|
+
height: 120px
|
21
|
+
}
|
22
|
+
|
23
|
+
.fastui-header {
|
24
|
+
padding:10px;
|
25
|
+
}
|
26
|
+
|
27
|
+
.fastui-header span.caption {
|
28
|
+
color:#3e6aaa;
|
29
|
+
font-size: 22px !important;
|
30
|
+
text-shadow: 0 2px 0 white;
|
31
|
+
}
|
32
|
+
|
33
|
+
.fastui-header span.version {
|
34
|
+
margin-left: 10px;
|
35
|
+
font-size:10px;
|
36
|
+
font-weight: bold;
|
37
|
+
color: black;
|
38
|
+
text-shadow: 0 1px 0 white;
|
39
|
+
}
|
40
|
+
|
41
|
+
.fastui-home {
|
42
|
+
background-image: url( application/application_home.png ) !important;
|
43
|
+
}
|
44
|
+
.fastui-menu {
|
45
|
+
background-image: url( application/application_side_tree.png ) !important;
|
46
|
+
}
|
47
|
+
.fastui-tree-expand {
|
48
|
+
background-image: url( arrow/arrow_divide.png ) !important;
|
49
|
+
}
|
50
|
+
.fastui-tree-collapse {
|
51
|
+
background-image: url( arrow/arrow_join.png ) !important;
|
52
|
+
}
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
.fastui-login-title {
|
58
|
+
background-image: url( locked.png ) !important;
|
59
|
+
}
|
60
|
+
.fastui-login-submit {
|
61
|
+
background-image: url( key_go.png ) !important;
|
62
|
+
}
|
63
|
+
.fastui-login-cancel {
|
64
|
+
background-image: url( cross.png ) !important;
|
65
|
+
}
|
66
|
+
.fastui-login-header {
|
67
|
+
background: transparent url("lock.png") no-repeat 97% 50%;
|
68
|
+
font-size: 11px;
|
69
|
+
font-weight: bold;
|
70
|
+
padding: 10px 45px 10px 10px;
|
71
|
+
}
|
72
|
+
.fastui-upload {
|
73
|
+
background-image: url( upload.png ) !important;
|
74
|
+
}
|
75
|
+
|
76
|
+
|
77
|
+
.fastui-btn-new {
|
78
|
+
background-image: url( application/application_form_add.png ) !important;
|
79
|
+
}
|
80
|
+
.fastui-btn-edit {
|
81
|
+
background-image: url( application/application_form_edit.png ) !important;
|
82
|
+
}
|
83
|
+
.fastui-btn-list {
|
84
|
+
background-image: url( application/application_view_columns.png ) !important;
|
85
|
+
}
|
86
|
+
.fastui-btn-del {
|
87
|
+
background-image: url( application/application_form_delete.png ) !important;
|
88
|
+
}
|
89
|
+
.fastui-btn-save {
|
90
|
+
background-image: url( table/table_save.png ) !important;
|
91
|
+
}
|
92
|
+
.fastui-btn-help {
|
93
|
+
background-image: url( table/help.png ) !important;
|
94
|
+
}
|
95
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
|
12
|
+
* require ./extjs4/resources/css/ext-all
|
13
|
+
*= require ./admin
|
14
|
+
*/
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Fastui
|
2
|
+
class ApplicationController < ActionController::Base
|
3
|
+
|
4
|
+
|
5
|
+
# 分页方法
|
6
|
+
def paginate(record_relation)
|
7
|
+
limit = params[:limit].to_i
|
8
|
+
start = params[:start].to_i
|
9
|
+
@records = record_relation
|
10
|
+
if limit != 0
|
11
|
+
@records = record_relation.limit(limit).offset(start)
|
12
|
+
end
|
13
|
+
data ={
|
14
|
+
:totalCount => record_relation.length,
|
15
|
+
:rows => @records
|
16
|
+
}
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
require_dependency "fastui/application_controller"
|
2
|
+
|
3
|
+
module Fastui
|
4
|
+
class MListItemsController < ApplicationController
|
5
|
+
respond_to :html, :xml, :json
|
6
|
+
def index
|
7
|
+
list = MList.where({
|
8
|
+
:name => params[:list_name]
|
9
|
+
}.delete_if {|k, v| v.blank? })
|
10
|
+
|
11
|
+
@m_list_items = MListItem.where({
|
12
|
+
:m_list_id => params[:m_list_id] || list
|
13
|
+
}.delete_if {|k, v| v.blank? })
|
14
|
+
#data = paginate(@m_list_items)
|
15
|
+
respond_with(@m_list_items.to_json(:include =>[:m_list,:createdbyorg,:createdby,:updatedby]))
|
16
|
+
end
|
17
|
+
|
18
|
+
def show
|
19
|
+
@m_list_item = MListItem.find(params[:id])
|
20
|
+
respond_with(@m_list_item)
|
21
|
+
end
|
22
|
+
|
23
|
+
def edit
|
24
|
+
@m_list_item = MListItem.find(params[:id])
|
25
|
+
respond_with(@m_list_item)
|
26
|
+
end
|
27
|
+
|
28
|
+
def new
|
29
|
+
@m_list_item = MListItem.new
|
30
|
+
respond_with(@m_list_item)
|
31
|
+
end
|
32
|
+
|
33
|
+
def create
|
34
|
+
@m_list_item = MListItem.new(params[:m_list_item])
|
35
|
+
respond_with(@m_list_item) do |format|
|
36
|
+
if @m_list_item.save
|
37
|
+
format.json { render :json => {:success => true, :msg => 'ok'} }
|
38
|
+
else
|
39
|
+
format.json { render :json => {:success => false, :msg => 'failure'} }
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
def update
|
46
|
+
@m_list_item = MListItem.find(params[:id])
|
47
|
+
|
48
|
+
respond_with(@m_list_item) do |format|
|
49
|
+
if @m_list_item.update_attributes(params[:m_list_item])
|
50
|
+
format.json { render :json => {:success => true, :msg => 'ok'} }
|
51
|
+
else
|
52
|
+
format.json { render :json => {:success => false, :msg => 'false'} }
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def destroy
|
58
|
+
@m_list_item = MListItem.find(params[:id])
|
59
|
+
@m_list_item.destroy
|
60
|
+
respond_with(@m_list_item)
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
require_dependency "fastui/application_controller"
|
2
|
+
|
3
|
+
module Fastui
|
4
|
+
class MListsController < ApplicationController
|
5
|
+
respond_to :html, :xml, :json
|
6
|
+
def index
|
7
|
+
@m_lists = MList.scoped
|
8
|
+
data = paginate(@m_lists)
|
9
|
+
respond_with(data.to_json(:include => [:m_list_items,:createdbyorg, :createdby, :updatedby]))
|
10
|
+
end
|
11
|
+
|
12
|
+
def show
|
13
|
+
@m_list = MList.find(params[:id])
|
14
|
+
respond_with(@m_list)
|
15
|
+
end
|
16
|
+
|
17
|
+
def edit
|
18
|
+
@m_list = MList.find(params[:id])
|
19
|
+
respond_with(@m_list)
|
20
|
+
end
|
21
|
+
|
22
|
+
def new
|
23
|
+
@m_list = MList.new
|
24
|
+
respond_with(@m_list)
|
25
|
+
end
|
26
|
+
|
27
|
+
def create
|
28
|
+
@m_list = MList.new(params[:m_list])
|
29
|
+
respond_with(@m_list) do |format|
|
30
|
+
if @m_list.save
|
31
|
+
format.json { render :json => {:success => true, :msg => 'ok'} }
|
32
|
+
else
|
33
|
+
format.json { render :json => {:success => false, :msg => 'failure'} }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
def update
|
40
|
+
@m_list = MList.find(params[:id])
|
41
|
+
|
42
|
+
respond_with(@m_list) do |format|
|
43
|
+
if @m_list.update_attributes(params[:m_list])
|
44
|
+
format.json { render :json => {:success => true, :msg => 'ok'} }
|
45
|
+
else
|
46
|
+
format.json { render :json => {:success => false, :msg => 'false'} }
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def destroy
|
52
|
+
@m_list = MList.find(params[:id])
|
53
|
+
@m_list.destroy
|
54
|
+
respond_with(@m_list)
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require_dependency "fastui/application_controller"
|
3
|
+
|
4
|
+
module Fastui
|
5
|
+
class MMenuItemsController < ApplicationController
|
6
|
+
respond_to :html, :xml, :json
|
7
|
+
|
8
|
+
def index
|
9
|
+
@m_menu_items = params[:node] == 'root' ? MMenuItem.roots : MMenuItem.where({
|
10
|
+
:parent_id => params[:node]
|
11
|
+
}.delete_if { |k, v| v.blank? })
|
12
|
+
|
13
|
+
#if params[:id] == 'root'
|
14
|
+
# @m_menu_items = MMenuItem.roots
|
15
|
+
#else
|
16
|
+
# @m_menu_items = MMenuItem.where({:parent_id => params[:id]}.delete_if { |k, v| v.blank?})
|
17
|
+
#@m_menu_items = paginate(@items)
|
18
|
+
#end
|
19
|
+
respond_with(@m_menu_items.to_json(:include => [:m_menu, :createdbyorg, :createdby, :updatedby], :methods => [:leaf?, :child?]))
|
20
|
+
end
|
21
|
+
|
22
|
+
def show
|
23
|
+
@m_menu_item = MMenuItem.find(params[:id])
|
24
|
+
respond_with(@m_menu_item)
|
25
|
+
end
|
26
|
+
|
27
|
+
def edit
|
28
|
+
@m_menu_item = MMenuItem.find(params[:id])
|
29
|
+
respond_with(@m_menu_item.to_json(:include => [:m_menu, :createdbyorg, :createdby, :updatedby]))
|
30
|
+
end
|
31
|
+
|
32
|
+
def new
|
33
|
+
@m_menu_item = MMenuItem.new
|
34
|
+
respond_with(@m_menu_item)
|
35
|
+
end
|
36
|
+
|
37
|
+
def create
|
38
|
+
@m_menu_item = MMenuItem.new(params[:m_menu_item])
|
39
|
+
respond_with(@m_menu_item) do |format|
|
40
|
+
if @m_menu_item.save
|
41
|
+
format.json { render :json => {:success => true, :msg => 'ok'} }
|
42
|
+
else
|
43
|
+
format.json { render :json => {:success => false, :msg => 'failure'} }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
def update
|
50
|
+
@m_menu_item = MMenuItem.find(params[:id])
|
51
|
+
|
52
|
+
respond_with(@m_menu_item) do |format|
|
53
|
+
if @m_menu_item.update_attributes(params[:m_menu_item])
|
54
|
+
format.json { render :json => {:success => true, :msg => 'ok'} }
|
55
|
+
else
|
56
|
+
format.json { render :json => {:success => false, :msg => 'false'} }
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def destroy
|
62
|
+
@m_menu_item = MMenuItem.find(params[:id])
|
63
|
+
@m_menu_item.destroy
|
64
|
+
respond_with(@m_menu_item)
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
end
|
69
|
+
end
|