Description:
jquery, bootstrap ok
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r865:8fe37a31b728 - - The requested commit is too big and content was truncated. 139 files changed. Show full diff

@@ -0,0 +1,9
1 + import { Application } from "@hotwired/stimulus"
2 +
3 + const application = Application.start()
4 +
5 + // Configure Stimulus development experience
6 + application.debug = false
7 + window.Stimulus = application
8 +
9 + export { application }
@@ -0,0 +1,7
1 + import { Controller } from "@hotwired/stimulus"
2 +
3 + export default class extends Controller {
4 + connect() {
5 + this.element.textContent = "Hello World!"
6 + }
7 + }
@@ -0,0 +1,11
1 + // Import and register all your controllers from the importmap under controllers/*
2 +
3 + import { application } from "controllers/application"
4 +
5 + // Eager load all controllers defined in the import map under controllers/**/*_controller
6 + import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading"
7 + eagerLoadControllersFrom("controllers", application)
8 +
9 + // Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!)
10 + // import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading"
11 + // lazyLoadControllersFrom("controllers", application)
@@ -0,0 +1,11
1 + //we need jquery to load first, this is enforced by
2 + // doing
3 + // <%= javascript_import_module_tag('prepen_jquery') %>
4 + // before
5 + // <%= javascript_importmap_tags %>
6 + // (which loads application.js
7 +
8 + import jQuery from "jquery"
9 + window.$ = window.jQuery = jQuery;
10 +
11 + console.log('i am prepend_jquery');
new file 100644
@@ -9,114 +9,115
9 9 # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
10 10 gem "sprockets-rails"
11 11
12 12 gem 'activerecord-session_store'
13 13 gem 'puma'
14 14
15 15 # Reduces boot times through caching; required in config/boot.rb
16 16 gem 'bootsnap', require: false
17 17
18 18 # Bundle edge Rails instead:
19 19 # gem 'rails', :git => 'git://github.com/rails/rails.git'
20 20
21 21 #---------------- database ---------------------
22 22 #the database
23 23 gem 'mysql2'
24 24 #for testing
25 25 gem 'sqlite3'
26 26 gem 'rails-controller-testing'
27 27 #for dumping database into yaml
28 28 gem 'yaml_db'
29 29
30 30
31 31 #------------- assset pipeline -----------------
32 32 # Gems used only for assets and not required
33 33 # in production environments by default.
34 34 #sass-rails is depricated
35 35 #gem 'sass-rails'
36 36 gem 'sassc-rails'
37 37 gem 'coffee-rails'
38 38
39 39 # See https://github.com/sstephenson/execjs#readme for more supported runtimes
40 40 # gem 'therubyracer', :platforms => :ruby
41 41
42 42 gem 'uglifier'
43 43
44 44 gem 'haml'
45 45 gem 'haml-rails'
46 46
47 47 # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
48 48 #gem 'turbolinks', '~> 5'
49 49 # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
50 50 gem 'jbuilder'
51 51
52 52
53 53 #in-place editor
54 54 gem 'best_in_place', git: "https://github.com/mmotherwell/best_in_place"
55 55
56 56 # jquery addition
57 - gem 'jquery-rails'
58 - gem 'jquery-ui-rails'
57 + #gem 'jquery-rails'
58 + #gem 'jquery-ui-rails'
59 59 #gem 'jquery-timepicker-addon-rails'
60 - gem 'jquery-tablesorter'
61 - gem 'jquery-countdown-rails'
60 + #gem 'jquery-tablesorter'
61 + #gem 'jquery-countdown-rails'
62 62
63 63 #syntax highlighter
64 64 gem 'rouge'
65 65
66 66 #bootstrap add-ons
67 - gem 'bootstrap-sass', '~> 3.4.1'
68 - gem 'bootstrap-switch-rails'
69 - gem 'bootstrap-toggle-rails'
70 - gem 'autoprefixer-rails'
71 - gem 'momentjs-rails', '>= 2.9.0'
72 - gem 'rails_bootstrap_sortable'
67 + #gem 'bootstrap-sass', '~> 3.4.1'
68 + gem 'bootstrap', '~> 5.2'
69 + #gem 'bootstrap-switch-rails'
70 + #gem 'bootstrap-toggle-rails'
71 + #gem 'autoprefixer-rails'
72 + #gem 'momentjs-rails', '>= 2.9.0'
73 + #gem 'rails_bootstrap_sortable'
73 74 #gem 'bootstrap-datepicker-rails'
74 - gem 'bootstrap3-datetimepicker-rails', '~> 4.17.47'
75 + #gem 'bootstrap3-datetimepicker-rails', '~> 4.17.47'
75 76 #gem 'jquery-datatables-rails'
76 77
77 78 #----------- user interface -----------------
78 79 gem 'simple_form'
79 80 #select 2
80 81 gem 'select2-rails'
81 82 #ace editor
82 83 gem 'ace-rails-ap'
83 84 #paginator
84 85 #gem 'will_paginate', '~> 3.0.7'
85 86
86 87 gem 'mail'
87 88 gem 'rdiscount'
88 89 gem 'dynamic_form'
89 90 gem 'in_place_editing'
90 91 #gem 'verification', :git => 'https://github.com/sikachu/verification.git'
91 92
92 93
93 94 #---------------- testiing -----------------------
94 95 gem 'minitest-reporters'
95 96
96 97 #---------------- for console --------------------
97 98 gem 'fuzzy-string-match'
98 99
99 100
100 101 group :development, :test do
101 102 # Call 'byebug' anywhere in the code to stop execution and get a debugger console
102 103 gem 'debug', platforms: [:mri, :mingw, :x64_mingw]
103 104 end
104 105
105 106 group :development do
106 107 # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
107 108 gem 'web-console', '>= 3.3.0'
108 109 gem 'listen', '>= 3.0.5', '< 3.2'
109 110 # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
110 111 gem 'spring'
111 112 gem 'spring-watcher-listen', '~> 2.0.0'
112 113
113 114 # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
114 115 # gem "rack-mini-profiler"
115 116 end
116 117
117 118 group :test do
118 119 # Adds support for Capybara system testing and selenium driver
119 120 gem 'capybara'
120 121 gem 'selenium-webdriver'
121 122 gem 'webdrivers'
122 123 end
@@ -47,331 +47,306
47 47 rails-html-sanitizer (~> 1.0, >= 1.2.0)
48 48 actiontext (7.0.4)
49 49 actionpack (= 7.0.4)
50 50 activerecord (= 7.0.4)
51 51 activestorage (= 7.0.4)
52 52 activesupport (= 7.0.4)
53 53 globalid (>= 0.6.0)
54 54 nokogiri (>= 1.8.5)
55 55 actionview (7.0.4)
56 56 activesupport (= 7.0.4)
57 57 builder (~> 3.1)
58 58 erubi (~> 1.4)
59 59 rails-dom-testing (~> 2.0)
60 60 rails-html-sanitizer (~> 1.1, >= 1.2.0)
61 61 activejob (7.0.4)
62 62 activesupport (= 7.0.4)
63 63 globalid (>= 0.3.6)
64 64 activemodel (7.0.4)
65 65 activesupport (= 7.0.4)
66 66 activerecord (7.0.4)
67 67 activemodel (= 7.0.4)
68 68 activesupport (= 7.0.4)
69 69 activerecord-session_store (2.0.0)
70 70 actionpack (>= 5.2.4.1)
71 71 activerecord (>= 5.2.4.1)
72 72 multi_json (~> 1.11, >= 1.11.2)
73 73 rack (>= 2.0.8, < 3)
74 74 railties (>= 5.2.4.1)
75 75 activestorage (7.0.4)
76 76 actionpack (= 7.0.4)
77 77 activejob (= 7.0.4)
78 78 activerecord (= 7.0.4)
79 79 activesupport (= 7.0.4)
80 80 marcel (~> 1.0)
81 81 mini_mime (>= 1.1.0)
82 82 activesupport (7.0.4)
83 83 concurrent-ruby (~> 1.0, >= 1.0.2)
84 84 i18n (>= 1.6, < 2)
85 85 minitest (>= 5.1)
86 86 tzinfo (~> 2.0)
87 87 addressable (2.8.1)
88 88 public_suffix (>= 2.0.2, < 6.0)
89 89 ansi (1.5.0)
90 90 autoprefixer-rails (10.4.7.0)
91 91 execjs (~> 2)
92 92 bindex (0.8.1)
93 93 bootsnap (1.13.0)
94 94 msgpack (~> 1.2)
95 - bootstrap-sass (3.4.1)
96 - autoprefixer-rails (>= 5.2.1)
97 - sassc (>= 2.0.0)
98 - bootstrap-switch-rails (3.3.5)
99 - bootstrap-toggle-rails (2.2.1.0)
100 - bootstrap3-datetimepicker-rails (4.17.47)
101 - momentjs-rails (>= 2.8.1)
95 + bootstrap (5.2.0)
96 + autoprefixer-rails (>= 9.1.0)
97 + popper_js (>= 2.11.5, < 3)
98 + sassc-rails (>= 2.0.0)
102 99 builder (3.2.4)
103 100 capybara (3.37.1)
104 101 addressable
105 102 matrix
106 103 mini_mime (>= 0.1.3)
107 104 nokogiri (~> 1.8)
108 105 rack (>= 1.6.0)
109 106 rack-test (>= 0.6.3)
110 107 regexp_parser (>= 1.5, < 3.0)
111 108 xpath (~> 3.2)
112 109 childprocess (4.1.0)
113 110 coffee-rails (5.0.0)
114 111 coffee-script (>= 2.2.0)
115 112 railties (>= 5.2.0)
116 113 coffee-script (2.4.1)
117 114 coffee-script-source
118 115 execjs
119 116 coffee-script-source (1.12.2)
120 117 concurrent-ruby (1.1.10)
121 118 crass (1.0.6)
122 119 debug (1.6.2)
123 120 irb (>= 1.3.6)
124 121 reline (>= 0.3.1)
125 122 digest (3.1.0)
126 123 dynamic_form (1.1.4)
127 124 erubi (1.11.0)
128 125 erubis (2.7.0)
129 126 execjs (2.8.1)
130 127 ffi (1.15.5)
131 128 fuzzy-string-match (1.0.1)
132 129 RubyInline (>= 3.8.6)
133 130 globalid (1.0.0)
134 131 activesupport (>= 5.0)
135 132 haml (5.2.2)
136 133 temple (>= 0.8.0)
137 134 tilt
138 135 haml-rails (2.0.1)
139 136 actionpack (>= 5.1)
140 137 activesupport (>= 5.1)
141 138 haml (>= 4.0.6, < 6.0)
142 139 html2haml (>= 1.0.1)
143 140 railties (>= 5.1)
144 141 html2haml (2.2.0)
145 142 erubis (~> 2.7.0)
146 143 haml (>= 4.0, < 6)
147 144 nokogiri (>= 1.6.0)
148 145 ruby_parser (~> 3.5)
149 146 i18n (1.12.0)
150 147 concurrent-ruby (~> 1.0)
151 148 importmap-rails (1.1.5)
152 149 actionpack (>= 6.0.0)
153 150 railties (>= 6.0.0)
154 151 in_place_editing (1.2.0)
155 152 io-console (0.5.11)
156 153 irb (1.4.1)
157 154 reline (>= 0.3.0)
158 155 jbuilder (2.11.5)
159 156 actionview (>= 5.0.0)
160 157 activesupport (>= 5.0.0)
161 - jquery-countdown-rails (2.0.2)
162 - jquery-rails (4.5.0)
163 - rails-dom-testing (>= 1, < 3)
164 - railties (>= 4.2.0)
165 - thor (>= 0.14, < 2.0)
166 - jquery-tablesorter (1.27.2)
167 - railties (>= 3.2)
168 - jquery-ui-rails (6.0.1)
169 - railties (>= 3.2.16)
170 158 listen (3.0.8)
171 159 rb-fsevent (~> 0.9, >= 0.9.4)
172 160 rb-inotify (~> 0.9, >= 0.9.7)
173 161 loofah (2.18.0)
174 162 crass (~> 1.0.2)
175 163 nokogiri (>= 1.5.9)
176 164 mail (2.7.1)
177 165 mini_mime (>= 0.1.1)
178 166 marcel (1.0.2)
179 167 matrix (0.4.2)
180 168 method_source (1.0.0)
181 169 mini_mime (1.1.2)
182 170 minitest (5.16.3)
183 171 minitest-reporters (1.5.0)
184 172 ansi
185 173 builder
186 174 minitest (>= 5.0)
187 175 ruby-progressbar
188 - momentjs-rails (2.29.4.1)
189 - railties (>= 3.1)
190 176 msgpack (1.5.6)
191 177 multi_json (1.15.0)
192 178 mysql2 (0.5.4)
193 179 net-imap (0.2.3)
194 180 digest
195 181 net-protocol
196 182 strscan
197 183 net-pop (0.1.1)
198 184 digest
199 185 net-protocol
200 186 timeout
201 187 net-protocol (0.1.3)
202 188 timeout
203 189 net-smtp (0.3.1)
204 190 digest
205 191 net-protocol
206 192 timeout
207 193 nio4r (2.5.8)
208 194 nokogiri (1.13.8-x86_64-linux)
209 195 racc (~> 1.4)
196 + popper_js (2.11.5)
210 197 public_suffix (5.0.0)
211 198 puma (5.6.5)
212 199 nio4r (~> 2.0)
213 200 racc (1.6.0)
214 201 rack (2.2.4)
215 202 rack-test (2.0.2)
216 203 rack (>= 1.3)
217 204 rails (7.0.4)
218 205 actioncable (= 7.0.4)
219 206 actionmailbox (= 7.0.4)
220 207 actionmailer (= 7.0.4)
221 208 actionpack (= 7.0.4)
222 209 actiontext (= 7.0.4)
223 210 actionview (= 7.0.4)
224 211 activejob (= 7.0.4)
225 212 activemodel (= 7.0.4)
226 213 activerecord (= 7.0.4)
227 214 activestorage (= 7.0.4)
228 215 activesupport (= 7.0.4)
229 216 bundler (>= 1.15.0)
230 217 railties (= 7.0.4)
231 218 rails-controller-testing (1.0.5)
232 219 actionpack (>= 5.0.1.rc1)
233 220 actionview (>= 5.0.1.rc1)
234 221 activesupport (>= 5.0.1.rc1)
235 222 rails-dom-testing (2.0.3)
236 223 activesupport (>= 4.2.0)
237 224 nokogiri (>= 1.6)
238 225 rails-html-sanitizer (1.4.3)
239 226 loofah (~> 2.3)
240 - rails_bootstrap_sortable (2.0.7)
241 - momentjs-rails (>= 2.8.3)
242 227 railties (7.0.4)
243 228 actionpack (= 7.0.4)
244 229 activesupport (= 7.0.4)
245 230 method_source
246 231 rake (>= 12.2)
247 232 thor (~> 1.0)
248 233 zeitwerk (~> 2.5)
249 234 rake (13.0.6)
250 235 rb-fsevent (0.11.2)
251 236 rb-inotify (0.10.1)
252 237 ffi (~> 1.0)
253 238 rdiscount (2.2.0.2)
254 239 regexp_parser (2.5.0)
255 240 reline (0.3.1)
256 241 io-console (~> 0.5)
257 242 rexml (3.2.5)
258 243 rouge (4.0.0)
259 244 ruby-progressbar (1.11.0)
260 245 ruby_parser (3.19.1)
261 246 sexp_processor (~> 4.16)
262 247 rubyzip (2.3.2)
263 248 sassc (2.4.0)
264 249 ffi (~> 1.9)
265 250 sassc-rails (2.1.2)
266 251 railties (>= 4.0.0)
267 252 sassc (>= 2.0)
268 253 sprockets (> 3.0)
269 254 sprockets-rails
270 255 tilt
271 256 select2-rails (4.0.13)
272 257 selenium-webdriver (4.4.0)
273 258 childprocess (>= 0.5, < 5.0)
274 259 rexml (~> 3.2, >= 3.2.5)
275 260 rubyzip (>= 1.2.2, < 3.0)
276 261 websocket (~> 1.0)
277 262 sexp_processor (4.16.1)
278 263 simple_form (5.1.0)
279 264 actionpack (>= 5.2)
280 265 activemodel (>= 5.2)
281 266 spring (2.1.1)
282 267 spring-watcher-listen (2.0.1)
283 268 listen (>= 2.7, < 4.0)
284 269 spring (>= 1.2, < 3.0)
285 270 sprockets (4.1.1)
286 271 concurrent-ruby (~> 1.0)
287 272 rack (> 1, < 3)
288 273 sprockets-rails (3.4.2)
289 274 actionpack (>= 5.2)
290 275 activesupport (>= 5.2)
291 276 sprockets (>= 3.0.0)
292 277 sqlite3 (1.5.0-x86_64-linux)
293 278 strscan (3.0.4)
294 279 temple (0.8.2)
295 280 thor (1.2.1)
296 281 tilt (2.0.11)
297 282 timeout (0.3.0)
298 283 tzinfo (2.0.5)
299 284 concurrent-ruby (~> 1.0)
300 285 uglifier (4.2.0)
301 286 execjs (>= 0.3.0, < 3)
302 287 web-console (4.2.0)
303 288 actionview (>= 6.0.0)
304 289 activemodel (>= 6.0.0)
305 290 bindex (>= 0.4.0)
306 291 railties (>= 6.0.0)
307 292 webdrivers (5.0.0)
308 293 nokogiri (~> 1.6)
309 294 rubyzip (>= 1.3.0)
310 295 selenium-webdriver (~> 4.0)
311 296 websocket (1.2.9)
312 297 websocket-driver (0.7.5)
313 298 websocket-extensions (>= 0.1.0)
314 299 websocket-extensions (0.1.5)
315 300 xpath (3.2.0)
316 301 nokogiri (~> 1.8)
317 302 yaml_db (0.7.0)
318 303 rails (>= 3.0)
319 304 rake (>= 0.8.7)
320 305 zeitwerk (2.6.0)
321 306
322 307 PLATFORMS
323 308 x86_64-linux
324 309
325 310 DEPENDENCIES
326 311 ace-rails-ap
327 312 activerecord-session_store
328 - autoprefixer-rails
329 313 best_in_place!
330 314 bootsnap
331 - bootstrap-sass (~> 3.4.1)
332 - bootstrap-switch-rails
333 - bootstrap-toggle-rails
334 - bootstrap3-datetimepicker-rails (~> 4.17.47)
315 + bootstrap (~> 5.2)
335 316 capybara
336 317 coffee-rails
337 318 debug
338 319 dynamic_form
339 320 fuzzy-string-match
340 321 haml
341 322 haml-rails
342 323 importmap-rails (~> 1.1)
343 324 in_place_editing
344 325 jbuilder
345 - jquery-countdown-rails
346 - jquery-rails
347 - jquery-tablesorter
348 - jquery-ui-rails
349 326 listen (>= 3.0.5, < 3.2)
350 327 mail
351 328 minitest-reporters
352 - momentjs-rails (>= 2.9.0)
353 329 mysql2
354 330 puma
355 331 rails (~> 7.0)
356 332 rails-controller-testing
357 - rails_bootstrap_sortable
358 333 rdiscount
359 334 rouge
360 335 sassc-rails
361 336 select2-rails
362 337 selenium-webdriver
363 338 simple_form
364 339 spring
365 340 spring-watcher-listen (~> 2.0.0)
366 341 sprockets-rails
367 342 sqlite3
368 343 uglifier
369 344 web-console (>= 3.3.0)
370 345 webdrivers
371 346 yaml_db
372 347
373 348 RUBY VERSION
374 349 ruby 3.1.2p20
375 350
376 351 BUNDLED WITH
377 352 2.3.22
@@ -1,6 +1,5
1 1 //= link_tree ../images
2 - // x= link_directory ../javascripts .js
3 2 //= link_directory ../stylesheets .css
4 3 //= link_tree ../../javascript .js
5 4 //= link_tree ../../../vendor/javascript .js
6 5
@@ -1,85 +1,85
1 1 /* This is a manifest file that'll be compiled into application.css, which will include all the files
2 2 * listed below.
3 3 *
4 4 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
5 5 * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
6 6 *
7 7 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
8 8 * compiled file so the styles you add here take precedence over styles defined in any styles
9 9 * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
10 10 * file per style scope.
11 11 *
12 12 * // bootstrap says that we should not do this, but @import each file instead
13 13 * # *= require_tree .
14 14 * # *= require_self
15 15 */
16 16
17 - @import "jquery-ui";
17 + //@import "jquery-ui";
18 18 //@import "jquery.ui.core";
19 19 //@import "jquery.ui.theme";
20 20 //@import "jquery.ui.datepicker";
21 21 //@import "jquery.ui.slider";
22 22 //@import "jquery-ui-timepicker-addon";
23 23 //@import "jquery-tablesorter/theme.metro-dark";
24 - @import "jquery.countdown";
25 - @import "tablesorter-theme.cafe";
24 + //@import "jquery.countdown";
25 + //@import "tablesorter-theme.cafe";
26 26
27 27 //bootstrap
28 - @import "bootstrap-sprockets";
28 + //@import "bootstrap-sprockets";
29 29 @import "bootstrap";
30 30 @import "select2";
31 31 @import "select2-bootstrap";
32 32
33 33 //@import bootstrap3-switch
34 - @import "bootstrap-toggle";
35 - @import "bootstrap-sortable";
34 + //@import "bootstrap-toggle";
35 + //@import "bootstrap-sortable";
36 36 //@import "bootstrap-datepicker3";
37 - @import "bootstrap-datetimepicker";
37 + //@import "bootstrap-datetimepicker";
38 38 @import "datatables.net-bs/css/dataTables.bootstrap.min";
39 39 @import "datatables.net-buttons-bs/css/buttons.bootstrap.min";
40 40
41 41 //bootstrap navbar color (from)
42 42 $bgDefault: #19197b;
43 43 $bgHighlight: #06064b;
44 44 $colDefault: #8e8eb4;
45 45 $colHighlight: #ffffff;
46 46 $dropDown: false;
47 47
48 48 @font-face {
49 49 font-family: 'Glyphicons Halflings';
50 50 src: font-path('bootstrap/glyphicons-halflings-regular.eot');
51 51 src: font-path('bootstrap/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
52 52 font-path('bootstrap/glyphicons-halflings-regular.woff') format('woff'),
53 53 font-path('bootstrap/glyphicons-halflings-regular.ttf') format('truetype'),
54 54 font-path('bootstrap/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
55 55 }
56 56
57 57
58 58 .navbar-default {
59 59 background-color: $bgDefault;
60 60 border-color: $bgHighlight;
61 61
62 62 .navbar-brand {
63 63 color: $colDefault;
64 64
65 65 &:hover, &:focus {
66 66 color: $colHighlight;
67 67 }
68 68 }
69 69
70 70 .navbar-text {
71 71 color: $colDefault;
72 72 }
73 73
74 74 .navbar-nav {
75 75 > li {
76 76 > a {
77 77 color: $colDefault;
78 78
79 79 &:hover, &:focus {
80 80 color: $colHighlight;
81 81 }
82 82 }
83 83
84 84 @if $dropDown {
85 85 > .dropdown-menu {
@@ -1,17 +1,20
1 1 // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
2 2 //import "@hotwired/turbo-rails"
3 3 //import "controllers"
4 4 //
5 - console.log('xxxxx')
6 - import jQuery from "jquery"
7 - //import pdfmake from "pdfmake"
5 +
6 + import pdfmake from "pdfmake"
8 7 //import jszip from "jszip"
9 8 //import DataTable from "datatables.net-bs5"
10 - //
11 - window.$ = window.jQuery = jQuery;
12 9 //window.DataTable = DataTable();
13 - //
10 +
11 + //bootstrap
12 + //import * as bootstrap from "bootstrap"
13 + import "bootstrap"
14 + window.bootstrap = bootstrap
14 15 console.log($); // ok
15 - ////console.log(jszip);
16 + console.log(bootstrap)
17 + console.log(jszip);
18 +
16 19 console.log('application.js ready')
17 20
@@ -1,18 +1,24
1 1 <!DOCTYPE html>
2 2 %html
3 3 %head
4 4 %title= GraderConfiguration['contest.name']
5 5 = stylesheet_link_tag "application", params[:controller], :media => "all"
6 6 = csrf_meta_tags
7 7 = csp_meta_tag
8 + = javascript_import_module_tag('prepend_jquery')
8 9 = javascript_importmap_tags
9 10 = content_for :header
10 11 = yield :head
12 + -# %link{href:"https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/css/bootstrap.min.css",rel:"stylesheet",integrity:"sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT",crossorigin:"anonymous"}
13 + -# %script{src:"https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js",integrity:"sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3",crossorigin:"anonymous"}
14 + -# %script{src:"https://cdn.jsdelivr.net/npm/bootstrap@5.2.1/dist/js/bootstrap.bundle.min.js",integrity:"sha384-7VPbUDkoPSGFnVtYi0QogXtr74QeVeeIs99Qfg5YCF+TidwNdjvaKZX19NZ/e6oz",crossorigin:"anonymous"}
15 +
16 +
11 17
12 18 %body
13 19 - unless local_assigns[:skip_header]
14 20 = render 'layouts/header'
15 21
16 22 /= content_tag(:p,flash[:notice],class: 'alert alert-success') if flash[:notice]!=nil
17 23 = flash_messages
18 24 = yield
@@ -1,8 +1,12
1 1 # Pin npm packages by running ./bin/importmap
2 2
3 + #entry point
3 4 pin "application", preload: true
4 - #pin_all_from "app/javascript/controllers", under: "controllers"
5 + pin "prepend_jquery", preload: true
6 + pin_all_from "app/javascript/controllers", under: "controllers"
5 7
6 - #pin "jquery" # @3.6.1
7 - #pin "pdfmake", to: "https://ga.jspm.io/npm:pdfmake@0.2.5/build/pdfmake.js"
8 - pin "jquery", to: 'jquery-local.js'
8 + pin "pdfmake", to: "https://ga.jspm.io/npm:pdfmake@0.2.5/build/pdfmake.js"
9 + pin "jquery", to: 'jquery.js'
10 + pin "bootstrap", to: "bootstrap.bundle.min.js"
11 + #no need popper, because bundled already in bootstrap
12 + #pin "@popperjs/core", to: "https://ga.jspm.io/npm:@popperjs/core@2.11.6/lib/index.js"
@@ -1,22 +1,24
1 1 # Be sure to restart your server when you modify this file.
2 2
3 3 # Version of your assets, change this if you want to expire all your assets.
4 4 Rails.application.config.assets.version = "1.0"
5 5
6 6 # Add additional assets to the asset load path.
7 7 # Rails.application.config.assets.paths << Emoji.images_path
8 8 # Add Yarn node_modules folder to the asset load path.
9 9 Rails.application.config.assets.paths << Rails.root.join('node_modules')
10 10
11 11 # Precompile additional assets.
12 12 # application.js, application.css, and all non-JS/CSS in the app/assets
13 13 # folder are already added.
14 14 # Rails.application.config.assets.precompile += %w( admin.js admin.css )
15 + Rails.application.config.assets.precompile += %w(bootstrap.min.js popper.js)
16 +
15 17 Rails.application.config.assets.precompile += ['announcement_refresh.js','effects.js','site_update.js']
16 18 Rails.application.config.assets.precompile += ['local_jquery.js','tablesorter-theme.cafe.css']
17 19 %w( announcements submissions configurations contests contest_management graders heartbeat
18 20 login main messages problems report site sites sources tasks groups
19 21 test user_admin users tags testcases).each do |controller|
20 22 Rails.application.config.assets.precompile += ["#{controller}.js", "#{controller}.css"]
21 23 end
22 24
file renamed from vendor/javascript/jquery-local.js to vendor/javascript/jquery.js
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
deleted file
You need to be logged in to leave comments. Login now