Add BumbleberryOverrideHelper for modern feature support and update main.js for responsive column visibility although not needed with override. Fixes #10
This commit is contained in:
parent
5e6f962c95
commit
c2d1bdd017
@ -166,6 +166,20 @@
|
||||
if (!window.initNodeFunctions) {
|
||||
window.initNodeFunctions = [];
|
||||
}
|
||||
|
||||
// this code is used to hide columns with class "column-set" on small screens
|
||||
// but is not really necessary, was fixed with bumbleberry_overridehelp.rb
|
||||
function handleColumnSetVisibility() {
|
||||
var isMobile = window.innerWidth <= 679;
|
||||
var elements = document.querySelectorAll('.table-th.column-set, th.column-set');
|
||||
elements.forEach(function(el) {
|
||||
el.style.display = isMobile ? 'none' : '';
|
||||
});
|
||||
}
|
||||
|
||||
window.initNodeFunctions.push(handleColumnSetVisibility);
|
||||
window.addEventListener('resize', handleColumnSetVisibility);
|
||||
|
||||
window.initNodeFunctions.push(function(node) {
|
||||
forEachElement('.number-field,.email-field,.text-field,.password-field,.search-field', function(field) {
|
||||
var input = field.querySelector('input');
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,8 @@
|
||||
require 'net/https'
|
||||
|
||||
class ApplicationController < BaseController
|
||||
include BumbleberryOverrideHelper
|
||||
|
||||
protect_from_forgery with: :exception, except: [:do_confirm, :js_error, :admin_update]
|
||||
|
||||
before_filter :application_setup
|
||||
|
||||
11
app/helpers/bumbleberry_override_helper.rb
Normal file
11
app/helpers/bumbleberry_override_helper.rb
Normal file
@ -0,0 +1,11 @@
|
||||
module BumbleberryOverrideHelper
|
||||
MODERN_FEATURES = [:css3_boxsizing, :css_sel3, :flexbox, :css_grid, :svg].freeze
|
||||
|
||||
def capable_of(capability)
|
||||
if MODERN_FEATURES.include?(capability)
|
||||
true
|
||||
else
|
||||
super
|
||||
end
|
||||
end
|
||||
end
|
||||
6
pnpm-lock.yaml
generated
6
pnpm-lock.yaml
generated
@ -22,14 +22,14 @@ packages:
|
||||
hasBin: true
|
||||
dependencies:
|
||||
baseline-browser-mapping: 2.9.19
|
||||
caniuse-lite: 1.0.30001766
|
||||
caniuse-lite: 1.0.30001767
|
||||
electron-to-chromium: 1.5.283
|
||||
node-releases: 2.0.27
|
||||
update-browserslist-db: 1.2.3(browserslist@4.28.1)
|
||||
dev: false
|
||||
|
||||
/caniuse-lite@1.0.30001766:
|
||||
resolution: {integrity: sha512-4C0lfJ0/YPjJQHagaE9x2Elb69CIqEPZeG0anQt9SIvIoOH4a4uaRl73IavyO+0qZh6MDLH//DrXThEYKHkmYA==}
|
||||
/caniuse-lite@1.0.30001767:
|
||||
resolution: {integrity: sha512-34+zUAMhSH+r+9eKmYG+k2Rpt8XttfE4yXAjoZvkAPs15xcYQhyBYdalJ65BzivAvGRMViEjy6oKr/S91loekQ==}
|
||||
dev: false
|
||||
|
||||
/electron-to-chromium@1.5.283:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user