fastui 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
checksums.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
ODlmNTA0NDIxYmY1N2I4NjQyMTM0MmY0MmNmNzlhZDRkOTM1NGEwYw==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
MTNkMWVlNTcxZjA4YjcyOGQ1Nzc4ZDE3ODg1NDQwMzcyNmIzMTdiZA==
|
|
7
|
+
!binary "U0hBNTEy":
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
ZGZmMzYxZmYzZDAyY2EwMWQwYWEwYzdjMzAzY2NhYWVhMDNiY2RmZWQxZGU3
|
|
10
|
+
ODNkZDE3NzNmZjJjYWM4ODRlMGNlY2EwNzUyMzNiMWVjNWUwZTA3NGZmNzEx
|
|
11
|
+
MDU2YWVkNTQzOTczMWE2NzVkMjZjODE4NmIxNDA1MDRmMDJiZTQ=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
NTYwNmU2MTcwMzVjMDQwOTNjMzcyZjhkZTkyMjM0MGJlNDc3NzFiMWVmNTRk
|
|
14
|
+
OGViNGI1NWZlMGEyMzFhMDY2MDY1NmQxM2ZhOWIxNGYzNmU1NDNhZGZhMjkw
|
|
15
|
+
ZjMyMDE3ZmUyYWFiZDU0OTkxMDgwMDRiNjc1MmFhZWI4MGIxNDI=
|
data/MIT-LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright 2012 YOURNAME
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# FastUI
|
|
2
|
+
|
|
3
|
+
FastUI is a framework for creating enterprise-level application style interfaces.
|
|
4
|
+
This project rocks and uses MIT-LICENSE.
|
|
5
|
+
|
|
6
|
+
Fastui generates a user interface from the model.
|
|
7
|
+
|
|
8
|
+
## Configuration
|
|
9
|
+
|
|
10
|
+
For example, the syntax for view like this:
|
|
11
|
+
By default your view is configured in the file config/initializers/fastui_config.rb.
|
|
12
|
+
```ruby
|
|
13
|
+
Fastui::View.instance.config do |conf|
|
|
14
|
+
conf.win :m_list, title: '数据字典', window_kind: 'maintain' do |w|
|
|
15
|
+
w.tab :m_list, title: '枚举', entity:'Fastui::MList', members:[
|
|
16
|
+
{name:'id', title: 'ID', datatype:'VNumber', readonly: true},
|
|
17
|
+
{name:'title', title: '标题', datatype:'VText'},
|
|
18
|
+
{name:'print_text', title: '打印文本', datatype:'VText'},
|
|
19
|
+
{name:'name', title: '标识', datatype:'VText'}
|
|
20
|
+
]
|
|
21
|
+
w.tab :m_list_item, title:'枚举项', entity:'Fastui::MListItem', included_tab: 'm_list', members:[
|
|
22
|
+
{name:'id', title: 'ID', datatype:'VNumber', readonly: true},
|
|
23
|
+
{name:'title', title: '标题', datatype:'VText'},
|
|
24
|
+
{name:'print_text', title: '打印文本', datatype:'VText'},
|
|
25
|
+
{name:'name', title: '标识', datatype:'VText'}
|
|
26
|
+
]
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Generates a view that looks like this:
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+

|
|
36
|
+
|
|
37
|
+
## Getting Started
|
|
38
|
+
|
|
39
|
+
Fastui is released as a Ruby Gem. The gem is to be installed within a Ruby
|
|
40
|
+
on Rails 3 application. To install, simply add the following to your Gemfile:
|
|
41
|
+
|
|
42
|
+
gem 'fastui'
|
|
43
|
+
|
|
44
|
+
After updating your bundle, run the installer
|
|
45
|
+
```shell
|
|
46
|
+
$> rails generate fastui:install -s
|
|
47
|
+
$> rake db:migrate
|
|
48
|
+
$> rails generate fastui:init
|
|
49
|
+
$> rails server
|
|
50
|
+
```
|
|
51
|
+
Visit http://localhost:3000/fastui and log in using:
|
|
52
|
+
|
|
53
|
+
Voila! You're on your brand new FastUI main window.
|
data/Rakefile
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env rake
|
|
2
|
+
begin
|
|
3
|
+
require 'bundler/setup'
|
|
4
|
+
rescue LoadError
|
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
|
6
|
+
end
|
|
7
|
+
begin
|
|
8
|
+
require 'rdoc/task'
|
|
9
|
+
rescue LoadError
|
|
10
|
+
require 'rdoc/rdoc'
|
|
11
|
+
require 'rake/rdoctask'
|
|
12
|
+
RDoc::Task = Rake::RDocTask
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
|
17
|
+
rdoc.title = 'Fastui'
|
|
18
|
+
rdoc.options << '--line-numbers'
|
|
19
|
+
rdoc.rdoc_files.include('README.md')
|
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
|
|
24
|
+
load 'rails/tasks/engine.rake'
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
Bundler::GemHelper.install_tasks
|
|
29
|
+
|
|
30
|
+
require 'rake/testtask'
|
|
31
|
+
|
|
32
|
+
Rake::TestTask.new(:test) do |t|
|
|
33
|
+
t.libs << 'lib'
|
|
34
|
+
t.libs << 'test'
|
|
35
|
+
t.pattern = 'test/**/*_test.rb'
|
|
36
|
+
t.verbose = false
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
task :default => :test
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Ext.define('FastUI.Ctx', {
|
|
2
|
+
constructor:function(){
|
|
3
|
+
this._data_ = {};
|
|
4
|
+
},
|
|
5
|
+
set:function(key,value){
|
|
6
|
+
this._data_[key] = value;
|
|
7
|
+
},
|
|
8
|
+
get:function(key){
|
|
9
|
+
return this._data_[key];
|
|
10
|
+
},
|
|
11
|
+
setWinCtx:function(winNo,key,value){
|
|
12
|
+
this.set(winNo + '|' + key, value);
|
|
13
|
+
},
|
|
14
|
+
getWinCtx:function(winNo,key){
|
|
15
|
+
return this.get(winNo + '|' + key);
|
|
16
|
+
},
|
|
17
|
+
setTabCtx:function(winNo,tabNo,key,value){
|
|
18
|
+
this.set(winNo + '|' + tabNo + '|' + key, value);
|
|
19
|
+
},
|
|
20
|
+
getTabCtx:function(winNo,tabNo,key){
|
|
21
|
+
return this.get(winNo + '|' + tabNo + '|' + key);
|
|
22
|
+
},
|
|
23
|
+
parseCtx:function(WinNo, value){
|
|
24
|
+
var patten = /\${([\s\S]*?)}/ig ;
|
|
25
|
+
var me = this;
|
|
26
|
+
return value.replace(patten, function(m){
|
|
27
|
+
m = m.replace('${','');
|
|
28
|
+
m = m.replace('}','');
|
|
29
|
+
return me.getWinCtx(WinNo,m);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Ext.define('FastUI.Env', {
|
|
2
|
+
singleton: true,
|
|
3
|
+
_ctx_: Ext.create('FastUI.Ctx'),
|
|
4
|
+
getCtx: function() {
|
|
5
|
+
return this._ctx_;
|
|
6
|
+
},
|
|
7
|
+
set:function(key,value){
|
|
8
|
+
this.getCtx().set(key,value);
|
|
9
|
+
},
|
|
10
|
+
get:function(key){
|
|
11
|
+
return this.getCtx().get(key);
|
|
12
|
+
},
|
|
13
|
+
setWinCtx:function(win,key,value){
|
|
14
|
+
this.getCtx().setWinCtx(win,key,value);
|
|
15
|
+
},
|
|
16
|
+
getWinCtx:function(win,key){
|
|
17
|
+
return this.getCtx().getWinCtx(win,key);
|
|
18
|
+
},
|
|
19
|
+
setTabCtx:function(win,tab,key,value){
|
|
20
|
+
this.getCtx().setTabCtx(win,tab,key,value);
|
|
21
|
+
},
|
|
22
|
+
getTabCtx:function(win,tab,key){
|
|
23
|
+
return this.getCtx().getTabCtx(win,tab,key);
|
|
24
|
+
},
|
|
25
|
+
//'${value}=${value}'
|
|
26
|
+
parseCtx:function(WindowNo, value){
|
|
27
|
+
// var patten = /\${([\s\S]*?)}/ig ;
|
|
28
|
+
// var me = this;
|
|
29
|
+
// return value.replace(patten, function(m){
|
|
30
|
+
// var p = patten.exec(m);
|
|
31
|
+
// if(p){
|
|
32
|
+
// return me.getWinCtx(WindowNo,p[1]);
|
|
33
|
+
// }
|
|
34
|
+
// return m;
|
|
35
|
+
// });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
});
|