Merge pull request #2334 from yglb/master

luci-theme-rosy: Fix related bugs displayed on the page
This commit is contained in:
Jo-Philipp Wich 2018-12-07 00:12:18 +01:00 committed by GitHub
commit 1b26c91a08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 456 additions and 527 deletions

File diff suppressed because it is too large Load diff

View file

@ -270,17 +270,20 @@
if( $(window).width() > 992 ){
$('.logged-in .main-right').outerWidth( $(window).width() - $('.logged-in .main-left').width() - 50 );
}
var a = window.getComputedStyle($(".cbi-section .table .tr:first-child")[0], ':before').getPropertyValue('content');
var b = window.getComputedStyle($('.cbi-section .table .tr:last-child')[0], ':before').getPropertyValue('content');
console.log(typeof a);
if( a != 'none' || b != 'none' ){
$('.cbi-section .table .tr:first-child .td:first-child').css('border-top-left-radius', '0');
$('.cbi-section .table .tr:last-child .td:first-child').css('border-bottom-left-radius', '0');
$('.cbi-section .table .tr:first-child .th:first-child').css('border-top-left-radius', '0');
console.log($('.cbi-section .table .tr:last-child .td:first-child'));
}
$('.cbi-section .table').each(function(){
var thisTr = $(this).children('.tr').get(0);
var td = $(thisTr).children('.td').get(0);
var th = $(thisTr).children('.th').get(0)
var a = window.getComputedStyle(thisTr, ':before').getPropertyValue('content');
console.log(td, th);
if( th && a != 'none' ){
$(th).css('border-top-left-radius', '0');
}else if( td && a != 'none' ){
$(td).css('border-top-left-radius', '0');
}
});
});
})(jQuery);