From d5b572d9257d5c2a662274c3df6dcd9d46a99ec4 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 30 Apr 2013 00:20:49 -0700 Subject: [PATCH] More table-row highlighting fixes. --- e107_handlers/admin_ui.php | 3 ++- e107_themes/bootstrap/admin_dark.css | 2 +- e107_themes/bootstrap/admin_style.css | 2 ++ e107_web/js/core/admin.jquery.js | 27 +++++---------------------- 4 files changed, 10 insertions(+), 24 deletions(-) diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index c0cef251f..80abedb6d 100644 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -689,7 +689,8 @@ class e_admin_response $glue = deftrue('SEP',' - '); // Defined by admin theme. // admin-ui used only by bootstrap. - return $head. implode($glue, $content).$foot; + return implode($glue, $content); + // return $head. implode($glue, $content).$foot; } /** diff --git a/e107_themes/bootstrap/admin_dark.css b/e107_themes/bootstrap/admin_dark.css index f0f5966ff..1643bb429 100644 --- a/e107_themes/bootstrap/admin_dark.css +++ b/e107_themes/bootstrap/admin_dark.css @@ -31,7 +31,7 @@ min-height:50px; tr.highlight-odd { background-color: #212121; } tr.highlight-even { background-color: #212121; } -.table-striped tbody > tr.highlight-odd td { background-color: transparent } + /* diff --git a/e107_themes/bootstrap/admin_style.css b/e107_themes/bootstrap/admin_style.css index 379ca645d..d6155da5a 100644 --- a/e107_themes/bootstrap/admin_style.css +++ b/e107_themes/bootstrap/admin_style.css @@ -776,6 +776,8 @@ ul#e-latest { line-height:17px } ul#e-latest li a span.badge { float:right;font-size:85% } ul#e-latest li a:hover { text-decoration: none; } +.table-striped tbody > tr.highlight-odd td { background-color: transparent } +.table-striped tbody > tr.highlight-even td { background-color: transparent } /* Bootstrap tags input */ .tags { display: inline-block; diff --git a/e107_web/js/core/admin.jquery.js b/e107_web/js/core/admin.jquery.js index 758617efe..d9b66c6ba 100644 --- a/e107_web/js/core/admin.jquery.js +++ b/e107_web/js/core/admin.jquery.js @@ -440,33 +440,16 @@ $(document).ready(function() // highlight checked row $(".adminlist input[type='checkbox']").click(function(evt){ - - var cls = $(this).closest("tr").attr('class'); - // alert(cls); - + if(this.checked) { - if(cls == 'odd' || cls == 'highlight-odd') - { - $(this).closest("tr").switchClass( "odd", "highlight-odd", 0 ); - } - else - { - $(this).closest("tr").switchClass( "even", "highlight-even", 0 ); - } - - + $(this).closest("tr.odd").switchClass( "odd", "highlight-odd", 50 ); + $(this).closest("tr.even").switchClass( "even", "highlight-even", 50 ); } else { - if(cls == 'highlight-odd' || cls =='odd') - { - $(this).closest("tr").switchClass( "highlight-odd", "odd", 300 ); - } - else - { - $(this).closest("tr").switchClass( "highlight-even", "even", 300 ); - } + $(this).closest("tr.highlight-odd").switchClass( "highlight-odd", "odd", 300 ); + $(this).closest("tr.highlight-even").switchClass( "highlight-even", "even", 300 ); } });