[MediaWiki-commits] [Gerrit] Hygiene: Add missing WikiGrok documentation - change (mediawiki...MobileFrontend)

2014-10-29 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

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

Change subject: Hygiene: Add missing WikiGrok documentation
..

Hygiene: Add missing WikiGrok documentation

Bug: 72657
Change-Id: I595c5d56ed65e494ce9fdb6a99c48c14ba9b88fa
---
M javascripts/modules/wikigrok/WikiDataApi.js
M javascripts/modules/wikigrok/WikiGrokApi.js
M javascripts/modules/wikigrok/WikiGrokDialog.js
M javascripts/modules/wikigrok/WikiGrokMoreInfo.js
M javascripts/modules/wikigrok/wikigrok.js
5 files changed, 10 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/82/169782/1

diff --git a/javascripts/modules/wikigrok/WikiDataApi.js 
b/javascripts/modules/wikigrok/WikiDataApi.js
index c0d3fe0..6a5f0f2 100644
--- a/javascripts/modules/wikigrok/WikiDataApi.js
+++ b/javascripts/modules/wikigrok/WikiDataApi.js
@@ -1,6 +1,7 @@
 ( function ( M, $ ) {
var Api = M.require( 'api' ).Api, WikiDataApi;
/**
+* Gets claims and labels from the WikiData API
 * @class WikiDataApi
 * @extends Api
 */
diff --git a/javascripts/modules/wikigrok/WikiGrokApi.js 
b/javascripts/modules/wikigrok/WikiGrokApi.js
index 0e544c7..ced17bc 100644
--- a/javascripts/modules/wikigrok/WikiGrokApi.js
+++ b/javascripts/modules/wikigrok/WikiGrokApi.js
@@ -2,6 +2,7 @@
 ( function ( M ) {
var Api = M.require( 'api' ).Api, WikiGrokApi;
/**
+* Records claims, gets suggestions, nationalities, occupations from 
the API
 * @class WikiGrokApi
 * @extends Api
 */
diff --git a/javascripts/modules/wikigrok/WikiGrokDialog.js 
b/javascripts/modules/wikigrok/WikiGrokDialog.js
index ef4678b..e209ecb 100644
--- a/javascripts/modules/wikigrok/WikiGrokDialog.js
+++ b/javascripts/modules/wikigrok/WikiGrokDialog.js
@@ -76,7 +76,7 @@
/**
 * Return a new array from 'array' with 'count' randomly 
selected elements.
 * @param {Array} array Array from which random elements are 
selected
-* @param {Integer} count - Positive number of random elements 
to select
+* @param {number} count - Positive number of random elements 
to select
 * @returns {Array}
 */
chooseRandomItemsFromArray: function ( array, count ) {
@@ -205,7 +205,7 @@
/**
 * Check if at least half of the element's height and half of 
its width are in viewport
 * @method
-* @param {jQuery.Object} $el
+* @param {jQuery.Object} $el - element that's being tested
 * @return {boolean}
 */
isElementInViewport: function ( $el ) {
diff --git a/javascripts/modules/wikigrok/WikiGrokMoreInfo.js 
b/javascripts/modules/wikigrok/WikiGrokMoreInfo.js
index 625c1c2..84c23bc 100644
--- a/javascripts/modules/wikigrok/WikiGrokMoreInfo.js
+++ b/javascripts/modules/wikigrok/WikiGrokMoreInfo.js
@@ -5,6 +5,7 @@
WikiGrokMoreInfo;
 
/**
+* Show more info about the wikigrok
 * @class WikiGrokMoreInfo
 * @extends Overlay
 */
diff --git a/javascripts/modules/wikigrok/wikigrok.js 
b/javascripts/modules/wikigrok/wikigrok.js
index d587d2e..e2d2694 100644
--- a/javascripts/modules/wikigrok/wikigrok.js
+++ b/javascripts/modules/wikigrok/wikigrok.js
@@ -15,7 +15,7 @@
},
version;
 
-   /**
+   /*
 * Gets the version of wikigrok to use.
 *
 * If logged in:
@@ -24,8 +24,9 @@
 * If anonymous:
 *   * If it had any particular version assigned, use that one.
 *   * Else, assign randomly a wikigrok version to use.
+* @return {Object}
 */
-   function getWikigrokVersion() {
+   function getWikiGrokVersion() {
var cookieName = mw.config.get( 'wgCookiePrefix' ) + 
'-wikiGrokAnonymousVersion',
anonVersion = $.cookie( cookieName );
 
@@ -49,7 +50,7 @@
}
}
 
-   /**
+   /*
 * Gets the user's token from 'cookie prefix' + -wikiGrokUserToken
 * cookie. If the cookie isn't set, then a token is generated,
 * stored in the cookie for 90 days, and then returned.
@@ -108,7 +109,7 @@
) {
 
// Load the required module and view based on the version for 
the user
-   version = getWikigrokVersion();
+   version = getWikiGrokVersion();
mw.loader.using( version.module ).done( function () {
var WikiGrokDialog = M.require( version.view );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] Hygiene: Add missing WikiGrok documentation - change (mediawiki...MobileFrontend)

2014-10-29 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: Add missing WikiGrok documentation
..


Hygiene: Add missing WikiGrok documentation

Bug: 72657
Change-Id: I595c5d56ed65e494ce9fdb6a99c48c14ba9b88fa
---
M javascripts/modules/wikigrok/WikiDataApi.js
M javascripts/modules/wikigrok/WikiGrokApi.js
M javascripts/modules/wikigrok/WikiGrokDialog.js
M javascripts/modules/wikigrok/WikiGrokMoreInfo.js
M javascripts/modules/wikigrok/wikigrok.js
5 files changed, 10 insertions(+), 6 deletions(-)

Approvals:
  Phuedx: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/javascripts/modules/wikigrok/WikiDataApi.js 
b/javascripts/modules/wikigrok/WikiDataApi.js
index c0d3fe0..6a5f0f2 100644
--- a/javascripts/modules/wikigrok/WikiDataApi.js
+++ b/javascripts/modules/wikigrok/WikiDataApi.js
@@ -1,6 +1,7 @@
 ( function ( M, $ ) {
var Api = M.require( 'api' ).Api, WikiDataApi;
/**
+* Gets claims and labels from the WikiData API
 * @class WikiDataApi
 * @extends Api
 */
diff --git a/javascripts/modules/wikigrok/WikiGrokApi.js 
b/javascripts/modules/wikigrok/WikiGrokApi.js
index 0e544c7..ced17bc 100644
--- a/javascripts/modules/wikigrok/WikiGrokApi.js
+++ b/javascripts/modules/wikigrok/WikiGrokApi.js
@@ -2,6 +2,7 @@
 ( function ( M ) {
var Api = M.require( 'api' ).Api, WikiGrokApi;
/**
+* Records claims, gets suggestions, nationalities, occupations from 
the API
 * @class WikiGrokApi
 * @extends Api
 */
diff --git a/javascripts/modules/wikigrok/WikiGrokDialog.js 
b/javascripts/modules/wikigrok/WikiGrokDialog.js
index ef4678b..e209ecb 100644
--- a/javascripts/modules/wikigrok/WikiGrokDialog.js
+++ b/javascripts/modules/wikigrok/WikiGrokDialog.js
@@ -76,7 +76,7 @@
/**
 * Return a new array from 'array' with 'count' randomly 
selected elements.
 * @param {Array} array Array from which random elements are 
selected
-* @param {Integer} count - Positive number of random elements 
to select
+* @param {number} count - Positive number of random elements 
to select
 * @returns {Array}
 */
chooseRandomItemsFromArray: function ( array, count ) {
@@ -205,7 +205,7 @@
/**
 * Check if at least half of the element's height and half of 
its width are in viewport
 * @method
-* @param {jQuery.Object} $el
+* @param {jQuery.Object} $el - element that's being tested
 * @return {boolean}
 */
isElementInViewport: function ( $el ) {
diff --git a/javascripts/modules/wikigrok/WikiGrokMoreInfo.js 
b/javascripts/modules/wikigrok/WikiGrokMoreInfo.js
index 625c1c2..84c23bc 100644
--- a/javascripts/modules/wikigrok/WikiGrokMoreInfo.js
+++ b/javascripts/modules/wikigrok/WikiGrokMoreInfo.js
@@ -5,6 +5,7 @@
WikiGrokMoreInfo;
 
/**
+* Show more info about the wikigrok
 * @class WikiGrokMoreInfo
 * @extends Overlay
 */
diff --git a/javascripts/modules/wikigrok/wikigrok.js 
b/javascripts/modules/wikigrok/wikigrok.js
index d587d2e..e2d2694 100644
--- a/javascripts/modules/wikigrok/wikigrok.js
+++ b/javascripts/modules/wikigrok/wikigrok.js
@@ -15,7 +15,7 @@
},
version;
 
-   /**
+   /*
 * Gets the version of wikigrok to use.
 *
 * If logged in:
@@ -24,8 +24,9 @@
 * If anonymous:
 *   * If it had any particular version assigned, use that one.
 *   * Else, assign randomly a wikigrok version to use.
+* @return {Object}
 */
-   function getWikigrokVersion() {
+   function getWikiGrokVersion() {
var cookieName = mw.config.get( 'wgCookiePrefix' ) + 
'-wikiGrokAnonymousVersion',
anonVersion = $.cookie( cookieName );
 
@@ -49,7 +50,7 @@
}
}
 
-   /**
+   /*
 * Gets the user's token from 'cookie prefix' + -wikiGrokUserToken
 * cookie. If the cookie isn't set, then a token is generated,
 * stored in the cookie for 90 days, and then returned.
@@ -108,7 +109,7 @@
) {
 
// Load the required module and view based on the version for 
the user
-   version = getWikigrokVersion();
+   version = getWikiGrokVersion();
mw.loader.using( version.module ).done( function () {
var WikiGrokDialog = M.require( version.view );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I595c5d56ed65e494ce9fdb6a99c48c14ba9b88fa
Gerrit-PatchSet: 1
Gerrit-Project: