diff options
author | Yanlan Shen <yanlan.shen.@rosinson.com> | 2018-11-29 18:30:12 +0800 |
---|---|---|
committer | Yanlan Shen <yanlan.shen.@rosinson.com> | 2018-12-03 15:08:11 +0800 |
commit | c7bd4397fbd761591237c7171e147969099fc4d1 (patch) | |
tree | ece9bee876fe7c028d43748857116321b1ad05e9 /themes/luci-theme-rosy/htdocs/luci-static/rosy/js | |
parent | 6cb25970b8089afc9dffd0b82ff1a64837633344 (diff) |
luci-theme-rosy: Fixed bug with rounded corners and drop down boxes
Signed-off-by: Yanlan Shen <yanlan.shen.@rosinson.com>
Diffstat (limited to 'themes/luci-theme-rosy/htdocs/luci-static/rosy/js')
-rwxr-xr-x | themes/luci-theme-rosy/htdocs/luci-static/rosy/js/script.js | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/themes/luci-theme-rosy/htdocs/luci-static/rosy/js/script.js b/themes/luci-theme-rosy/htdocs/luci-static/rosy/js/script.js index 9da67062a7..e8ba020609 100755 --- a/themes/luci-theme-rosy/htdocs/luci-static/rosy/js/script.js +++ b/themes/luci-theme-rosy/htdocs/luci-static/rosy/js/script.js @@ -270,15 +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'); - - 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'); - - } + + $('.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'); + } + }); }); $('<samll>').text($('.cbi-progressbar').attr('title')).appendTo('.cbi-progressbar'); @@ -288,5 +293,6 @@ }); }, 5000); + })(jQuery); |