tabulator-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +15 -0
  3. data/CHANGELOG.md +2 -0
  4. data/CODE_OF_CONDUCT.md +74 -0
  5. data/Gemfile +6 -0
  6. data/Gemfile.lock +93 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +63 -0
  9. data/Rakefile +6 -0
  10. data/VERSIONS.md +5 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/lib/tabulator-rails.rb +3 -0
  14. data/lib/tabulator-rails/engine.rb +6 -0
  15. data/lib/tabulator-rails/version.rb +5 -0
  16. data/tabulator-rails.gemspec +38 -0
  17. data/test-app/.gitignore +23 -0
  18. data/test-app/Gemfile +59 -0
  19. data/test-app/Gemfile.lock +210 -0
  20. data/test-app/README.md +24 -0
  21. data/test-app/Rakefile +6 -0
  22. data/test-app/app/assets/config/manifest.js +3 -0
  23. data/test-app/app/assets/images/.keep +0 -0
  24. data/test-app/app/assets/javascripts/application.js +17 -0
  25. data/test-app/app/assets/javascripts/cable.js +13 -0
  26. data/test-app/app/assets/javascripts/channels/.keep +0 -0
  27. data/test-app/app/assets/javascripts/posts.js +28 -0
  28. data/test-app/app/assets/stylesheets/application.css +16 -0
  29. data/test-app/app/assets/stylesheets/posts.scss +3 -0
  30. data/test-app/app/assets/stylesheets/scaffolds.scss +84 -0
  31. data/test-app/app/channels/application_cable/channel.rb +4 -0
  32. data/test-app/app/channels/application_cable/connection.rb +4 -0
  33. data/test-app/app/controllers/application_controller.rb +3 -0
  34. data/test-app/app/controllers/concerns/.keep +0 -0
  35. data/test-app/app/controllers/posts_controller.rb +3 -0
  36. data/test-app/app/helpers/application_helper.rb +2 -0
  37. data/test-app/app/helpers/posts_helper.rb +2 -0
  38. data/test-app/app/jobs/application_job.rb +2 -0
  39. data/test-app/app/mailers/application_mailer.rb +4 -0
  40. data/test-app/app/models/application_record.rb +3 -0
  41. data/test-app/app/models/concerns/.keep +0 -0
  42. data/test-app/app/models/post.rb +2 -0
  43. data/test-app/app/views/layouts/application.html.erb +14 -0
  44. data/test-app/app/views/layouts/mailer.html.erb +13 -0
  45. data/test-app/app/views/layouts/mailer.text.erb +1 -0
  46. data/test-app/app/views/posts/index.html.erb +3 -0
  47. data/test-app/bin/bundle +3 -0
  48. data/test-app/bin/rails +9 -0
  49. data/test-app/bin/rake +9 -0
  50. data/test-app/bin/setup +38 -0
  51. data/test-app/bin/spring +17 -0
  52. data/test-app/bin/update +29 -0
  53. data/test-app/bin/yarn +11 -0
  54. data/test-app/config.ru +5 -0
  55. data/test-app/config/application.rb +18 -0
  56. data/test-app/config/boot.rb +3 -0
  57. data/test-app/config/cable.yml +10 -0
  58. data/test-app/config/database.yml +25 -0
  59. data/test-app/config/environment.rb +5 -0
  60. data/test-app/config/environments/development.rb +54 -0
  61. data/test-app/config/environments/production.rb +91 -0
  62. data/test-app/config/environments/test.rb +42 -0
  63. data/test-app/config/initializers/application_controller_renderer.rb +8 -0
  64. data/test-app/config/initializers/assets.rb +14 -0
  65. data/test-app/config/initializers/backtrace_silencers.rb +7 -0
  66. data/test-app/config/initializers/cookies_serializer.rb +5 -0
  67. data/test-app/config/initializers/filter_parameter_logging.rb +4 -0
  68. data/test-app/config/initializers/inflections.rb +16 -0
  69. data/test-app/config/initializers/mime_types.rb +4 -0
  70. data/test-app/config/initializers/wrap_parameters.rb +14 -0
  71. data/test-app/config/locales/en.yml +33 -0
  72. data/test-app/config/puma.rb +56 -0
  73. data/test-app/config/routes.rb +6 -0
  74. data/test-app/config/secrets.yml +32 -0
  75. data/test-app/config/spring.rb +6 -0
  76. data/test-app/db/migrate/20180109155755_create_posts.rb +8 -0
  77. data/test-app/db/schema.rb +20 -0
  78. data/test-app/db/seeds.rb +7 -0
  79. data/test-app/lib/assets/.keep +0 -0
  80. data/test-app/lib/tasks/.keep +0 -0
  81. data/test-app/log/.keep +0 -0
  82. data/test-app/package.json +5 -0
  83. data/test-app/public/404.html +67 -0
  84. data/test-app/public/422.html +67 -0
  85. data/test-app/public/500.html +66 -0
  86. data/test-app/public/apple-touch-icon-precomposed.png +0 -0
  87. data/test-app/public/apple-touch-icon.png +0 -0
  88. data/test-app/public/favicon.ico +0 -0
  89. data/test-app/public/robots.txt +1 -0
  90. data/test-app/test/application_system_test_case.rb +5 -0
  91. data/test-app/test/controllers/.keep +0 -0
  92. data/test-app/test/controllers/posts_controller_test.rb +48 -0
  93. data/test-app/test/fixtures/.keep +0 -0
  94. data/test-app/test/fixtures/files/.keep +0 -0
  95. data/test-app/test/fixtures/posts.yml +11 -0
  96. data/test-app/test/helpers/.keep +0 -0
  97. data/test-app/test/integration/.keep +0 -0
  98. data/test-app/test/mailers/.keep +0 -0
  99. data/test-app/test/models/.keep +0 -0
  100. data/test-app/test/models/post_test.rb +7 -0
  101. data/test-app/test/system/.keep +0 -0
  102. data/test-app/test/system/posts_test.rb +9 -0
  103. data/test-app/test/test_helper.rb +9 -0
  104. data/test-app/tmp/.keep +0 -0
  105. data/test-app/vendor/.keep +0 -0
  106. data/vendor/assets/javascripts/tabulator.js +14581 -0
  107. data/vendor/assets/stylesheets/tabulator.css +535 -0
  108. metadata +195 -0
@@ -0,0 +1,210 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ tabulator-rails (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ actioncable (5.1.4)
10
+ actionpack (= 5.1.4)
11
+ nio4r (~> 2.0)
12
+ websocket-driver (~> 0.6.1)
13
+ actionmailer (5.1.4)
14
+ actionpack (= 5.1.4)
15
+ actionview (= 5.1.4)
16
+ activejob (= 5.1.4)
17
+ mail (~> 2.5, >= 2.5.4)
18
+ rails-dom-testing (~> 2.0)
19
+ actionpack (5.1.4)
20
+ actionview (= 5.1.4)
21
+ activesupport (= 5.1.4)
22
+ rack (~> 2.0)
23
+ rack-test (>= 0.6.3)
24
+ rails-dom-testing (~> 2.0)
25
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
26
+ actionview (5.1.4)
27
+ activesupport (= 5.1.4)
28
+ builder (~> 3.1)
29
+ erubi (~> 1.4)
30
+ rails-dom-testing (~> 2.0)
31
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
32
+ activejob (5.1.4)
33
+ activesupport (= 5.1.4)
34
+ globalid (>= 0.3.6)
35
+ activemodel (5.1.4)
36
+ activesupport (= 5.1.4)
37
+ activerecord (5.1.4)
38
+ activemodel (= 5.1.4)
39
+ activesupport (= 5.1.4)
40
+ arel (~> 8.0)
41
+ activesupport (5.1.4)
42
+ concurrent-ruby (~> 1.0, >= 1.0.2)
43
+ i18n (~> 0.7)
44
+ minitest (~> 5.1)
45
+ tzinfo (~> 1.1)
46
+ addressable (2.5.2)
47
+ public_suffix (>= 2.0.2, < 4.0)
48
+ arel (8.0.0)
49
+ bindex (0.5.0)
50
+ builder (3.2.3)
51
+ byebug (9.1.0)
52
+ capybara (2.17.0)
53
+ addressable
54
+ mini_mime (>= 0.1.3)
55
+ nokogiri (>= 1.3.3)
56
+ rack (>= 1.0.0)
57
+ rack-test (>= 0.5.4)
58
+ xpath (>= 2.0, < 4.0)
59
+ childprocess (0.8.0)
60
+ ffi (~> 1.0, >= 1.0.11)
61
+ coffee-rails (4.2.2)
62
+ coffee-script (>= 2.2.0)
63
+ railties (>= 4.0.0)
64
+ coffee-script (2.4.1)
65
+ coffee-script-source
66
+ execjs
67
+ coffee-script-source (1.12.2)
68
+ concurrent-ruby (1.0.5)
69
+ crass (1.0.3)
70
+ erubi (1.7.0)
71
+ execjs (2.7.0)
72
+ ffi (1.9.18)
73
+ globalid (0.4.1)
74
+ activesupport (>= 4.2.0)
75
+ i18n (0.9.1)
76
+ concurrent-ruby (~> 1.0)
77
+ jbuilder (2.7.0)
78
+ activesupport (>= 4.2.0)
79
+ multi_json (>= 1.2)
80
+ jquery-rails (4.3.1)
81
+ rails-dom-testing (>= 1, < 3)
82
+ railties (>= 4.2.0)
83
+ thor (>= 0.14, < 2.0)
84
+ jquery-ui-rails (6.0.1)
85
+ railties (>= 3.2.16)
86
+ listen (3.1.5)
87
+ rb-fsevent (~> 0.9, >= 0.9.4)
88
+ rb-inotify (~> 0.9, >= 0.9.7)
89
+ ruby_dep (~> 1.2)
90
+ loofah (2.1.1)
91
+ crass (~> 1.0.2)
92
+ nokogiri (>= 1.5.9)
93
+ mail (2.7.0)
94
+ mini_mime (>= 0.1.1)
95
+ method_source (0.9.0)
96
+ mini_mime (1.0.0)
97
+ mini_portile2 (2.3.0)
98
+ minitest (5.11.1)
99
+ multi_json (1.13.0)
100
+ nio4r (2.2.0)
101
+ nokogiri (1.8.1)
102
+ mini_portile2 (~> 2.3.0)
103
+ public_suffix (3.0.1)
104
+ puma (3.11.0)
105
+ rack (2.0.3)
106
+ rack-test (0.8.2)
107
+ rack (>= 1.0, < 3)
108
+ rails (5.1.4)
109
+ actioncable (= 5.1.4)
110
+ actionmailer (= 5.1.4)
111
+ actionpack (= 5.1.4)
112
+ actionview (= 5.1.4)
113
+ activejob (= 5.1.4)
114
+ activemodel (= 5.1.4)
115
+ activerecord (= 5.1.4)
116
+ activesupport (= 5.1.4)
117
+ bundler (>= 1.3.0)
118
+ railties (= 5.1.4)
119
+ sprockets-rails (>= 2.0.0)
120
+ rails-dom-testing (2.0.3)
121
+ activesupport (>= 4.2.0)
122
+ nokogiri (>= 1.6)
123
+ rails-html-sanitizer (1.0.3)
124
+ loofah (~> 2.0)
125
+ railties (5.1.4)
126
+ actionpack (= 5.1.4)
127
+ activesupport (= 5.1.4)
128
+ method_source
129
+ rake (>= 0.8.7)
130
+ thor (>= 0.18.1, < 2.0)
131
+ rake (12.3.0)
132
+ rb-fsevent (0.10.2)
133
+ rb-inotify (0.9.10)
134
+ ffi (>= 0.5.0, < 2)
135
+ ruby_dep (1.5.0)
136
+ rubyzip (1.2.1)
137
+ sass (3.5.5)
138
+ sass-listen (~> 4.0.0)
139
+ sass-listen (4.0.0)
140
+ rb-fsevent (~> 0.9, >= 0.9.4)
141
+ rb-inotify (~> 0.9, >= 0.9.7)
142
+ sass-rails (5.0.7)
143
+ railties (>= 4.0.0, < 6)
144
+ sass (~> 3.1)
145
+ sprockets (>= 2.8, < 4.0)
146
+ sprockets-rails (>= 2.0, < 4.0)
147
+ tilt (>= 1.1, < 3)
148
+ selenium-webdriver (3.8.0)
149
+ childprocess (~> 0.5)
150
+ rubyzip (~> 1.0)
151
+ spring (2.0.2)
152
+ activesupport (>= 4.2)
153
+ spring-watcher-listen (2.0.1)
154
+ listen (>= 2.7, < 4.0)
155
+ spring (>= 1.2, < 3.0)
156
+ sprockets (3.7.1)
157
+ concurrent-ruby (~> 1.0)
158
+ rack (> 1, < 3)
159
+ sprockets-rails (3.2.1)
160
+ actionpack (>= 4.0)
161
+ activesupport (>= 4.0)
162
+ sprockets (>= 3.0.0)
163
+ sqlite3 (1.3.13)
164
+ thor (0.20.0)
165
+ thread_safe (0.3.6)
166
+ tilt (2.0.8)
167
+ turbolinks (5.1.0)
168
+ turbolinks-source (~> 5.1)
169
+ turbolinks-source (5.1.0)
170
+ tzinfo (1.2.4)
171
+ thread_safe (~> 0.1)
172
+ uglifier (4.1.3)
173
+ execjs (>= 0.3.0, < 3)
174
+ web-console (3.5.1)
175
+ actionview (>= 5.0)
176
+ activemodel (>= 5.0)
177
+ bindex (>= 0.4.0)
178
+ railties (>= 5.0)
179
+ websocket-driver (0.6.5)
180
+ websocket-extensions (>= 0.1.0)
181
+ websocket-extensions (0.1.3)
182
+ xpath (3.0.0)
183
+ nokogiri (~> 1.8)
184
+
185
+ PLATFORMS
186
+ ruby
187
+
188
+ DEPENDENCIES
189
+ byebug
190
+ capybara (~> 2.13)
191
+ coffee-rails (~> 4.2)
192
+ jbuilder (~> 2.5)
193
+ jquery-rails
194
+ jquery-ui-rails
195
+ listen (>= 3.0.5, < 3.2)
196
+ puma (~> 3.7)
197
+ rails (~> 5.1.4)
198
+ sass-rails (~> 5.0)
199
+ selenium-webdriver
200
+ spring
201
+ spring-watcher-listen (~> 2.0.0)
202
+ sqlite3
203
+ tabulator-rails!
204
+ turbolinks (~> 5)
205
+ tzinfo-data
206
+ uglifier (>= 1.3.0)
207
+ web-console (>= 3.3.0)
208
+
209
+ BUNDLED WITH
210
+ 1.16.0
@@ -0,0 +1,24 @@
1
+ # README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require_relative 'config/application'
5
+
6
+ Rails.application.load_tasks
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
File without changes
@@ -0,0 +1,17 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
5
+ // vendor/assets/javascripts directory can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
+ //
10
+ // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require jquery
14
+ //= require jquery-ui
15
+ //= require tabulator
16
+ //= require rails-ujs
17
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ // Action Cable provides the framework to deal with WebSockets in Rails.
2
+ // You can generate new channels where WebSocket features live using the `rails generate channel` command.
3
+ //
4
+ //= require action_cable
5
+ //= require_self
6
+ //= require_tree ./channels
7
+
8
+ (function() {
9
+ this.App || (this.App = {});
10
+
11
+ App.cable = ActionCable.createConsumer();
12
+
13
+ }).call(this);
@@ -0,0 +1,28 @@
1
+ $(document).ready(function() {
2
+ $("#example-table").tabulator({
3
+ height:205, // set height of table, this enables the Virtual DOM and improves render speed dramatically (can be any valid css height value)
4
+ layout:"fitColumns", //fit columns to width of table (optional)
5
+ columns:[ //Define Table Columns
6
+ {title:"Name", field:"name", width:150},
7
+ {title:"Age", field:"age", align:"left", formatter:"progress"},
8
+ {title:"Favourite Color", field:"col"},
9
+ {title:"Date Of Birth", field:"dob", sorter:"date", align:"center"},
10
+ ],
11
+ rowClick:function(e, row){ //trigger an alert message when the row is clicked
12
+ alert("Row " + row.getData().id + " Clicked!!!!");
13
+ },
14
+ });
15
+
16
+
17
+ var tabledata = [
18
+ {id:1, name:"Oli Bob", age:"12", col:"red", dob:""},
19
+ {id:2, name:"Mary May", age:"1", col:"blue", dob:"14/05/1982"},
20
+ {id:3, name:"Christine Lobowski", age:"42", col:"green", dob:"22/05/1982"},
21
+ {id:4, name:"Brendon Philips", age:"125", col:"orange", dob:"01/08/1980"},
22
+ {id:5, name:"Margret Marmajuke", age:"16", col:"yellow", dob:"31/01/1999"},
23
+ ];
24
+
25
+ //load sample data into the table
26
+ $("#example-table").tabulator("setData", tabledata);
27
+
28
+ });
@@ -0,0 +1,16 @@
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, or any plugin's
6
+ * vendor/assets/stylesheets directory 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 bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require tabulator
14
+ *= require_tree .
15
+ *= require_self
16
+ */
@@ -0,0 +1,3 @@
1
+ // Place all the styles related to the posts controller here.
2
+ // They will automatically be included in application.css.
3
+ // You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,84 @@
1
+ body {
2
+ background-color: #fff;
3
+ color: #333;
4
+ margin: 33px;
5
+ font-family: verdana, arial, helvetica, sans-serif;
6
+ font-size: 13px;
7
+ line-height: 18px;
8
+ }
9
+
10
+ p, ol, ul, td {
11
+ font-family: verdana, arial, helvetica, sans-serif;
12
+ font-size: 13px;
13
+ line-height: 18px;
14
+ }
15
+
16
+ pre {
17
+ background-color: #eee;
18
+ padding: 10px;
19
+ font-size: 11px;
20
+ }
21
+
22
+ a {
23
+ color: #000;
24
+
25
+ &:visited {
26
+ color: #666;
27
+ }
28
+
29
+ &:hover {
30
+ color: #fff;
31
+ background-color: #000;
32
+ }
33
+ }
34
+
35
+ th {
36
+ padding-bottom: 5px;
37
+ }
38
+
39
+ td {
40
+ padding: 0 5px 7px;
41
+ }
42
+
43
+ div {
44
+ &.field, &.actions {
45
+ margin-bottom: 10px;
46
+ }
47
+ }
48
+
49
+ #notice {
50
+ color: green;
51
+ }
52
+
53
+ .field_with_errors {
54
+ padding: 2px;
55
+ background-color: red;
56
+ display: table;
57
+ }
58
+
59
+ #error_explanation {
60
+ width: 450px;
61
+ border: 2px solid red;
62
+ padding: 7px 7px 0;
63
+ margin-bottom: 20px;
64
+ background-color: #f0f0f0;
65
+
66
+ h2 {
67
+ text-align: left;
68
+ font-weight: bold;
69
+ padding: 5px 5px 5px 15px;
70
+ font-size: 12px;
71
+ margin: -7px -7px 0;
72
+ background-color: #c00;
73
+ color: #fff;
74
+ }
75
+
76
+ ul li {
77
+ font-size: 12px;
78
+ list-style: square;
79
+ }
80
+ }
81
+
82
+ label {
83
+ display: block;
84
+ }
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Channel < ActionCable::Channel::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module ApplicationCable
2
+ class Connection < ActionCable::Connection::Base
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery with: :exception
3
+ end
@@ -0,0 +1,3 @@
1
+ class PostsController < ApplicationController
2
+ def index; end
3
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end