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

Change subject: Merge multiple var into multiline var blocks
......................................................................


Merge multiple var into multiline var blocks

Change-Id: I84098e2d6222704780397638757eeb8715335c49
---
M wikibase/init.js
M wikibase/queryService/api/QuerySamples.js
M wikibase/queryService/api/Sparql.js
M wikibase/queryService/ui/App.js
M wikibase/queryService/ui/QueryExampleDialog.js
M wikibase/queryService/ui/resultBrowser/GraphResultBrowserNodeBrowser.js
M wikibase/queryService/ui/resultBrowser/TimelineResultBrowser.js
M wikibase/queryService/ui/resultBrowser/TreeMapResultBrowser.js
M wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
M wikibase/queryService/ui/visualEditor/SelectorBox.js
M wikibase/queryService/ui/visualEditor/SparqlQuery.js
M wikibase/queryService/ui/visualEditor/VisualEditor.js
12 files changed, 73 insertions(+), 73 deletions(-)

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



diff --git a/wikibase/init.js b/wikibase/init.js
index 5292a9d..f4f5248 100644
--- a/wikibase/init.js
+++ b/wikibase/init.js
@@ -38,12 +38,15 @@
                                setLanguage( lang );
                        } );
 
-                       var rdfHint = new wb.ui.editor.hint.Rdf( api );
-                       var rdfTooltip = new wb.ui.editor.tooltip.Rdf( api );
+                       var rdfHint = new wb.ui.editor.hint.Rdf( api ),
+                               rdfTooltip = new wb.ui.editor.tooltip.Rdf( api 
);
 
-                       new wb.ui.App( $( '.wikibase-queryservice ' ), new 
wb.ui.editor.Editor( rdfHint,
-                                       null, rdfTooltip ), new 
wb.ui.visualEditor.VisualEditor( api ),
-                                       new wb.api.Sparql( 
config.api.sparql.uri ) );
+                       new wb.ui.App(
+                               $( '.wikibase-queryservice ' ),
+                               new wb.ui.editor.Editor( rdfHint, null, 
rdfTooltip ),
+                               new wb.ui.visualEditor.VisualEditor( api ),
+                               new wb.api.Sparql( config.api.sparql.uri )
+                       );
                } );
 
 } )( jQuery, CONFIG, moment );
diff --git a/wikibase/queryService/api/QuerySamples.js 
b/wikibase/queryService/api/QuerySamples.js
index b070968..30f10ad 100644
--- a/wikibase/queryService/api/QuerySamples.js
+++ b/wikibase/queryService/api/QuerySamples.js
@@ -5,10 +5,10 @@
 wikibase.queryService.api.QuerySamples = ( function ( $ ) {
        'use strict';
 
-       var API_SERVER = 'https://www.wikidata.org/';
-       var API_ENDPOINT = API_SERVER + 'api/rest_v1/page/html/';
-       var PAGE_TITLE = 'Wikidata:SPARQL query service/queries/examples';
-       var PAGE_URL = API_SERVER + 'wiki/' + PAGE_TITLE;
+       var API_SERVER = 'https://www.wikidata.org/',
+               API_ENDPOINT = API_SERVER + 'api/rest_v1/page/html/',
+               PAGE_TITLE = 'Wikidata:SPARQL query service/queries/examples',
+               PAGE_URL = API_SERVER + 'wiki/' + PAGE_TITLE;
 
        /**
         * QuerySamples API for the Wikibase query service
@@ -30,12 +30,10 @@
                var deferred = $.Deferred(),
                        self = this;
 
-               $.ajax(
-                       {
-                               url: API_ENDPOINT + encodeURIComponent( 
PAGE_TITLE ) + '?redirect=false',
-                               dataType: 'html'
-                       }
-               ).done(
+               $.ajax( {
+                       url: API_ENDPOINT + encodeURIComponent( PAGE_TITLE ) + 
'?redirect=false',
+                       dataType: 'html'
+               } ).done(
                        function ( data ) {
                                deferred.resolve( self._parseHTML( data ) );
                        }
@@ -103,8 +101,8 @@
                                return;
                        }
 
-                       var data = JSON.parse( dataMW );
-                       var query;
+                       var data = JSON.parse( dataMW ),
+                               query;
 
                        if ( data.parts && data.parts[0].template.target.href 
=== './Template:SPARQL' ) {
                                // SPARQL template
diff --git a/wikibase/queryService/api/Sparql.js 
b/wikibase/queryService/api/Sparql.js
index 7eb4349..20578f3 100644
--- a/wikibase/queryService/api/Sparql.js
+++ b/wikibase/queryService/api/Sparql.js
@@ -172,8 +172,9 @@
                }
 
                try {//extract error from server response
-                       var errorToMatch = error.debug.substring( error.debug
-                                       .indexOf( 
'java.util.concurrent.ExecutionException:' ) );
+                       var errorToMatch = error.debug.substring(
+                               error.debug.indexOf( 
'java.util.concurrent.ExecutionException:' )
+                       );
 
                        for ( var errorKey in ERROR_MAP ) {
                                if ( errorToMatch.indexOf( errorKey ) !== -1 ) {
diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js
index 2ad4417..d63d2ba 100644
--- a/wikibase/queryService/ui/App.js
+++ b/wikibase/queryService/ui/App.js
@@ -378,12 +378,11 @@
         * @private
         */
        SELF.prototype._initDataUpdated = function() {
-               var self = this;
-               var $label = $( '.dataUpdated' );
+               var self = this,
+                       $label = $( '.dataUpdated' );
 
                var updateDataStatus = function() {
                        self._sparqlApi.queryDataUpdatedTime().done( function( 
time, difference ) {
-
                                var updatestatustext = moment.duration( 
difference, 'seconds' ).humanize(),
                                        labelClass,
                                        badge;
@@ -436,10 +435,11 @@
                                $.proxy( this._handleNamespaceSelected, this ) 
);
 
                $( '.addPrefixes' ).click( function() {
-                       var standardPrefixes = 
wikibase.queryService.RdfNamespaces.STANDARD_PREFIXES;
-                       var prefixes = Object.keys( standardPrefixes ).map( 
function( x ) {
-                               return standardPrefixes[x];
-                       } ).join( '\n' );
+                       var standardPrefixes = 
wikibase.queryService.RdfNamespaces.STANDARD_PREFIXES,
+                               prefixes = Object.keys( standardPrefixes ).map( 
function( x ) {
+                                       return standardPrefixes[x];
+                               } ).join( '\n' );
+
                        self._editor.prepandValue( prefixes + '\n\n' );
                        self._track( 'buttonClick.addPrefixes' );
                } );
diff --git a/wikibase/queryService/ui/QueryExampleDialog.js 
b/wikibase/queryService/ui/QueryExampleDialog.js
index 3b06a48..03463f3 100644
--- a/wikibase/queryService/ui/QueryExampleDialog.js
+++ b/wikibase/queryService/ui/QueryExampleDialog.js
@@ -142,9 +142,9 @@
         * @private
         */
        SELF.prototype._drawTagCloud = function( redraw ) {
-               var self = this;
+               var self = this,
+                       jQCloudTags = [];
 
-               var jQCloudTags = [];
                $.each( this._getCloudTags(), function( tag, weight ) {
                        jQCloudTags.push( {
                                text: tag,
diff --git 
a/wikibase/queryService/ui/resultBrowser/GraphResultBrowserNodeBrowser.js 
b/wikibase/queryService/ui/resultBrowser/GraphResultBrowserNodeBrowser.js
index e133cd2..fc5e4ad 100644
--- a/wikibase/queryService/ui/resultBrowser/GraphResultBrowserNodeBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/GraphResultBrowserNodeBrowser.js
@@ -71,9 +71,8 @@
         * @private
         */
        SELF.prototype._getEntites = function( entityUri, propertyUri ) {
-               var self = this;
-
-               var deferred = $.Deferred();
+               var self = this,
+                       deferred = $.Deferred();
 
                this._sparql.query(
                                SPARQL_ENTITES.replace( '{entityUri}', 
entityUri ).replace( '{propertyUri}',
@@ -98,9 +97,8 @@
         * @private
         */
        SELF.prototype._getProperties = function( entityUri ) {
-               var self = this;
-
-               var deferred = $.Deferred();
+               var self = this,
+                       deferred = $.Deferred();
 
                this._sparql.query( SPARQL_PROPERTIES.replace( '{entityUri}', 
entityUri ) ).done(
                                function() {
@@ -142,10 +140,10 @@
         * @private
         */
        SELF.prototype._expandPropertyNode = function( nodeId ) {
-               var self = this;
-               var n = this._temporaryNodes[nodeId];
+               var self = this,
+                       node = this._temporaryNodes[nodeId];
 
-               this._getEntites( n.entityId, n.id ).done( function( entites ) {
+               this._getEntites( node.entityId, node.id ).done( function( 
entites ) {
                        $.each( entites, function( i, e ) {
                                if ( self._nodes.get( e.id ) === null ) {
                                        self._nodes.add( {
@@ -155,10 +153,10 @@
                                }
                                self._edges.add( {
                                        dashes: true,
-                                       from: n.entityId,
+                                       from: node.entityId,
                                        to: e.id,
-                                       label: n.propertyLabel,
-                                       linkType: n.id
+                                       label: node.propertyLabel,
+                                       linkType: node.id
                                } );
                        } );
                } );
diff --git a/wikibase/queryService/ui/resultBrowser/TimelineResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/TimelineResultBrowser.js
index 998b899..210bee8 100644
--- a/wikibase/queryService/ui/resultBrowser/TimelineResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/TimelineResultBrowser.js
@@ -104,8 +104,8 @@
                                .appendTo( $toolbar );
 
                function zoom( percentage ) {
-                       var range = timeline.getWindow();
-                       var interval = range.end - range.start;
+                       var range = timeline.getWindow(),
+                               interval = range.end - range.start;
 
                        timeline.setWindow( {
                                start: range.start.valueOf() - interval * 
percentage,
diff --git a/wikibase/queryService/ui/resultBrowser/TreeMapResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/TreeMapResultBrowser.js
index 18d68ef..41ac80a 100644
--- a/wikibase/queryService/ui/resultBrowser/TreeMapResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/TreeMapResultBrowser.js
@@ -131,16 +131,16 @@
                // with little modification
 
                var supportsForeignObject = false;// 
FIXME:Modernizr.svgforeignobject;
-               var chartWidth = $( window ).width();
-               var chartHeight = $( window ).height();
-               var xscale = d3.scale.linear().range( [ 0, chartWidth ] );
-               var yscale = d3.scale.linear().range( [ 0, chartHeight ] );
-               var color = d3.scale.category10();
-               var headerHeight = 20;
-               var headerColor = '#555555';
-               var transitionDuration = 500;
-               var root;
-               var node;
+               var chartWidth = $( window ).width(),
+                       chartHeight = $( window ).height(),
+                       xscale = d3.scale.linear().range( [ 0, chartWidth ] ),
+                       yscale = d3.scale.linear().range( [ 0, chartHeight ] ),
+                       color = d3.scale.category10(),
+                       headerHeight = 20,
+                       headerColor = '#555555',
+                       transitionDuration = 500,
+                       root,
+                       node;
 
                var treemap = d3.layout.treemap().round( false ).size( [ 
chartWidth, chartHeight ] )
                                .sticky( true ).value( function( d ) {
@@ -274,9 +274,10 @@
                }
 
                function getRGBComponents( color ) {
-                       var r = color.substring( 1, 3 );
-                       var g = color.substring( 3, 5 );
-                       var b = color.substring( 5, 7 );
+                       var r = color.substring( 1, 3 ),
+                               g = color.substring( 3, 5 ),
+                               b = color.substring( 5, 7 );
+
                        return {
                                R: parseInt( r, 16 ),
                                G: parseInt( g, 16 ),
diff --git a/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js 
b/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
index b7152b1..a624488 100644
--- a/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
+++ b/wikibase/queryService/ui/resultBrowser/helper/FormatterHelper.js
@@ -47,9 +47,8 @@
         * @return {jQuery} element
         */
        SELF.prototype.formatRow = function( row, embed ) {
-               var self = this;
-
-               var $result = $( '<div/>' );
+               var self = this,
+                       $result = $( '<div/>' );
 
                $.each( row, function( key, value ) {
                        $result.prepend( $( '<div>' ).append( self.formatValue( 
value, key, embed ) ) );
@@ -406,9 +405,10 @@
         * @return {number} luminance of the color, or NaN if the color string 
is invalid
         */
        SELF.prototype.calculateLuminance = function( color ) {
-               var r = parseInt( color.substr( 1, 2 ), 16 ) / 255;
-               var g = parseInt( color.substr( 3, 2 ), 16 ) / 255;
-               var b = parseInt( color.substr( 5, 2 ), 16 ) / 255;
+               var r = parseInt( color.substr( 1, 2 ), 16 ) / 255,
+                       g = parseInt( color.substr( 3, 2 ), 16 ) / 255,
+                       b = parseInt( color.substr( 5, 2 ), 16 ) / 255;
+
                if ( isFinite( r ) && isFinite( g ) && isFinite( b ) ) {
                        // linearize gamma-corrected sRGB values
                        r = r <= 0.04045 ? r / 12.92 : Math.pow( ( r + 0.055 ) 
/ 1.055, 2.4 );
diff --git a/wikibase/queryService/ui/visualEditor/SelectorBox.js 
b/wikibase/queryService/ui/visualEditor/SelectorBox.js
index 139146e..a26d1ce 100644
--- a/wikibase/queryService/ui/visualEditor/SelectorBox.js
+++ b/wikibase/queryService/ui/visualEditor/SelectorBox.js
@@ -75,12 +75,11 @@
         * @private
         */
        SELF.prototype._createSelect = function( $element, listener, toolbar ) {
-               var self = this;
-
-               var $select = this._getSelectBox( $element );
-               var $close = this._getCloseButton();
-               var $toolbar = this._getToolbar( toolbar, $element );
-               var $content = $( '<div>' ).append( $close, ' ', $select, ' ', 
$toolbar );
+               var self = this,
+                       $select = this._getSelectBox( $element ),
+                       $close = this._getCloseButton(),
+                       $toolbar = this._getToolbar( toolbar, $element ),
+                       $content = $( '<div>' ).append( $close, ' ', $select, ' 
', $toolbar );
 
                $element.clickover( {
                        placement: 'bottom',
@@ -164,8 +163,8 @@
         * @private
         */
        SELF.prototype._renderSelect2 = function( $select, $element ) {
-               var self = this;
-               var type = $element.data( 'type' );
+               var self = this,
+                       type = $element.data( 'type' );
 
                var formatter = function( item ) {
                        if ( !item.data ) {
diff --git a/wikibase/queryService/ui/visualEditor/SparqlQuery.js 
b/wikibase/queryService/ui/visualEditor/SparqlQuery.js
index 9a1c221..d5745ab 100644
--- a/wikibase/queryService/ui/visualEditor/SparqlQuery.js
+++ b/wikibase/queryService/ui/visualEditor/SparqlQuery.js
@@ -173,9 +173,9 @@
         * @private
         */
        SELF.prototype._createTriples = function( triplesData, isOptional ) {
-               var triples = [];
+               var self = this,
+                       triples = [];
 
-               var self = this;
                $.each( triplesData, function( i, triple ) {
                        triples.push( {
                                optional: isOptional,
diff --git a/wikibase/queryService/ui/visualEditor/VisualEditor.js 
b/wikibase/queryService/ui/visualEditor/VisualEditor.js
index 192e5fa..66389ce 100644
--- a/wikibase/queryService/ui/visualEditor/VisualEditor.js
+++ b/wikibase/queryService/ui/visualEditor/VisualEditor.js
@@ -474,9 +474,9 @@
         * @private
         */
        SELF.prototype._getTripleEntityHtml = function( entity, triple, key ) {
-               var $label = $( '<span>' );
+               var self = this,
+                       $label = $( '<span>' );
 
-               var self = this;
                this._getLabel( entity ).done( function( label, id, 
description, type ) {
                        var $link = $( '<a>' )
                                .text( label )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I84098e2d6222704780397638757eeb8715335c49
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