apotomo-datatable 0.0.1 → 0.0.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.
- data/README.md +12 -7
- data/app/assets/javascripts/apotomo-datatable.js +51 -0
- data/app/assets/javascripts/jquery.dataTables.js +12098 -0
- data/app/assets/stylesheets/apotomo-datatable.css +1165 -0
- data/app/assets/stylesheets/demo_page.css +126 -0
- data/app/assets/stylesheets/demo_table.css +577 -0
- data/app/assets/stylesheets/jquery-ui-1.9.2.custom.css +462 -0
- data/lib/apotomo-datatable.rb +3 -2
- data/lib/apotomo-datatable/engine.rb +12 -0
- data/lib/apotomo-datatable/version.rb +1 -1
- data/spec/widget/included_excluded_columns_spec.rb +2 -2
- metadata +11 -4
data/lib/apotomo-datatable.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
require 'apotomo/datatable_widget'
|
2
2
|
require 'apotomo-datatable/railtie'
|
3
|
+
require 'apotomo-datatable/engine'
|
3
4
|
module ApotomoDatatable
|
4
|
-
class Engine < Rails::Engine
|
5
|
+
# class Engine < Rails::Engine
|
5
6
|
# loads views from 'cell/views' and NOT from 'app/cells'
|
6
7
|
# config.paths.add 'app/cell_views', :with => 'cell/views'
|
7
8
|
|
8
9
|
# appends 'lib/my_cells_view_path' to this Railtie view path contribution
|
9
10
|
# config.paths['app/cell_views'] << 'lib/apotomo/datatable'
|
10
|
-
end
|
11
|
+
# end
|
11
12
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#http://rakeroutes.com/blog/write-a-gem-for-the-rails-asset-pipeline/
|
2
|
+
module ApotomoDatatable
|
3
|
+
class Engine < Rails::Engine
|
4
|
+
initializer 'apotomo-datatable.load_static_assets' do |app|
|
5
|
+
# app.config.assets.paths << "#{root}/vendor/assets"
|
6
|
+
# app.middleware.use ::ActionDispatch::Static, "#{root}/vendor/assets"
|
7
|
+
# app.middleware.insert_before(::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/vendor")
|
8
|
+
# app.middleware.insert_before ::Rack::Lock, ::ActionDispatch::Static, "#{root}/vendor"
|
9
|
+
File.open('/tmp/a','w') {|f| f.write("should be loading assets from #{app.config.assets.paths}\n")}
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -25,9 +25,9 @@ describe Apotomo::DatatableWidget, "apotomo-datatable widget" do
|
|
25
25
|
@test_controller.render_widget(:datatable,:display).should include("<th>id</th>")
|
26
26
|
end
|
27
27
|
it "should exclude additional columns passed in the [:template][:excluded_columns] option" do
|
28
|
-
@test_controller=test_controller(:widget=>{},:template=>{:
|
28
|
+
@test_controller=test_controller(:widget=>{},:template=>{:excluded_columns=>[:name]},:plugin=>{})
|
29
29
|
@widget=@test_controller.apotomo_root.childrenHash[:datatable]
|
30
|
-
@test_controller.render_widget(:datatable,:display).
|
30
|
+
@test_controller.render_widget(:datatable,:display).should_not include("<th>name</th>")
|
31
31
|
end
|
32
32
|
|
33
33
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apotomo-datatable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -291,7 +291,14 @@ executables: []
|
|
291
291
|
extensions: []
|
292
292
|
extra_rdoc_files: []
|
293
293
|
files:
|
294
|
+
- app/assets/javascripts/jquery.dataTables.js
|
295
|
+
- app/assets/javascripts/apotomo-datatable.js
|
296
|
+
- app/assets/stylesheets/demo_page.css
|
297
|
+
- app/assets/stylesheets/apotomo-datatable.css
|
298
|
+
- app/assets/stylesheets/jquery-ui-1.9.2.custom.css
|
299
|
+
- app/assets/stylesheets/demo_table.css
|
294
300
|
- lib/apotomo-datatable/version.rb
|
301
|
+
- lib/apotomo-datatable/engine.rb
|
295
302
|
- lib/apotomo-datatable/railtie.rb
|
296
303
|
- lib/apotomo-datatable.rb
|
297
304
|
- lib/tasks/apotomo-datatable_tasks.rake
|
@@ -328,7 +335,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
328
335
|
version: '0'
|
329
336
|
segments:
|
330
337
|
- 0
|
331
|
-
hash:
|
338
|
+
hash: 173177793655389497
|
332
339
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
333
340
|
none: false
|
334
341
|
requirements:
|
@@ -337,7 +344,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
337
344
|
version: '0'
|
338
345
|
segments:
|
339
346
|
- 0
|
340
|
-
hash:
|
347
|
+
hash: 173177793655389497
|
341
348
|
requirements: []
|
342
349
|
rubyforge_project:
|
343
350
|
rubygems_version: 1.8.24
|