Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed Jan 20, 2024
1 parent 676e617 commit 9a63f67
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 14 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ require (
github.com/nging-plugins/firewallmanager v1.5.1
github.com/nging-plugins/frpmanager v1.5.0
github.com/nging-plugins/ftpmanager v1.5.0
github.com/nging-plugins/servermanager v1.5.2
github.com/nging-plugins/servermanager v1.5.3
github.com/nging-plugins/sshmanager v1.5.0
github.com/nging-plugins/webauthn v1.5.0
github.com/studio-b12/gowebdav v0.9.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2325,8 +2325,8 @@ github.com/nging-plugins/frpmanager v1.5.0 h1:POSjm2OVoMhY2BStXVMhBDAuJUILqXFGkW
github.com/nging-plugins/frpmanager v1.5.0/go.mod h1:L7M1HoSew3/+1+N7r5Pt2hPreUkUJaGS5+Jd5lc4B58=
github.com/nging-plugins/ftpmanager v1.5.0 h1:9f7Pks7GFm9H7ESy4u59n9f0i//yp/o1DUrOCuBZxl4=
github.com/nging-plugins/ftpmanager v1.5.0/go.mod h1:xP0+EtC4mPL5Pka0ZPjlbhDUJnYzZ6Fn3UMBLMyXVK4=
github.com/nging-plugins/servermanager v1.5.2 h1:kcpFiKxKR5RkBUtTPE1ZNM/WPjL7LxCcykkK6hP14YA=
github.com/nging-plugins/servermanager v1.5.2/go.mod h1:p643WHNUOA3BeH7VtCvTMTB725V/XlFmUFVScNaOv3o=
github.com/nging-plugins/servermanager v1.5.3 h1:p5Kobttt56xc4OphKlcK3kpvzBakPu69S74+KQRvMxE=
github.com/nging-plugins/servermanager v1.5.3/go.mod h1:p643WHNUOA3BeH7VtCvTMTB725V/XlFmUFVScNaOv3o=
github.com/nging-plugins/sshmanager v1.5.0 h1:DmM/LSERnwyGV3VGuUn+OOKzHB12C4obiXRpxemFOnA=
github.com/nging-plugins/sshmanager v1.5.0/go.mod h1:dTlDBCPbA3A8UXx74F4br8LQRTnjLpDluLksxY3B09A=
github.com/nging-plugins/webauthn v1.5.0 h1:ed5YgO97dypmt9lvXSlsPS3C5+pOYQKkWul4u7j94NE=
Expand Down
3 changes: 3 additions & 0 deletions public/assets/backend/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2460,6 +2460,9 @@ table.no-any-border tr td{
table.no-any-border-force tr td{
border:0 !important;
}
table.layout-fixed{
table-layout: fixed;
}
caption.caption-default,
caption.caption-black,
caption.caption-primary,
Expand Down
2 changes: 1 addition & 1 deletion public/assets/backend/css/style.min.css

Large diffs are not rendered by default.

35 changes: 26 additions & 9 deletions public/assets/backend/js/behaviour/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ var App = function () {
},
autoFixedThead: function (prefix) {
if (prefix == null) prefix = '';
var top = $(window).width()>767 ? $('#head-nav').height() : 0;
var top = function(){return $(window).width()>=753 ? $('#head-nav').height() : 0;}
App.topFloatThead(prefix + 'thead.auto-fixed', top);
},
pageAside: function (options) {
Expand Down Expand Up @@ -1303,14 +1303,21 @@ var App = function () {
},
topFloatRawThead: function (elems, top) {
if ($(elems).length < 1) return;
if (top == null) top = 0;
var topF = null;
if (typeof top == 'function'){
topF = top;
}else{
if (top == null) top = 0;
topF = function(){return top}
}
$(elems).not('[disabled-fixed]').each(function () {
$(this).attr('disabled-fixed', 'fixed');
var elem = this, table = $(elem).parent('table'), reponsive = table.closest('.table-responsive');
var scrollable = reponsive.length > 0;
var offsetY = $(elem).offset().top;
var offsetY = $(elem).offset().top, marginTop = Number(String(table.css('margin-top')).replace(/px$/,''));
$(elem).css({'background-color':'white'});
//$(table).css({'table-layout':'fixed','min-width':table.width()+'px'});
table.data('originalMarginTop',marginTop);
//if(!table.hasClass('layout-fixed') && table.children('colgroup').length>0) table.css({'table-layout':'fixed'});
var setSize = function (init) {
if (init == null) init = false;
if (scrollable) {
Expand Down Expand Up @@ -1344,7 +1351,7 @@ var App = function () {
$(elem).css({'width':table.width()});
tds.each(function () {
var width = $(this).outerWidth(), w = width * ratio;
html += '<col style="min-width:' + w + 'px;max-width:auto" />';
html += '<col style="min-width:' + w + 'px;width:' + w + 'px;max-width:auto" />';
$(this).css({ 'min-width': w, 'width': w, 'max-width': 'auto' });
});
table.prepend(html);
Expand All @@ -1366,6 +1373,7 @@ var App = function () {
if (scrollH <= offsetY || scrollH >= maxOffsetY) {
if ($(elem).hasClass('always-top')) {
$(elem).removeClass('always-top');
table.css({'margin-top':table.data('originalMarginTop')});
}
if (scrollable) {
$(elem).off('scroll').data('scroll-reponsive', false);
Expand All @@ -1374,8 +1382,11 @@ var App = function () {
return;
}
if (table.height() > $(window).height()) {
if (!$(elem).hasClass('always-top')) $(elem).addClass('always-top');
var cssOpts = { 'top': top };
if (!$(elem).hasClass('always-top')) {
$(elem).addClass('always-top');
table.css({'margin-top':table.data('originalMarginTop')+$(elem).height()});
}
var cssOpts = { 'top': topF() };
if (scrollable) {
if (!reponsive.data('scroll-thead')) {
reponsive.on('scroll', function () {
Expand All @@ -1392,7 +1403,13 @@ var App = function () {
topFloatThead: function (elems, top, clone) {
if (!clone) return App.topFloatRawThead(elems, top);
if ($(elems).length < 1) return;
if (top == null) top = 0;
var topF = null;
if (typeof top == 'function'){
topF = top;
}else{
if (top == null) top = 0;
topF = function(){return top}
}
$(elems).not('[disabled-fixed]').each(function () {
$(this).attr('disabled-fixed', 'fixed');
var elem = this, table = $(elem).parent('table'), reponsive = table.closest('.table-responsive');
Expand All @@ -1404,7 +1421,7 @@ var App = function () {
cid = Math.random();
$(elem).data('copy', cid);
}
var eBox = $('<div class="always-top" style="overflow:hidden;display:block;width:'+(scrollable?reponsive.width():table.width())+'px;top:'+top+'px"></div>');
var eBox = $('<div class="always-top" style="overflow:hidden;display:block;width:'+(scrollable?reponsive.width():table.width())+'px;top:'+topF()+'px"></div>');
var eCopy = $('<table class="' + table.attr('class') + '" style="background-color:white;table-layout:fixed" id="tableCopy' + cid + '"></table>');
var hCopy = $(elem).clone();
hCopy.css({ 'position': 'relative' });
Expand Down
2 changes: 1 addition & 1 deletion public/assets/backend/js/behaviour/general.min.js

Large diffs are not rendered by default.

0 comments on commit 9a63f67

Please sign in to comment.