Santhosh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/190797
Change subject: Load the category informaton in parallel with source load
......................................................................
Load the category informaton in parallel with source load
And display the categories once source is loaded.
This helps to avoid a flicker in screen when categories
fetched and inserted after source is rendered.
Change-Id: I9e37d4843a3515d1248c89e207f78986fec88bac
---
M modules/tools/ext.cx.tools.categories.js
1 file changed, 3 insertions(+), 3 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation
refs/changes/97/190797/1
diff --git a/modules/tools/ext.cx.tools.categories.js
b/modules/tools/ext.cx.tools.categories.js
index 7db52e3..adcfd9b 100644
--- a/modules/tools/ext.cx.tools.categories.js
+++ b/modules/tools/ext.cx.tools.categories.js
@@ -602,7 +602,7 @@
* If no set is specified, returns all three sets
*
* @param {string} categorySet The set of categories to return
- * @return {jQuery.promis}
+ * @return {jQuery.Promise}
*/
CXCategoryTool.prototype.getCategories = function ( categorySet ) {
var categoryTool = this,
@@ -721,8 +721,8 @@
}
$( function () {
- mw.hook( 'mw.cx.source.loaded' ).add( function () {
- mw.cx.categoryTool.getCategories().done( function (
categories ) {
+ mw.cx.categoryTool.getCategories().done( function ( categories
) {
+ mw.hook( 'mw.cx.source.loaded' ).add( function () {
mw.cx.categoryTool.initializeWidgets( 'source'
);
mw.cx.categoryTool.initializeWidgets(
'translation' );
if ( Object.keys( categories.source ).length >
0 ) {
--
To view, visit https://gerrit.wikimedia.org/r/190797
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e37d4843a3515d1248c89e207f78986fec88bac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits