jenkins-bot has submitted this change and it was merged.

Change subject: Fix js bug where error report was always for first link.
......................................................................


Fix js bug where error report was always for first link.

If you clicked on show error on the transcode table, the
javascript always showed the first error, even if you clicked
on the second error link. The title was also all the error
titles concated instead of just the appropriate title.

Change-Id: I4ba07a4184de56a8991422c0d1ebbb59a309492b
---
M resources/ext.tmh.transcodetable.js
1 file changed, 7 insertions(+), 6 deletions(-)

Approvals:
  Gilles: Looks good to me, approved
  Mdale: Verified; Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/resources/ext.tmh.transcodetable.js 
b/resources/ext.tmh.transcodetable.js
index 4bfebdd..5b1e443 100644
--- a/resources/ext.tmh.transcodetable.js
+++ b/resources/ext.tmh.transcodetable.js
@@ -25,13 +25,14 @@
        $( '.mw-filepage-transcodestatus .errorlink' ).click( errorPopup );
        // New version.
        $errorLink = $( '.mw-filepage-transcodestatus 
.mw-tmh-pseudo-error-link' );
-       $errorLink.wrapInner(
-               $( '<a />' ).attr( {
+       $errorLink.wrapInner( function() {
+               var $this = $(this);
+               return $( '<a />' ).attr( {
                        href: '#',
-                       title: $errorLink.text(),
-                       'data-error': $errorLink.attr('data-error')
-               } ).click( errorPopup )
-       );
+                       title: $this.text(),
+                       'data-error': $this.attr('data-error')
+               } ).click( errorPopup );
+       } );
 
        // Reset transcode action:
        $('.mw-filepage-transcodereset a').click( function(){

-- 
To view, visit https://gerrit.wikimedia.org/r/108172
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ba07a4184de56a8991422c0d1ebbb59a309492b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: Mdale <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to