jenkins-bot has submitted this change and it was merged.
Change subject: Adding alma mater to WikiGrok version A
......................................................................
Adding alma mater to WikiGrok version A
Also removing old unused functions in WikiGrokSuggestionApi.js.
Change-Id: I1575a3391fb0d6ba99ecf222819f279a6d1e6e69
---
M javascripts/modules/wikigrok/WikiGrokDialog.js
M javascripts/modules/wikigrok/WikiGrokSuggestionApi.js
2 files changed, 7 insertions(+), 6 deletions(-)
Approvals:
Jdlrobson: Looks good to me, approved
jenkins-bot: Verified
diff --git a/javascripts/modules/wikigrok/WikiGrokDialog.js
b/javascripts/modules/wikigrok/WikiGrokDialog.js
index 3991c8c..dad0f6b 100644
--- a/javascripts/modules/wikigrok/WikiGrokDialog.js
+++ b/javascripts/modules/wikigrok/WikiGrokDialog.js
@@ -170,6 +170,8 @@
} else {
options.contentMsg = 'Was ' + options.name + ' a citizen of the ' +
options.claimLabel + '?';
}
+ } else if (
options.suggestion.name === 'schools' ) {
+ options.contentMsg =
'Did ' + options.name + ' attend ' + options.claimLabel + '?';
}
// Re-render with new content
for 'Question' step
@@ -214,6 +216,8 @@
claim.prop = 'occupation';
} else if ( options.suggestion.name === 'nationality' )
{
claim.prop = 'nationality';
+ } else if ( options.suggestion.name === 'schools' ) {
+ claim.prop = 'alma mater';
}
this.apiWikiGrokResponse.recordClaims( [ claim ]
).done( function () {
@@ -397,6 +401,9 @@
if (
suggestions.nationalities && suggestions.nationalities.list.length ) {
options.suggestions.push( suggestions.nationalities );
}
+ if (
suggestions.schools && suggestions.schools.list.length ) {
+
options.suggestions.push( suggestions.schools );
+ }
if (
options.suggestions.length ) {
self.show();
} else {
diff --git a/javascripts/modules/wikigrok/WikiGrokSuggestionApi.js
b/javascripts/modules/wikigrok/WikiGrokSuggestionApi.js
index 485279d..4a0594c 100644
--- a/javascripts/modules/wikigrok/WikiGrokSuggestionApi.js
+++ b/javascripts/modules/wikigrok/WikiGrokSuggestionApi.js
@@ -46,12 +46,6 @@
}
}
} );
- },
- getPossibleNationalities: function () {
- return this.action( 'get_potential_nationality',
'nationality' );
- },
- getPossibleOccupations: function () {
- return this.action( 'get_potential_occupations',
'occupations' );
}
} );
--
To view, visit https://gerrit.wikimedia.org/r/171988
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1575a3391fb0d6ba99ecf222819f279a6d1e6e69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Kaldari <[email protected]>
Gerrit-Reviewer: Awjrichards <[email protected]>
Gerrit-Reviewer: Bmansurov <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Jhernandez <[email protected]>
Gerrit-Reviewer: Phuedx <[email protected]>
Gerrit-Reviewer: Robmoen <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits