Compare commits

...

2 Commits

Author SHA1 Message Date
BoHung Chiu 127aa8e617 Fix bug for rails 4.2. 2023-08-15 21:15:32 +08:00
BoHung Chiu 3be81db424 Fix accessibility. 2023-08-15 21:15:32 +08:00
4 changed files with 15 additions and 7 deletions

View File

@ -25,7 +25,6 @@
.gallery.card-group .card.card-flip.h-100 {
position: relative;
overflow: hidden;
width: 25%;
width: calc( 25% - 0.75em);
background: white;

View File

@ -1,11 +1,6 @@
@import url(https://fonts.googleapis.com/css?family=Roboto);
/* Reset and basic styles */
body {
overflow-x: hidden;
}
*,
*:before,
*:after {

View File

@ -7,6 +7,7 @@ class Admin::GalleriesController < OrbitAdminController
layout :compute_layout
find_tag = Tag.all.select{|value| value.name==I18n.t('gallery.not_show_desc')}
RackTempMiddleExist = defined?(Rack::TempfileReaper)
RACK_TEMPFILES = defined?(Rack::RACK_TEMPFILES) ? Rack::RACK_TEMPFILES : rack.tempfiles
if find_tag.length==0
module_app_id = ModuleApp.where(:key=>"gallery").first[:_id]
tags = ModuleApp.where(:key=>"gallery").first.tags
@ -559,7 +560,7 @@ class Admin::GalleriesController < OrbitAdminController
album_unprocess.save_var = file
album_unprocess.save!
ObjectSpace.undefine_finalizer(file.tempfile)
request.set_header(Rack::RACK_TEMPFILES, []) if RackTempMiddleExist # Avoid Rack::TempfileReaper Middleware to unlink temp files automatically.
request.set_header(RACK_TEMPFILES, []) if RackTempMiddleExist # Avoid Rack::TempfileReaper Middleware to unlink temp files automatically.
end
image.save!
end

View File

@ -35,4 +35,17 @@
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('[data-subpart-id="{{subpart-id}}"] .card-body a').on('focusin', function(){
var _this = $(this);
var card_flip = _this.parents('.card-flip');
card_flip.addClass('hover-class');
var off_hover = function(){
card_flip.removeClass('hover-class');
}
_this.one('focusout', off_hover);
})
})
</script>
</div>