Patch #43976 » 0003-Use-stylesheet-instead-of-JavaScript.patch
| app/assets/javascripts/application-legacy.js | ||
|---|---|---|
|
}).change();
|
||
|
});
|
||
|
function setFilecontentContainerHeight() {
|
||
|
var $filecontainer = $('.filecontent-container');
|
||
|
var fileTypeSelectors = ['.image', 'video'];
|
||
|
if($filecontainer.length > 0 && $filecontainer.find(fileTypeSelectors.join(',')).length === 1) {
|
||
|
var containerOffsetTop = $filecontainer.offset().top;
|
||
|
var containerMarginBottom = parseInt($filecontainer.css('marginBottom'));
|
||
|
var paginationHeight = $filecontainer.next('.pagination').height();
|
||
|
var diff = containerOffsetTop + containerMarginBottom + paginationHeight;
|
||
|
$filecontainer.css('height', 'calc(100vh - ' + diff + 'px)')
|
||
|
}
|
||
|
}
|
||
|
function setupAttachmentDetail() {
|
||
|
setFilecontentContainerHeight();
|
||
|
$(window).resize(setFilecontentContainerHeight);
|
||
|
}
|
||
|
function setupWikiTableSortableHeader() {
|
||
|
if (typeof Tablesort === 'undefined') { return; }
|
||
|
$('div.wiki table').each(function(i, table){
|
||
| ... | ... | |
|
$(document).ready(hideOnLoad);
|
||
|
$(document).ready(addFormObserversForDoubleSubmit);
|
||
|
$(document).ready(defaultFocus);
|
||
|
$(document).ready(setupAttachmentDetail);
|
||
|
$(document).ready(setupFilePreviewNavigation);
|
||
|
$(document).on('focus', '[data-auto-complete=true]', function(event) {
|
||
|
inlineAutoComplete(event.target);
|
||
| app/assets/stylesheets/application.css | ||
|---|---|---|
|
image-orientation: from-image;
|
||
|
}
|
||
|
div#content:has(.filecontent-container) {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
}
|
||
|
.filecontent-container {
|
||
|
position: relative;
|
||
|
margin-block-end: 20px;
|
||
|
min-block-size: 200px;
|
||
|
flex-grow: 1
|
||
|
}
|
||
|
.filecontent-container > .filecontent {
|
||
|
position: absolute;
|
||
- « Previous
- 1
- 2
- 3
- Next »