luci-theme-rosy: Fixed bug with rounded corners and drop down boxes
authorYanlan Shen <yanlan.shen.@rosinson.com>
Thu, 29 Nov 2018 10:30:12 +0000 (18:30 +0800)
committerYanlan Shen <yanlan.shen.@rosinson.com>
Mon, 3 Dec 2018 07:08:11 +0000 (15:08 +0800)
Signed-off-by: Yanlan Shen <yanlan.shen.@rosinson.com>
themes/luci-theme-rosy/htdocs/luci-static/rosy/cascade.css
themes/luci-theme-rosy/htdocs/luci-static/rosy/js/script.js

index d380caf92b51c76070bf48b66f8e2e5eef7487cc..0b30ee3c46d48c83c3b31af7ec715a2b671d88d9 100644 (file)
@@ -528,7 +528,6 @@ td>table>tbody>tr>td,
     border-radius: 0;
     border-bottom-left-radius: 10px;
     border-bottom-right-radius: 10px;
-    overflow: hidden;
 }
 .tabs {
     background-color: #FFFFFF;
@@ -654,11 +653,6 @@ td>table>tbody>tr>td,
     background-color: #eee;
 }
 
-.cbi-rowstyle-2 .cbi-button-up,
-.cbi-rowstyle-2 .cbi-button-down {
-    background-color: #468ea4 !important;
-}
-
 .cbi-section-table .cbi-section-table-titles .cbi-section-table-cell {
     width: auto !important;
 }
@@ -2475,4 +2469,4 @@ footer {
     .cbi-value-field .cbi-dropdown {
         min-width: 25rem;
     }
-}
\ No newline at end of file
+}
index 9da67062a74b2afe0ac6ee00b8a4714afb8a93ab..e8ba0206093e651aa2cb03b52b128e3145aa5a16 100755 (executable)
         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');
         });
         
     }, 5000);
+    
 
 })(jQuery);