netzke-basepack 0.7.7 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. data/.travis.yml +15 -10
  2. data/{CHANGELOG.rdoc → CHANGELOG.md} +146 -110
  3. data/LICENSE +7 -1
  4. data/README.md +47 -56
  5. data/Rakefile +5 -5
  6. data/config/before-travis.sh +10 -0
  7. data/javascripts/basepack.js +0 -130
  8. data/javascripts/netzkeremotecombo.js +59 -0
  9. data/lib/netzke/basepack.rb +9 -14
  10. data/lib/netzke/basepack/accordion.rb +45 -0
  11. data/lib/netzke/basepack/active_record.rb +12 -0
  12. data/lib/netzke/basepack/active_record/relation_extensions.rb +27 -0
  13. data/lib/netzke/basepack/columns.rb +309 -0
  14. data/lib/netzke/basepack/data_accessor.rb +22 -12
  15. data/lib/netzke/basepack/data_adapters/abstract_adapter.rb +75 -11
  16. data/lib/netzke/basepack/data_adapters/active_record_adapter.rb +154 -49
  17. data/lib/netzke/basepack/fields.rb +162 -0
  18. data/lib/netzke/basepack/form.rb +136 -0
  19. data/lib/netzke/basepack/{form_panel → form}/javascripts/comma_list_cbg.js +0 -1
  20. data/lib/netzke/basepack/{form_panel/javascripts/form_panel.js → form/javascripts/form.js} +20 -26
  21. data/lib/netzke/basepack/{form_panel → form}/javascripts/n_radio_group.js +0 -1
  22. data/lib/netzke/basepack/{form_panel → form}/javascripts/readonly_mode.js +0 -0
  23. data/lib/netzke/basepack/form/services.rb +115 -0
  24. data/lib/netzke/basepack/{form_panel → form}/stylesheets/readonly_mode.css +0 -0
  25. data/lib/netzke/basepack/grid.rb +355 -0
  26. data/lib/netzke/basepack/{grid_panel → grid}/javascripts/advanced_search.js +1 -1
  27. data/lib/netzke/basepack/{grid_panel → grid}/javascripts/check_column_fix.js +0 -0
  28. data/lib/netzke/basepack/{grid_panel → grid}/javascripts/edit_in_form.js +3 -3
  29. data/lib/netzke/basepack/{grid_panel → grid}/javascripts/event_handling.js +5 -2
  30. data/lib/netzke/basepack/{grid_panel/javascripts/grid_panel.js → grid/javascripts/grid.js} +120 -132
  31. data/lib/netzke/basepack/{grid_panel → grid}/javascripts/misc.js +0 -0
  32. data/lib/netzke/basepack/grid/services.rb +216 -0
  33. data/lib/netzke/basepack/item_persistence.rb +44 -0
  34. data/lib/netzke/basepack/item_persistence/events_plugin.rb +47 -0
  35. data/lib/netzke/basepack/{paging_form_panel.rb → paging_form.rb} +24 -30
  36. data/lib/netzke/basepack/{paging_form_panel/javascripts/paging_form_panel.js → paging_form/javascripts/paging_form.js} +2 -4
  37. data/lib/netzke/basepack/query_builder.rb +44 -73
  38. data/lib/netzke/basepack/query_builder/javascripts/query_builder.js +16 -2
  39. data/lib/netzke/basepack/record_form_window.rb +67 -0
  40. data/lib/netzke/basepack/search_panel.rb +22 -24
  41. data/lib/netzke/basepack/search_panel/javascripts/condition_field.js +2 -2
  42. data/lib/netzke/basepack/search_window.rb +47 -53
  43. data/lib/netzke/basepack/simple_app.rb +10 -13
  44. data/lib/netzke/basepack/simple_app/javascripts/simple_app.js +2 -8
  45. data/lib/netzke/basepack/tab_panel.rb +5 -4
  46. data/lib/netzke/basepack/tab_panel/javascripts/tab_panel.js +5 -5
  47. data/lib/netzke/basepack/version.rb +2 -2
  48. data/lib/netzke/basepack/viewport.rb +16 -0
  49. data/lib/netzke/basepack/window.rb +27 -18
  50. data/lib/netzke/basepack/window/javascripts/window.js +7 -1
  51. data/lib/netzke/basepack/wrap_lazy_loaded.rb +18 -18
  52. data/locales/en.yml +40 -24
  53. data/netzke-basepack.gemspec +51 -82
  54. data/stylesheets/basepack.css +0 -41
  55. data/test/basepack_test_app/Gemfile +9 -46
  56. data/test/basepack_test_app/Gemfile.lock +61 -96
  57. data/test/basepack_test_app/app/components/author_form.rb +8 -5
  58. data/test/basepack_test_app/app/components/author_grid.rb +2 -2
  59. data/test/basepack_test_app/app/components/book_form.rb +34 -31
  60. data/test/basepack_test_app/app/components/book_form_with_defaults.rb +6 -7
  61. data/test/basepack_test_app/app/components/book_form_with_file_upload.rb +10 -0
  62. data/test/basepack_test_app/app/components/book_form_with_nested_attributes.rb +5 -6
  63. data/test/basepack_test_app/app/components/book_grid.rb +19 -8
  64. data/test/basepack_test_app/app/components/book_grid_filtering.rb +4 -7
  65. data/test/basepack_test_app/app/components/book_grid_loader.rb +28 -15
  66. data/test/basepack_test_app/app/components/book_grid_with_custom_columns.rb +45 -21
  67. data/test/basepack_test_app/app/components/book_grid_with_default_values.rb +26 -8
  68. data/test/basepack_test_app/app/components/book_grid_with_excluded_columns.rb +11 -0
  69. data/test/basepack_test_app/app/components/book_grid_with_extra_feedback.rb +2 -2
  70. data/test/basepack_test_app/app/components/book_grid_with_extra_filters.rb +7 -6
  71. data/test/basepack_test_app/app/components/book_grid_with_mass_assignment_security.rb +9 -0
  72. data/test/basepack_test_app/app/components/book_grid_with_nested_attributes.rb +9 -9
  73. data/test/basepack_test_app/app/components/book_grid_with_overridden_columns.rb +5 -3
  74. data/test/basepack_test_app/app/components/book_grid_with_paging.rb +6 -8
  75. data/test/basepack_test_app/app/components/book_grid_with_persistence.rb +6 -4
  76. data/test/basepack_test_app/app/components/book_grid_with_scope.rb +6 -0
  77. data/test/basepack_test_app/app/components/book_grid_with_scoped_authors.rb +10 -7
  78. data/test/basepack_test_app/app/components/book_grid_with_virtual_attributes.rb +21 -13
  79. data/test/basepack_test_app/app/components/book_paging_form.rb +21 -0
  80. data/test/basepack_test_app/app/components/book_query_builder.rb +7 -6
  81. data/test/basepack_test_app/app/components/book_with_custom_primary_key_grid.rb +6 -7
  82. data/test/basepack_test_app/app/components/books_bound_to_author.rb +9 -7
  83. data/test/basepack_test_app/app/components/border_layout_panel_with_persistence.rb +12 -0
  84. data/test/basepack_test_app/app/components/double_book_grid.rb +19 -14
  85. data/test/basepack_test_app/app/components/form_without_model.rb +15 -16
  86. data/test/basepack_test_app/app/components/grid_with_initial_sorting.rb +7 -0
  87. data/test/basepack_test_app/app/components/grid_with_inline_data.rb +7 -0
  88. data/test/basepack_test_app/app/components/paging_form_with_search.rb +2 -2
  89. data/test/basepack_test_app/app/components/panel_with_persistent_regions.rb +35 -0
  90. data/test/basepack_test_app/app/components/query_builder.rb +7 -0
  91. data/test/basepack_test_app/app/components/simple_panel.rb +16 -11
  92. data/test/basepack_test_app/app/components/simple_window.rb +7 -6
  93. data/test/basepack_test_app/app/components/some_accordion.rb +18 -0
  94. data/test/basepack_test_app/app/components/some_auth_app.rb +5 -5
  95. data/test/basepack_test_app/app/components/some_border_layout.rb +20 -20
  96. data/test/basepack_test_app/app/components/some_search_panel.rb +6 -0
  97. data/test/basepack_test_app/app/components/some_simple_app.rb +30 -16
  98. data/test/basepack_test_app/app/components/some_tab_panel.rb +18 -15
  99. data/test/basepack_test_app/app/components/user_form.rb +18 -16
  100. data/test/basepack_test_app/app/components/user_form_with_default_fields.rb +5 -6
  101. data/test/basepack_test_app/app/components/user_grid.rb +11 -6
  102. data/test/basepack_test_app/app/components/user_grid_with_customized_form_fields.rb +5 -3
  103. data/test/basepack_test_app/app/components/window_component_loader.rb +25 -21
  104. data/test/basepack_test_app/app/models/address.rb +0 -26
  105. data/test/basepack_test_app/app/models/author.rb +0 -31
  106. data/test/basepack_test_app/app/models/book.rb +1 -42
  107. data/test/basepack_test_app/app/models/book_with_custom_primary_key.rb +1 -23
  108. data/test/basepack_test_app/app/models/role.rb +0 -21
  109. data/test/basepack_test_app/app/models/user.rb +0 -24
  110. data/test/basepack_test_app/app/views/layouts/components.html.erb +1 -1
  111. data/test/basepack_test_app/config/application.rb +1 -1
  112. data/test/basepack_test_app/config/database.yml.travis +2 -6
  113. data/test/basepack_test_app/config/initializers/netzke.rb +1 -6
  114. data/test/basepack_test_app/db/schema.rb +14 -14
  115. data/test/basepack_test_app/features/accordion_panel.feature +2 -2
  116. data/test/basepack_test_app/features/form_panel.feature +7 -7
  117. data/test/basepack_test_app/features/grid_panel.feature +93 -39
  118. data/test/basepack_test_app/features/grid_panel_with_custom_primary_key.feature +2 -1
  119. data/test/basepack_test_app/features/grid_sorting.feature +30 -6
  120. data/test/basepack_test_app/features/paging_form_panel.feature +7 -7
  121. data/test/basepack_test_app/features/persistent_regions.feature +30 -0
  122. data/test/basepack_test_app/features/search_in_grid.feature +5 -5
  123. data/test/basepack_test_app/features/simple_app.feature +6 -7
  124. data/test/basepack_test_app/features/step_definitions/form_panel_steps.rb +1 -1
  125. data/test/basepack_test_app/features/step_definitions/generic_steps.rb +109 -4
  126. data/test/basepack_test_app/features/step_definitions/grid_panel_steps.rb +8 -10
  127. data/test/basepack_test_app/features/step_definitions/window_steps.rb +27 -0
  128. data/test/basepack_test_app/features/tab_panel.feature +1 -1
  129. data/test/basepack_test_app/features/window.feature +17 -0
  130. data/test/unit/accordion_panel_test.rb +2 -2
  131. data/test/unit/grid_panel_test.rb +4 -4
  132. metadata +57 -83
  133. data/TODO.rdoc +0 -8
  134. data/lib/generators/netzke/basepack_generator.rb +0 -10
  135. data/lib/generators/netzke/templates/assets/ts-checkbox.gif +0 -0
  136. data/lib/generators/netzke/templates/create_netzke_field_lists.rb +0 -18
  137. data/lib/netzke/active_record.rb +0 -20
  138. data/lib/netzke/active_record/attributes.rb +0 -259
  139. data/lib/netzke/active_record/combobox_options.rb +0 -16
  140. data/lib/netzke/active_record/relation_extensions.rb +0 -37
  141. data/lib/netzke/basepack/accordion_panel.rb +0 -39
  142. data/lib/netzke/basepack/action_column.rb +0 -68
  143. data/lib/netzke/basepack/action_column/javascripts/action_column.js +0 -61
  144. data/lib/netzke/basepack/auth_app.rb +0 -159
  145. data/lib/netzke/basepack/basic_app.rb +0 -7
  146. data/lib/netzke/basepack/border_layout_panel.rb +0 -53
  147. data/lib/netzke/basepack/border_layout_panel/javascripts/border_layout_panel.js +0 -40
  148. data/lib/netzke/basepack/data_adapters/data_mapper_adapter.rb +0 -264
  149. data/lib/netzke/basepack/data_adapters/sequel_adapter.rb +0 -260
  150. data/lib/netzke/basepack/form_panel.rb +0 -144
  151. data/lib/netzke/basepack/form_panel/fields.rb +0 -208
  152. data/lib/netzke/basepack/form_panel/javascripts/misc.js +0 -4
  153. data/lib/netzke/basepack/form_panel/services.rb +0 -142
  154. data/lib/netzke/basepack/grid_panel.rb +0 -441
  155. data/lib/netzke/basepack/grid_panel/columns.rb +0 -400
  156. data/lib/netzke/basepack/grid_panel/javascripts/rows-dd.js +0 -281
  157. data/lib/netzke/basepack/grid_panel/record_form_window.rb +0 -41
  158. data/lib/netzke/basepack/grid_panel/services.rb +0 -235
  159. data/lib/netzke/basepack/panel.rb +0 -11
  160. data/lib/netzke/basepack/wrapper.rb +0 -28
  161. data/lib/netzke/data_mapper.rb +0 -18
  162. data/lib/netzke/data_mapper/attributes.rb +0 -273
  163. data/lib/netzke/data_mapper/combobox_options.rb +0 -11
  164. data/lib/netzke/data_mapper/relation_extensions.rb +0 -38
  165. data/lib/netzke/sequel.rb +0 -18
  166. data/lib/netzke/sequel/attributes.rb +0 -274
  167. data/lib/netzke/sequel/combobox_options.rb +0 -10
  168. data/lib/netzke/sequel/relation_extensions.rb +0 -40
  169. data/locales/zh-cn.yml +0 -79
  170. data/test/basepack_test_app/app/components/book_form_with_custom_fields.rb +0 -21
  171. data/test/basepack_test_app/app/components/book_grid_with_column_actions.rb +0 -15
  172. data/test/basepack_test_app/app/components/book_grid_with_defaults.rb +0 -6
  173. data/test/basepack_test_app/app/components/book_paging_form_panel.rb +0 -22
  174. data/test/basepack_test_app/app/components/generic_user_form.rb +0 -12
  175. data/test/basepack_test_app/app/components/simple_accordion.rb +0 -11
  176. data/test/basepack_test_app/app/components/simple_tab_panel.rb +0 -11
  177. data/test/basepack_test_app/app/components/simple_wrapper.rb +0 -7
  178. data/test/basepack_test_app/app/components/some_accordion_panel.rb +0 -22
  179. data/test/basepack_test_app/app/presenters/forms/generic_user.rb +0 -6
  180. data/test/basepack_test_app/app/views/components/loadable_window.html.erb +0 -9
  181. data/test/basepack_test_app/app/views/components/simple_panel.html.erb +0 -1
  182. data/test/basepack_test_app/features/components_in_view.feature +0 -11
  183. data/test/basepack_test_app/features/simple_panel.feature +0 -11
  184. data/test/basepack_test_app/features/validations_in_grid.feature +0 -13
  185. data/test/basepack_test_app/features/virtual_attributes.feature +0 -16
  186. data/test/basepack_test_app/spec/components/form_panel_spec.rb +0 -53
  187. data/test/basepack_test_app/spec/components/grid_panel_spec.rb +0 -10
  188. data/test/basepack_test_app/spec/data_adapter/adapter_spec.rb +0 -68
  189. data/test/basepack_test_app/spec/data_adapter/attributes_spec.rb +0 -56
  190. data/test/basepack_test_app/spec/data_adapter/relation_extensions_spec.rb +0 -125
  191. data/test/basepack_test_app/spec/factories.rb +0 -28
  192. data/test/basepack_test_app/spec/spec_helper.rb +0 -39
@@ -1,8 +1,7 @@
1
- class UserFormWithDefaultFields < Netzke::Basepack::FormPanel
2
- config do
3
- {
4
- :model => 'User',
5
- :record_id => User.first.id
6
- }
1
+ class UserFormWithDefaultFields < Netzke::Basepack::Form
2
+ def configure(c)
3
+ c.model = "User"
4
+ c.record = User.first
5
+ super
7
6
  end
8
7
  end
@@ -1,8 +1,13 @@
1
- class UserGrid < Netzke::Basepack::GridPanel
2
- title "Users"
3
- model "User"
1
+ class UserGrid < Netzke::Basepack::Grid
2
+ def configure(c)
3
+ c.model = "User"
4
+ c.title = "Users"
5
+ super
6
+ end
4
7
 
5
- add_form_config :class_name => "UserForm"
6
- edit_form_config :class_name => "UserForm"
7
- multi_edit_form_config :class_name => "UserForm"
8
+ # The way to make the grid use a custom form
9
+ def preconfigure_record_window(c)
10
+ super
11
+ c.form_config.klass = UserForm
12
+ end
8
13
  end
@@ -1,6 +1,8 @@
1
- class UserGridWithCustomizedFormFields < Netzke::Basepack::GridPanel
2
- js_property :title, "Users"
3
- config :model => "User"
1
+ class UserGridWithCustomizedFormFields < Netzke::Basepack::Grid
2
+ def configure(c)
3
+ c.title = "Users"
4
+ c.model = "User"
5
+ end
4
6
 
5
7
  def default_fields_for_forms
6
8
  [
@@ -1,27 +1,31 @@
1
1
  class WindowComponentLoader < Netzke::Base
2
- component :some_window, {
3
- :persistence => true,
4
- :class_name => "Netzke::Basepack::Window",
5
- :title => "Some Window Component",
6
- :lazy_loading => true,
7
- :width => 400,
8
- :height => 300,
9
- :modal => true,
10
- :items => [{
11
- :class_name => "Netzke::Basepack::GridPanel",
12
- :model => "User"
13
- }]
14
- }
2
+
3
+ component :some_window do |c|
4
+ c.persistence = true
5
+ c.klass = Netzke::Basepack::Window
6
+ c.title = "Some Window Component"
7
+ c.width = 300
8
+ c.height = 200
9
+ c.x = 100
10
+ c.y = 80
11
+ c.modal = true
12
+ end
15
13
 
16
14
  action :load_window
17
15
 
18
- js_property :bbar, [:load_window.action]
16
+ def configure(c)
17
+ super
18
+ c.bbar = [:load_window]
19
+ end
20
+
21
+ js_configure do |c|
22
+ c.on_load_window = <<-JS
23
+ function(params){
24
+ this.netzkeLoadComponent("some_window", {callback: function(w){
25
+ w.show();
26
+ }});
27
+ }
28
+ JS
29
+ end
19
30
 
20
- js_method :on_load_window, <<-JS
21
- function(params){
22
- this.loadNetzkeComponent({name: "some_window", callback: function(w){
23
- w.show();
24
- }});
25
- }
26
- JS
27
31
  end
@@ -1,29 +1,3 @@
1
- if defined? DataMapper::Resource
2
-
3
- class Address
4
- include DataMapper::Resource
5
- property :id, Serial
6
- belongs_to :user
7
- property :street, String
8
- property :city, String
9
- property :postcode, String
10
- property :created_at, DateTime
11
- property :updated_at, DateTime
12
- end
13
-
14
- elsif defined? Sequel::Model
15
-
16
- class Address < Sequel::Model
17
- # although this is one_to_one, according to Sequel docs,
18
- # the model containing the foreign key should have many_to_one
19
- # and the other model should have one_to_one
20
- many_to_one :user
21
- end
22
-
23
- else
24
-
25
1
  class Address < ActiveRecord::Base
26
2
  belongs_to :user
27
3
  end
28
-
29
- end
@@ -1,38 +1,7 @@
1
- if defined? DataMapper::Resource
2
-
3
- class Author
4
- include DataMapper::Resource
5
- property :id, Serial
6
- property :first_name, String
7
- property :last_name, String
8
- property :created_at, DateTime
9
- property :updated_at, DateTime
10
- has n, :books
11
- end
12
-
13
-
14
- elsif defined? Sequel::Model
15
-
16
- class Author < Sequel::Model
17
- one_to_many :books
18
- end
19
-
20
- else
21
-
22
1
  class Author < ActiveRecord::Base
23
2
  has_many :books
24
- end
25
-
26
- end
27
-
28
- # ORM-agnostic bits
29
- class Author
30
-
31
3
  # virtual attribute
32
4
  def name
33
5
  "#{last_name}, #{first_name}"
34
6
  end
35
-
36
- netzke_attribute :name
37
-
38
7
  end
@@ -1,49 +1,8 @@
1
- if defined? DataMapper::Resource
2
-
3
- class Book
4
- include DataMapper::Resource
5
- property :id, Serial
6
- belongs_to :author, :required => false
7
- validates_presence_of :title, :message => "Title can't be blank"
8
- property :title, String
9
- property :exemplars, Integer
10
- property :digitized, Boolean
11
- property :notes, Text
12
- property :tags, String
13
- property :rating, Integer
14
- property :created_at, DateTime
15
- property :updated_at, DateTime
16
- property :last_read_at, DateTime
17
- property :published_on, Date
18
-
19
- def self.sorted_by_author_name dir
20
- all :order => [ author.last_name.send(dir), author.first_name.send(dir) ], :links => [ relationships[:author].inverse ]
21
- end
22
-
23
- end
24
-
25
- elsif defined? Sequel::Model
26
-
27
- class Book < Sequel::Model
28
- many_to_one :author
29
-
30
- def_dataset_method(:sorted_by_author_name) do |dir|
31
- eager_graph(:author).order_append(:author__last_name.send(dir), :author__first_name.send(dir))
32
- end
33
-
34
- def validate
35
- validates_presence :title, :message => "can't be blank"
36
- end
37
-
38
- end
39
-
40
- else
41
-
42
1
  class Book < ActiveRecord::Base
43
2
  belongs_to :author
44
3
  validates_presence_of :title
45
4
 
46
5
  scope :sorted_by_author_name, lambda { |dir| joins(:author).order("authors.last_name #{dir}, authors.first_name #{dir}") }
47
- end
48
6
 
7
+ attr_protected :exemplars, :author_id, :as => :user
49
8
  end
@@ -1,26 +1,4 @@
1
- if defined? DataMapper::Resource
2
-
3
- class BookWithCustomPrimaryKey
4
- include DataMapper::Resource
5
- property :uid, Serial
6
- belongs_to :author
7
- property :title, String
8
- property :created_at, DateTime
9
- property :updated_at, DateTime
10
- end
11
-
12
- elsif defined? Sequel::Model
13
-
14
- class BookWithCustomPrimaryKey < Sequel::Model
15
- set_primary_key :uid
16
- many_to_one :author
17
- end
18
-
19
- else
20
-
21
1
  class BookWithCustomPrimaryKey < ActiveRecord::Base
22
- set_primary_key 'uid'
2
+ self.primary_key = 'uid'
23
3
  belongs_to :author
24
4
  end
25
-
26
- end
@@ -1,24 +1,3 @@
1
- if defined? DataMapper::Resource
2
-
3
- class Role
4
- include DataMapper::Resource
5
- property :id, Serial
6
- property :name, String
7
- has n, :users
8
- property :created_at, DateTime
9
- property :updated_at, DateTime
10
- end
11
-
12
- elsif defined? Sequel::Model
13
-
14
- class Role < Sequel::Model
15
- one_to_many :users
16
- end
17
-
18
- else
19
-
20
1
  class Role < ActiveRecord::Base
21
2
  has_many :users
22
3
  end
23
-
24
- end
@@ -1,29 +1,5 @@
1
- if defined? DataMapper::Resource
2
-
3
- class User
4
- include DataMapper::Resource
5
- property :id, Serial
6
- property :first_name, String
7
- property :last_name, String
8
- belongs_to :role, :required => false
9
- has 1, :address
10
- property :created_at, DateTime
11
- property :updated_at, DateTime
12
- end
13
-
14
- elsif defined? Sequel::Model
15
-
16
- class User < Sequel::Model
17
- many_to_one :role
18
- one_to_one :address
19
- end
20
-
21
- else
22
-
23
1
  class User < ActiveRecord::Base
24
2
  # scope :latest, lambda {|param| where(:created_at.gt => param)}
25
3
  belongs_to :role
26
4
  has_one :address
27
5
  end
28
-
29
- end
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <title>Netzke Basepack Test App</title>
5
5
  <%= csrf_meta_tag %>
6
- <%= netzke_init %>
6
+ <%= load_netzke %>
7
7
  </head>
8
8
  <body>
9
9
 
@@ -48,7 +48,7 @@ module RailsApp
48
48
  # config.netzke.basepack.grid_panel.extended_search_available = false
49
49
 
50
50
  # to build links to the code on github
51
- config.repo_root = "https://github.com/nomadcoder/netzke-basepack/blob/master/test/basepack_test_app"
51
+ config.repo_root = "https://github.com/netzke/netzke-basepack/blob/master/test/basepack_test_app"
52
52
 
53
53
  # Enable the asset pipeline
54
54
  config.assets.enabled = true
@@ -3,13 +3,9 @@
3
3
  # Do not set this db to the same as development or production.
4
4
  test: &test
5
5
  adapter: mysql2
6
- encoding: utf8
7
- reconnect: false
8
- database: nbt_test
6
+ database: basepack_test_app_test
9
7
  pool: 5
10
- username:
11
- # DM
12
- uri: mysql://127.0.0.1/nbt_test?user=&encoding=UTF-8
8
+ timeout: 5000
13
9
 
14
10
  cucumber:
15
11
  <<: *test
@@ -1,9 +1,4 @@
1
- Netzke::Basepack.setup do |config|
2
- # config.icons_uri = "/images/icons"
3
- end
4
-
5
1
  Netzke::Core.setup do |config|
6
2
  # config.ext_uri = "/extjs4"
7
- # config.ext3_compat_uri = "/extjs-compatibility"
8
3
  config.js_direct_max_retries = 0
9
- end
4
+ end
@@ -19,22 +19,22 @@ ActiveRecord::Schema.define(:version => 20110909071740) do
19
19
  t.string "city"
20
20
  t.string "postcode"
21
21
  t.integer "country_id"
22
- t.datetime "created_at"
23
- t.datetime "updated_at"
22
+ t.datetime "created_at", :null => false
23
+ t.datetime "updated_at", :null => false
24
24
  end
25
25
 
26
26
  create_table "authors", :force => true do |t|
27
27
  t.string "first_name"
28
28
  t.string "last_name"
29
- t.datetime "created_at"
30
- t.datetime "updated_at"
29
+ t.datetime "created_at", :null => false
30
+ t.datetime "updated_at", :null => false
31
31
  end
32
32
 
33
33
  create_table "book_with_custom_primary_keys", :primary_key => "uid", :force => true do |t|
34
34
  t.string "title"
35
35
  t.integer "author_id"
36
- t.datetime "created_at"
37
- t.datetime "updated_at"
36
+ t.datetime "created_at", :null => false
37
+ t.datetime "updated_at", :null => false
38
38
  end
39
39
 
40
40
  create_table "books", :force => true do |t|
@@ -45,8 +45,8 @@ ActiveRecord::Schema.define(:version => 20110909071740) do
45
45
  t.text "notes"
46
46
  t.string "tags"
47
47
  t.integer "rating"
48
- t.datetime "created_at"
49
- t.datetime "updated_at"
48
+ t.datetime "created_at", :null => false
49
+ t.datetime "updated_at", :null => false
50
50
  t.datetime "last_read_at"
51
51
  t.date "published_on"
52
52
  end
@@ -56,8 +56,8 @@ ActiveRecord::Schema.define(:version => 20110909071740) do
56
56
  t.integer "user_id"
57
57
  t.integer "role_id"
58
58
  t.text "value"
59
- t.datetime "created_at"
60
- t.datetime "updated_at"
59
+ t.datetime "created_at", :null => false
60
+ t.datetime "updated_at", :null => false
61
61
  end
62
62
 
63
63
  add_index "netzke_component_states", ["component"], :name => "index_netzke_component_states_on_component"
@@ -66,16 +66,16 @@ ActiveRecord::Schema.define(:version => 20110909071740) do
66
66
 
67
67
  create_table "roles", :force => true do |t|
68
68
  t.string "name"
69
- t.datetime "created_at"
70
- t.datetime "updated_at"
69
+ t.datetime "created_at", :null => false
70
+ t.datetime "updated_at", :null => false
71
71
  end
72
72
 
73
73
  create_table "users", :force => true do |t|
74
74
  t.string "first_name"
75
75
  t.string "last_name"
76
76
  t.integer "role_id"
77
- t.datetime "created_at"
78
- t.datetime "updated_at"
77
+ t.datetime "created_at", :null => false
78
+ t.datetime "updated_at", :null => false
79
79
  end
80
80
 
81
81
  end
@@ -5,8 +5,8 @@ Feature: Accordion panel
5
5
 
6
6
  @javascript
7
7
  Scenario: Lazy loading of a component into a panel when the latter gets expanded
8
- Given I am on the SimpleAccordion test page
8
+ Given I am on the SomeAccordion test page
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"
@@ -58,7 +58,7 @@ Scenario: UserFormWithDefaultFields should render properly
58
58
  And I should see "writer"
59
59
 
60
60
  @javascript
61
- Scenario: FormPanel should be functional without model provided
61
+ Scenario: Form should be functional without model provided
62
62
  Given I am on the FormWithoutModel test page
63
63
  When I fill in "Text field:" with "Some text"
64
64
  And I fill in "Number field:" with "42"
@@ -92,7 +92,7 @@ Scenario: Editing and immediately submitting the form
92
92
  Then the form should show author__name: "Castaneda, Carlos"
93
93
 
94
94
  When I press "Apply"
95
- And I wait for the response from the server
95
+ And I wait for response from server
96
96
  Then the form should show author__name: "Castaneda, Carlos"
97
97
 
98
98
  # @javascript
@@ -102,7 +102,7 @@ Scenario: Editing and immediately submitting the form
102
102
  # And I check ext checkbox "recommend"
103
103
  # And I check ext checkbox "cool"
104
104
  # And I press "Apply"
105
- # And I wait for the response from the server
105
+ # And I wait for response from server
106
106
  # Then ext "cool" checkbox should be checked
107
107
  # And ext "recommend" checkbox should be checked
108
108
  # But ext "read" checkbox should not be checked
@@ -114,12 +114,12 @@ Scenario: Editing and immediately submitting the form
114
114
  When I go to the BookForm test page
115
115
  And I fill in "Title:" with ""
116
116
  And I press "Apply"
117
- And I wait for the response from the server
117
+ And I wait for response from server
118
118
  Then I should see "Title can't be blank"
119
119
  But I should not see "Success!"
120
120
  When I fill in "Title:" with "Not Blank"
121
121
  And I press "Apply"
122
- And I wait for the response from the server
122
+ And I wait for response from server
123
123
  Then I should not see "Title can't be blank"
124
124
  But I should see "Success!"
125
125
 
@@ -129,7 +129,7 @@ Scenario: Editing and immediately submitting the form
129
129
  When I go to the BookFormWithDefaults test page
130
130
  Then I fill in "Published on" with "2005-01-23"
131
131
  And I press "Apply"
132
- And I wait for the response from the server
132
+ And I wait for response from server
133
133
  Then a book should exist with published_on: "2005-01-23"
134
134
 
135
135
  @javascript
@@ -138,5 +138,5 @@ Scenario: Editing and immediately submitting the form
138
138
  When I go to the BookFormWithDefaults test page
139
139
  Then I fill in Ext field "Last read at" with "2005-01-23 11:12:13"
140
140
  And I press "Apply"
141
- And I wait for the response from the server
141
+ And I wait for response from server
142
142
  Then a book should exist with last_read_at: "2005-01-23 11:12:13"