jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/331857 )

Change subject: Split every var in a var block to a separate line
......................................................................


Split every var in a var block to a separate line

Change-Id: I72131553f101846567236304f314738395e160ee
---
M wikibase/queryService/api/Sparql.js
M wikibase/queryService/ui/App.js
M wikibase/queryService/ui/editor/Editor.js
M wikibase/queryService/ui/editor/hint/Rdf.js
M wikibase/queryService/ui/editor/hint/Sparql.js
M wikibase/queryService/ui/editor/tooltip/Rdf.js
M wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
M wikibase/queryService/ui/resultBrowser/BubbleChartResultBrowser.js
M wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
M wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js
M wikibase/queryService/ui/resultBrowser/TableResultBrowser.js
M wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
M wikibase/queryService/ui/visualEditor/SelectorBox.js
M wikibase/queryService/ui/visualEditor/VisualEditor.js
14 files changed, 81 insertions(+), 51 deletions(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wikibase/queryService/api/Sparql.js 
b/wikibase/queryService/api/Sparql.js
index fec715d..6cbb45f 100644
--- a/wikibase/queryService/api/Sparql.js
+++ b/wikibase/queryService/api/Sparql.js
@@ -126,11 +126,9 @@
         * @return {jQuery.Promise} query
         */
        SELF.prototype.query = function( query ) {
-               var self = this, deferred = $.Deferred(), settings = {
-                       headers: {
-                               Accept: 'application/sparql-results+json'
-                       }
-               };
+               var self = this,
+                       deferred = $.Deferred(),
+                       settings = { headers: { Accept: 
'application/sparql-results+json' } };
 
                this._queryUri = this._serviceUri + '?query=' + 
encodeURIComponent( query );
 
diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js
index ed258d3..f779b78 100644
--- a/wikibase/queryService/ui/App.js
+++ b/wikibase/queryService/ui/App.js
@@ -647,7 +647,9 @@
        SELF.prototype._handleQueryError = function() {
                $( '#execute-button' ).prop( 'disabled', false );
 
-               var error = this._sparqlApi.getError(), errorMessageKey = null, 
codes = this._sparqlApi.ERROR_CODES;
+               var error = this._sparqlApi.getError(),
+                       errorMessageKey = null,
+                       codes = this._sparqlApi.ERROR_CODES;
 
                switch ( error.code ) {
                case codes.TIMEOUT:
diff --git a/wikibase/queryService/ui/editor/Editor.js 
b/wikibase/queryService/ui/editor/Editor.js
index d3258c7..96263cc 100644
--- a/wikibase/queryService/ui/editor/Editor.js
+++ b/wikibase/queryService/ui/editor/Editor.js
@@ -112,9 +112,10 @@
                                                        if ( editor !== 
self._editor ) {
                                                                return;
                                                        }
-                                                       var lineContent = 
editor.getLine( editor.getCursor().line ), editorContent = editor.doc
-                                                                       
.getValue(), cursorPos = editor.getCursor().ch, lineNum = editor
-                                                                       
.getCursor().line;
+                                                       var lineContent = 
editor.getLine( editor.getCursor().line ),
+                                                               editorContent = 
editor.doc.getValue(),
+                                                               cursorPos = 
editor.getCursor().ch,
+                                                               lineNum = 
editor.getCursor().line;
 
                                                        self._getHints( 
editorContent, lineContent, lineNum, cursorPos ).done(
                                                                        
function( hint ) {
@@ -126,7 +127,8 @@
        };
 
        SELF.prototype._getHints = function( editorContent, lineContent, 
lineNum, cursorPos ) {
-               var deferred = new $.Deferred(), self = this;
+               var deferred = new $.Deferred(),
+                       self = this;
 
                this._rdfHint.getHint( editorContent, lineContent, lineNum, 
cursorPos ).done(
                                function( hint ) {
@@ -195,7 +197,9 @@
         * @param {string} description
         */
        SELF.prototype.highlightError = function( description ) {
-               var line, character, match = description.match( /line (\d+), 
column (\d+)/ );
+               var line,
+                       character,
+                       match = description.match( /line (\d+), column (\d+)/ );
                if ( match ) {
                        // highlight character at error position
                        line = match[1] - 1;
diff --git a/wikibase/queryService/ui/editor/hint/Rdf.js 
b/wikibase/queryService/ui/editor/hint/Rdf.js
index 083cfd1..fa8ce9c 100755
--- a/wikibase/queryService/ui/editor/hint/Rdf.js
+++ b/wikibase/queryService/ui/editor/hint/Rdf.js
@@ -50,8 +50,13 @@
         * @return {jQuery.Promise} Returns the completion as promise 
({list:[], from:, to:})
         */
        SELF.prototype.getHint = function( editorContent, lineContent, lineNum, 
cursorPos ) {
-               var deferred = new $.Deferred(), currentWord = this
-                               ._getCurrentWord( lineContent, cursorPos ), 
list, prefix, term, entityPrefixes, self = this;
+               var deferred = new $.Deferred(),
+                       currentWord = this._getCurrentWord( lineContent, 
cursorPos ),
+                       list,
+                       prefix,
+                       term,
+                       entityPrefixes,
+                       self = this;
 
                if ( !currentWord.word.match( /\S+:\S*/ ) ) {
                        return deferred.reject().promise();
@@ -120,7 +125,8 @@
        };
 
        SELF.prototype._searchEntities = function( term, type ) {
-               var entityList = [], deferred = $.Deferred();
+               var entityList = [],
+                       deferred = $.Deferred();
 
                this._api.searchEntities( term, type ).done( function( data ) {
                        $.each( data.search, function( key, value ) {
@@ -138,10 +144,9 @@
        };
 
        SELF.prototype._getCurrentWord = function( line, position ) {
-               var pos = position - 1, colon = false;
-               var wordSeparator = [
-                               '/', '*', '+', ' ', ';', '.', '\n', '\t', '(', 
')', '{', '}', '[', ']'
-               ];
+               var pos = position - 1,
+                       colon = false,
+                       wordSeparator = [ '/', '*', '+', ' ', ';', '.', '\n', 
'\t', '(', ')', '{', '}', '[', ']' ];
 
                if ( pos < 0 ) {
                        pos = 0;
@@ -179,8 +184,10 @@
        };
 
        SELF.prototype._extractPrefixes = function( text ) {
-               var prefixes = this._rdfNamespaces.getPrefixMap( 
this._rdfNamespaces.ENTITY_TYPES ), types = this._rdfNamespaces.ENTITY_TYPES, 
lines = text
-                               .split( '\n' ), matches;
+               var prefixes = this._rdfNamespaces.getPrefixMap( 
this._rdfNamespaces.ENTITY_TYPES ),
+                       types = this._rdfNamespaces.ENTITY_TYPES,
+                       lines = text.split( '\n' ),
+                       matches;
 
                $.each( lines, function( index, line ) {
                        // PREFIX wd: <http://www.wikidata.org/entity/>
diff --git a/wikibase/queryService/ui/editor/hint/Sparql.js 
b/wikibase/queryService/ui/editor/hint/Sparql.js
index 8033c89..5974e45 100755
--- a/wikibase/queryService/ui/editor/hint/Sparql.js
+++ b/wikibase/queryService/ui/editor/hint/Sparql.js
@@ -89,7 +89,9 @@
         * @return {jQuery.Promise} Returns the completion as promise 
({list:[], from:, to:})
         **/
        SELF.prototype.getHint = function( editorContent, lineContent, lineNum, 
cursorPos ) {
-               var currentWord = this._getCurrentWord( lineContent, cursorPos 
), hintList = [], deferred = new $.Deferred();
+               var currentWord = this._getCurrentWord( lineContent, cursorPos 
),
+                       hintList = [],
+                       deferred = new $.Deferred();
 
                if ( currentWord.word.indexOf( '?' ) === 0 ) {
                        hintList = hintList.concat( this._getVariableHints( 
currentWord.word, this
diff --git a/wikibase/queryService/ui/editor/tooltip/Rdf.js 
b/wikibase/queryService/ui/editor/tooltip/Rdf.js
index dfa9bdc..2146936 100644
--- a/wikibase/queryService/ui/editor/tooltip/Rdf.js
+++ b/wikibase/queryService/ui/editor/tooltip/Rdf.js
@@ -66,11 +66,12 @@
        };
 
        SELF.prototype._createTooltip = function( e ) {
-               var posX = e.clientX, posY = e.clientY + $( window 
).scrollTop(), token = this._editor
-                               .getTokenAt( this._editor.coordsChar( {
-                                       left: posX,
-                                       top: posY
-                               } ) ).string;
+               var posX = e.clientX,
+                       posY = e.clientY + $( window ).scrollTop(),
+                       token = this._editor.getTokenAt( 
this._editor.coordsChar( {
+                               left: posX,
+                               top: posY
+                       } ) ).string;
 
                if ( !token.match( /.+\:(Q|P)[0-9]*/ ) ) {
                        return;
@@ -112,8 +113,9 @@
        };
 
        SELF.prototype._extractPrefixes = function( text ) {
-               var prefixes = this._rdfNamespaces.getPrefixMap( 
this._rdfNamespaces.ENTITY_TYPES ), lines = text
-                               .split( '\n' ), matches;
+               var prefixes = this._rdfNamespaces.getPrefixMap( 
this._rdfNamespaces.ENTITY_TYPES ),
+                       lines = text.split( '\n' ),
+                       matches;
 
                var self = this;
                $.each( lines, function( index, line ) {
@@ -129,7 +131,8 @@
        };
 
        SELF.prototype._searchEntities = function( term, type ) {
-               var entityList = [], deferred = $.Deferred();
+               var entityList = [],
+                       deferred = $.Deferred();
 
                this._api.searchEntities( term, type ).done(
                                function( data ) {
diff --git a/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
index 9a82709..93e8db3 100644
--- a/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/AbstractResultBrowser.js
@@ -121,7 +121,8 @@
         * @param {String} columnKey
         */
        SELF.prototype.processVisitors = function( data, columnKey ) {
-               var self = this, removeVisitors = {};
+               var self = this,
+                       removeVisitors = {};
 
                if ( this._visitors.length === 0 ) {
                        return;
diff --git a/wikibase/queryService/ui/resultBrowser/BubbleChartResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/BubbleChartResultBrowser.js
index d203f3b..2015749 100644
--- a/wikibase/queryService/ui/resultBrowser/BubbleChartResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/BubbleChartResultBrowser.js
@@ -38,11 +38,11 @@
         * @param {jQuery} $element to draw at
         **/
        SELF.prototype.draw = function( $element ) {
-               var self = this;
-               var data = {
-                       'name': 'bubblechart',
-                       'children': []
-               }, labelKey = this._getLabelColumns()[0], numberKey = 
this._getNumberColumns()[0], prevRow = null;
+               var self = this,
+                       data = { 'name': 'bubblechart', 'children': [] },
+                       labelKey = this._getLabelColumns()[0],
+                       numberKey = this._getNumberColumns()[0],
+                       prevRow = null;
 
                this._iterateResult( function( field, key, row ) {
 
diff --git a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
index cc61721..87218e8 100644
--- a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
@@ -207,7 +207,8 @@
         * @private
         */
        SELF.prototype._createMarkerGroups = function() {
-               var self = this, markers = {};
+               var self = this,
+                       markers = {};
                markers[ LAYER_DEFAULT_GROUP ] = [];
 
                this._iterateResult( function( field, key, row ) {
diff --git a/wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js
index c09b688..5029713 100644
--- a/wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/ImageResultBrowser.js
@@ -36,8 +36,8 @@
 
                this._iterateResult( function( field, key, row ) {
                        if ( field && self._isCommonsResource( field.value ) ) {
-                               var url = field.value, fileName = 
self._getFormatter().getCommonsResourceFileName(
-                                               url );
+                               var url = field.value,
+                                       fileName = 
self._getFormatter().getCommonsResourceFileName( url );
 
                                self._grid.append( self._getItem( 
self._getThumbnail( url ), self._getThumbnail(
                                                url, 1000 ), fileName, row ) );
diff --git a/wikibase/queryService/ui/resultBrowser/TableResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/TableResultBrowser.js
index 8c2b53a..e66fd21 100644
--- a/wikibase/queryService/ui/resultBrowser/TableResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/TableResultBrowser.js
@@ -111,7 +111,8 @@
         * @param {jQuery} $element to draw at
         */
        SELF.prototype.drawBootstrapTable = function( $element ) {
-               var self = this, showPagination = ( this.rows.length > 
TABLE_PAGE_SIZE );
+               var self = this,
+                       showPagination = ( this.rows.length > TABLE_PAGE_SIZE );
 
                jQuery.fn.bootstrapTable.columnDefaults.formatter = function( 
data, row, index ) {
                        if ( !data ) {
diff --git a/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js 
b/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
index 2cc6ea7..b7152b1 100644
--- a/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
+++ b/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
@@ -67,7 +67,8 @@
         * @return {jQuery} element
         */
        SELF.prototype.formatValue = function( data, title, embed ) {
-               var value = data.value, $html = $( '<span>' );
+               var value = data.value,
+                       $html = $( '<span>' );
 
                if ( !title ) {
                        title = data.dataType || '';
diff --git a/wikibase/queryService/ui/visualEditor/SelectorBox.js 
b/wikibase/queryService/ui/visualEditor/SelectorBox.js
index e5dbf57..139146e 100644
--- a/wikibase/queryService/ui/visualEditor/SelectorBox.js
+++ b/wikibase/queryService/ui/visualEditor/SelectorBox.js
@@ -48,9 +48,10 @@
         * @private
         */
        SELF.prototype._createInput = function( $element, listener, toolbar ) {
-               var $input = $( '<input>' ).attr( 'type', $element.data( 'type' 
) ), $close = this
-                               ._getCloseButton(), $toolbar = 
this._getToolbar( toolbar, $element ), $content = $(
-                               '<div>' ).append( $close, ' ', $input, ' ', 
$toolbar );
+               var $input = $( '<input>' ).attr( 'type', $element.data( 'type' 
) ),
+                       $close = this._getCloseButton(),
+                       $toolbar = this._getToolbar( toolbar, $element ),
+                       $content = $( '<div>' ).append( $close, ' ', $input, ' 
', $toolbar );
 
                $element.clickover( {
                        placement: 'bottom',
diff --git a/wikibase/queryService/ui/visualEditor/VisualEditor.js 
b/wikibase/queryService/ui/visualEditor/VisualEditor.js
index 6171a32..192e5fa 100644
--- a/wikibase/queryService/ui/visualEditor/VisualEditor.js
+++ b/wikibase/queryService/ui/visualEditor/VisualEditor.js
@@ -130,8 +130,10 @@
         * @private
         */
        SELF.prototype._cleanQueryPrefixes = function( query ) {
-               var prefixRegex = /PREFIX ([a-z]+): <(.*)>/gi, m;
-               var prefixes = {}, cleanQuery = query.replace( prefixRegex, '' 
).trim();
+               var prefixRegex = /PREFIX ([a-z]+): <(.*)>/gi,
+                       m,
+                       prefixes = {},
+                       cleanQuery = query.replace( prefixRegex, '' ).trim();
 
                while ( ( m = prefixRegex.exec( query ) ) ) {
                        var prefix = m[1];
@@ -194,9 +196,11 @@
         * @private
         */
        SELF.prototype._getHtml = function() {
-               var self = this;
-               var $html = $( '<div>' ), $find = this._getFindSection(), $show 
= this._getShowSection(), $spacer = $(
-                               '<div>' ).addClass( 'spacer' );
+               var self = this,
+                       $html = $( '<div>' ),
+                       $find = this._getFindSection(),
+                       $show = this._getShowSection(),
+                       $spacer = $( '<div>' ).addClass( 'spacer' );
 
                $html.append( $find, $spacer.clone(), $show, $spacer.clone(), 
this._getLimitSection() );
 
@@ -235,8 +239,12 @@
         * @private
         */
        SELF.prototype._getLimitSection = function() {
-               var $limitSection = $( '<div>' ), $limit = $( '<a 
data-type="number">' ).attr( 'href', '#' )
-                               .text( 'Limit' ).data( 'value', 
this._query.getLimit() ), $value = $( '<span>' )
+               var $limitSection = $( '<div>' ),
+                       $limit = $( '<a data-type="number">' )
+                               .attr( 'href', '#' )
+                               .text( 'Limit' )
+                               .data( 'value', this._query.getLimit() ),
+                       $value = $( '<span>' )
                                .text( this._query.getLimit() ? 
this._query.getLimit() : '' );
 
                var self = this;
@@ -432,7 +440,8 @@
         * @private
         */
        SELF.prototype._getTripleEntityPathHtml = function( path, triple ) {
-               var self = this, $path = $( '<span>' );
+               var self = this,
+                       $path = $( '<span>' );
                $.each( path.items, function( k, v ) {
                        if ( v.type && v.type === 'path' ) {
                                $path.append( self._getTripleEntityPathHtml( v, 
triple ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72131553f101846567236304f314738395e160ee
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Thiemo M├Ąttig (WMDE) <thiemo.maet...@wikimedia.de>
Gerrit-Reviewer: Jonas Kress (WMDE) <jonas.kr...@wikimedia.de>
Gerrit-Reviewer: Smalyshev <smalys...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to