Daniel Werner has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/67574


Change subject: (bug 38201) Temporary solution for tablesorter crash
......................................................................

(bug 38201) Temporary solution for tablesorter crash

with multiple SiteLinksEditTool instances the tablesorter would crash in some 
situations. One case
where it crashes is if one of the edit tools has site links when the JS is 
initializing.

Should be merged before Iedfa02a or alternatively, the tablesorter problem 
should be solved.

Change-Id: I5b918835ac86b335ebb585c301fff97baa3c35f8
---
M lib/resources/wikibase.ui.SiteLinksEditTool.js
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/74/67574/1

diff --git a/lib/resources/wikibase.ui.SiteLinksEditTool.js 
b/lib/resources/wikibase.ui.SiteLinksEditTool.js
index a8ee96c..dedfae6 100644
--- a/lib/resources/wikibase.ui.SiteLinksEditTool.js
+++ b/lib/resources/wikibase.ui.SiteLinksEditTool.js
@@ -64,7 +64,9 @@
 
                if ( $( 'table.wb-sitelinks thead' ).children().length > 0 ) {
                        // initially sort on the site id column
-                       $( 'table.wb-sitelinks' ).tablesorter( { sortList: 
[{1:'asc'}] } );
+                       // TODO/FIXME: Put tablesorter in use again after 
fixing problem of multiple edit tool
+                       //  instances using the tablesorter will lead to a 
crash in some cases.
+                       // $( 'table.wb-sitelinks' ).tablesorter( { sortList: 
[{1:'asc'}] } );
                }
 
        },
@@ -154,6 +156,9 @@
                                $( 'table.wb-sitelinks tfoot 
.wb-ui-propertyedittool-editablevalue' )
                                .appendTo( 'table.wb-sitelinks tbody' );
 
+                               // TODO/FIXME: Put tablesorter in use again 
after fixing problem of multiple edit tool
+                               //  instances using the tablesorter will lead 
to a crash in some cases.
+                               /*
                                // init tablesorter if it has not been 
initialised yet (no site link existed
                                // previous to adding the just added site link)
                                if ( $( 'table.wb-sitelinks' ).data( 
'tablesorter' ) === undefined ) {
@@ -163,6 +168,7 @@
                                        // site link to the bottom of the table
                                        $( 'table.wb-sitelinks' ).data( 
'tablesorter' ).sort( [] );
                                }
+                               */
                        }
                } );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b918835ac86b335ebb585c301fff97baa3c35f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Werner <[email protected]>

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

Reply via email to