[MediaWiki-commits] [Gerrit] Refactor the dashboard and translationlist modules - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Refactor the dashboard and translationlist modules .. Refactor the dashboard and translationlist modules Translation list module was handling the rendering and event handlers of translation status filter and language selectors. It was also rendering the new translation button. This commit moves all the above features to the dashboard module. Translation list is now just a widget to list the translations. This change is to initiate the listing of suggestion initiated by dashboard module and provide way for suggestion list to share the language filters. Functionality wise nothing changed. Change-Id: I647c4b5348e59f3c5385a08907b1953da113952e --- M extension.json M modules/dashboard/ext.cx.dashboard.js M modules/dashboard/ext.cx.translationlist.js M modules/dashboard/styles/ext.cx.dashboard.less M modules/dashboard/styles/ext.cx.translationlist.less 5 files changed, 418 insertions(+), 421 deletions(-) Approvals: Amire80: Looks good to me, but someone else must approve Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 405ff73..7ddc679 100644 --- a/extension.json +++ b/extension.json @@ -192,6 +192,7 @@ ext.cx.header, ext.cx.model, ext.cx.sitemapper, + ext.cx.source.selector, ext.cx.translationlist, mediawiki.Uri, mediawiki.ui.button @@ -201,7 +202,13 @@ cx-dashboard-sidebar-title, cx-dashboard-sidebar-information, cx-dashboard-sidebar-stats, - cx-dashboard-sidebar-feedback + cx-dashboard-sidebar-feedback, + cx-create-new-translation, + cx-translation-filter-suggested-translations, + cx-translation-filter-published-translations, + cx-translation-filter-draft-translations, + cx-translation-filter-from-any-language, + cx-translation-filter-to-any-language ] }, ext.cx.magnuslink: { @@ -740,7 +747,6 @@ ], dependencies: [ ext.cx.progressbar, - ext.cx.source.selector, ext.cx.util, ext.cx.widgets.overlay, jquery.uls.data, @@ -748,12 +754,6 @@ ], messages: [ cx-dashboard-header, - cx-create-new-translation, - cx-translation-filter-suggested-translations, - cx-translation-filter-published-translations, - cx-translation-filter-draft-translations, - cx-translation-filter-from-any-language, - cx-translation-filter-to-any-language, cx-discard-translation, cx-translation-status-draft, cx-translation-status-deleted, diff --git a/modules/dashboard/ext.cx.dashboard.js b/modules/dashboard/ext.cx.dashboard.js index 467da96..2583557 100644 --- a/modules/dashboard/ext.cx.dashboard.js +++ b/modules/dashboard/ext.cx.dashboard.js @@ -20,23 +20,95 @@ this.siteMapper = siteMapper; this.$header = null; this.$sidebar = null; - this.$translationList = null; + this.translationList = null; + this.$translationListContainer = null; this.$newTranslationButton = null; + this.$filter = null; + this.$listHeader = null; + this.$sourceLanguageFilter = null; + this.$targetLanguageFilter = null; + this.$cta = null; this.init(); } CXDashboard.prototype.init = function () { this.render(); - this.initComponents(); + this.initLists(); this.listen(); mw.hook( 'mw.cx.dashboard.ready' ).fire(); }; /** +* Get all the translations of given user. +* +* @return {jQuery.Promise} +*/ + CXDashboard.prototype.getTranslations = function () { + var api = new mw.Api(); + + return api.get( { list: 'contenttranslation' } ); + }; +
[MediaWiki-commits] [Gerrit] Refactor the dashboard and translationlist modules - change (mediawiki...ContentTranslation)
jenkins-bot has submitted this change and it was merged. Change subject: Refactor the dashboard and translationlist modules .. Refactor the dashboard and translationlist modules Translation list module was handling the rendering and event handlers of translation status filter and language selectors. It was also rendering the new translation button. This commit removes all the above features to the dashboard module. Translation list is now just a widget to list the translations. This change is to initiate the listing of suggestion initiated by dashboard module and provide way for suggestion list to share the language filters. Functionality wise nothing changed. Change-Id: Ie5bbcb3a01dfa0b136ad8fa000ca1f52a7a98878 --- M extension.json M modules/dashboard/ext.cx.dashboard.js M modules/dashboard/ext.cx.translationlist.js M modules/dashboard/styles/ext.cx.dashboard.less M modules/dashboard/styles/ext.cx.translationlist.less 5 files changed, 420 insertions(+), 421 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/extension.json b/extension.json index 405ff73..b9e1b1c 100644 --- a/extension.json +++ b/extension.json @@ -42,6 +42,7 @@ }, APIListModules: { contenttranslation: ApiQueryContentTranslation, + contenttranslationlist: ApiQueryContentTranslationList, contenttranslationstats: ApiQueryContentTranslationStats, contenttranslationlangtrend: ApiQueryContentTranslationLanguageTrend, cxpublishedtranslations: ApiQueryPublishedTranslations @@ -59,6 +60,7 @@ ApiContentTranslationPublish: api/ApiContentTranslationPublish.php, ApiContentTranslationToken: api/ApiContentTranslationToken.php, ApiQueryContentTranslation: api/ApiQueryContentTranslation.php, + ApiQueryContentTranslationList: api/ApiQueryContentTranslationList.php, ApiQueryContentTranslationLanguageTrend: api/ApiQueryContentTranslationLanguageTrend.php, ApiQueryContentTranslationStats: api/ApiQueryContentTranslationStats.php, ApiQueryPublishedTranslations: api/ApiQueryPublishedTranslations.php, @@ -192,6 +194,7 @@ ext.cx.header, ext.cx.model, ext.cx.sitemapper, + ext.cx.source.selector, ext.cx.translationlist, mediawiki.Uri, mediawiki.ui.button @@ -201,7 +204,13 @@ cx-dashboard-sidebar-title, cx-dashboard-sidebar-information, cx-dashboard-sidebar-stats, - cx-dashboard-sidebar-feedback + cx-dashboard-sidebar-feedback, + cx-create-new-translation, + cx-translation-filter-suggested-translations, + cx-translation-filter-published-translations, + cx-translation-filter-draft-translations, + cx-translation-filter-from-any-language, + cx-translation-filter-to-any-language ] }, ext.cx.magnuslink: { @@ -740,7 +749,6 @@ ], dependencies: [ ext.cx.progressbar, - ext.cx.source.selector, ext.cx.util, ext.cx.widgets.overlay, jquery.uls.data, @@ -748,12 +756,6 @@ ], messages: [ cx-dashboard-header, - cx-create-new-translation, - cx-translation-filter-suggested-translations, - cx-translation-filter-published-translations, - cx-translation-filter-draft-translations, - cx-translation-filter-from-any-language, - cx-translation-filter-to-any-language, cx-discard-translation, cx-translation-status-draft, cx-translation-status-deleted, diff --git a/modules/dashboard/ext.cx.dashboard.js b/modules/dashboard/ext.cx.dashboard.js index 467da96..2583557 100644 --- a/modules/dashboard/ext.cx.dashboard.js +++ b/modules/dashboard/ext.cx.dashboard.js @@ -20,23 +20,95 @@ this.siteMapper = siteMapper; this.$header = null; this.$sidebar = null; -
[MediaWiki-commits] [Gerrit] Refactor the dashboard and translationlist modules - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/232677 Change subject: Refactor the dashboard and translationlist modules .. Refactor the dashboard and translationlist modules Translation list module was handling the rendering and event handlers of translation status filter and language selectors. It was also rendering the new translation button. This commit removes all the above features to the dashboard module. Translation list is now just a widget to list the translations. This change is to initiate the listing of suggestion initiated by dashboard module and provide way for suggestion list to share the language filters. Functionality wise nothing changed. Change-Id: I647c4b5348e59f3c5385a08907b1953da113952e --- M extension.json M modules/dashboard/ext.cx.dashboard.js M modules/dashboard/ext.cx.translationlist.js M modules/dashboard/styles/ext.cx.dashboard.less M modules/dashboard/styles/ext.cx.translationlist.less 5 files changed, 418 insertions(+), 421 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/77/232677/1 diff --git a/extension.json b/extension.json index 405ff73..7ddc679 100644 --- a/extension.json +++ b/extension.json @@ -192,6 +192,7 @@ ext.cx.header, ext.cx.model, ext.cx.sitemapper, + ext.cx.source.selector, ext.cx.translationlist, mediawiki.Uri, mediawiki.ui.button @@ -201,7 +202,13 @@ cx-dashboard-sidebar-title, cx-dashboard-sidebar-information, cx-dashboard-sidebar-stats, - cx-dashboard-sidebar-feedback + cx-dashboard-sidebar-feedback, + cx-create-new-translation, + cx-translation-filter-suggested-translations, + cx-translation-filter-published-translations, + cx-translation-filter-draft-translations, + cx-translation-filter-from-any-language, + cx-translation-filter-to-any-language ] }, ext.cx.magnuslink: { @@ -740,7 +747,6 @@ ], dependencies: [ ext.cx.progressbar, - ext.cx.source.selector, ext.cx.util, ext.cx.widgets.overlay, jquery.uls.data, @@ -748,12 +754,6 @@ ], messages: [ cx-dashboard-header, - cx-create-new-translation, - cx-translation-filter-suggested-translations, - cx-translation-filter-published-translations, - cx-translation-filter-draft-translations, - cx-translation-filter-from-any-language, - cx-translation-filter-to-any-language, cx-discard-translation, cx-translation-status-draft, cx-translation-status-deleted, diff --git a/modules/dashboard/ext.cx.dashboard.js b/modules/dashboard/ext.cx.dashboard.js index 467da96..2583557 100644 --- a/modules/dashboard/ext.cx.dashboard.js +++ b/modules/dashboard/ext.cx.dashboard.js @@ -20,23 +20,95 @@ this.siteMapper = siteMapper; this.$header = null; this.$sidebar = null; - this.$translationList = null; + this.translationList = null; + this.$translationListContainer = null; this.$newTranslationButton = null; + this.$filter = null; + this.$listHeader = null; + this.$sourceLanguageFilter = null; + this.$targetLanguageFilter = null; + this.$cta = null; this.init(); } CXDashboard.prototype.init = function () { this.render(); - this.initComponents(); + this.initLists(); this.listen(); mw.hook( 'mw.cx.dashboard.ready' ).fire(); }; /** +* Get all the translations of given user. +* +* @return {jQuery.Promise} +*/ + CXDashboard.prototype.getTranslations = function () { + var api = new mw.Api(); + + return api.get( { list: 'contenttranslation' } ); +
[MediaWiki-commits] [Gerrit] Refactor the dashboard and translationlist modules - change (mediawiki...ContentTranslation)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/232000 Change subject: Refactor the dashboard and translationlist modules .. Refactor the dashboard and translationlist modules Translation list module was handling the rendering and event handlers of translation status filter and language selectors. It was also rendering the new translation button. This commit removes all the above features to the dashboard module. Translation list is now just a widget to list the translations. This change is to initiate the listing of suggestion initiated by dashboard module and provide way for suggestion list to share the language filters. Functionality wise nothing changed. Change-Id: Ie5bbcb3a01dfa0b136ad8fa000ca1f52a7a98878 --- M extension.json M modules/dashboard/ext.cx.dashboard.js M modules/dashboard/ext.cx.translationlist.js M scripts/manage-lists.php 4 files changed, 269 insertions(+), 266 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/00/232000/1 diff --git a/extension.json b/extension.json index abbb8d1..c1604cf 100644 --- a/extension.json +++ b/extension.json @@ -42,6 +42,7 @@ }, APIListModules: { contenttranslation: ApiQueryContentTranslation, + contenttranslationlist: ApiQueryContentTranslationList, contenttranslationstats: ApiQueryContentTranslationStats, contenttranslationlangtrend: ApiQueryContentTranslationLanguageTrend, cxpublishedtranslations: ApiQueryPublishedTranslations @@ -59,6 +60,7 @@ ApiContentTranslationPublish: api/ApiContentTranslationPublish.php, ApiContentTranslationToken: api/ApiContentTranslationToken.php, ApiQueryContentTranslation: api/ApiQueryContentTranslation.php, + ApiQueryContentTranslationList: api/ApiQueryContentTranslationList.php, ApiQueryContentTranslationLanguageTrend: api/ApiQueryContentTranslationLanguageTrend.php, ApiQueryContentTranslationStats: api/ApiQueryContentTranslationStats.php, ApiQueryPublishedTranslations: api/ApiQueryPublishedTranslations.php, @@ -193,6 +195,7 @@ ext.cx.header, ext.cx.model, ext.cx.sitemapper, + ext.cx.source.selector, ext.cx.translationlist, mediawiki.Uri, mediawiki.ui.button @@ -202,7 +205,13 @@ cx-dashboard-sidebar-title, cx-dashboard-sidebar-information, cx-dashboard-sidebar-stats, - cx-dashboard-sidebar-feedback + cx-dashboard-sidebar-feedback, + cx-create-new-translation, + cx-translation-filter-suggested-translations, + cx-translation-filter-published-translations, + cx-translation-filter-draft-translations, + cx-translation-filter-from-any-language, + cx-translation-filter-to-any-language ] }, ext.cx.magnuslink: { @@ -741,7 +750,6 @@ ], dependencies: [ ext.cx.progressbar, - ext.cx.source.selector, ext.cx.util, ext.cx.widgets.overlay, jquery.uls.data, @@ -749,12 +757,6 @@ ], messages: [ cx-dashboard-header, - cx-create-new-translation, - cx-translation-filter-suggested-translations, - cx-translation-filter-published-translations, - cx-translation-filter-draft-translations, - cx-translation-filter-from-any-language, - cx-translation-filter-to-any-language, cx-discard-translation, cx-translation-status-draft, cx-translation-status-deleted, diff --git a/modules/dashboard/ext.cx.dashboard.js b/modules/dashboard/ext.cx.dashboard.js index 467da96..ac36202 100644 --- a/modules/dashboard/ext.cx.dashboard.js +++ b/modules/dashboard/ext.cx.dashboard.js @@ -20,23 +20,94 @@ this.siteMapper = siteMapper; this.$header = null; this.$sidebar = null; -