netzke-basepack 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +14 -6
- data/README.rdoc +16 -31
- data/Rakefile +22 -16
- data/TODO.rdoc +1 -1
- data/app/models/netzke_field_list.rb +29 -29
- data/app/models/netzke_model_attr_list.rb +4 -4
- data/app/models/netzke_persistent_array_auto_model.rb +9 -9
- data/config/database.yml +2 -35
- data/features/accordion_panel.feature +1 -1
- data/features/form_panel.feature +2 -2
- data/features/grid_panel.feature +15 -3
- data/features/search_in_grid.feature +4 -4
- data/features/simple_panel.feature +4 -4
- data/features/step_definitions/pickle_steps.rb +2 -2
- data/features/step_definitions/web_steps.rb +5 -5
- data/features/support/env.rb +6 -6
- data/features/tab_panel.feature +1 -1
- data/javascripts/basepack.js +28 -28
- data/lib/netzke-basepack.rb +5 -5
- data/lib/netzke/active_record.rb +1 -1
- data/lib/netzke/active_record/association_attributes.rb +9 -9
- data/lib/netzke/active_record/attributes.rb +24 -23
- data/lib/netzke/active_record/combobox_options.rb +3 -3
- data/lib/netzke/active_record/relation_extensions.rb +4 -4
- data/lib/netzke/basepack.rb +4 -4
- data/{app/components → lib}/netzke/basepack/accordion_panel.rb +7 -7
- data/{app/components → lib}/netzke/basepack/basic_app.rb +18 -18
- data/{app/components → lib}/netzke/basepack/basic_app/statusbar_ext.js +0 -0
- data/lib/netzke/basepack/border_layout_panel.rb +101 -0
- data/{app/components → lib}/netzke/basepack/form_panel.rb +21 -21
- data/{app/components → lib}/netzke/basepack/form_panel/fields.rb +29 -36
- data/{app/components → lib}/netzke/basepack/form_panel/javascripts/netzkefileupload.js +0 -0
- data/{app/components → lib}/netzke/basepack/form_panel/javascripts/pre.js +9 -9
- data/{app/components → lib}/netzke/basepack/form_panel/javascripts/xcheckbox.js +1 -1
- data/{app/components → lib}/netzke/basepack/form_panel/services.rb +11 -11
- data/{app/components → lib}/netzke/basepack/grid_panel.rb +74 -92
- data/{app/components → lib}/netzke/basepack/grid_panel/columns.rb +34 -36
- data/{app/components → lib}/netzke/basepack/grid_panel/javascript.rb +7 -7
- data/{app/components → lib}/netzke/basepack/grid_panel/javascripts/advanced_search.js +10 -10
- data/{app/components → lib}/netzke/basepack/grid_panel/javascripts/edit_in_form.js +2 -2
- data/{app/components → lib}/netzke/basepack/grid_panel/javascripts/pre.js +31 -31
- data/{app/components → lib}/netzke/basepack/grid_panel/javascripts/rows-dd.js +1 -1
- data/{app/components → lib}/netzke/basepack/grid_panel/multi_edit_form.rb +2 -2
- data/{app/components → lib}/netzke/basepack/grid_panel/record_form_window.rb +3 -3
- data/{app/components → lib}/netzke/basepack/grid_panel/search_window.rb +11 -11
- data/{app/components → lib}/netzke/basepack/grid_panel/services.rb +28 -28
- data/{app/components → lib}/netzke/basepack/panel.rb +0 -0
- data/{app/components → lib}/netzke/basepack/search_panel.rb +11 -11
- data/{app/components → lib}/netzke/basepack/tab_panel.rb +7 -7
- data/lib/netzke/basepack/version.rb +1 -1
- data/{app/components → lib}/netzke/basepack/window.rb +14 -14
- data/{app/components → lib}/netzke/basepack/wrapper.rb +6 -6
- data/lib/netzke/data_accessor.rb +18 -18
- data/lib/netzke/fields_configurator.rb +30 -30
- data/lib/netzke/json_array_editor.rb +9 -9
- data/lib/netzke/masquerade_selector.rb +5 -5
- data/locale/en.yml +1 -1
- data/netzke-basepack.gemspec +252 -240
- data/spec/active_record/attributes_spec.rb +6 -1
- data/spec/active_record/relation_extensions_spec.rb +11 -11
- data/spec/components/form_panel_spec.rb +13 -19
- data/spec/components/grid_panel_spec.rb +1 -1
- data/test/rails_app/Gemfile +4 -3
- data/test/rails_app/Gemfile.lock +42 -50
- data/test/rails_app/app/components/book_grid.rb +4 -0
- data/test/rails_app/app/components/generic_user_form.rb +2 -2
- data/test/rails_app/app/components/simple_basic_app.rb +3 -3
- data/test/rails_app/app/components/simple_panel.rb +1 -1
- data/test/rails_app/app/components/some_border_layout.rb +12 -11
- data/test/rails_app/app/components/some_search_panel.rb +5 -5
- data/test/rails_app/app/components/user_form.rb +1 -1
- data/test/rails_app/app/components/window_component_loader.rb +2 -2
- data/test/rails_app/app/models/author.rb +7 -0
- data/test/rails_app/app/models/book.rb +3 -0
- data/test/rails_app/app/models/user.rb +1 -1
- data/test/rails_app/config/locales/es.yml +0 -1
- data/test/rails_app/config/routes.rb +2 -2
- data/test/rails_app/db/development_structure.sql +28 -3
- data/test/rails_app/db/migrate/20101026185816_create_authors.rb +14 -0
- data/test/rails_app/db/migrate/20101026190021_create_books.rb +17 -0
- data/test/rails_app/db/schema.rb +18 -1
- data/test/rails_app/public/javascripts/effects.js +1 -1
- data/test/rails_app/spec/models/author_spec.rb +5 -0
- data/test/rails_app/spec/models/book_spec.rb +5 -0
- data/test/test_helper.rb +1 -1
- data/test/unit/accordion_panel_test.rb +2 -2
- data/test/unit/active_record_basepack_test.rb +9 -9
- data/test/unit/fields_configuration_test.rb +4 -4
- data/test/unit/grid_panel_test.rb +8 -8
- data/test/unit/tab_panel_test.rb +2 -2
- metadata +49 -36
- data/.gitignore +0 -10
- data/app/components/netzke/basepack/border_layout_panel.rb +0 -39
data/config/database.yml
CHANGED
@@ -1,35 +1,2 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
development:
|
4
|
-
adapter: mysql2
|
5
|
-
encoding: utf8
|
6
|
-
reconnect: false
|
7
|
-
database: nbt_development
|
8
|
-
pool: 5
|
9
|
-
username: root
|
10
|
-
password:
|
11
|
-
socket: /tmp/mysql.sock
|
12
|
-
|
13
|
-
# Warning: The database defined as "test" will be erased and
|
14
|
-
# re-generated from your development database when you run "rake".
|
15
|
-
# Do not set this db to the same as development or production.
|
16
|
-
# test:
|
17
|
-
# adapter: sqlite3
|
18
|
-
# database: db/test.sqlite3
|
19
|
-
# pool: 5
|
20
|
-
# timeout: 5000
|
21
|
-
test:
|
22
|
-
adapter: mysql2
|
23
|
-
encoding: utf8
|
24
|
-
reconnect: false
|
25
|
-
database: nbt_test
|
26
|
-
pool: 5
|
27
|
-
username: root
|
28
|
-
password:
|
29
|
-
socket: /tmp/mysql.sock
|
30
|
-
|
31
|
-
production:
|
32
|
-
adapter: sqlite3
|
33
|
-
database: db/production.sqlite3
|
34
|
-
pool: 5
|
35
|
-
timeout: 5000
|
1
|
+
# This dummy file is only here to please cucumber environment
|
2
|
+
test:
|
@@ -9,7 +9,7 @@ Scenario: Lazy loading of a component into a panel when the latter gets expanded
|
|
9
9
|
When I expand "Panel Two"
|
10
10
|
Then I should see "Original HTML"
|
11
11
|
When I press "Update html"
|
12
|
-
Then I should see "Update for Panel Two"
|
12
|
+
Then I should see "Update for Panel Two"
|
13
13
|
|
14
14
|
|
15
15
|
|
data/features/form_panel.feature
CHANGED
@@ -25,11 +25,11 @@ Scenario: Editing the record
|
|
25
25
|
Then I should see "Salvador"
|
26
26
|
And I should see "Dali"
|
27
27
|
And I should see "painter"
|
28
|
-
|
28
|
+
|
29
29
|
But I should not see "Maxim"
|
30
30
|
And I should not see "Osminogov"
|
31
31
|
And I should not see "musician"
|
32
|
-
|
32
|
+
|
33
33
|
Scenario: UserFormWithDefaultFields should render properly
|
34
34
|
Given a role exists with name: "writer"
|
35
35
|
And a user exists with first_name: "Carlos", last_name: "Castaneda", role: that role
|
data/features/grid_panel.feature
CHANGED
@@ -11,7 +11,7 @@ Scenario: UserGrid should render properly
|
|
11
11
|
And I should see "Castaneda"
|
12
12
|
And I should see "Taisha"
|
13
13
|
And I should see "Abelar"
|
14
|
-
|
14
|
+
|
15
15
|
@javascript
|
16
16
|
Scenario: Adding a record via "Add in form"
|
17
17
|
Given I am on the UserGrid test page
|
@@ -57,6 +57,18 @@ Scenario: Multi-editing records
|
|
57
57
|
And I press "Edit in form"
|
58
58
|
And I fill in "First name:" with "Maxim"
|
59
59
|
And I press "OK"
|
60
|
-
Then
|
61
|
-
|
60
|
+
Then the following users should exist:
|
61
|
+
| first_name | last_name |
|
62
|
+
| Maxim | Castaneda |
|
63
|
+
| Maxim | Hesse |
|
62
64
|
But a user should not exist with first_name: "Carlos"
|
65
|
+
|
66
|
+
@javascript
|
67
|
+
Scenario: Filling out association column with association's virtual method
|
68
|
+
Given an author exists with first_name: "Vladimir", last_name: "Nabokov"
|
69
|
+
And a book exists with title: "Lolita", author: that author
|
70
|
+
When I go to the BookGrid test page
|
71
|
+
Then I should see "Nabokov, Vladimir"
|
72
|
+
And I should see "Lolita"
|
73
|
+
|
74
|
+
|
@@ -10,23 +10,23 @@ Feature: Search
|
|
10
10
|
| admin |
|
11
11
|
| superadmin |
|
12
12
|
| user |
|
13
|
-
|
13
|
+
|
14
14
|
And the following users exist:
|
15
15
|
| first_name | last_name | role__name |
|
16
16
|
| Paul | Bley | admin |
|
17
17
|
| Dalai | Lama | user |
|
18
18
|
| Taisha | Abelar | superadmin |
|
19
19
|
| Florinda | Donner | admin |
|
20
|
-
|
20
|
+
|
21
21
|
When I go to the UserGrid test page
|
22
22
|
Then the grid should show 4 records
|
23
|
-
|
23
|
+
|
24
24
|
When I press "Search"
|
25
25
|
And I fill in "First name like:" with "ai"
|
26
26
|
And I press "Search" within "#user_grid__search_form"
|
27
27
|
And I sleep 1 second
|
28
28
|
Then the grid should show 2 records
|
29
|
-
|
29
|
+
|
30
30
|
When I press "Search"
|
31
31
|
And I fill in "Role name like:" with "adm"
|
32
32
|
And I fill in "First name like:" with ""
|
@@ -60,7 +60,7 @@ Then(/^#{capture_model} should not be #{capture_model}(?:'s)? (\w+)$/) do |targe
|
|
60
60
|
model!(owner).send(association).should_not == model!(target)
|
61
61
|
end
|
62
62
|
|
63
|
-
# assert model.predicate?
|
63
|
+
# assert model.predicate?
|
64
64
|
Then(/^#{capture_model} should (?:be|have) (?:an? )?#{capture_predicate}$/) do |name, predicate|
|
65
65
|
if model!(name).respond_to?("has_#{predicate.gsub(' ', '_')}")
|
66
66
|
model!(name).should send("have_#{predicate.gsub(' ', '_')}")
|
@@ -83,7 +83,7 @@ end
|
|
83
83
|
Then(/^#{capture_model}'s (\w+) (should(?: not)?) be #{capture_value}$/) do |name, attribute, expectation, expected|
|
84
84
|
actual_value = model(name).send(attribute)
|
85
85
|
expectation = expectation.gsub(' ', '_')
|
86
|
-
|
86
|
+
|
87
87
|
case expected
|
88
88
|
when 'nil', 'true', 'false'
|
89
89
|
actual_value.send(expectation, send("be_#{expected}"))
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
2
|
-
# It is recommended to regenerate this file in the future when you upgrade to a
|
3
|
-
# newer version of cucumber-rails. Consider adding your own code to a new file
|
2
|
+
# It is recommended to regenerate this file in the future when you upgrade to a
|
3
|
+
# newer version of cucumber-rails. Consider adding your own code to a new file
|
4
4
|
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
5
5
|
# files.
|
6
6
|
|
@@ -191,7 +191,7 @@ Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do |
|
|
191
191
|
end
|
192
192
|
end
|
193
193
|
end
|
194
|
-
|
194
|
+
|
195
195
|
Then /^(?:|I )should be on (.+)$/ do |page_name|
|
196
196
|
current_path = URI.parse(current_url).path
|
197
197
|
if current_path.respond_to? :should
|
@@ -205,8 +205,8 @@ Then /^(?:|I )should have the following query string:$/ do |expected_pairs|
|
|
205
205
|
query = URI.parse(current_url).query
|
206
206
|
actual_params = query ? CGI.parse(query) : {}
|
207
207
|
expected_params = {}
|
208
|
-
expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')}
|
209
|
-
|
208
|
+
expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')}
|
209
|
+
|
210
210
|
if actual_params.respond_to? :should
|
211
211
|
actual_params.should == expected_params
|
212
212
|
else
|
data/features/support/env.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
|
2
|
-
# It is recommended to regenerate this file in the future when you upgrade to a
|
3
|
-
# newer version of cucumber-rails. Consider adding your own code to a new file
|
2
|
+
# It is recommended to regenerate this file in the future when you upgrade to a
|
3
|
+
# newer version of cucumber-rails. Consider adding your own code to a new file
|
4
4
|
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
5
5
|
# files.
|
6
6
|
|
@@ -31,7 +31,7 @@ require 'cucumber/rails/capybara_javascript_emulation' # Lets you click links wi
|
|
31
31
|
# steps to use the XPath syntax.
|
32
32
|
Capybara.default_selector = :css
|
33
33
|
|
34
|
-
# If you set this to false, any error raised from within your app will bubble
|
34
|
+
# If you set this to false, any error raised from within your app will bubble
|
35
35
|
# up to your step definition and out to cucumber unless you catch it somewhere
|
36
36
|
# on the way. You can make Rails rescue errors and render error pages on a
|
37
37
|
# per-scenario basis by tagging a scenario or feature with the @allow-rescue tag.
|
@@ -43,15 +43,15 @@ Capybara.default_selector = :css
|
|
43
43
|
ActionController::Base.allow_rescue = false
|
44
44
|
|
45
45
|
# If you set this to true, each scenario will run in a database transaction.
|
46
|
-
# You can still turn off transactions on a per-scenario basis, simply tagging
|
46
|
+
# You can still turn off transactions on a per-scenario basis, simply tagging
|
47
47
|
# a feature or scenario with the @no-txn tag. If you are using Capybara,
|
48
48
|
# tagging with @culerity or @javascript will also turn transactions off.
|
49
49
|
#
|
50
50
|
# If you set this to false, transactions will be off for all scenarios,
|
51
51
|
# regardless of whether you use @no-txn or not.
|
52
52
|
#
|
53
|
-
# Beware that turning transactions off will leave data in your database
|
54
|
-
# after each scenario, which can lead to hard-to-debug failures in
|
53
|
+
# Beware that turning transactions off will leave data in your database
|
54
|
+
# after each scenario, which can lead to hard-to-debug failures in
|
55
55
|
# subsequent scenarios. If you do this, we recommend you create a Before
|
56
56
|
# block that will explicitly put your database in a known state.
|
57
57
|
Cucumber::Rails::World.use_transactional_fixtures = true
|
data/features/tab_panel.feature
CHANGED
@@ -9,7 +9,7 @@ Scenario: Lazy loading of a component into a tab when the latter gets open
|
|
9
9
|
When I follow "Panel Two"
|
10
10
|
Then I should see "Original HTML"
|
11
11
|
When I press "Update html"
|
12
|
-
Then I should see "Update for Panel Two"
|
12
|
+
Then I should see "Update for Panel Two"
|
13
13
|
|
14
14
|
|
15
15
|
|
data/javascripts/basepack.js
CHANGED
@@ -15,24 +15,24 @@ Ext.netzke.ComboBox = Ext.extend(Ext.form.ComboBox, {
|
|
15
15
|
valueField : 'id',
|
16
16
|
triggerAction : 'all',
|
17
17
|
typeAhead : true,
|
18
|
-
|
18
|
+
|
19
19
|
initComponent : function(){
|
20
20
|
var row = Ext.data.Record.create([{name:'id'}]);
|
21
21
|
var store = new Ext.data.Store({
|
22
22
|
proxy : new Ext.data.HttpProxy({url: Ext.getCmp(this.parentId).endpointUrl("get_combobox_options"), jsonData:{column:this.name}}),
|
23
23
|
reader : new Ext.data.ArrayReader({root:'data', id:0}, row)
|
24
24
|
});
|
25
|
-
|
25
|
+
|
26
26
|
Ext.apply(this, {
|
27
27
|
store : store
|
28
28
|
});
|
29
|
-
|
29
|
+
|
30
30
|
Ext.netzke.ComboBox.superclass.initComponent.apply(this, arguments);
|
31
|
-
|
31
|
+
|
32
32
|
this.on('blur', function(cb){
|
33
33
|
cb.setValue(cb.getRawValue());
|
34
34
|
});
|
35
|
-
|
35
|
+
|
36
36
|
this.on('specialkey', function(cb, event){
|
37
37
|
if (event.getKey() == 9 || event.getKey() == 13) {cb.setValue(cb.getRawValue());}
|
38
38
|
});
|
@@ -40,11 +40,11 @@ Ext.netzke.ComboBox = Ext.extend(Ext.form.ComboBox, {
|
|
40
40
|
var parent = Ext.getCmp(this.parentId);
|
41
41
|
// Is parent a grid?
|
42
42
|
if (parent.getSelectionModel) {
|
43
|
-
this.on('beforequery',function(qe) {
|
44
|
-
delete qe.combo.lastQuery;
|
45
|
-
},this);
|
43
|
+
this.on('beforequery',function(qe) {
|
44
|
+
delete qe.combo.lastQuery;
|
45
|
+
},this);
|
46
46
|
}
|
47
|
-
|
47
|
+
|
48
48
|
// A not-so-clean approach to submit the current record id
|
49
49
|
store.on('beforeload',function(store, options){
|
50
50
|
if (parent.getSelectionModel) {
|
@@ -131,11 +131,11 @@ Ext.netzke.JsonField = Ext.extend(Ext.form.TextField, {
|
|
131
131
|
return "Invalid JSON"
|
132
132
|
}
|
133
133
|
}
|
134
|
-
|
134
|
+
|
135
135
|
,setValue: function(value) {
|
136
136
|
this.setRawValue(Ext.encode(value));
|
137
137
|
}
|
138
|
-
|
138
|
+
|
139
139
|
});
|
140
140
|
|
141
141
|
Ext.reg('jsonfield', Ext.netzke.JsonField);
|
@@ -155,7 +155,7 @@ Ext.reg('jsonfield', Ext.netzke.JsonField);
|
|
155
155
|
* the Open Source LGPL 3.0 license. Commercial use is permitted to the extent
|
156
156
|
* that the code/component(s) do NOT become part of another Open Source or Commercially
|
157
157
|
* licensed development library or toolkit without explicit permission.
|
158
|
-
*
|
158
|
+
*
|
159
159
|
* <p>License details: <a href="http://www.gnu.org/licenses/lgpl.html"
|
160
160
|
* target="_blank">http://www.gnu.org/licenses/lgpl.html</a></p>
|
161
161
|
*
|
@@ -369,7 +369,7 @@ Ext.ux.form.DateTime = Ext.extend(Ext.form.Field, {
|
|
369
369
|
// {{{
|
370
370
|
/**
|
371
371
|
* @private
|
372
|
-
* called from Component::destroy.
|
372
|
+
* called from Component::destroy.
|
373
373
|
* Destroys all elements and removes all listeners we've created.
|
374
374
|
*/
|
375
375
|
,beforeDestroy:function() {
|
@@ -463,14 +463,14 @@ Ext.ux.form.DateTime = Ext.extend(Ext.form.Field, {
|
|
463
463
|
// {{{
|
464
464
|
/**
|
465
465
|
* Returns true if this component is visible
|
466
|
-
* @return {boolean}
|
466
|
+
* @return {boolean}
|
467
467
|
*/
|
468
468
|
,isVisible : function(){
|
469
469
|
return this.df.rendered && this.df.getActionEl().isVisible();
|
470
470
|
} // eo function isVisible
|
471
471
|
// }}}
|
472
472
|
// {{{
|
473
|
-
/**
|
473
|
+
/**
|
474
474
|
* @private Handles blur event
|
475
475
|
*/
|
476
476
|
,onBlur:function(f) {
|
@@ -560,7 +560,7 @@ Ext.ux.form.DateTime = Ext.extend(Ext.form.Field, {
|
|
560
560
|
} // eo function setDate
|
561
561
|
// }}}
|
562
562
|
// {{{
|
563
|
-
/**
|
563
|
+
/**
|
564
564
|
* @private Sets the value of TimeField
|
565
565
|
*/
|
566
566
|
,setTime:function(date) {
|
@@ -868,7 +868,7 @@ Ext.override(Ext.Panel, {
|
|
868
868
|
Ext.ns('Ext.ux.form');
|
869
869
|
Ext.ux.form.TriCheckbox = Ext.extend(Ext.form.Checkbox, {
|
870
870
|
checked: null,
|
871
|
-
valueList: [null, false, true],
|
871
|
+
valueList: [null, false, true],
|
872
872
|
stateClassList: ['x-checkbox-undef', null, 'x-checkbox-checked'],
|
873
873
|
overClass: 'x-form-check-over',
|
874
874
|
clickClass: 'x-form-check-down',
|
@@ -893,33 +893,33 @@ Ext.ux.form.TriCheckbox = Ext.extend(Ext.form.Checkbox, {
|
|
893
893
|
},
|
894
894
|
onRender : function(ct, position){
|
895
895
|
Ext.form.Checkbox.superclass.onRender.call(this, ct, position);
|
896
|
-
|
896
|
+
|
897
897
|
this.innerWrap = this.el.wrap({tag: 'span', cls: 'x-form-check-innerwrap'});
|
898
898
|
this.wrap = this.innerWrap.wrap({cls: 'x-form-check-wrap'});
|
899
|
-
|
899
|
+
|
900
900
|
this.currCls = this.getCls(this.value);
|
901
901
|
this.wrap.addClass(this.currCls);
|
902
902
|
if(this.clickClass && !this.disabled && !this.readOnly)
|
903
903
|
this.innerWrap.addClassOnClick(this.clickClass);
|
904
904
|
if(this.overClass && !this.disabled && !this.readOnly)
|
905
905
|
this.innerWrap.addClassOnOver(this.overClass);
|
906
|
-
|
906
|
+
|
907
907
|
this.imageEl = this.innerWrap.createChild({
|
908
908
|
tag: 'img',
|
909
909
|
src: Ext.BLANK_IMAGE_URL,
|
910
910
|
cls: 'x-form-tscheckbox'
|
911
911
|
}, this.el);
|
912
912
|
if(this.fieldClass) this.imageEl.addClass(this.fieldClass);
|
913
|
-
|
913
|
+
|
914
914
|
if(this.boxLabel){
|
915
915
|
this.innerWrap.createChild({
|
916
|
-
tag: 'label',
|
917
|
-
htmlFor: this.el.id,
|
918
|
-
cls: 'x-form-cb-label',
|
916
|
+
tag: 'label',
|
917
|
+
htmlFor: this.el.id,
|
918
|
+
cls: 'x-form-cb-label',
|
919
919
|
html: this.boxLabel
|
920
920
|
});
|
921
921
|
}
|
922
|
-
|
922
|
+
|
923
923
|
// Need to repaint for IE, otherwise positioning is broken
|
924
924
|
if(Ext.isIE){
|
925
925
|
this.wrap.repaint();
|
@@ -960,7 +960,7 @@ Ext.ux.form.TriCheckbox = Ext.extend(Ext.form.Checkbox, {
|
|
960
960
|
return this;
|
961
961
|
},
|
962
962
|
normalizeValue: function(v) {
|
963
|
-
return (v === null || v === undefined) && this.triState ? null :
|
963
|
+
return (v === null || v === undefined) && this.triState ? null :
|
964
964
|
(v === true || (['true', 'yes', 'on', '1']).indexOf(String(v).toLowerCase()) != -1);
|
965
965
|
},
|
966
966
|
getCls: function(v) {
|
@@ -970,9 +970,9 @@ Ext.ux.form.TriCheckbox = Ext.extend(Ext.form.Checkbox, {
|
|
970
970
|
updateView: function() {
|
971
971
|
var cls = this.getCls(this.value);
|
972
972
|
if (!this.wrap || cls === undefined) return;
|
973
|
-
|
973
|
+
|
974
974
|
this.wrap.replaceClass(this.currCls, cls);
|
975
975
|
this.currCls = cls;
|
976
976
|
}
|
977
977
|
});
|
978
|
-
Ext.reg('tricheckbox', Ext.ux.form.TriCheckbox);
|
978
|
+
Ext.reg('tricheckbox', Ext.ux.form.TriCheckbox);
|
data/lib/netzke-basepack.rb
CHANGED
@@ -12,7 +12,7 @@ require 'netzke/basepack'
|
|
12
12
|
|
13
13
|
module Netzke
|
14
14
|
autoload :Ext, 'ext'
|
15
|
-
|
15
|
+
|
16
16
|
module Basepack
|
17
17
|
class Engine < Rails::Engine
|
18
18
|
config.after_initialize do
|
@@ -20,7 +20,7 @@ module Netzke
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
end
|
25
25
|
|
26
26
|
Netzke::Basepack.init
|
@@ -39,13 +39,13 @@ Netzke::Basepack.init
|
|
39
39
|
# ActiveSupport::Dependencies.autoload_once_paths.delete(path)
|
40
40
|
# end
|
41
41
|
|
42
|
-
# Include javascript & styles required by all basepack components.
|
42
|
+
# Include javascript & styles required by all basepack components.
|
43
43
|
# These files will get loaded at the initial load of the framework (along with Ext and Netzke-core).
|
44
44
|
|
45
45
|
|
46
|
-
# FIXME: The following stylesheet inclusion doesn't *really* belong here, being component-specific,
|
46
|
+
# FIXME: The following stylesheet inclusion doesn't *really* belong here, being component-specific,
|
47
47
|
# but I don't see any other solution for now. The problem is that these stylesheets come straight from
|
48
|
-
# Ext JS, having *relative* URLs to the images, which doesn't allow us to include them all together as those stylesheets
|
48
|
+
# Ext JS, having *relative* URLs to the images, which doesn't allow us to include them all together as those stylesheets
|
49
49
|
# from Netzke.
|
50
50
|
|
51
51
|
# Used by FormPanel (file upload field)
|