[Bps-public-commit] RT-Extension-PreviewInSearch branch, master, updated. 0.04-2-g2a1e28c

Jim Brandt jbrandt at bestpractical.com
Tue Mar 21 09:41:30 EDT 2017


The branch, master has been updated
       via  2a1e28ceb488f2f9eaa79185c251713f938e9d66 (commit)
      from  32e873190be1d4fac27b07ae6bc53a0bc7248948 (commit)

Summary of changes:
 .../RT-Extension-PreviewInSearch/Search/Results.html/BeforeResults      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 2a1e28ceb488f2f9eaa79185c251713f938e9d66
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Mar 21 09:39:29 2017 -0400

    Update removeClass with selector to find the previous row
    
    The previous tr element that was selected is not a direct
    sibling of the current row, so the removeClass call was not clearing
    the previously clicked ticket. This resulted in multiple tickets
    showing the shading for 'in-preview'. Update the selector to backtrack
    and then find the correct list of tr elements.

diff --git a/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/BeforeResults b/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/BeforeResults
index 7fe58cf..eeb1162 100644
--- a/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/BeforeResults
+++ b/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/BeforeResults
@@ -49,7 +49,7 @@ var do_preview = function(row) {
     var tid = row.find('> td a[href*="Display.html?id="]')
         .first().attr('href').match(/Display\.html\?id=(\d+)/)[1];
     var url = <% RT->Config->Get('WebPath') |n,j %> +'/Helpers/TicketPreview?id='+tid;
-    row.siblings('tr').removeClass('in-preview');
+    row.closest('table').children('tbody').children('tr').removeClass('in-preview');
     row.addClass('in-preview');
     jQuery('#ticket-preview-container').text(<% loc('Loading...') |n,j %>).load( url );
 % if ( RT->Config->Get('SideBySidePreview') ) {

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list