[MediaWiki-commits] [Gerrit] Move beta scap source directory off of NFS - change (operations/puppet)

2014-04-29 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Move beta scap source directory off of NFS
..


Move beta scap source directory off of NFS

Change the directory that receives MediaWiki code and configuration via
Jenkins job updates from the NFS mounted
/data/project/apache/common-local/ to a local directory on
deployment-bastion.

Configuration has been added to the beta::autoupdater class to ensure
that a clones of operations/mediawiki-config.git, mediawiki/core.git and
mediawiki/extensions.git are present in the new staging directory along
with an l10n cache directory and a LocalSettings.php file. Note that the
wmf-config/PrivateSettings.php file will still need to be copied or
created by had for the deploy to be fully functional.

Also cleanup configuration differences that were needed while scap was
being tested in beta as a parallel deployment process.

Bug: 63746
Change-Id: I4cbd312e19a9b590760bba8e776fa5f816e20e34
---
M manifests/misc/deployment.pp
A modules/beta/files/LocalSettings.php
M modules/beta/manifests/autoupdater.pp
M modules/beta/manifests/config.pp
M modules/beta/manifests/scap/master.pp
M modules/beta/manifests/scap/rsync_slave.pp
M modules/beta/manifests/scap/target.pp
R modules/beta/templates/wmf-beta-autoupdate.py.erb
A modules/beta/templates/wmf-beta-mwconfig-update.erb
M modules/mediawiki/manifests/packages.pp
10 files changed, 118 insertions(+), 19 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/misc/deployment.pp b/manifests/misc/deployment.pp
index 1582182..f9cf741 100644
--- a/manifests/misc/deployment.pp
+++ b/manifests/misc/deployment.pp
@@ -350,10 +350,7 @@
$dblist_common = /srv/deployment/mediawiki/common/dblists
$dblist_common_source = $dblist_common
} elsif $system == scap {
-   $mw_common = $::realm ? {
-   'labs'  = '/srv/common-local',
-   default = '/usr/local/apache/common-local',
-   }
+   $mw_common = '/usr/local/apache/common-local'
$mw_common_source = /a/common
$dblist_common = $mw_common
$dblist_common_source = $mw_common_source
@@ -373,6 +370,7 @@
mode= '0775',
}
} else {
+   include ::beta::config
$mw_rsync_host = deployment-bastion.${::site}.wmflabs
 
$mw_statsd_host = deployment-graphite.${::site}.wmflabs
@@ -409,7 +407,7 @@
 
 file { $mw_common_source:
 ensure = link,
-target = '/data/project/apache/common-local',
+target = $::beta::config::scap_stage_dir,
 }
 }
}
diff --git a/modules/beta/files/LocalSettings.php 
b/modules/beta/files/LocalSettings.php
new file mode 100644
index 000..3196558
--- /dev/null
+++ b/modules/beta/files/LocalSettings.php
@@ -0,0 +1,5 @@
+?php
+# Managed by puppet. (modules/beta/files/LocalSettings.php)
+# WARNING: This file is publically viewable on the web. Do not put private
+# data here.
+require_once '/usr/local/apache/common/wmf-config/CommonSettings.php';
diff --git a/modules/beta/manifests/autoupdater.pp 
b/modules/beta/manifests/autoupdater.pp
index 08f0ab1..afbf162 100644
--- a/modules/beta/manifests/autoupdater.pp
+++ b/modules/beta/manifests/autoupdater.pp
@@ -4,9 +4,11 @@
 # cluster. This is the lame way to automatically pull any code merged in master
 # branches.
 class beta::autoupdater {
-
+include ::beta::config
 require misc::deployment::common_scripts
 include ::beta::mwdeploy_sudo
+
+$stage_dir = $::beta::config::scap_stage_dir
 
 # Parsoid JavaScript dependencies are updated on beta via npm
 package { 'npm':
@@ -18,6 +20,72 @@
 group   = 'root',
 mode= '0555',
 require = Package['git-core'],
-source  = 'puppet:///modules/beta/wmf-beta-autoupdate.py',
+content = template('beta/wmf-beta-autoupdate.py.erb'),
+}
+
+file { '/usr/local/bin/wmf-beta-mwconfig-update':
+owner   = 'root',
+group   = 'root',
+mode= '0555',
+require = Package['git-core'],
+content = template('beta/wmf-beta-mwconfig-update.erb'),
+}
+
+file { $stage_dir:
+ensure = directory,
+owner  = 'mwdeploy',
+group  = 'mwdeploy',
+mode   = '0775',
+}
+
+git::clone { 'operations/mediawiki-config':
+directory = $stage_dir,
+branch= 'master',
+owner = 'mwdeploy',
+group = 'mwdeploy',
+require   = File[$stage_dir],
+}
+
+git::clone { 'mediawiki/core':
+directory = ${stage_dir}/php-master,
+branch= 'master',
+owner = 'mwdeploy',
+group = 'mwdeploy',
+require   = 

[MediaWiki-commits] [Gerrit] Convert VisualEditor Beta Feature to a normal (non-optional)... - change (mediawiki...Math)

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

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

Change subject: Convert VisualEditor Beta Feature to a normal (non-optional) 
plugin
..

Convert VisualEditor Beta Feature to a normal (non-optional) plugin

Change-Id: I0dd1c85ad92d7e42654e23b6237b30f8f4dfe0fa
---
M Math.hooks.php
M Math.php
D images/betafeatures-icon-VisualEditor-formulae-ltr.svg
D images/betafeatures-icon-VisualEditor-formulae-rtl.svg
4 files changed, 1 insertion(+), 446 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/79/130479/1

diff --git a/Math.hooks.php b/Math.hooks.php
index 60eb2f0..cf20545 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -158,28 +158,6 @@
return true;
}
 
-   public static function onGetBetaPreferences( $user, $preferences ) {
-   global $wgExtensionAssetsPath;
-   if ( class_exists( 'VisualEditorHooks' ) ) {
-   // Add beta feature if VisualEditor is installed
-   $dir = 
RequestContext::getMain()-getLanguage()-getDir();
-   $preferences['math-enable-visualeditor'] = array(
-   'version' = '1.0',
-   'label-message' = 
'math-preference-mwmathinspector-label',
-   'desc-message' = 
'math-preference-mwmathinspector-description',
-   'screenshot' = $wgExtensionAssetsPath .
-   
/Math/images/betafeatures-icon-VisualEditor-formulae-$dir.svg,
-   'info-message' = 
'math-preference-mwmathinspector-info-link',
-   'discussion-message' = 
'math-preference-mwmathinspector-info-link',
-   'requirements' = array(
-   'betafeatures' = array(
-   'visualeditor-enable',
-   ),
-   ),
-   );
-   }
-   }
-
/**
 * List of message keys for the various math output settings.
 *
diff --git a/Math.php b/Math.php
index 34a0ef4..991d4bb 100644
--- a/Math.php
+++ b/Math.php
@@ -179,7 +179,6 @@
 
 $wgExtensionFunctions[] = 'MathHooks::setup';
 $wgHooks['ParserFirstCallInit'][] = 'MathHooks::onParserFirstCallInit';
-$wgHooks['GetBetaFeaturePreferences'][] = 'MathHooks::onGetBetaPreferences';
 $wgHooks['GetPreferences'][] = 'MathHooks::onGetPreferences';
 $wgHooks['LoadExtensionSchemaUpdates'][] = 
'MathHooks::onLoadExtensionSchemaUpdates';
 $wgHooks['ParserTestTables'][] = 'MathHooks::onParserTestTables';
@@ -469,4 +468,4 @@
'targets' = array( 'desktop', 'mobile' ),
 ) + $moduleTemplate;
 
-$wgVisualEditorPreferenceModules['math-enable-visualeditor'] = 
'ext.math.visualEditor';
+$wgVisualEditorPluginModules[] = 'ext.math.visualEditor';
diff --git a/images/betafeatures-icon-VisualEditor-formulae-ltr.svg 
b/images/betafeatures-icon-VisualEditor-formulae-ltr.svg
deleted file mode 100644
index 72d66ae..000
--- a/images/betafeatures-icon-VisualEditor-formulae-ltr.svg
+++ /dev/null
@@ -1,184 +0,0 @@
-?xml version=1.0 encoding=UTF-8 standalone=no?
-!-- Created with Inkscape (http://www.inkscape.org/) --
-
-svg
-   xmlns:dc=http://purl.org/dc/elements/1.1/;
-   xmlns:cc=http://creativecommons.org/ns#;
-   xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#;
-   xmlns:svg=http://www.w3.org/2000/svg;
-   xmlns=http://www.w3.org/2000/svg;
-   version=1.1
-   width=264
-   height=162
-   viewBox=0 0 264 162
-   id=Layer_1
-   xml:space=preservemetadata
- id=metadata3213rdf:RDFcc:Work
- rdf:about=dc:formatimage/svg+xml/dc:formatdc:type
-   rdf:resource=http://purl.org/dc/dcmitype/StillImage; 
/dc:title/dc:title/cc:Work/rdf:RDF/metadatadefs
- id=defs3211 /g
- id=g3120-2polygon
-   points=0.5,151.749 0.5,0.5 263.5,0.5 263.5,152.249 254.5,158.954 
254.5,42.5 215.5,42.5 215.5,155.1 211.107,151.369 203.5,156.699 203.5,42.5 
48.5,42.5 48.5,153.35 38.749,161.38 24.833,151.361 13.366,161.357 
-   id=polygon3122-9
-   style=fill:#ff /g
-   id=g3124-5path
- d=m 263,1 v 150.998 l -8,5.96 V 43 42 h -1 -38 -1 v 1 111.02 l 
-3.274,-2.781 -0.589,-0.498 -0.633,0.441 -6.504,4.556 V 43 42 H 203 49 48 v 1 
110.1 l -9.257,7.66 -13.295,-9.57 -0.645,-0.463 -0.598,0.521 -10.864,9.47 L 
1,151.499 V 1 h 262 m 1,-1 H 0 V 152 L 13.391,162 24.865,152 38.756,162 
49,153.6 V 43 H 203 V 157.66 L 211.078,152 216,156.18 V 43 h 38 v 116.95 l 
10,-7.45 V 0 l 0,0 z
- id=path3126-5
- style=fill:#e5e5e5 //g/gpath
- d=M 203,157.66 V 43 H 49 v 110.6 l 2.145,-1.6 12.555,10 13.809,-10 
14.229,10 12.972,-10 12.973,10 13.811,-10 12.136,10 13.391,-10 14.229,10 
12.972,-10 12.974,10 5.804,-4.34 z
- 

[MediaWiki-commits] [Gerrit] Preload Media Viewer js/css when hovering thumbs - change (mediawiki...MultimediaViewer)

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

Change subject: Preload Media Viewer js/css when hovering thumbs
..


Preload Media Viewer js/css when hovering thumbs

Change-Id: I6f56c9d3d908f1980d2a3b29bea857d828fdaf0e
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/430
---
M resources/mmv/mmv.bootstrap.js
M tests/qunit/mmv/mmv.bootstrap.test.js
2 files changed, 46 insertions(+), 12 deletions(-)

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



diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js
index 9c40546..49ac5d8 100755
--- a/resources/mmv/mmv.bootstrap.js
+++ b/resources/mmv/mmv.bootstrap.js
@@ -37,12 +37,14 @@
// Exposed for tests
this.readinessCSSClass = 'mw-mmv-has-been-loaded';
this.readinessWaitDuration = 100;
+   this.hoverWaitDuration = 200;
 
/** @property {mw.mmv.HtmlUtils} htmlUtils - */
this.htmlUtils = new mw.mmv.HtmlUtils();
 
this.thumbsReadyDeferred = $.Deferred();
this.thumbs = [];
+
this.$thumbs = $( '.gallery .image img, a.image img, #file a 
img' );
this.processThumbs();
 
@@ -177,6 +179,21 @@
$thumbCaption = $thumbContain.closest( 
'.gallerybox' ).find( '.gallerytext' ).clone();
}
caption = this.htmlUtils.htmlToTextWithLinks( 
$thumbCaption.html() || '' );
+
+   // If this is a thumb, we preload JS/CSS when the mouse 
cursor hovers the thumb container (thumb image + caption + border)
+   $thumbContain.mouseenter( function() {
+   // There is no point preloading if clicking the 
thumb won't open Media Viewer
+   if ( mw.config.get( 'wgMediaViewerOnClick' ) 
!== true ) {
+   return;
+   }
+   bs.preloadOnHoverTimer = setTimeout( function() 
{
+   mw.loader.load( 'mmv' );
+   }, bs.hoverWaitDuration );
+   } ).mouseleave( function() {
+   if ( bs.preloadOnHoverTimer ) {
+   clearTimeout( bs.preloadOnHoverTimer );
+   }
+   } );
}
 
if ( $thumb.closest( '#file' ).length  0 ) {
@@ -205,13 +222,6 @@
title : title,
link : link,
caption : caption } );
-
-   if ( $thumbContain.length === 0 ) {
-   // This isn't a thumbnail! Just use the link.
-   $thumbContain = $link;
-   } else if ( $thumbContain.is( '.thumb' ) ) {
-   $thumbContain = $thumbContain.find( '.image' );
-   }
 
$link.add( $enlarge ).click( function ( e ) {
return bs.click( this, e, title, alwaysOpen );
diff --git a/tests/qunit/mmv/mmv.bootstrap.test.js 
b/tests/qunit/mmv/mmv.bootstrap.test.js
index d3d6211..734ad8a 100644
--- a/tests/qunit/mmv/mmv.bootstrap.test.js
+++ b/tests/qunit/mmv/mmv.bootstrap.test.js
@@ -5,6 +5,7 @@
setup: function () {
backup.onclick = mw.config.get( 'wgMediaViewerOnClick' 
);
mw.config.set( 'wgMediaViewerOnClick', true );
+   this.clock = this.sandbox.useFakeTimers();
},
 
teardown: function () {
@@ -187,7 +188,7 @@
var $div, $link, bootstrap,
viewer = { initWithThumbs : $.noop };
 
-   // Create gallery with image that has invalid name extension
+   // Create gallery with image that has valid name extension
$div = createGallery();
 
// Create a new bootstrap object to trigger the DOM scan, etc.
@@ -325,10 +326,6 @@
.text( '.' + CSSclass + ' { display: inline; }' 
);
 
bootstrap.readinessCSSClass = CSSclass;
-   // This speeds up the test execution
-   // It's not zero because if the test fails, the browser would 
get hammered indefinitely
-   bootstrap.readinessWaitDuration = 30;
-
bootstrap.isCSSReady( deferred );
 
assert.strictEqual( deferred.state(), 'pending', 'The style 
isn\'t on the page yet' );
@@ -343,6 +340,8 @@
} );
 
$style.appendTo( 'head' );
+
+   this.clock.tick( bootstrap.readinessWaitDuration );
} );
 
QUnit.test( 'Restoring article scroll position', 2, function ( assert ) 
{
@@ -372,4 +371,29 

[MediaWiki-commits] [Gerrit] Enable survey in Dutch - change (mediawiki...MultimediaViewer)

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

Change subject: Enable survey in Dutch
..


Enable survey in Dutch

Related core change: Ic5892e29c6e64d0d015e8b6037c402c42ea1c7d5

Change-Id: I5f939f98f8654c3fd90bcfae1b28fec262da8332
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/545
---
M resources/mmv/ui/mmv.ui.stripeButtons.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/mmv/ui/mmv.ui.stripeButtons.js 
b/resources/mmv/ui/mmv.ui.stripeButtons.js
index c4d460a..896402d 100644
--- a/resources/mmv/ui/mmv.ui.stripeButtons.js
+++ b/resources/mmv/ui/mmv.ui.stripeButtons.js
@@ -195,7 +195,7 @@
var baseLangcode,
baseUrl = 
'https://www.surveymonkey.com/s/media-viewer-1',
surveyTranslations = { ca: 'ca', hu: 'hu', fr: 'fr', 
pt: 'pt-br', 'pt-br': 'pt-br',
-   de: 'de', es: 'es' };
+   de: 'de', es: 'es', nl: 'nl' };
 
baseLangcode = langcode.split( /[_-]/ )[0]; // get rid of 
variants
if ( baseLangcode === 'en') {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f939f98f8654c3fd90bcfae1b28fec262da8332
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update Wikidata, more time parsing bug fixes - change (mediawiki/core)

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

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

Change subject: Update Wikidata, more time parsing bug fixes
..

Update Wikidata, more time parsing bug fixes

Change-Id: I84c2283e076f3672f7a1308114f14aea0a2f004b
---
M extensions/Wikidata
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/80/130480/1

diff --git a/extensions/Wikidata b/extensions/Wikidata
index 3e191d5..65f8133 16
--- a/extensions/Wikidata
+++ b/extensions/Wikidata
-Subproject commit 3e191d51e90d5ae164f78031508ed3b74956ae69
+Subproject commit 65f813382766a85155e490e56f88e8b18e7a896b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I84c2283e076f3672f7a1308114f14aea0a2f004b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] vector: Apply content text style via .mw-body-content instea... - change (mediawiki/core)

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

Change subject: vector: Apply content text style via .mw-body-content instead 
of #bodyContent
..


vector: Apply content text style via .mw-body-content instead of #bodyContent

Font size, line height and positioning styles related to content
rendering should be re-usable for applying in other contexts.
Not just the #bodyContent div.

The use of classes for content styling has been recommended and generally
agreed upon, specifically in the context of the RFC about scoping site CSS:
https://www.mediawiki.org/wiki/Requests_for_comment/Scoping_site_CSS

This change takes the first step toward introducing a reusable class
throughout the UI to apply content-specific styles where needed.

This also makes it possible to resolve a bug in which VisualEditor
does not receive the correct styles because it creates the edit surface
outside the #bodyContent (but within #content) and had no way to
receive the same styling.

Bug: 63985
Change-Id: I66c56c577bad064261c3e4a62a1c1b2566d53972
---
M skins/Vector.php
M skins/vector/components/common.less
2 files changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Krinkle: Looks good to me, approved
  Edokter: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/skins/Vector.php b/skins/Vector.php
index 0fad5cc..ee61272 100644
--- a/skins/Vector.php
+++ b/skins/Vector.php
@@ -177,7 +177,7 @@
$this-text( 'pageLanguage' );
?span dir=auto?php $this-html( 'title' ) 
?/span/h1
?php $this-html( 'prebodyhtml' ) ?
-   div id=bodyContent
+   div id=bodyContent class=mw-body-content
?php
if ( $this-data['isarticle'] ) {
?
diff --git a/skins/vector/components/common.less 
b/skins/vector/components/common.less
index 76d1873..f70c7a4 100644
--- a/skins/vector/components/common.less
+++ b/skins/vector/components/common.less
@@ -127,7 +127,9 @@
vertical-align: text-bottom;
 }
 
-#bodyContent {
+/* TODO: Remove #bodyContent selector (kept for backwards compatibility with 
cached html) */
+#bodyContent,
+.mw-body-content {
position: relative;
line-height: @content-line-height;
font-size: @content-font-size;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66c56c577bad064261c3e4a62a1c1b2566d53972
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com
Gerrit-Reviewer: Edokter er...@darcoury.nl
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: Trevor Parscal tpars...@wikimedia.org
Gerrit-Reviewer: Waldir wal...@email.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] vector: Apply content text style via .mw-body-content instea... - change (mediawiki/core)

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

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

Change subject: vector: Apply content text style via .mw-body-content instead 
of #bodyContent
..

vector: Apply content text style via .mw-body-content instead of #bodyContent

Font size, line height and positioning styles related to content
rendering should be re-usable for applying in other contexts.
Not just the #bodyContent div.

The use of classes for content styling has been recommended and generally
agreed upon, specifically in the context of the RFC about scoping site CSS:
https://www.mediawiki.org/wiki/Requests_for_comment/Scoping_site_CSS

This change takes the first step toward introducing a reusable class
throughout the UI to apply content-specific styles where needed.

This also makes it possible to resolve a bug in which VisualEditor
does not receive the correct styles because it creates the edit surface
outside the #bodyContent (but within #content) and had no way to
receive the same styling.

Bug: 63985
Change-Id: I66c56c577bad064261c3e4a62a1c1b2566d53972
(cherry picked from commit 9c8592fe786b399d0a321d65d681ba93abd7ce42)
---
M skins/Vector.php
M skins/vector/components/common.less
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/81/130481/1

diff --git a/skins/Vector.php b/skins/Vector.php
index a8d3477..e7a4514 100644
--- a/skins/Vector.php
+++ b/skins/Vector.php
@@ -177,7 +177,7 @@
$this-text( 'pageLanguage' );
?span dir=auto?php $this-html( 'title' ) 
?/span/h1
?php $this-html( 'prebodyhtml' ) ?
-   div id=bodyContent
+   div id=bodyContent class=mw-body-content
?php
if ( $this-data['isarticle'] ) {
?
diff --git a/skins/vector/components/common.less 
b/skins/vector/components/common.less
index 76d1873..f70c7a4 100644
--- a/skins/vector/components/common.less
+++ b/skins/vector/components/common.less
@@ -127,7 +127,9 @@
vertical-align: text-bottom;
 }
 
-#bodyContent {
+/* TODO: Remove #bodyContent selector (kept for backwards compatibility with 
cached html) */
+#bodyContent,
+.mw-body-content {
position: relative;
line-height: @content-line-height;
font-size: @content-font-size;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66c56c577bad064261c3e4a62a1c1b2566d53972
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Trevor Parscal tpars...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add percentiles to the Geo data - change (analytics/multimedia)

2014-04-29 Thread MarkTraceur (Code Review)
MarkTraceur has submitted this change and it was merged.

Change subject: Add percentiles to the Geo data
..


Add percentiles to the Geo data

Change-Id: I9c4ac62fd6c2efdfbcaa31d8931988026051ec0c
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/506
---
M perf/country-api.sql
M perf/country-image.sql
2 files changed, 36 insertions(+), 2 deletions(-)

Approvals:
  MarkTraceur: Verified; Looks good to me, approved



diff --git a/perf/country-api.sql b/perf/country-api.sql
index 81a9025..9e75f2e 100644
--- a/perf/country-api.sql
+++ b/perf/country-api.sql
@@ -1,4 +1,21 @@
-SELECT event_country as country, EXP(AVG(LOG(event_total))) as mean, 
EXP(STD(LOG(event_total))) as std, COUNT(event_total) as sample_size FROM (
+SET group_concat_max_len = 10485760;
+SELECT event_country as country,
+EXP(AVG(LOG(event_total))) as mean,
+EXP(STD(LOG(event_total))) as std,
+COUNT(event_total) as sample_size,
+CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(
+  GROUP_CONCAT(event_total ORDER BY event_total SEPARATOR ','),
+   ',', 1/100 * COUNT(*) + 1), ',', -1) AS DECIMAL) AS 1st_percentile,
+CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(
+  GROUP_CONCAT(event_total ORDER BY event_total SEPARATOR ','),
+   ',', 50/100 * COUNT(*) + 1), ',', -1) AS DECIMAL) AS 50th_percentile,
+CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(
+  GROUP_CONCAT(event_total ORDER BY event_total SEPARATOR ','),
+   ',', 90/100 * COUNT(*) + 1), ',', -1) AS DECIMAL) AS 90th_percentile,
+CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(
+  GROUP_CONCAT(event_total ORDER BY event_total SEPARATOR ','),
+   ',', 99/100 * COUNT(*) + 1), ',', -1) AS DECIMAL) AS 99th_percentile
+FROM (
 SELECT timestamp, event_total, event_country, event_type FROM 
MultimediaViewerNetworkPerformance_7393226
 UNION ALL
 SELECT timestamp, event_total, event_country, event_type FROM 
MultimediaViewerNetworkPerformance_7488625
diff --git a/perf/country-image.sql b/perf/country-image.sql
index ee1a2d9..c3e4364 100644
--- a/perf/country-image.sql
+++ b/perf/country-image.sql
@@ -1,4 +1,21 @@
-SELECT event_country as country, EXP(AVG(LOG(event_total))) as mean, 
EXP(STD(LOG(event_total))) as std, COUNT(event_total) as sample_size FROM (
+SET group_concat_max_len = 10485760;
+SELECT event_country as country,
+EXP(AVG(LOG(event_total))) as mean,
+EXP(STD(LOG(event_total))) as std,
+COUNT(event_total) as sample_size,
+CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(
+  GROUP_CONCAT(event_total ORDER BY event_total SEPARATOR ','),
+   ',', 1/100 * COUNT(*) + 1), ',', -1) AS DECIMAL) AS 1st_percentile,
+CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(
+  GROUP_CONCAT(event_total ORDER BY event_total SEPARATOR ','),
+   ',', 50/100 * COUNT(*) + 1), ',', -1) AS DECIMAL) AS 50th_percentile,
+CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(
+  GROUP_CONCAT(event_total ORDER BY event_total SEPARATOR ','),
+   ',', 90/100 * COUNT(*) + 1), ',', -1) AS DECIMAL) AS 90th_percentile,
+CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(
+  GROUP_CONCAT(event_total ORDER BY event_total SEPARATOR ','),
+   ',', 99/100 * COUNT(*) + 1), ',', -1) AS DECIMAL) AS 99th_percentile
+FROM (
 SELECT timestamp, event_total, event_country, event_type FROM 
MultimediaViewerNetworkPerformance_7393226
 UNION ALL
 SELECT timestamp, event_total, event_country, event_type FROM 
MultimediaViewerNetworkPerformance_7488625

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c4ac62fd6c2efdfbcaa31d8931988026051ec0c
Gerrit-PatchSet: 1
Gerrit-Project: analytics/multimedia
Gerrit-Branch: master
Gerrit-Owner: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org

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


[MediaWiki-commits] [Gerrit] Finish removing boolean return values from JobQueue code - change (mediawiki/core)

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

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

Change subject: Finish removing boolean return values from JobQueue code
..

Finish removing boolean return values from JobQueue code

This is a follow-up for patch
Ia706ac0122a7dd7f418e2dc2d3bd36e9a0252c25.

Conflicts:
includes/jobqueue/JobQueue.php
includes/jobqueue/JobQueueDB.php
includes/jobqueue/JobQueueGroup.php
includes/jobqueue/JobQueueRedis.php

Change-Id: I19fe58a939706d3f7594d937e0bcad6d97c52a50
(cherry picked from commit e292bc972dd198b864d92caaf2e8896091f0f893)
---
M includes/api/ApiUpload.php
M includes/jobqueue/Job.php
M includes/jobqueue/JobQueue.php
M includes/jobqueue/JobQueueDB.php
M includes/jobqueue/JobQueueFederated.php
M includes/jobqueue/JobQueueGroup.php
M includes/jobqueue/JobQueueRedis.php
7 files changed, 23 insertions(+), 41 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/130482/1

diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php
index 30f8adb..5290820 100644
--- a/includes/api/ApiUpload.php
+++ b/includes/api/ApiUpload.php
@@ -234,7 +234,7 @@
array( 'result' = 'Poll',
'stage' = 'queued', 'status' 
= Status::newGood() )
);
-   $ok = JobQueueGroup::singleton()-push( new 
AssembleUploadChunksJob(
+   JobQueueGroup::singleton()-push( new 
AssembleUploadChunksJob(
Title::makeTitle( NS_FILE, $filekey ),
array(
'filename' = 
$this-mParams['filename'],
@@ -242,13 +242,7 @@
'session' = 
$this-getContext()-exportSession()
)
) );
-   if ( $ok ) {
-   $result['result'] = 'Poll';
-   } else {
-   UploadBase::setSessionStatus( $filekey, 
false );
-   $this-dieUsage(
-   Failed to start 
AssembleUploadChunks.php, 'stashfailed' );
-   }
+   $result['result'] = 'Poll';
} else {
$status = $this-mUpload-concatenateChunks();
if ( !$status-isGood() ) {
@@ -625,7 +619,7 @@
$this-mParams['filekey'],
array( 'result' = 'Poll', 'stage' = 'queued', 
'status' = Status::newGood() )
);
-   $ok = JobQueueGroup::singleton()-push( new 
PublishStashedFileJob(
+   JobQueueGroup::singleton()-push( new 
PublishStashedFileJob(
Title::makeTitle( NS_FILE, 
$this-mParams['filename'] ),
array(
'filename' = 
$this-mParams['filename'],
@@ -636,13 +630,7 @@
'session' = 
$this-getContext()-exportSession()
)
) );
-   if ( $ok ) {
-   $result['result'] = 'Poll';
-   } else {
-   UploadBase::setSessionStatus( 
$this-mParams['filekey'], false );
-   $this-dieUsage(
-   Failed to start 
PublishStashedFile.php, 'publishfailed' );
-   }
+   $result['result'] = 'Poll';
} else {
/** @var $status Status */
$status = $this-mUpload-performUpload( 
$this-mParams['comment'],
diff --git a/includes/jobqueue/Job.php b/includes/jobqueue/Job.php
index 5fc1e06..c9324d0 100644
--- a/includes/jobqueue/Job.php
+++ b/includes/jobqueue/Job.php
@@ -92,7 +92,8 @@
 * @deprecated since 1.21
 */
public static function batchInsert( $jobs ) {
-   return JobQueueGroup::singleton()-push( $jobs );
+   JobQueueGroup::singleton()-push( $jobs );
+   return true;
}
 
/**
@@ -107,7 +108,8 @@
 * @deprecated since 1.21
 */
public static function safeBatchInsert( $jobs ) {
-   return JobQueueGroup::singleton()-push( $jobs, 
JobQueue::QOS_ATOMIC );
+   JobQueueGroup::singleton()-push( $jobs, JobQueue::QOS_ATOMIC );
+   return true;
}
 
/**
@@ -281,7 +283,8 @@
 * @deprecated since 1.21
 */
public function 

[MediaWiki-commits] [Gerrit] More performance tweaks / tokenizer cleanup - change (mediawiki...parsoid)

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

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

Change subject: More performance tweaks / tokenizer cleanup
..

More performance tweaks / tokenizer cleanup

* Remove old and unused 'new String' logic
* simplify, optimize and partially inline inline_breaks
* Remove some dead code from the tokenizer

Change-Id: Idccadc5ef891d3b622b316060ed537a18fcac772
---
M lib/mediawiki.HTML5TreeBuilder.node.js
M lib/mediawiki.tokenizer.peg.js
M lib/pegTokenizer.pegjs.txt
3 files changed, 80 insertions(+), 182 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/83/130483/1

diff --git a/lib/mediawiki.HTML5TreeBuilder.node.js 
b/lib/mediawiki.HTML5TreeBuilder.node.js
index c52d4fe..19d665c 100644
--- a/lib/mediawiki.HTML5TreeBuilder.node.js
+++ b/lib/mediawiki.HTML5TreeBuilder.node.js
@@ -141,12 +141,6 @@
|| self.lastToken.name !== 
'pre';
switch( token.constructor ) {
case String:
-   // note that we sometimes add 'dataAttrib' and 'get' 
fields to
-   // string objects, making them non-primitive.
-   // (git grep 'new String' for more details)
-   // we strip that information from the tokens here so we 
don't
-   // end up with non-primitive strings in the DOM.
-   token = token.valueOf(); // convert token to primitive 
string.
if ( token.match(/^[ \t\r\n\f]+$/)  
isNotPrecededByPre ) {
// Treat space characters specially so that the 
tree builder
// doesn't apply the foster parenting algorithm
diff --git a/lib/mediawiki.tokenizer.peg.js b/lib/mediawiki.tokenizer.peg.js
index 361556b..a8d88b6 100644
--- a/lib/mediawiki.tokenizer.peg.js
+++ b/lib/mediawiki.tokenizer.peg.js
@@ -253,27 +253,32 @@
  * handle the end marker.
  */
 PegTokenizer.prototype.inline_breaks = function (input, pos, stops ) {
+   var c = input[pos];
+   if (!/[=|!\}\{:\r\n\]]/.test(c)) {
+   return false;
+   }
+
var counters = stops.counters;
-   switch( input[pos] ) {
+   switch( c ) {
case '=':
return stops.onStack( 'equal' ) ||
( counters.h 
-   ( pos === input.length - 1 ||
- input.substr( pos + 1 )
-   // possibly more equals 
followed by spaces or comments
-   .match(/^=*(?:[ 
\t]|\!--(?:(?!--)[^])*--)*(?:[\r\n]|$)/) !== null )
-   ) || null;
+   ( pos === input.length - 1
+ // possibly more equals followed by 
spaces or comments
+ || /^=*(?:[ 
\t]|\!--(?:(?!--)[^])*--)*(?:[\r\n]|$)/
+   .test(input.substr( pos + 1 )))
+   );
case '|':
return stops.onStack('pipe') ||
//counters.template ||
counters.linkdesc || (
stops.onStack('table')  (
counters.tableCellArg || (
-   pos  input.length - 1 
 input[pos+1].match(/[}|]/) !== null
+   pos  input.length - 1
+
/[}|]/.test(input[pos+1])
)
)
-   ) ||
-   null;
+   );
case '{':
// {{!}} pipe templates..
return (
@@ -286,41 +291,36 @@

counters.tableCellArg
)
)
-   )  input.substr( pos, 5 ) === '{{!}}' 
|| null;
+   )  input.substr( pos, 5 ) === '{{!}}';
case !:
-   return stops.onStack( 'table' )  input[pos + 1] === 
! ||
-   null;
+   return stops.onStack( 'table' )  input[pos + 1] === 
!;
case }:
-   return counters.template  input[pos + 1] === } || 
null;
+   return counters.template  input[pos + 1] === };
case ::
  

[MediaWiki-commits] [Gerrit] Enable survey in Dutch - change (mediawiki...MultimediaViewer)

2014-04-29 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Enable survey in Dutch
..

Enable survey in Dutch

Related core change: Ic5892e29c6e64d0d015e8b6037c402c42ea1c7d5

Change-Id: I5f939f98f8654c3fd90bcfae1b28fec262da8332
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/545
(cherry picked from commit bbe3429f3858f70fee8b481c302a991004722667)
---
M resources/mmv/ui/mmv.ui.stripeButtons.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/84/130484/1

diff --git a/resources/mmv/ui/mmv.ui.stripeButtons.js 
b/resources/mmv/ui/mmv.ui.stripeButtons.js
index c4d460a..896402d 100644
--- a/resources/mmv/ui/mmv.ui.stripeButtons.js
+++ b/resources/mmv/ui/mmv.ui.stripeButtons.js
@@ -195,7 +195,7 @@
var baseLangcode,
baseUrl = 
'https://www.surveymonkey.com/s/media-viewer-1',
surveyTranslations = { ca: 'ca', hu: 'hu', fr: 'fr', 
pt: 'pt-br', 'pt-br': 'pt-br',
-   de: 'de', es: 'es' };
+   de: 'de', es: 'es', nl: 'nl' };
 
baseLangcode = langcode.split( /[_-]/ )[0]; // get rid of 
variants
if ( baseLangcode === 'en') {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f939f98f8654c3fd90bcfae1b28fec262da8332
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Enable survey in Dutch - change (mediawiki...MultimediaViewer)

2014-04-29 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Enable survey in Dutch
..

Enable survey in Dutch

Related core change: Ic5892e29c6e64d0d015e8b6037c402c42ea1c7d5

Change-Id: I5f939f98f8654c3fd90bcfae1b28fec262da8332
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/545
(cherry picked from commit bbe3429f3858f70fee8b481c302a991004722667)
---
M resources/mmv/ui/mmv.ui.stripeButtons.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/85/130485/1

diff --git a/resources/mmv/ui/mmv.ui.stripeButtons.js 
b/resources/mmv/ui/mmv.ui.stripeButtons.js
index c4d460a..896402d 100644
--- a/resources/mmv/ui/mmv.ui.stripeButtons.js
+++ b/resources/mmv/ui/mmv.ui.stripeButtons.js
@@ -195,7 +195,7 @@
var baseLangcode,
baseUrl = 
'https://www.surveymonkey.com/s/media-viewer-1',
surveyTranslations = { ca: 'ca', hu: 'hu', fr: 'fr', 
pt: 'pt-br', 'pt-br': 'pt-br',
-   de: 'de', es: 'es' };
+   de: 'de', es: 'es', nl: 'nl' };
 
baseLangcode = langcode.split( /[_-]/ )[0]; // get rid of 
variants
if ( baseLangcode === 'en') {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f939f98f8654c3fd90bcfae1b28fec262da8332
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf1
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Allow citation tools to be shown instead of reference tools - change (mediawiki...VisualEditor)

2014-04-29 Thread Trevor Parscal (Code Review)
Trevor Parscal has uploaded a new change for review.

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

Change subject: Allow citation tools to be shown instead of reference tools
..

Allow citation tools to be shown instead of reference tools

As opposed to with.

Change-Id: I50796945b31340e578ed3986053ace3718e99adb
---
M modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/86/130486/1

diff --git a/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
index 2e86faf..f0ae1e4 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
@@ -16,12 +16,13 @@
  * @param {Object} [config] Configuration options
  */
 ve.ui.MWCitationDialogTool = function VeUiMWCitationDialogTool( toolbar, 
config ) {
-   ve.ui.DialogTool.call( this, toolbar, config );
+   // Parent method
+   ve.ui.MWCitationDialogTool.super.call( this, toolbar, config );
 };
 
 /* Inheritance */
 
-OO.inheritClass( ve.ui.MWCitationDialogTool, ve.ui.DialogTool );
+OO.inheritClass( ve.ui.MWCitationDialogTool, ve.ui.MWReferenceDialogTool );
 
 /* Static Properties */
 
@@ -40,7 +41,7 @@
  */
 ve.ui.MWCitationDialogTool.static.isCompatibleWith = function ( model ) {
var internalItem, branches, leaves, partsList,
-   compatible = ve.ui.DialogTool.static.isCompatibleWith.call( 
this, model );
+   compatible = 
ve.ui.MWCitationDialogTool.super.static.isCompatibleWith.call( this, model );
 
if ( compatible  this.template ) {
// Check if content of the reference node contains only a 
template with the same name as

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50796945b31340e578ed3986053ace3718e99adb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update OOjs UI to v0.1.0-pre (7705a94df5) - change (VisualEditor/VisualEditor)

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

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

Change subject: Update OOjs UI to v0.1.0-pre (7705a94df5)
..

Update OOjs UI to v0.1.0-pre (7705a94df5)

New changes:
c486e35 Add info icon and alert indicator
5928259 Add a 'ready' event to the window open sequence
d2f1933 Improve info and alert icons/indicators
6d78021 Defer window 'ready' event to let rendering happen
7705a94 Add focus method to SearchWidget

Change-Id: I58ae4c8154d45b34e2dcd404a5d8c3c9bbffd32f
---
A lib/oojs-ui/images/icons/info.png
A lib/oojs-ui/images/icons/info.svg
A lib/oojs-ui/images/indicators/alert.png
A lib/oojs-ui/images/indicators/alert.svg
M lib/oojs-ui/oojs-ui.js
M lib/oojs-ui/oojs-ui.svg.css
6 files changed, 50 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/87/130487/1

diff --git a/lib/oojs-ui/images/icons/info.png 
b/lib/oojs-ui/images/icons/info.png
new file mode 100644
index 000..f43804d
--- /dev/null
+++ b/lib/oojs-ui/images/icons/info.png
Binary files differ
diff --git a/lib/oojs-ui/images/icons/info.svg 
b/lib/oojs-ui/images/icons/info.svg
new file mode 100644
index 000..8c5672a
--- /dev/null
+++ b/lib/oojs-ui/images/icons/info.svg
@@ -0,0 +1,10 @@
+?xml version=1.0 encoding=UTF-8?
+!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN 
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;
+svg version=1.1 xmlns=http://www.w3.org/2000/svg; 
xmlns:xlink=http://www.w3.org/1999/xlink; x=0px y=0px width=24 
height=24 viewBox=0, 0, 24, 24
+  g id=help opacity=0.75
+path d=M11.499,17 C8.463,17 6,14.536 6,11.5 C6,8.463 8.462,6 11.499,6 
C14.536,6 17,8.462 17,11.5 C17,14.536 14.536,17 11.499,17 z M11.501,5 C7.91,5 
5,7.91 5,11.5 C5,15.09 7.91,18 11.501,18 C15.089,18 18,15.089 18,11.5 C18,7.911 
15.089,5 11.501,5 z fill=#00/
+path d=M12,10 L12,14 L13,14 L13,15 L10,15 L10,14 L11,14 L11,11 L10,11 
L10,10 z fill=#00/
+path d=M11,8 L12,8 L12,9 L11,9 z fill=#00/
+  /g
+  defs/
+/svg
diff --git a/lib/oojs-ui/images/indicators/alert.png 
b/lib/oojs-ui/images/indicators/alert.png
new file mode 100644
index 000..8d97d1a
--- /dev/null
+++ b/lib/oojs-ui/images/indicators/alert.png
Binary files differ
diff --git a/lib/oojs-ui/images/indicators/alert.svg 
b/lib/oojs-ui/images/indicators/alert.svg
new file mode 100644
index 000..0cb76dc
--- /dev/null
+++ b/lib/oojs-ui/images/indicators/alert.svg
@@ -0,0 +1,9 @@
+?xml version=1.0 encoding=UTF-8?
+!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN 
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;
+svg version=1.1 xmlns=http://www.w3.org/2000/svg; 
xmlns:xlink=http://www.w3.org/1999/xlink; x=0px y=0px width=12 
height=12 viewBox=0, 0, 12, 12
+  g id=deprecated opacity=0.75
+path d=M5,9 L7,9 L7,11 L5,11 z fill=#00/
+path d=M7,1 L7,8 L5,8 L5,1 z fill=#00/
+  /g
+  defs/
+/svg
diff --git a/lib/oojs-ui/oojs-ui.js b/lib/oojs-ui/oojs-ui.js
index 1318ed7..e5ba6ef 100644
--- a/lib/oojs-ui/oojs-ui.js
+++ b/lib/oojs-ui/oojs-ui.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (b91660e612)
+ * OOjs UI v0.1.0-pre (7705a94df5)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: Mon Apr 28 2014 12:56:19 GMT-0700 (PDT)
+ * Date: Tue Apr 29 2014 14:06:06 GMT-0700 (PDT)
  */
 ( function ( OO ) {
 
@@ -1297,7 +1297,9 @@
  * Do not override this method. See #setup for a way to make changes each time 
the window opens.
  *
  * @param {Object} [data] Window opening data
+ * @fires opening
  * @fires open
+ * @fires ready
  * @chainable
  */
 OO.ui.Window.prototype.open = function ( data ) {
@@ -1308,13 +1310,16 @@
this.visible = true;
this.emit( 'opening', data );
this.setup( data );
-   // Focus the content div (which has a tabIndex) to 
inactivate
-   // (but not clear) selections in the parent frame.
-   // Must happen after setup runs (otherwise focusing it 
doesn't work)
-   // but before 'open' is emitted (so subclasses can give 
focus to something else)
-   this.frame.$content.focus();
this.emit( 'open', data );
-   this.opening = false;
+   setTimeout( OO.ui.bind( function () {
+   // Focus the content div (which has a tabIndex) 
to inactivate
+   // (but not clear) selections in the parent 
frame.
+   // Must happen after 'open' is emitted (to 
ensure it is visible)
+   // but before 'ready' is emitted (so subclasses 
can give focus to something else)
+   this.frame.$content.focus();
+ 

[MediaWiki-commits] [Gerrit] Sync up with Parsoid parserTests. - change (mediawiki/core)

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

Change subject: Sync up with Parsoid parserTests.
..


Sync up with Parsoid parserTests.

This now aligns with Parsoid commit c257ad0880a19df3f10d9942896da9a40f57b17c

Change-Id: I64786aeb0ed264b8f8638106be114a8a2a1cd682
---
M tests/parser/parserTests.txt
1 file changed, 416 insertions(+), 66 deletions(-)

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



diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index c4bd12d..569c165 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -3042,6 +3042,38 @@
 /p
 !! end
 
+!! test
+Definition Lists: Hacky use to indent tables, with comments (bug 63979)
+!! wikitext
+!-- foo --
+::{|
+|foo
+|bar
+|}!-- bar --
+this text
+should be left alone
+!! html/parsoid
+!-- foo --
+dldddlddtabletr
+tdfoo/td
+tdbar/td
+/tr/table!-- bar --/dd/dl/dd/dl
+pthis text
+should be left alone/p
+!! end
+
+!! test
+Definition Lists: Hacky use to indent tables, with comment before table
+!! wikitext
+::!-- foo --{|
+|foo
+|}
+!! html/parsoid
+dldddldd!-- foo --tabletr
+tdfoo/td
+/tr/table/dd/dl/dd/dl
+!! end
+
 # Bug 52473
 !! test
 Definition Lists: Hacky use to indent tables (WS-insensitive)
@@ -3645,17 +3677,22 @@
 /p
 !! end
 
+# parsoid doesn't explicitly mark autonumbered links, see bug 53505
 !! test
 External links: numbered
 !! wikitext
 Numbered: [http://example.com]
 Numbered: [http://example.net]
 Numbered: [http://example.com]
-!! html
+!! html/php
 pNumbered: a rel=nofollow class=external autonumber 
href=http://example.com;[1]/a
 Numbered: a rel=nofollow class=external autonumber 
href=http://example.net;[2]/a
 Numbered: a rel=nofollow class=external autonumber 
href=http://example.com;[3]/a
 /p
+!! html/parsoid
+pNumbered: a rel=mw:ExtLink href=http://example.com;/a
+Numbered: a rel=mw:ExtLink href=http://example.net;/a
+Numbered: a rel=mw:ExtLink href=http://example.com;/a/p
 !!end
 
 !! test
@@ -3685,28 +3722,50 @@
 /p
 !! end
 
+# parsoid doesn't explicitly mark autonumbered links, see bug 53505
 !! test
-External links: dollar sign in URL (named)
+External links: dollar sign in URL (autonumber)
 !! wikitext
 [http://example.com/1$2345]
-!! html
+!! html/php
 pa rel=nofollow class=external autonumber 
href=http://example.com/1$2345;[1]/a
 /p
+!! html/parsoid
+pa rel=mw:ExtLink href=http://example.com/1$2345;/a/p
 !!end
 
 !! test
 External links: open square bracket forbidden in URL (bug 4377)
+!! options
+parsoid=wt2html,wt2wt,html2html
 !! wikitext
 http://example.com/1[2345
-!! html
+!! html/php
 pa rel=nofollow class=external free 
href=http://example.com/1;http://example.com/1/a[2345
 /p
+!! html/parsoid
+pa rel=mw:ExtLink 
href=http://example.com/1;http://example.com/1/a[2345/p
 !! end
 
 !! test
 External links: open square bracket forbidden in URL (named) (bug 4377)
+!! options
+parsoid=wt2html,html2html
 !! wikitext
 [http://example.com/1[2345]
+!! html/php
+pa rel=nofollow class=external text 
href=http://example.com/1;[2345/a
+/p
+!! html/parsoid
+pa rel=mw:ExtLink href=http://example.com/1;[2345/a/p
+!!end
+
+# parsoid adds a space before the link name
+!! test
+External links: open square bracket forbidden in URL (named) (bug 4377)
+Parsoid variant.
+!! wikitext
+[http://example.com/1 [2345]
 !! html
 pa rel=nofollow class=external text 
href=http://example.com/1;[2345/a
 /p
@@ -3750,13 +3809,16 @@
 /p
 !! end
 
+# parsoid doesn't explicitly mark autonumbered links, see bug 53505
 !! test
 External links: protocol-relative URL in brackets without text
 !! wikitext
 [//example.com]
-!! html
+!! html/php
 pa rel=nofollow class=external autonumber href=//example.com[1]/a
 /p
+!! html/parsoid
+pa rel=mw:ExtLink href=//example.com/a/p
 !! end
 
 !! test
@@ -3882,54 +3944,95 @@
 External links: encoded ampersand
 !! wikitext
 Old amp; use: http://xamp;y
-!! html
+!! html/php
 pOld amp; use: a rel=nofollow class=external free 
href=http://xamp;y;http://xamp;y/a
 /p
+!! html/parsoid
+pOld span typeof=mw:Entityamp;/span use: a rel=mw:ExtLink 
href=http://xamp;y;http://xamp;y/a/p
 !! end
 
 !! test
 External links: encoded equals (bug 6102)
 !! wikitext
 http://example.com/?foo#61;bar
-!! html
+!! html/php
 pa rel=nofollow class=external free 
href=http://example.com/?foo=bar;http://example.com/?foo=bar/a
 /p
+!! html/parsoid
+pa rel=mw:ExtLink 
href=http://example.com/?foo=bar;http://example.com/?foo=bar/a/p
 !! end
+
+##
+## Note that parsoid doesn't explicit mark autonumbered links, nor
+## does it number them.  As discussed in bug 53505, we can identify
+## autonumbered links via CSS.
+##
 
 !! test
 External links: [raw ampersand]
 !! wikitext
 Old amp; use: [http://xy]
-!! html
+!! html/php
 pOld amp; use: a rel=nofollow class=external autonumber 
href=http://xamp;y;[1]/a
 /p
+!! html/parsoid
+pOld span typeof=mw:Entityamp;/span use: a rel=mw:ExtLink 

[MediaWiki-commits] [Gerrit] Update OOjs UI to v0.1.0-pre (7705a94df5) - change (mediawiki/core)

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

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

Change subject: Update OOjs UI to v0.1.0-pre (7705a94df5)
..

Update OOjs UI to v0.1.0-pre (7705a94df5)

New changes:
c486e35 Add info icon and alert indicator
5928259 Add a 'ready' event to the window open sequence
d2f1933 Improve info and alert icons/indicators
6d78021 Defer window 'ready' event to let rendering happen
7705a94 Add focus method to SearchWidget

Change-Id: I0636dcb373f1395bd5468d960bb8177d4e825955
---
A resources/lib/oojs-ui/images/icons/info.png
A resources/lib/oojs-ui/images/icons/info.svg
A resources/lib/oojs-ui/images/indicators/alert.png
A resources/lib/oojs-ui/images/indicators/alert.svg
M resources/lib/oojs-ui/oojs-ui.js
M resources/lib/oojs-ui/oojs-ui.svg.css
6 files changed, 50 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/88/130488/1

diff --git a/resources/lib/oojs-ui/images/icons/info.png 
b/resources/lib/oojs-ui/images/icons/info.png
new file mode 100644
index 000..f43804d
--- /dev/null
+++ b/resources/lib/oojs-ui/images/icons/info.png
Binary files differ
diff --git a/resources/lib/oojs-ui/images/icons/info.svg 
b/resources/lib/oojs-ui/images/icons/info.svg
new file mode 100644
index 000..8c5672a
--- /dev/null
+++ b/resources/lib/oojs-ui/images/icons/info.svg
@@ -0,0 +1,10 @@
+?xml version=1.0 encoding=UTF-8?
+!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN 
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;
+svg version=1.1 xmlns=http://www.w3.org/2000/svg; 
xmlns:xlink=http://www.w3.org/1999/xlink; x=0px y=0px width=24 
height=24 viewBox=0, 0, 24, 24
+  g id=help opacity=0.75
+path d=M11.499,17 C8.463,17 6,14.536 6,11.5 C6,8.463 8.462,6 11.499,6 
C14.536,6 17,8.462 17,11.5 C17,14.536 14.536,17 11.499,17 z M11.501,5 C7.91,5 
5,7.91 5,11.5 C5,15.09 7.91,18 11.501,18 C15.089,18 18,15.089 18,11.5 C18,7.911 
15.089,5 11.501,5 z fill=#00/
+path d=M12,10 L12,14 L13,14 L13,15 L10,15 L10,14 L11,14 L11,11 L10,11 
L10,10 z fill=#00/
+path d=M11,8 L12,8 L12,9 L11,9 z fill=#00/
+  /g
+  defs/
+/svg
diff --git a/resources/lib/oojs-ui/images/indicators/alert.png 
b/resources/lib/oojs-ui/images/indicators/alert.png
new file mode 100644
index 000..8d97d1a
--- /dev/null
+++ b/resources/lib/oojs-ui/images/indicators/alert.png
Binary files differ
diff --git a/resources/lib/oojs-ui/images/indicators/alert.svg 
b/resources/lib/oojs-ui/images/indicators/alert.svg
new file mode 100644
index 000..0cb76dc
--- /dev/null
+++ b/resources/lib/oojs-ui/images/indicators/alert.svg
@@ -0,0 +1,9 @@
+?xml version=1.0 encoding=UTF-8?
+!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN 
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;
+svg version=1.1 xmlns=http://www.w3.org/2000/svg; 
xmlns:xlink=http://www.w3.org/1999/xlink; x=0px y=0px width=12 
height=12 viewBox=0, 0, 12, 12
+  g id=deprecated opacity=0.75
+path d=M5,9 L7,9 L7,11 L5,11 z fill=#00/
+path d=M7,1 L7,8 L5,8 L5,1 z fill=#00/
+  /g
+  defs/
+/svg
diff --git a/resources/lib/oojs-ui/oojs-ui.js b/resources/lib/oojs-ui/oojs-ui.js
index 60476d5..150b11a 100644
--- a/resources/lib/oojs-ui/oojs-ui.js
+++ b/resources/lib/oojs-ui/oojs-ui.js
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.1.0-pre (b91660e612)
+ * OOjs UI v0.1.0-pre (7705a94df5)
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2014 OOjs Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: Mon Apr 28 2014 12:57:47 GMT-0700 (PDT)
+ * Date: Tue Apr 29 2014 14:07:10 GMT-0700 (PDT)
  */
 ( function ( OO ) {
 
@@ -1297,7 +1297,9 @@
  * Do not override this method. See #setup for a way to make changes each time 
the window opens.
  *
  * @param {Object} [data] Window opening data
+ * @fires opening
  * @fires open
+ * @fires ready
  * @chainable
  */
 OO.ui.Window.prototype.open = function ( data ) {
@@ -1308,13 +1310,16 @@
this.visible = true;
this.emit( 'opening', data );
this.setup( data );
-   // Focus the content div (which has a tabIndex) to 
inactivate
-   // (but not clear) selections in the parent frame.
-   // Must happen after setup runs (otherwise focusing it 
doesn't work)
-   // but before 'open' is emitted (so subclasses can give 
focus to something else)
-   this.frame.$content.focus();
this.emit( 'open', data );
-   this.opening = false;
+   setTimeout( OO.ui.bind( function () {
+   // Focus the content div (which has a tabIndex) 
to inactivate
+   // (but not clear) selections in the parent 
frame.
+   // Must happen after 'open' is emitted (to 

[MediaWiki-commits] [Gerrit] Fix remoteExtPath to Parsoid module - change (mediawiki...Parsoid)

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

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

Change subject: Fix remoteExtPath to Parsoid module
..

Fix remoteExtPath to Parsoid module

The remoteExtPath should be 'Parsoid/php/modules'.

Bug: 51245
Change-Id: I411b97050fef7dc7d934b35e8ed9065226b30747
---
M php/Parsoid.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/89/130489/1

diff --git a/php/Parsoid.php b/php/Parsoid.php
index 6a02727..c087dcc 100644
--- a/php/Parsoid.php
+++ b/php/Parsoid.php
@@ -60,7 +60,7 @@
$wgResourceModules += array(
'ext.parsoid.styles' = array(
'localBasePath' = __DIR__ . '/modules',
-   'remoteExtPath' = 'Parsoid/modules',
+   'remoteExtPath' = 'Parsoid/php/modules',
'styles' = 'parsoid.styles.css',
'targets' = array( 'desktop', 'mobile' ),
),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I411b97050fef7dc7d934b35e8ed9065226b30747
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Spage sp...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Allow citation tools to be shown instead of reference tools - change (mediawiki...VisualEditor)

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

Change subject: Allow citation tools to be shown instead of reference tools
..


Allow citation tools to be shown instead of reference tools

As opposed to with.

Change-Id: I50796945b31340e578ed3986053ace3718e99adb
---
M modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
index 2e86faf..f0ae1e4 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWCitationDialogTool.js
@@ -16,12 +16,13 @@
  * @param {Object} [config] Configuration options
  */
 ve.ui.MWCitationDialogTool = function VeUiMWCitationDialogTool( toolbar, 
config ) {
-   ve.ui.DialogTool.call( this, toolbar, config );
+   // Parent method
+   ve.ui.MWCitationDialogTool.super.call( this, toolbar, config );
 };
 
 /* Inheritance */
 
-OO.inheritClass( ve.ui.MWCitationDialogTool, ve.ui.DialogTool );
+OO.inheritClass( ve.ui.MWCitationDialogTool, ve.ui.MWReferenceDialogTool );
 
 /* Static Properties */
 
@@ -40,7 +41,7 @@
  */
 ve.ui.MWCitationDialogTool.static.isCompatibleWith = function ( model ) {
var internalItem, branches, leaves, partsList,
-   compatible = ve.ui.DialogTool.static.isCompatibleWith.call( 
this, model );
+   compatible = 
ve.ui.MWCitationDialogTool.super.static.isCompatibleWith.call( this, model );
 
if ( compatible  this.template ) {
// Check if content of the reference node contains only a 
template with the same name as

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I50796945b31340e578ed3986053ace3718e99adb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 3cea30d..c2a2e32 - change (mediawiki/extensions)

2014-04-29 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 3cea30d..c2a2e32
..

Syncronize VisualEditor: 3cea30d..c2a2e32

Change-Id: Ifb9167b3f54e7c9acbe1dbb1cb856e1f0fca7c03
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/90/130490/1

diff --git a/VisualEditor b/VisualEditor
index 3cea30d..c2a2e32 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 3cea30d59840fbb8f526cbe15a729330b4295315
+Subproject commit c2a2e32ecb8a07121619187c221626a0d36babf2

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb9167b3f54e7c9acbe1dbb1cb856e1f0fca7c03
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 3cea30d..c2a2e32 - change (mediawiki/extensions)

2014-04-29 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 3cea30d..c2a2e32
..


Syncronize VisualEditor: 3cea30d..c2a2e32

Change-Id: Ifb9167b3f54e7c9acbe1dbb1cb856e1f0fca7c03
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 3cea30d..c2a2e32 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 3cea30d59840fbb8f526cbe15a729330b4295315
+Subproject commit c2a2e32ecb8a07121619187c221626a0d36babf2

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb9167b3f54e7c9acbe1dbb1cb856e1f0fca7c03
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org
Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Adds new performance metrics - change (mediawiki...MultimediaViewer)

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

Change subject: Adds new performance metrics
..


Adds new performance metrics

- duration between early click and replayed click
- duration between replayed/post-replay click and first image display
- duration between replayed/post-replay click and first metadata display

Change-Id: Ia308db7580fd89538b9a9c8b0fea89fa2a4c77d2
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/515
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/508
---
M MultimediaViewer.php
M MultimediaViewerHooks.php
M docs/categories.json
A resources/mmv/mmv.DurationLogger.js
M resources/mmv/mmv.bootstrap.js
M resources/mmv/mmv.head.js
M resources/mmv/mmv.js
A tests/qunit/mmv/mmv.DurationLogger.test.js
8 files changed, 209 insertions(+), 0 deletions(-)

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



diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index f770db0..171e18b 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -730,6 +730,7 @@
'mmv.lightboxinterface',
'mmv.provider',
'mmv.routing',
+   'mmv.DurationLogger',
'jquery.fullscreen',
'jquery.hidpi',
'jquery.scrollTo',
@@ -760,6 +761,7 @@
'mediawiki.Title',
'mmv.logger',
'mmv.HtmlUtils',
+   'mmv.DurationLogger',
'jquery.scrollTo',
),
 
@@ -779,6 +781,16 @@
),
),
 
+   'mmv.DurationLogger' = $wgMediaViewerResourceTemplate + array(
+   'scripts' = array(
+   'mmv/mmv.DurationLogger.js',
+   ),
+
+   'dependencies' = array(
+   'mmv.base'
+   )
+   ),
+
'mmv.head' = $wgMediaViewerResourceTemplate + array(
'scripts' = array(
'mmv/mmv.head.js',
@@ -786,6 +798,7 @@
 
'dependencies' = array(
'mmv.base',
+   'mmv.DurationLogger'
),
 
'position' = 'top',
@@ -820,11 +833,20 @@
'revision' = 7917896,
);
 
+   $wgResourceModules['schema.MultimediaViewerDuration'] = array(
+   'class' = 'ResourceLoaderSchemaModule',
+   'schema' = 'MultimediaViewerDuration',
+   'revision' = 8318615,
+   );
+
$wgResourceModules['mmv.logger']['dependencies'][] = 
'ext.eventLogging';
$wgResourceModules['mmv.logger']['dependencies'][] = 
'schema.MediaViewer';
 
$wgResourceModules['mmv.performance']['dependencies'][] = 
'ext.eventLogging';
$wgResourceModules['mmv.performance']['dependencies'][] = 
'schema.MultimediaViewerNetworkPerformance';
+
+   $wgResourceModules['mmv.DurationLogger']['dependencies'][] = 
'ext.eventLogging';
+   $wgResourceModules['mmv.DurationLogger']['dependencies'][] = 
'schema.MultimediaViewerDuration';
}
 };
 
diff --git a/MultimediaViewerHooks.php b/MultimediaViewerHooks.php
index ba59876..40aded1 100644
--- a/MultimediaViewerHooks.php
+++ b/MultimediaViewerHooks.php
@@ -181,6 +181,7 @@
'scripts' = array(
'tests/qunit/mmv/mmv.bootstrap.test.js',
'tests/qunit/mmv/mmv.test.js',
+   'tests/qunit/mmv/mmv.DurationLogger.test.js',
'tests/qunit/mmv/mmv.lightboxinterface.test.js',
'tests/qunit/mmv/mmv.lightboximage.test.js',

'tests/qunit/mmv/mmv.ThumbnailWidthCalculator.test.js',
diff --git a/docs/categories.json b/docs/categories.json
index eeecc25..5d2aa3d 100644
--- a/docs/categories.json
+++ b/docs/categories.json
@@ -6,6 +6,7 @@
name: Base,
classes: [
mw.mmv.Api,
+   mw.mmv.DurationLogger,
mw.mmv.EmbedFileFormatter,
mw.mmv.HtmlUtils,
mw.mmv.LightboxImage,
diff --git a/resources/mmv/mmv.DurationLogger.js 
b/resources/mmv/mmv.DurationLogger.js
new file mode 100644
index 000..859405b
--- /dev/null
+++ b/resources/mmv/mmv.DurationLogger.js
@@ -0,0 +1,87 @@
+/*
+ * This file is part of the MediaWiki extension MultimediaViewer.
+ *
+ * MultimediaViewer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 

[MediaWiki-commits] [Gerrit] Ensure click playback happens at the right time - change (mediawiki...MultimediaViewer)

2014-04-29 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Ensure click playback happens at the right time
..

Ensure click playback happens at the right time

The code to replay clicks and clean up the handler was called after
processing each thumbnail, instead of just once at the end.
This might have caused many subtle issues such as clicks on any
but the first image not replaying correctly; more problematically,
of there were no MediaViewer-compatible thumbs, the handler was
never cleaned up and the clicks were never replayed.

Besides fixing that, this commit also adds a try..finally wrapper
so that the click replaying is not broken even if there is an error
in the thumb processing code. This might or might not be a good
idea. The internets say that try..finally without a catch causes
errors in IE8, but only if it is not wrapped in another try..catch,
so we are probably fine. (Adding a catch which just rethrows the
error would be an alternative, but it messes up stack traces.)

Change-Id: I2f645762103274c92c15a0d4b595d18d93b08415
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/497
Bug: 64345
(cherry picked from commit 3be5195ed2c365a4d78c128351c5afe5079cb76b)
---
M resources/mmv/mmv.bootstrap.js
1 file changed, 12 insertions(+), 8 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/91/130491/1

diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js
index 23f0c02..c0c9035 100755
--- a/resources/mmv/mmv.bootstrap.js
+++ b/resources/mmv/mmv.bootstrap.js
@@ -125,9 +125,18 @@
MMVB.processThumbs = function () {
var bs = this;
 
-   this.$thumbs.each( function ( i, thumb ) {
-   bs.processThumb( thumb );
-   } );
+   // if this breaks in IE8, see 
https://github.com/ebryn/backburner.js/pull/50
+   // but it probably won't since there is a catch further up the 
chain
+   try {
+   this.$thumbs.each( function ( i, thumb ) {
+   bs.processThumb( thumb );
+   } );
+   } finally {
+   this.thumbsReadyDeferred.resolve();
+   // now that we have set up our real click handler we 
can we can remove the temporary
+   // handler added in mmv.head.js which just replays 
clicks to the real handler
+   $( document ).off( 'click.mmv-head' );
+   }
};
 
/**
@@ -207,11 +216,6 @@
$link.add( $enlarge ).click( function ( e ) {
return bs.click( this, e, title, alwaysOpen );
} );
-   // now that we have set up our real click handler we can we can 
remove the temporary
-   // handler added in mmv.head.js which just replays clicks to 
the real handler
-   $( document ).off( 'click.mmv-head' );
-
-   this.thumbsReadyDeferred.resolve();
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f645762103274c92c15a0d4b595d18d93b08415
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Ensure click playback happens at the right time - change (mediawiki...MultimediaViewer)

2014-04-29 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Ensure click playback happens at the right time
..

Ensure click playback happens at the right time

The code to replay clicks and clean up the handler was called after
processing each thumbnail, instead of just once at the end.
This might have caused many subtle issues such as clicks on any
but the first image not replaying correctly; more problematically,
of there were no MediaViewer-compatible thumbs, the handler was
never cleaned up and the clicks were never replayed.

Besides fixing that, this commit also adds a try..finally wrapper
so that the click replaying is not broken even if there is an error
in the thumb processing code. This might or might not be a good
idea. The internets say that try..finally without a catch causes
errors in IE8, but only if it is not wrapped in another try..catch,
so we are probably fine. (Adding a catch which just rethrows the
error would be an alternative, but it messes up stack traces.)

Change-Id: I2f645762103274c92c15a0d4b595d18d93b08415
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/497
Bug: 64345
(cherry picked from commit 3be5195ed2c365a4d78c128351c5afe5079cb76b)
---
M resources/mmv/mmv.bootstrap.js
1 file changed, 12 insertions(+), 8 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/92/130492/1

diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js
index 42eb17f..524a566 100755
--- a/resources/mmv/mmv.bootstrap.js
+++ b/resources/mmv/mmv.bootstrap.js
@@ -120,9 +120,18 @@
MMVB.processThumbs = function () {
var bs = this;
 
-   this.$thumbs.each( function ( i, thumb ) {
-   bs.processThumb( thumb );
-   } );
+   // if this breaks in IE8, see 
https://github.com/ebryn/backburner.js/pull/50
+   // but it probably won't since there is a catch further up the 
chain
+   try {
+   this.$thumbs.each( function ( i, thumb ) {
+   bs.processThumb( thumb );
+   } );
+   } finally {
+   this.thumbsReadyDeferred.resolve();
+   // now that we have set up our real click handler we 
can we can remove the temporary
+   // handler added in mmv.head.js which just replays 
clicks to the real handler
+   $( document ).off( 'click.mmv-head' );
+   }
};
 
/**
@@ -199,11 +208,6 @@
$link.add( $enlarge ).click( function ( e ) {
return bs.click( this, e, title, alwaysOpen );
} );
-   // now that we have set up our real click handler we can we can 
remove the temporary
-   // handler added in mmv.head.js which just replays clicks to 
the real handler
-   $( document ).off( 'click.mmv-head' );
-
-   this.thumbsReadyDeferred.resolve();
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f645762103274c92c15a0d4b595d18d93b08415
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf1
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Don't require several modules on each parse call - change (mediawiki...parsoid)

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

Change subject: Don't require several modules on each parse call
..


Don't require several modules on each parse call

Change-Id: I19ee11853e96eafc4b0ea25112570915090de6be
---
M lib/mediawiki.tokenizer.peg.js
M lib/pegTokenizer.pegjs.txt
2 files changed, 41 insertions(+), 12 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  Cscott: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/lib/mediawiki.tokenizer.peg.js b/lib/mediawiki.tokenizer.peg.js
index 1c47799..361556b 100644
--- a/lib/mediawiki.tokenizer.peg.js
+++ b/lib/mediawiki.tokenizer.peg.js
@@ -16,12 +16,28 @@
events = require('events'),
util = require('util');
 
+/**
+ * Includes passed to the tokenizer, so that it does not need to require those
+ * on each call. They are available as pegArgs.pegIncludes, and are unpacked
+ * in the head of pegTokenizer.pegjs.txt.
+ */
+var pegIncludes = {
+   Util: require('./mediawiki.Util.js').Util,
+   defines: require('./mediawiki.parser.defines.js'),
+   // defined below to satisfy JSHint
+   PegTokenizer: null
+};
+
+
+
 function PegTokenizer( env, options ) {
events.EventEmitter.call(this);
this.env = env;
this.options = options || {};
this.offsets = {};
 }
+
+pegIncludes.PegTokenizer = PegTokenizer;
 
 // Inherit from EventEmitter
 util.inherits(PegTokenizer, events.EventEmitter);
@@ -115,7 +131,13 @@
 
// Kick it off!
var srcOffset = this.offsets.startOffset || 0;
-   var args = { cb: chunkCB, pegTokenizer: this, srcOffset: srcOffset, 
env: this.env };
+   var args = {
+   cb: chunkCB,
+   pegTokenizer: this,
+   srcOffset: srcOffset,
+   env: this.env,
+   pegIncludes: pegIncludes
+   };
if (fullParse) {
if ( ! this.env.conf.parsoid.debug ) {
try {
@@ -135,7 +157,13 @@
 PegTokenizer.prototype.tokenizeAsync = function( text, srcOffset, cb ) {
var ret,
pegTokenizer = this,
-   args = { cb: cb, pegTokenizer: this, srcOffset: srcOffset, env: 
this.env };
+   args = {
+   cb: cb,
+   pegTokenizer: this,
+   srcOffset: srcOffset,
+   env: this.env,
+   pegIncludes: pegIncludes
+   };
 
if ( ! this.env.conf.parsoid.debug ) {
try {
@@ -183,7 +211,8 @@
cb: function(r) { toks = toks.concat(r); },
pegTokenizer: this,
srcOffset: this.offsets.startOffset || 0,
-   env: this.env
+   env: this.env,
+   pegIncludes: pegIncludes
};
}
var retToks = this.tokenizer.tokenize(text, production, args);
@@ -205,7 +234,7 @@
  * Tokenize a URL
  */
 PegTokenizer.prototype.tokenizeURL = function( text ) {
-   var args = { pegTokenizer: this, env: this.env };
+   var args = { pegTokenizer: this, env: this.env, pegIncludes: 
pegIncludes };
return this.tokenize(text, url, args);
 };
 
@@ -213,7 +242,7 @@
  * Tokenize table cell attributes
  */
 PegTokenizer.prototype.tokenizeTableCellAttributes = function( text ) {
-   var args = { pegTokenizer: this, env: this.env };
+   var args = { pegTokenizer: this, env: this.env, pegIncludes: 
pegIncludes };
return this.tokenize(text, single_cell_table_args, args);
 };
 
diff --git a/lib/pegTokenizer.pegjs.txt b/lib/pegTokenizer.pegjs.txt
index 74b6998..6598c02 100644
--- a/lib/pegTokenizer.pegjs.txt
+++ b/lib/pegTokenizer.pegjs.txt
@@ -33,13 +33,13 @@
 //return es;
 //};
 
-require('./core-upgrade');
-var Util = require('./mediawiki.Util.js').Util;
-var PegTokenizer = require('./mediawiki.tokenizer.peg.js').PegTokenizer;
+var pegIncludes = pegArgs.pegIncludes,
+Util = pegIncludes.Util,
+PegTokenizer = pegIncludes.PegTokenizer,
+defines = pegIncludes.defines;
 
-// import defines and define some constructor shortcuts
-var defines = require('./mediawiki.parser.defines.js'),
-KV = defines.KV,
+// define some constructor shortcuts
+var KV = defines.KV,
 TagTk = defines.TagTk,
 SelfclosingTagTk = defines.SelfclosingTagTk,
 EndTagTk = defines.EndTagTk,
@@ -399,7 +399,7 @@
  * current expression can return an empty list (true).
  */
 var emitChunk = function (tokens) {
-var env = pegArgs.pegTokenizer.env;
+var env = pegArgs.env;
 // shift tsr of all tokens by offset
 Util.shiftTokenTSR(tokens, 

[MediaWiki-commits] [Gerrit] Handle window.localStorage === null case correctly. - change (mediawiki...MultimediaViewer)

2014-04-29 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Handle window.localStorage === null case correctly.
..

Handle window.localStorage === null case correctly.

Change-Id: I49ddf45093daee4988fb7f3b481fb35bfaceb152
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/521
Bug: 64525
(cherry picked from commit a56759d8fe5cfef7a06e115a2cb9d7e8bc403905)
---
M resources/mmv/ui/mmv.ui.metadataPanel.js
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/93/130493/1

diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js 
b/resources/mmv/ui/mmv.ui.metadataPanel.js
index 47c3b2f..f1001a3 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanel.js
+++ b/resources/mmv/ui/mmv.ui.metadataPanel.js
@@ -37,8 +37,7 @@
 * @property {boolean}
 * @private
 */
-   this.hasAnimatedMetadata = window.localStorage === undefined ||
-   localStorage.getItem( 'mmv.hasOpenedMetadata' );
+   this.hasAnimatedMetadata = !window.localStorage || 
localStorage.getItem( 'mmv.hasOpenedMetadata' );
 
/** @property {mw.mmv.HtmlUtils} htmlUtils - */
this.htmlUtils = new mw.mmv.HtmlUtils();
@@ -829,7 +828,7 @@
if (
!this.savedHasOpenedMetadata 
scrolled 
-   window.localStorage !== undefined
+   window.localStorage
) {
localStorage.setItem( 'mmv.hasOpenedMetadata', true );
this.savedHasOpenedMetadata = true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49ddf45093daee4988fb7f3b481fb35bfaceb152
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Inline isEOF / isSOF - change (mediawiki...parsoid)

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

Change subject: Inline isEOF / isSOF
..


Inline isEOF / isSOF

We generally use the production, so directly inline the code to avoid
unnecessary indirections.

Change-Id: I9d080a5d27a07de88bd65152f49963abec9f8c74
---
M lib/pegTokenizer.pegjs.txt
1 file changed, 4 insertions(+), 12 deletions(-)

Approvals:
  Arlolra: Looks good to me, approved
  Subramanya Sastry: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/pegTokenizer.pegjs.txt b/lib/pegTokenizer.pegjs.txt
index 6598c02..a399e87 100644
--- a/lib/pegTokenizer.pegjs.txt
+++ b/lib/pegTokenizer.pegjs.txt
@@ -304,16 +304,6 @@
 // cache the input length
 var inputLength = input.length;
 
-// pseudo-production that matches at start of input
-var isSOF = function (pos) {
-return pos === 0;
-};
-
-// pseudo-production that matches at end of input
-var isEOF = function (pos) {
-return pos === inputLength;
-};
-
 // Current extension/include tag being parsed.
 var currExtTag = null;
 
@@ -2455,9 +2445,11 @@
   return [inclTag].concat(inclContentToks);
   }
 
-sof =  { return isSOF(pos); } { return true; }
+// Start of file
+sof =  { return pos === 0; } { return true; }
 
-eof =  { return isEOF(pos); } { return true; }
+// End of file
+eof =  { return pos === input.length; } { return true; }
 
 newline = '\n' / '\r\n'
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d080a5d27a07de88bd65152f49963abec9f8c74
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Arlolra abrea...@wikimedia.org
Gerrit-Reviewer: Cscott canan...@wikimedia.org
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Marcoil marc...@wikimedia.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Handle window.localStorage === null case correctly. - change (mediawiki...MultimediaViewer)

2014-04-29 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Handle window.localStorage === null case correctly.
..

Handle window.localStorage === null case correctly.

Change-Id: I49ddf45093daee4988fb7f3b481fb35bfaceb152
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/521
Bug: 64525
(cherry picked from commit a56759d8fe5cfef7a06e115a2cb9d7e8bc403905)
---
M resources/mmv/ui/mmv.ui.metadataPanel.js
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/94/130494/1

diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js 
b/resources/mmv/ui/mmv.ui.metadataPanel.js
index 26782a7..210ecaa 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanel.js
+++ b/resources/mmv/ui/mmv.ui.metadataPanel.js
@@ -37,8 +37,7 @@
 * @property {boolean}
 * @private
 */
-   this.hasAnimatedMetadata = window.localStorage === undefined ||
-   localStorage.getItem( 'mmv.hasOpenedMetadata' );
+   this.hasAnimatedMetadata = !window.localStorage || 
localStorage.getItem( 'mmv.hasOpenedMetadata' );
 
/** @property {mw.mmv.HtmlUtils} htmlUtils - */
this.htmlUtils = new mw.mmv.HtmlUtils();
@@ -869,7 +868,7 @@
if (
!this.savedHasOpenedMetadata 
scrolled 
-   window.localStorage !== undefined
+   window.localStorage
) {
localStorage.setItem( 'mmv.hasOpenedMetadata', true );
this.savedHasOpenedMetadata = true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49ddf45093daee4988fb7f3b481fb35bfaceb152
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf1
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add post summary workflowid to loadMetadataBatch() - change (mediawiki...Flow)

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

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

Change subject: Add post summary workflowid to loadMetadataBatch()
..

Add post summary workflowid to loadMetadataBatch()

Change-Id: I711de68c10ba181c1edd0ac4d2ac7933614dac81
---
M includes/Formatter/AbstractQuery.php
1 file changed, 9 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/95/130495/1

diff --git a/includes/Formatter/AbstractQuery.php 
b/includes/Formatter/AbstractQuery.php
index 0d4152d..b8e88fd 100644
--- a/includes/Formatter/AbstractQuery.php
+++ b/includes/Formatter/AbstractQuery.php
@@ -82,14 +82,20 @@
if ( $result instanceof PostRevision ) {
// If top-level, then just get the workflow.
// Otherwise we need to find the root post.
+   $id = $result-getPostId();
+   $alpha = $id-getAlphadecimal();
if ( $result-isTopicTitle() ) {
-   $workflowIds[] = $result-getPostId();
+   $workflowIds[] = $id;
} else {
-   $postIds[] = $result-getPostId();
+   $postIds[$alpha] = $id;
}
-   
$this-postCache[$result-getPostId()-getAlphadecimal()] = $result;
+   $this-postCache[$alpha] = $result;
} elseif ( $result instanceof Header ) {
$workflowIds[] = $result-getWorkflowId();
+   } elseif ( $result instanceof PostSummary ) {
+   // This would be the post id for the summary
+   $id = $result-getSummaryTargetId();
+   $postIds[$id-getAlphadecimal()] = $id;
}
 
$revisions[$result-getRevisionId()-getAlphadecimal()] 
= $result;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I711de68c10ba181c1edd0ac4d2ac7933614dac81
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Bsitu bs...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix PHP Notice: Undefined index visualeditor-enable-language - change (mediawiki...VisualEditor)

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

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

Change subject: Fix PHP Notice: Undefined index visualeditor-enable-language
..

Fix PHP Notice: Undefined index visualeditor-enable-language

Change-Id: I3e4d821fb52fd6fd9ffc0529741218005a33702f
---
M VisualEditor.php
1 file changed, 9 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/96/130496/1

diff --git a/VisualEditor.php b/VisualEditor.php
index 520951e..c641ecb 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -69,11 +69,6 @@
 $wgHooks['PageContentSaveComplete'][] = 
'VisualEditorHooks::onPageContentSaveComplete';
 $wgExtensionFunctions[] = 'VisualEditorHooks::onSetup';
 
-// Set default values for new preferences
-$wgDefaultUserOptions['visualeditor-enable'] = 0;
-$wgDefaultUserOptions['visualeditor-enable-experimental'] = 0;
-$wgDefaultUserOptions['visualeditor-betatempdisable'] = 0;
-
 // Register resource modules
 
 $wgVisualEditorResourceTemplate = array(
@@ -1181,6 +1176,14 @@
),
 );
 
+/* Extend MediaWiki configuration */
+
+// Set default values for new preferences
+$wgDefaultUserOptions['visualeditor-enable'] = 0;
+$wgDefaultUserOptions['visualeditor-betatempdisable'] = 0;
+$wgDefaultUserOptions['visualeditor-enable-experimental'] = 0;
+$wgDefaultUserOptions['visualeditor-enable-language'] = 0;
+
 
 /* Configuration */
 
@@ -1190,6 +1193,7 @@
 
 // Array of modules to load based on a preference. Keys are preference names, 
values are
 // ResourceLoader module names.
+// Remember to also set defaults in $wgDefaultUserOptions!
 $wgVisualEditorPreferenceModules = array(
'visualeditor-enable-experimental' = 'ext.visualEditor.experimental',
'visualeditor-enable-language' = 'ext.visualEditor.language',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e4d821fb52fd6fd9ffc0529741218005a33702f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com

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


[MediaWiki-commits] [Gerrit] Sync parserTests with core. - change (mediawiki...parsoid)

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

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

Change subject: Sync parserTests with core.
..

Sync parserTests with core.

This matches upstream commit 2d26a0c535191d5261e5b379230c89ad3b988935.

Upstream has added a new djvu test case.  Added this to the mock API, but
we don't have any support for djvu or the 'page' image parameter yet, so
the newly-added tests go on the blacklist.

Change-Id: Ia20949bc3aed9333fdcbefc4b279d85eb75e6d77
---
M tests/fetch-parserTests.txt.js
M tests/mockAPI.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
4 files changed, 21 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/97/130497/1

diff --git a/tests/fetch-parserTests.txt.js b/tests/fetch-parserTests.txt.js
index b30fba4..5d2ebc9 100755
--- a/tests/fetch-parserTests.txt.js
+++ b/tests/fetch-parserTests.txt.js
@@ -11,9 +11,9 @@
 // and update these hashes automatically.
 //
 // You can use 'sha1sum -b tests/parser/parserTests.txt' to compute this value:
-var expectedSHA1 = 13ae5bc490f84a773c9b665d4c1f13f3439d9c3c;
+var expectedSHA1 = 188581e1332aec0922e232c0c1c868a80c6badce;
 // git log --pretty=oneline -1 tests/parser/parserTests.txt
-var latestCommit = 85d4e39ff096d05386fd2f333cd6acea66ad6f90;
+var latestCommit = 2d26a0c535191d5261e5b379230c89ad3b988935;
 
 var fs = require('fs'),
path = require('path'),
diff --git a/tests/mockAPI.js b/tests/mockAPI.js
index 6029f9b..eeab255 100644
--- a/tests/mockAPI.js
+++ b/tests/mockAPI.js
@@ -19,6 +19,9 @@
},
'Foobar.svg': {
size: 12345, width: 240, height: 180, bits: 24, mime: 
'image/svg+xml'
+   },
+   'LoremIpsum.djvu': {
+   size: 3249, width: 2480, height: 3508, bits: 8, mime: 
'image/vnd.djvu'
}
 };
 
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 5e59354..3dc69bf 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -339,6 +339,7 @@
 add(wt2html, Width-sized image (using px, no following whitespace), p 
data-parsoid='{\dsr\:[0,26,0,0]}'span typeof=\mw:Image\ 
data-parsoid='{\optList\:[{\ck\:\width\,\ak\:\640px\}],\dsr\:[0,26,null,null]}'a
 href=\./File:Foobar.jpg\ 
data-parsoid='{\a\:{\href\:\./File:Foobar.jpg\}}'img 
resource=\./File:Foobar.jpg\ 
src=\//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg\ 
height=\73\ width=\640\ 
data-parsoid='{\a\:{\resource\:\./File:Foobar.jpg\,\height\:\73\,\width\:\640\},\sa\:{\resource\:\Image:foobar.jpg\}}'//a/span/p);
 add(wt2html, Width-sized image (using px, with following whitespace - test 
regression from r39467), p data-parsoid='{\dsr\:[0,27,0,0]}'span 
typeof=\mw:Image\ 
data-parsoid='{\optList\:[{\ck\:\width\,\ak\:\640px 
\}],\dsr\:[0,27,null,null]}'a href=\./File:Foobar.jpg\ 
data-parsoid='{\a\:{\href\:\./File:Foobar.jpg\}}'img 
resource=\./File:Foobar.jpg\ 
src=\//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg\ 
height=\73\ width=\640\ 
data-parsoid='{\a\:{\resource\:\./File:Foobar.jpg\,\height\:\73\,\width\:\640\},\sa\:{\resource\:\Image:foobar.jpg\}}'//a/span/p);
 add(wt2html, Width-sized image (using px, with preceding whitespace - test 
regression from r39467), p data-parsoid='{\dsr\:[0,27,0,0]}'span 
typeof=\mw:Image\ data-parsoid='{\optList\:[{\ck\:\width\,\ak\:\ 
640px\}],\dsr\:[0,27,null,null]}'a href=\./File:Foobar.jpg\ 
data-parsoid='{\a\:{\href\:\./File:Foobar.jpg\}}'img 
resource=\./File:Foobar.jpg\ 
src=\//example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg\ 
height=\73\ width=\640\ 
data-parsoid='{\a\:{\resource\:\./File:Foobar.jpg\,\height\:\73\,\width\:\640\},\sa\:{\resource\:\Image:foobar.jpg\}}'//a/span/p);
+add(wt2html, Image with page parameter, meta typeof=\mw:Placeholder\ 
data-parsoid='{\src\:\[[File:LoremIpsum.djvu|page=2]]\,\optList\:[{\ck\:\page\,\ak\:\page=2\}],\dsr\:[0,31,null,null]}'/);
 add(wt2html, HTML with raw HTML ($wgRawHtml==true), p 
data-parsoid='{\dsr\:[0,39,0,0]}'lt;htmllt;scriptalert(1);lt;/scriptlt;/html/p);
 add(wt2html, Parents of subpages, one level up, not named, p 
data-parsoid='{\dsr\:[0,7,0,0]}'a rel=\mw:WikiLink\ 
href=\../../../Subpage_test/L1/L2\ 
data-parsoid='{\stx\:\simple\,\a\:{\href\:\../../../Subpage_test/L1/L2\},\sa\:{\href\:\../\},\dsr\:[0,7,2,2]}'Subpage_test/L1/L2/a/p);
 add(wt2html, Parents of subpages, two levels up, without trailing slash or 
name., p data-parsoid='{\dsr\:[0,9,0,0]}'a rel=\mw:WikiLink\ 
href=\../../../Subpage_test/L1/L2/..\ 
data-parsoid='{\stx\:\simple\,\a\:{\href\:\../../../Subpage_test/L1/L2/..\},\sa\:{\href\:\../..\},\dsr\:[0,9,2,2]}'Subpage_test/L1/L2/../a/p);
@@ -951,6 +952,7 @@
 add(html2html, Width-sized image (using px, no following whitespace), p 
data-parsoid='{\dsr\:[0,64,0,0]}'img 
src=\http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg\; 
alt=\640px-Foobar.jpg\ 

[MediaWiki-commits] [Gerrit] Use sinon.js to test the thumbnail fetching - change (mediawiki...MultimediaViewer)

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

Change subject: Use sinon.js to test the thumbnail fetching
..


Use sinon.js to test the thumbnail fetching

Change-Id: Ida6143e29e54d90f26e7888aced1d207b3bfa702
---
M tests/qunit/mmv/mmv.test.js
1 file changed, 84 insertions(+), 104 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/qunit/mmv/mmv.test.js b/tests/qunit/mmv/mmv.test.js
index bbcbfde..51aa237 100644
--- a/tests/qunit/mmv/mmv.test.js
+++ b/tests/qunit/mmv/mmv.test.js
@@ -377,126 +377,106 @@
viewer.fetchThumbnail( title, 1000, null, intendedWidth, 60 );
} );
 
-   QUnit.test( 'fetchThumbnail()', 14, function ( assert ) {
-   var viewer = new mw.mmv.MultimediaViewer(),
+   QUnit.test( 'fetchThumbnail()', 32, function ( assert ) {
+   var guessedThumbnailInfoStub,
+   thumbnailInfoStub,
+   imageStub,
+   promise,
+   viewer = new mw.mmv.MultimediaViewer(),
+   sandbox = this.sandbox,
oldUseThumbnailGuessing = mw.config.get( 
'wgMultimediaViewer' ).useThumbnailGuessing,
file = new mw.Title( 'File:Copyleft.svg' ),
sampleURL = 
'http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Copyleft.svg/300px-Copyleft.svg.png',
width = 100,
originalWidth = 1000,
originalHeight = 1000,
-   apiURL = 'foo',
-   guessedURL = 'bar';
+   image = {};
+
+   function setupStubs() {
+   guessedThumbnailInfoStub = 
viewer.guessedThumbnailInfoProvider.get = sandbox.stub();
+   thumbnailInfoStub = viewer.thumbnailInfoProvider.get = 
sandbox.stub();
+   imageStub = viewer.imageProvider.get = sandbox.stub();
+   }
 
mw.config.get( 'wgMultimediaViewer' ).useThumbnailGuessing = 
true;
 
-   viewer.guessedThumbnailInfoProvider = {
-   get: function() {
-   assert.ok( false, 'Guessed thumbnail provider 
should not be called, because we lack sample URL and original dimensions' );
-   }
-   };
+   // When we lack sample URL and original dimensions, the classic 
provider should be used
+   setupStubs();
+   guessedThumbnailInfoStub.returns( $.Deferred().resolve( { url: 
'guessedURL' } ) );
+   thumbnailInfoStub.returns( $.Deferred().resolve( { url: 
'apiURL' } ) );
+   imageStub.returns( $.Deferred().resolve( image ) );
+   promise = viewer.fetchThumbnail( file, width );
+   assert.ok( !guessedThumbnailInfoStub.called, 'When we lack 
sample URL and original dimensions, GuessedThumbnailInfoProvider is not called' 
);
+   assert.ok( thumbnailInfoStub.calledOnce, 'When we lack sample 
URL and original dimensions, ThumbnailInfoProvider is called once' );
+   assert.ok( imageStub.calledOnce, 'When we lack sample URL and 
original dimensions, ImageProvider is called once' );
+   assert.ok( imageStub.calledWithExactly( 'apiURL' ), 'When we 
lack sample URL and original dimensions, ImageProvider is called with the API 
url' );
+   assert.strictEqual( promise.state(), 'resolved', 'When we lack 
sample URL and original dimensions, fetchThumbnail resolves' );
 
-   viewer.thumbnailInfoProvider = {
-   get: function() {
-   assert.ok( true, 'Classic thumbnail info 
provider should be called, because we lack sample URL and original dimensions' 
);
-   return $.Deferred().reject();
-   }
-   };
+   // When the guesser bails out, the classic provider should be 
used
+   setupStubs();
+   guessedThumbnailInfoStub.returns( $.Deferred().reject() );
+   thumbnailInfoStub.returns( $.Deferred().resolve( { url: 
'apiURL' } ) );
+   imageStub.returns( $.Deferred().resolve( image ) );
+   promise = viewer.fetchThumbnail( file, width, sampleURL, 
originalWidth, originalHeight );
+   assert.ok( guessedThumbnailInfoStub.calledOnce, 'When the 
guesser bails out, GuessedThumbnailInfoProvider is called once' );
+   assert.ok( thumbnailInfoStub.calledOnce, 'When the guesser 
bails out, ThumbnailInfoProvider is called once' );
+   assert.ok( imageStub.calledOnce, 'When the guesser bails out, 
ImageProvider is called once' );
+   assert.ok( imageStub.calledWithExactly( 'apiURL' ), 'When the 
guesser bails out, 

[MediaWiki-commits] [Gerrit] Fix provision from scratch - change (operations...wikimetrics)

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

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

Change subject: Fix provision from scratch
..

Fix provision from scratch

When provisioning a vm with an existing wikimetrics setup, everything
was fine, but errors are evident if you try to provision starting at
nothing.  This change fixes those errors.

Change-Id: I6c9346fdb02255cfdb8a5088d15ffcfe57b20881
---
M manifests/database.pp
1 file changed, 13 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/wikimetrics 
refs/changes/99/130499/1

diff --git a/manifests/database.pp b/manifests/database.pp
index 878a016..8eff12a 100644
--- a/manifests/database.pp
+++ b/manifests/database.pp
@@ -45,7 +45,7 @@
 exec { 'wikimetrics_mysql_create_user':
 command = /usr/bin/mysql ${username_option} ${password_option} -e \
 CREATE USER '${db_user}'@'localhost' IDENTIFIED BY '${db_pass}';
-CREATE USER '${db_user}'@'127.0.0.1' IDENTIFIED BY '${db_pass}';,
+CREATE USER '${db_user}'@'127.0.0.1' IDENTIFIED BY '${db_pass}';\,
 unless  = /usr/bin/mysql ${username_option} ${password_option} -e \
 SELECT user FROM mysql.user;\ | grep -q \${db_user}\,
 user= 'root',
@@ -79,16 +79,17 @@
 Wikimetrics::Database::Create[$db_name_wikimetrics],
 Exec['wikimetrics_mysql_create_user']
 ],
- }
+}
 
- # If we are running in debug mode, then
- # go ahead and create the test databases
- if $::wikimetrics::debug {
- wikimetrics::database::create { $db_names_testing:
- db_user  = $db_user,
- db_pass  = $db_pass,
- db_root_user = $db_root_user,
- db_root_pass = $db_root_pass,
- }
- }
+# If we are running in debug mode, then
+# go ahead and create the test databases
+if $::wikimetrics::debug {
+wikimetrics::database::create { $db_names_testing:
+db_user  = $db_user,
+db_pass  = $db_pass,
+db_root_user = $db_root_user,
+db_root_pass = $db_root_pass,
+before   = Exec['alembic_upgrade_head']
+}
+}
  }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c9346fdb02255cfdb8a5088d15ffcfe57b20881
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: Milimetric dandree...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Support precomputed data in GitInfo - change (mediawiki/core)

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

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

Change subject: Support precomputed data in GitInfo
..

Support precomputed data in GitInfo

Support reading git repository information from a `.mw-git-info.json`
file. When present in a directory, this file serves to provide
information needed by getHead, getHeadSHA1, getHeadCommitDate,
getCurrentBranch and a new getRemoteUrl method.
A GitInfo::precomputeValues method is also provided which can generate
the .mw-git-info.json cache file for a given GitInfo instance.

This support can be combined with a deployment step to reduce the need
to repeatedly gather information from the .git files/git binary. It also
allows computing information that can be lost when directory structures
differ between deployment staging hosts and hosts running MediaWiki.

Bug: 53972
Change-Id: I66e058acc5a71e5d82644f85d819f49d6ee9d1e6
---
M .gitignore
M includes/GitInfo.php
A tests/phpunit/data/gitinfo/testMissingJsonData/.gitignore
A tests/phpunit/data/gitinfo/testValidJsonData/.mw-git-info.json
A tests/phpunit/includes/GitInfoTest.php
5 files changed, 197 insertions(+), 75 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/98/130498/1

diff --git a/.gitignore b/.gitignore
index 0351cf5..1456f35 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,6 +38,7 @@
 /AdminSettings.php
 /LocalSettings.php
 /StartProfiler.php
+.mw-git-info.json
 
 # Building  testing
 node_modules/
diff --git a/includes/GitInfo.php b/includes/GitInfo.php
index 6b092d9..fb068f5 100644
--- a/includes/GitInfo.php
+++ b/includes/GitInfo.php
@@ -36,23 +36,60 @@
protected $basedir;
 
/**
+* Path to JSON cache file for pre-computed git information.
+*/
+   protected $precomputedFile;
+
+   /**
+* Cached git information.
+*/
+   protected $cache = array();
+
+   /**
 * Map of repo URLs to viewer URLs. Access via static method 
getViewers().
 */
private static $viewers = false;
 
/**
 * @param string $dir The root directory of the repo where the .git dir 
can be found
+* @param bool $usePrecomputed Use precomputed information if available
+* @see precomputeValues
 */
-   public function __construct( $dir ) {
-   $this-basedir = $dir . DIRECTORY_SEPARATOR . '.git';
-   if ( is_readable( $this-basedir )  !is_dir( $this-basedir ) 
) {
-   $GITfile = file_get_contents( $this-basedir );
-   if ( strlen( $GITfile )  8  substr( $GITfile, 0, 8 ) 
=== 'gitdir: ' ) {
-   $path = rtrim( substr( $GITfile, 8 ), \r\n );
-   $isAbsolute = $path[0] === '/' || substr( 
$path, 1, 1 ) === ':';
-   $this-basedir = $isAbsolute ? $path : $dir . 
DIRECTORY_SEPARATOR . $path;
+   public function __construct( $dir, $usePrecomputed=true ) {
+   $this-precomputedFile = $dir . DIRECTORY_SEPARATOR . 
'.mw-git-info.json';
+   if ( $usePrecomputed  is_readable( $this-precomputedFile ) ) 
{
+   $this-cache =
+   FormatJson::decode( file_get_contents( 
$this-precomputedFile ), true );
+   }
+
+   if ( !$this-cacheIsComplete() ) {
+   $this-basedir = $dir . DIRECTORY_SEPARATOR . '.git';
+   if ( is_readable( $this-basedir )  !is_dir( 
$this-basedir ) ) {
+   $GITfile = file_get_contents( $this-basedir );
+   if ( strlen( $GITfile )  8  substr( 
$GITfile, 0, 8 ) === 'gitdir: ' ) {
+   $path = rtrim( substr( $GITfile, 8 ), 
\r\n );
+   $isAbsolute = $path[0] === '/' || 
substr( $path, 1, 1 ) === ':';
+   $this-basedir = $isAbsolute ? $path : 
$dir . DIRECTORY_SEPARATOR . $path;
+   }
}
}
+   }
+
+   /**
+* Check to see if the current cache is fully populated.
+*
+* Note: This method is public only to make unit testing easier. There's
+* really no strong reason that anything other than a test should want 
to
+* call this method.
+*
+* @return bool True if all expected cache keys exist, false otherwise
+*/
+   public function cacheIsComplete() {
+   return isset( $this-cache['head'] ) 
+   isset( $this-cache['headSHA1'] ) 
+   isset( $this-cache['headCommitDate'] ) 
+   isset( $this-cache['branch'] ) 
+   isset( $this-cache['remoteURL'] );
}
 
/**
@@ -82,19 +119,22 @@
 * @return string 

[MediaWiki-commits] [Gerrit] WIP: Baby steps toward precompilation of tokenizer. - change (mediawiki...parsoid)

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

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

Change subject: WIP: Baby steps toward precompilation of tokenizer.
..

WIP: Baby steps toward precompilation of tokenizer.

Change-Id: If8e4eaf42b34eaff93d906ab3caa30ce137f6555
---
A lib/mediawiki.tokenizer.js
M lib/mediawiki.tokenizer.peg.js
2 files changed, 19,253 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/00/130500/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8e4eaf42b34eaff93d906ab3caa30ce137f6555
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Tweak fixed header behaviour - change (mediawiki...VectorBeta)

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

Change subject: Tweak fixed header behaviour
..


Tweak fixed header behaviour

Make it feel more responsive
Introduce small gap a la Winter mockup between left border
of search and top of screen

Change-Id: Id395257cd722a3363c7062bd1e10eee4f8e32805
---
M resources/fixedHeader/header.js
M resources/fixedHeader/header.less
2 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/resources/fixedHeader/header.js b/resources/fixedHeader/header.js
index 9a4dd6e..49aa3ff 100644
--- a/resources/fixedHeader/header.js
+++ b/resources/fixedHeader/header.js
@@ -1,11 +1,11 @@
 jQuery( function( $ ) {
-   var $body = $( 'body' );
+   var $body = $( 'body' ), threshold = $( '#p-logo' ).height() - 10;
function goPositionFixed() {
-   if ( $( this ).scrollTop()  0  !$( document.body ).hasClass( 
'mw-special-MobileMenu' ) ) {
+   if ( $( this ).scrollTop()  threshold  !$body.hasClass( 
'mw-special-MobileMenu' ) ) {
$body.addClass( 'mw-scrolled' );
} else {
$body.removeClass( 'mw-scrolled' );
}
}
-   $( window ).on( 'scroll', $.debounce( 100, goPositionFixed ) );
+   $( window ).on( 'scroll', $.debounce( 0, goPositionFixed ) );
 } );
diff --git a/resources/fixedHeader/header.less 
b/resources/fixedHeader/header.less
index 52f7722..f3f0b22 100644
--- a/resources/fixedHeader/header.less
+++ b/resources/fixedHeader/header.less
@@ -60,7 +60,7 @@
background: none;
 }
 
-#p-search,
+#p-search .searchButton,
 div.vectorTabs,
 div#content {
border-left: 1px solid @content-nav-divider-color;
@@ -73,7 +73,7 @@
 }
 
 div#simpleSearch {
-   left: .35em;
+   left: 0;
background: none;
margin: 0;
border: none;
@@ -88,7 +88,7 @@
right: 0;
height: 100%;
padding: 0;
-   top: 0;
+   top: .3em;
width: 50px;
 
// FIXME: Kill image tag when upstream to core.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id395257cd722a3363c7062bd1e10eee4f8e32805
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/VectorBeta
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: Jorm bhar...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Ensure when Winter is disabled it is really disabled - change (mediawiki...VectorBeta)

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

Change subject: Ensure when Winter is disabled it is really disabled
..


Ensure when Winter is disabled it is really disabled

If $wgVectorBetaWinter is off but beta feature is enabled Winter
should not be applied

Change-Id: I52d8e8ce2bb3709817fd57d063d87b2d31f03503
---
M VectorBeta.hooks.php
1 file changed, 15 insertions(+), 4 deletions(-)

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



diff --git a/VectorBeta.hooks.php b/VectorBeta.hooks.php
index e808216..f1c1a72 100644
--- a/VectorBeta.hooks.php
+++ b/VectorBeta.hooks.php
@@ -53,6 +53,16 @@
}
 
/**
+* Checks whether fixed header experiment can be run or not
+* @param User $user
+* @return bool
+*/
+   static function isFixedHeaderEnabled( $user ) {
+   global $wgVectorBetaWinter;
+   return $wgVectorBetaWinter  BetaFeatures::isFeatureEnabled( 
$user, 'betafeatures-vector-fixedheader' );
+   }
+
+   /**
 * GetSkinTemplateOutputPageBeforeExec
 * Modifies the template to swap out the default navigation controls 
with new Winter
 * ones.
@@ -71,7 +81,7 @@
if ( !class_exists( 'BetaFeatures' ) ) {
wfDebugLog( 'VectorBeta', 'The BetaFeatures extension 
is not installed' );
return true;
-   } else if ( BetaFeatures::isFeatureEnabled( $skin-getUser(), 
'betafeatures-vector-fixedheader' ) ) {
+   } else if ( self::isFixedHeaderEnabled( $skin-getUser() ) ) {
$data = $tpl-data;
$skin = $data['skin'];
$nav = $data['content_navigation'];
@@ -305,10 +315,11 @@
 */
static function skinVectorStyleModules( $skin, $modules ) {
global $wgVectorBetaTypography;
+
if ( class_exists( 'BetaFeatures' ) ) {
$typeEnabled = $wgVectorBetaTypography 
BetaFeatures::isFeatureEnabled( 
$skin-getUser(), 'betafeatures-vector-typography-update' );
-   $fixedHeaderEnabled = BetaFeatures::isFeatureEnabled( 
$skin-getUser(), 'betafeatures-vector-fixedheader' );
+
if ( $typeEnabled ) {
$index = array_search( 'skins.vector.styles', 
$modules );
if ( $index !== false ) {
@@ -316,7 +327,7 @@
}
$modules[] = 'skins.vector.beta';
}
-   if ( $fixedHeaderEnabled ) {
+   if ( self::isFixedHeaderEnabled( $skin-getUser() ) ) {
$modules[] = 'skins.vector.header.beta';
}
} else {
@@ -343,7 +354,7 @@
$modules = array();
 
// Fixed header experiment modules
-   if ( BetaFeatures::isFeatureEnabled( $user, 
'betafeatures-vector-fixedheader' ) ) {
+   if ( self::isFixedHeaderEnabled( $user ) ) {
$modules[] = 'skins.vector.headerjs.beta';
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I52d8e8ce2bb3709817fd57d063d87b2d31f03503
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VectorBeta
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson jrob...@wikimedia.org
Gerrit-Reviewer: JGonera jgon...@wikimedia.org
Gerrit-Reviewer: Jorm bhar...@wikimedia.org
Gerrit-Reviewer: Kaldari rkald...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Tweaked wfThumbIsStandard() to recognize handler-specific de... - change (mediawiki/core)

2014-04-29 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Tweaked wfThumbIsStandard() to recognize handler-specific 
default parameters
..

Tweaked wfThumbIsStandard() to recognize handler-specific default parameters

* Now thumbnails with default lossy/lossless values will still count as 
standard,
  for example. This makes use of the file media handler.

Change-Id: Ia69301dfbf85bb26a17f8eee0939d690021343ec
---
M thumb.php
1 file changed, 21 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/130501/1

diff --git a/thumb.php b/thumb.php
index a5bdc5b..c5da918 100644
--- a/thumb.php
+++ b/thumb.php
@@ -429,16 +429,13 @@
  * of possible files with standard parameters is far less than that of all
  * possible combinations; rate-limiting for them can thus be more generious.
  *
- * @param File $img
+ * @param File $file
  * @param array $params
  * @return bool
  */
-function wfThumbIsStandard( File $img, array $params ) {
+function wfThumbIsStandard( File $file, array $params ) {
global $wgThumbLimits, $wgImageLimits;
-   // @TODO: use polymorphism with media handler here
-   if ( array_diff( array_keys( $params ), array( 'width', 'page' ) ) ) {
-   return false; // extra parameters present
-   }
+
if ( isset( $params['width'] ) ) {
$widths = $wgThumbLimits;
foreach ( $wgImageLimits as $pair ) {
@@ -448,6 +445,24 @@
return false;
}
}
+
+   $handler = $file-getHandler();
+   if ( $handler ) {
+   // Standard thumbnails use a standard width and any page number
+   $normalParams = array( 'width' = $params['width'] );
+   if ( isset( $params['page'] ) ) {
+   $normalParams['page'] = $params['page'];
+   }
+   // Append any default values to the map (e.g. lossy, 
lossless, seek...)
+   $handler-normaliseParams( $file, $normalParams );
+   // Check that the given values for non-page, non-width, params 
are just defaults
+   foreach ( $params as $key = $value ) {
+   if ( !isset( $normalParams[$key] ) || 
$normalParams[$key] !== $value ) {
+   return false;
+   }
+   }
+   }
+
return true;
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia69301dfbf85bb26a17f8eee0939d690021343ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix IE9's lack of support for console.warn.apply - change (mediawiki/core)

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

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

Change subject: Fix IE9's lack of support for console.warn.apply
..

Fix IE9's lack of support for console.warn.apply

Bug: 63770
Change-Id: I8c286af374df5b5c1e7fa6b9ea1bef2ddaf5d796
(cherry picked from commit 4c146968c843f74bf1b578ba78b614b5bd7f5457)
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/02/130502/1

diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index f6154ee..e844f95 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -538,7 +538,7 @@
 */
log.warn = function () {
var console = window.console;
-   if ( console  console.warn ) {
+   if ( console  console.warn  
console.warn.apply ) {
console.warn.apply( console, arguments 
);
if ( console.trace ) {
console.trace();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c286af374df5b5c1e7fa6b9ea1bef2ddaf5d796
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_23
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: MarkAHershberger m...@nichework.com

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


[MediaWiki-commits] [Gerrit] Enable Flow on mw:Talk:VisualEditor/Beta Features/Language - change (operations/mediawiki-config)

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

Change subject: Enable Flow on mw:Talk:VisualEditor/Beta Features/Language
..


Enable Flow on mw:Talk:VisualEditor/Beta Features/Language

Change-Id: Ic52c67c1e3ef43f3b5debfd968175ff6d521c9bd
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index ca1486b..edcc057 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12474,6 +12474,7 @@
'Talk:Beta Features/Hovercards',
'Talk:Compact Personal Bar',
'Talk:Beta Features/Nearby Pages',
+   'Talk:VisualEditor/Beta Features/Language',
),
'enwiki' = array( // Bug 60178
'Wikipedia talk:WikiProject Breakfast',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic52c67c1e3ef43f3b5debfd968175ff6d521c9bd
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Spage sp...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Enable Flow on mw:Talk:Content translation - change (operations/mediawiki-config)

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

Change subject: Enable Flow on mw:Talk:Content translation
..


Enable Flow on mw:Talk:Content translation

Change-Id: I7307336933f230fd4cef60fbe0cfcef68a73a681
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index edcc057..b4695c8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12475,6 +12475,7 @@
'Talk:Compact Personal Bar',
'Talk:Beta Features/Nearby Pages',
'Talk:VisualEditor/Beta Features/Language',
+   'Talk:Content translation',
),
'enwiki' = array( // Bug 60178
'Wikipedia talk:WikiProject Breakfast',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7307336933f230fd4cef60fbe0cfcef68a73a681
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Spage sp...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Object for bulk importation of saved pages records. - change (apps...wikipedia)

2014-04-29 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Object for bulk importation of saved pages records.
..


Object for bulk importation of saved pages records.

Change-Id: Iacca068c51be43e6e8f547dff6ba99921e750713
---
M Wikipedia.xcodeproj/project.pbxproj
A wikipedia/Importer/ArticleImporter.h
A wikipedia/Importer/ArticleImporter.m
M wikipedia/Session/SessionSingleton.h
M wikipedia/Session/SessionSingleton.m
5 files changed, 141 insertions(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index 1afeab0..28e10c6 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -93,6 +93,7 @@
04B0EA4A190B2348007458AF /* PreviewLicenseView.m in Sources */ 
= {isa = PBXBuildFile; fileRef = 04B0EA49190B2348007458AF /* 
PreviewLicenseView.m */; };
04B0EA4D190E2983007458AF /* NavButtonView.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04B0EA4C190E2983007458AF /* NavButtonView.m */; 
};
04B0EA50190E2E4E007458AF /* NavButtonLabel.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04B0EA4F190E2E4E007458AF /* NavButtonLabel.m */; 
};
+   04B0EA45190AFDD8007458AF /* ArticleImporter.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04B0EA44190AFDD8007458AF /* ArticleImporter.m 
*/; };
04B6925018E77B2A00F88D8A /* UIWebView+HideScrollGradient.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 04B6924F18E77B2A00F88D8A /* 
UIWebView+HideScrollGradient.m */; };
04B78A5318A580AF0050EBF5 /* LoginOp.m in Sources */ = {isa = 
PBXBuildFile; fileRef = 04B78A5218A580AF0050EBF5 /* LoginOp.m */; };
04B7B9BD18B5570E00A63551 /* CaptchaViewController.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = 04B7B9BC18B5570E00A63551 /* 
CaptchaViewController.m */; };
@@ -318,6 +319,8 @@
04B0EA4C190E2983007458AF /* NavButtonView.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= NavButtonView.m; sourceTree = group; };
04B0EA4E190E2E4E007458AF /* NavButtonLabel.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
NavButtonLabel.h; sourceTree = group; };
04B0EA4F190E2E4E007458AF /* NavButtonLabel.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= NavButtonLabel.m; sourceTree = group; };
+   04B0EA43190AFDD8007458AF /* ArticleImporter.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
ArticleImporter.h; sourceTree = group; };
+   04B0EA44190AFDD8007458AF /* ArticleImporter.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= ArticleImporter.m; sourceTree = group; };
04B6924E18E77B2A00F88D8A /* UIWebView+HideScrollGradient.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = UIWebView+HideScrollGradient.h; sourceTree = group; };
04B6924F18E77B2A00F88D8A /* UIWebView+HideScrollGradient.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = UIWebView+HideScrollGradient.m; sourceTree = 
group; };
04B78A5118A580AF0050EBF5 /* LoginOp.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
LoginOp.h; sourceTree = group; };
@@ -834,6 +837,15 @@
path = AccountCreation;
sourceTree = group;
};
+   04B0EA42190AFDBA007458AF /* Importer */ = {
+   isa = PBXGroup;
+   children = (
+   04B0EA43190AFDD8007458AF /* ArticleImporter.h 
*/,
+   04B0EA44190AFDD8007458AF /* ArticleImporter.m 
*/,
+   );
+   path = Importer;
+   sourceTree = group;
+   };
04B7B9BA18B5569600A63551 /* Captcha */ = {
isa = PBXGroup;
children = (
@@ -1195,6 +1207,7 @@
0442F57C1900718600F55DF9 /* Fonts */,
04D34DA31863D2D600610A87 /* HTML Parsing */,
0466F44C183A30CC00EA1FD7 /* Images */,
+   04B0EA42190AFDBA007458AF /* Importer */,
0463639518A844380049EE4F /* Keychain */,
04CF1CB5187C8F4400E9516F /* Languages */,
048A26741906268100395F53 /* PaddedLabel */,
@@ -1536,6 +1549,7 @@
04C43AC0183442FC006C643B /* NSString+Extras.m 
in Sources 

[MediaWiki-commits] [Gerrit] Work in progress: data migration from old app - change (apps...wikipedia)

2014-04-29 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Work in progress: data migration from old app
..


Work in progress: data migration from old app

Extracts the list of saved pages from the old app at app startup,
but doesn't yet do anything but dump them to console log.

Change-Id: I1dc4e230c2dc8320528045081fc834e4c992e992
---
M Wikipedia.xcodeproj/project.pbxproj
M wikipedia/AppDelegate.m
A wikipedia/DataMigrator.h
A wikipedia/DataMigrator.m
A wikipedia/SQLiteHelper.h
A wikipedia/SQLiteHelper.m
6 files changed, 332 insertions(+), 0 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index 28e10c6..b8e7c5c 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -162,6 +162,9 @@
D499144C181D51DE00E6073C /* Main_iPhone.storyboard in Resources 
*/ = {isa = PBXBuildFile; fileRef = D499144A181D51DE00E6073C /* 
Main_iPhone.storyboard */; };
D4991454181D51DE00E6073C /* Images.xcassets in Resources */ = 
{isa = PBXBuildFile; fileRef = D4991453181D51DE00E6073C /* Images.xcassets */; 
};
D4BC22B4181E9E6300CAC673 /* empty.png in Resources */ = {isa = 
PBXBuildFile; fileRef = D4BC22B3181E9E6300CAC673 /* empty.png */; };
+   D4E8A8A4190835C100DA4765 /* DataMigrator.m in Sources */ = {isa 
= PBXBuildFile; fileRef = D4E8A8A3190835C100DA4765 /* DataMigrator.m */; };
+   D4E8A8A719084F1300DA4765 /* SQLiteHelper.m in Sources */ = {isa 
= PBXBuildFile; fileRef = D4E8A8A619084F1300DA4765 /* SQLiteHelper.m */; };
+   D4E8A8A919085CEA00DA4765 /* libsqlite3.dylib in Frameworks */ = 
{isa = PBXBuildFile; fileRef = D4E8A8A819085CEA00DA4765 /* libsqlite3.dylib */; 
};
D4EE00B9182443FC0090790F /* MWPageTitle.m in Sources */ = {isa 
= PBXBuildFile; fileRef = D4EE00B8182443FC0090790F /* MWPageTitle.m */; };
 /* End PBXBuildFile section */
 
@@ -583,6 +586,11 @@
D4991466181D51DF00E6073C /* Wikipedia_Tests.m */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = 
Wikipedia_Tests.m; sourceTree = group; };
D4BC22B3181E9E6300CAC673 /* empty.png */ = {isa = 
PBXFileReference; lastKnownFileType = image.png; path = empty.png; sourceTree = 
group; };
D4DE203018283FF200148CA2 /* CommunicationBridgeTests.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = CommunicationBridgeTests.m; sourceTree = group; };
+   D4E8A8A2190835C100DA4765 /* DataMigrator.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
DataMigrator.h; sourceTree = group; };
+   D4E8A8A3190835C100DA4765 /* DataMigrator.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= DataMigrator.m; sourceTree = group; };
+   D4E8A8A519084F1300DA4765 /* SQLiteHelper.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SQLiteHelper.h; sourceTree = group; };
+   D4E8A8A619084F1300DA4765 /* SQLiteHelper.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= SQLiteHelper.m; sourceTree = group; };
+   D4E8A8A819085CEA00DA4765 /* libsqlite3.dylib */ = {isa = 
PBXFileReference; lastKnownFileType = compiled.mach-o.dylib; name = 
libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
D4EE00B7182443FC0090790F /* MWPageTitle.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
MWPageTitle.h; path = mw-support/MWPageTitle.h; sourceTree = group; };
D4EE00B8182443FC0090790F /* MWPageTitle.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name 
= MWPageTitle.m; path = mw-support/MWPageTitle.m; sourceTree = group; };
D4EE00BC1824459D0090790F /* PageTitleTests.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name 
= PageTitleTests.m; path = mw-support/PageTitleTests.m; sourceTree = 
group; };
@@ -593,6 +601,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+   D4E8A8A919085CEA00DA4765 /* libsqlite3.dylib in 
Frameworks */,
04D34DB21863D39000610A87 /* libxml2.dylib in 
Frameworks */,
D499143B181D51DE00E6073C /* 
CoreGraphics.framework in Frameworks */,
D499143D181D51DE00E6073C /* UIKit.framework in 
Frameworks */,
@@ -1180,6 +1189,7 @@
D4991437181D51DE00E6073C /* Frameworks */ = {

[MediaWiki-commits] [Gerrit] Tie together the migrator and the importer - change (apps...wikipedia)

2014-04-29 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Tie together the migrator and the importer
..


Tie together the migrator and the importer

Creates saved page records for all old-app saved pages
upon first load, then removes one of the old data files
to keep it from triggering again.

Note that pages are not actually fetched and saved yet --
you have to load them at least once to populate them.
May want to consider a fetch-all process which can be
triggered in the background or something.

Change-Id: Ibbb839e8396e13971ac1641008bb8b36f9afde88
---
M Wikipedia.xcodeproj/project.pbxproj
M wikipedia/AppDelegate.m
M wikipedia/DataMigrator.m
M wikipedia/Importer/ArticleImporter.m
M wikipedia/View Controllers/WebView/WebViewController.m
5 files changed, 48 insertions(+), 28 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index b8e7c5c..32cd3d1 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -586,8 +586,8 @@
D4991466181D51DF00E6073C /* Wikipedia_Tests.m */ = {isa = 
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = 
Wikipedia_Tests.m; sourceTree = group; };
D4BC22B3181E9E6300CAC673 /* empty.png */ = {isa = 
PBXFileReference; lastKnownFileType = image.png; path = empty.png; sourceTree = 
group; };
D4DE203018283FF200148CA2 /* CommunicationBridgeTests.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = CommunicationBridgeTests.m; sourceTree = group; };
-   D4E8A8A2190835C100DA4765 /* DataMigrator.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
DataMigrator.h; sourceTree = group; };
-   D4E8A8A3190835C100DA4765 /* DataMigrator.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= DataMigrator.m; sourceTree = group; };
+   D4E8A8A2190835C100DA4765 /* DataMigrator.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = 
DataMigrator.h; path = wikipedia/DataMigrator.h; sourceTree = SOURCE_ROOT; };
+   D4E8A8A3190835C100DA4765 /* DataMigrator.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name 
= DataMigrator.m; path = wikipedia/DataMigrator.m; sourceTree = SOURCE_ROOT; };
D4E8A8A519084F1300DA4765 /* SQLiteHelper.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SQLiteHelper.h; sourceTree = group; };
D4E8A8A619084F1300DA4765 /* SQLiteHelper.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= SQLiteHelper.m; sourceTree = group; };
D4E8A8A819085CEA00DA4765 /* libsqlite3.dylib */ = {isa = 
PBXFileReference; lastKnownFileType = compiled.mach-o.dylib; name = 
libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
@@ -619,6 +619,8 @@
040E5C831846AC13007AFE6F /* 
ArticleDataContextSingleton.m */,
04EA7779184E4CED00D2F3C9 /* Model */,
04D149E519CA006B4104 /* Operations */,
+   D4E8A8A11908357600DA4765 /* Data Migration */,
+   04B0EA42190AFDBA007458AF /* Importer */,
);
path = Data;
sourceTree = group;
@@ -852,7 +854,8 @@
04B0EA43190AFDD8007458AF /* ArticleImporter.h 
*/,
04B0EA44190AFDD8007458AF /* ArticleImporter.m 
*/,
);
-   path = Importer;
+   name = Importer;
+   path = ../Importer;
sourceTree = group;
};
04B7B9BA18B5569600A63551 /* Captcha */ = {
@@ -1213,12 +1216,10 @@
045A9F0C18F6090E0057EA85 /* assets */,
04C43AB7183442FC006C643B /* Categories */,
040E5C50184673F2007AFE6F /* Data */,
-   D4E8A8A11908357600DA4765 /* Data Migration */,
04292FFB185FC026002A13FC /* Defines */,
0442F57C1900718600F55DF9 /* Fonts */,
04D34DA31863D2D600610A87 /* HTML Parsing */,
0466F44C183A30CC00EA1FD7 /* Images */,
-   04B0EA42190AFDBA007458AF /* Importer */,
0463639518A844380049EE4F /* Keychain */,
04CF1CB5187C8F4400E9516F /* Languages */,
 

[MediaWiki-commits] [Gerrit] Fix IE9's lack of support for console.warn.apply - change (mediawiki/core)

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

Change subject: Fix IE9's lack of support for console.warn.apply
..


Fix IE9's lack of support for console.warn.apply

Bug: 63770
Change-Id: I8c286af374df5b5c1e7fa6b9ea1bef2ddaf5d796
(cherry picked from commit 4c146968c843f74bf1b578ba78b614b5bd7f5457)
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index f6154ee..e844f95 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -538,7 +538,7 @@
 */
log.warn = function () {
var console = window.console;
-   if ( console  console.warn ) {
+   if ( console  console.warn  
console.warn.apply ) {
console.warn.apply( console, arguments 
);
if ( console.trace ) {
console.trace();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c286af374df5b5c1e7fa6b9ea1bef2ddaf5d796
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_23
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: MarkAHershberger m...@nichework.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] De-lint pegTokenizer.pegjs.txt. - change (mediawiki...parsoid)

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

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

Change subject: De-lint pegTokenizer.pegjs.txt.
..

De-lint pegTokenizer.pegjs.txt.

Right now we're eval()ing the tokenizer as soon as PEG generates it...
but if you dumped it to a file you'd notice a few things that
jshint doesn't like.

Change-Id: If9cb68fc9e23c7f66160eba90b4cfc5649c9d05e
---
M lib/mediawiki.tokenizer.peg.js
M lib/pegTokenizer.pegjs.txt
2 files changed, 10 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/03/130503/1

diff --git a/lib/mediawiki.tokenizer.peg.js b/lib/mediawiki.tokenizer.peg.js
index 1c47799..1019d26 100644
--- a/lib/mediawiki.tokenizer.peg.js
+++ b/lib/mediawiki.tokenizer.peg.js
@@ -96,6 +96,8 @@
// add jshint config
tokenizerSource =
'/* jshint loopfunc:true, latedef:false, 
nonstandard:true */\n' +
+   '/* global Set: false */\n'+
+   'use strict;\n' +
tokenizerSource + ';';
 
// eval is not evil in the case of a grammar-generated 
tokenizer.
diff --git a/lib/pegTokenizer.pegjs.txt b/lib/pegTokenizer.pegjs.txt
index 74b6998..0fe3b4a 100644
--- a/lib/pegTokenizer.pegjs.txt
+++ b/lib/pegTokenizer.pegjs.txt
@@ -146,7 +146,7 @@
 
 // XXX: The following code is short-circuited because it is stricter
 // than the standard parser:
-
+/*
 switch (isbn.length) {
 case 10:
 for (i = 0; i  9; i++) {
@@ -156,12 +156,13 @@
 return (checksum % 11 === 0);
 case 13:
 for (i = 0; i  13; i++) {
-/* jshint bitwise:false */
+// jshint bitwise:false
 checksum += parseInt(isbn[i], 10) * ((i  1) ? 3 : 1);
 }
 return (checksum % 10 === 0)  (/^97[89]/.test(isbn));
 }
 return false;
+*/
 };
 
 
@@ -344,9 +345,9 @@
 da.srcTagName = name;
 }
 
-if ( endTag != '' ) {
+if ( endTag !== '' ) {
 tok = new EndTagTk( lcName, attribs, da );
-} else if ( selfClose != '' ) {
+} else if ( selfClose !== '' ) {
 da.selfClose = true;
 tok = new SelfclosingTagTk( lcName, attribs, da );
 } else {
@@ -525,7 +526,10 @@
 }
 tokens = b;
 } else if (b.constructor === String  b.attribs === undefined) {
+/*jshint -W053 */
+// we need to make a non-primitive string in order to add properties
 b = new String( b );
+/*jshint +W053 */
 if (b.dataAttribs === undefined) {
 b.dataAttribs = {};
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9cb68fc9e23c7f66160eba90b4cfc5649c9d05e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add travis and scrutinizer badges to README - change (mediawiki...Wikibase)

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

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

Change subject: Add travis and scrutinizer badges to README
..

Add travis and scrutinizer badges to README

Change-Id: Id9a0100379afb94ef7dd5f5b14eaca5757f3e338
---
M README.md
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/04/130504/1

diff --git a/README.md b/README.md
index e6031e3..c9d72f6 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,8 @@
 # Wikibase.git
 
+[![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Wikibase.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Wikibase)
+[![Scrutinizer Quality 
Score](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Wikibase/badges/quality-score.png?s=857e6982ca67c05cd28ce53ba6d42e7e20b89325)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Wikibase/)
+
 The Wikibase.git package is part of the [Wikibase software](http://wikiba.se/) 
and consists of
 three interconnected extensions:
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9a0100379afb94ef7dd5f5b14eaca5757f3e338
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] SimpleCaptcha: Move the equals sign inside the label/ - change (mediawiki...ConfirmEdit)

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

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

Change subject: SimpleCaptcha: Move the equals sign inside the label/
..

SimpleCaptcha: Move the equals sign inside the label/

The old style does not cooperate well with the new pretty forms in
core MediaWiki, and arguably this should be done like this anyway.

Bug: 63606
Change-Id: Ifbe41ee5787bd4ed9e6144c06cd1d16f72354061
(cherry picked from commit 0f1be66bd3b85e2b4ee866d22711ec118de3ef39)
---
M Captcha.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/05/130505/1

diff --git a/Captcha.php b/Captcha.php
index 746b890..c6a05b1 100644
--- a/Captcha.php
+++ b/Captcha.php
@@ -38,7 +38,7 @@
$captcha = $this-getCaptcha();
$index = $this-storeCaptcha( $captcha );
 
-   return plabel 
for=\wpCaptchaWord\{$captcha['question']}/label =  .
+   return plabel for=\wpCaptchaWord\{$captcha['question']} 
= /label .
Xml::element( 'input', array(
'name' = 'wpCaptchaWord',
'id'   = 'wpCaptchaWord',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifbe41ee5787bd4ed9e6144c06cd1d16f72354061
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: REL1_23
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] SimpleCaptcha: Move the equals sign inside the label/ - change (mediawiki...ConfirmEdit)

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

Change subject: SimpleCaptcha: Move the equals sign inside the label/
..


SimpleCaptcha: Move the equals sign inside the label/

The old style does not cooperate well with the new pretty forms in
core MediaWiki, and arguably this should be done like this anyway.

Bug: 63606
Change-Id: Ifbe41ee5787bd4ed9e6144c06cd1d16f72354061
(cherry picked from commit 0f1be66bd3b85e2b4ee866d22711ec118de3ef39)
---
M Captcha.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/Captcha.php b/Captcha.php
index 746b890..c6a05b1 100644
--- a/Captcha.php
+++ b/Captcha.php
@@ -38,7 +38,7 @@
$captcha = $this-getCaptcha();
$index = $this-storeCaptcha( $captcha );
 
-   return plabel 
for=\wpCaptchaWord\{$captcha['question']}/label =  .
+   return plabel for=\wpCaptchaWord\{$captcha['question']} 
= /label .
Xml::element( 'input', array(
'name' = 'wpCaptchaWord',
'id'   = 'wpCaptchaWord',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbe41ee5787bd4ed9e6144c06cd1d16f72354061
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: REL1_23
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add travis and scrutinizer badges to README - change (mediawiki...Wikibase)

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

Change subject: Add travis and scrutinizer badges to README
..


Add travis and scrutinizer badges to README

Change-Id: Id9a0100379afb94ef7dd5f5b14eaca5757f3e338
---
M README.md
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  WikidataJenkins: Verified
  jenkins-bot: Verified



diff --git a/README.md b/README.md
index e6031e3..c9d72f6 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,8 @@
 # Wikibase.git
 
+[![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Wikibase.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Wikibase)
+[![Scrutinizer Quality 
Score](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Wikibase/badges/quality-score.png?s=857e6982ca67c05cd28ce53ba6d42e7e20b89325)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-Wikibase/)
+
 The Wikibase.git package is part of the [Wikibase software](http://wikiba.se/) 
and consists of
 three interconnected extensions:
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id9a0100379afb94ef7dd5f5b14eaca5757f3e338
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: WikidataJenkins wikidata-servi...@wikimedia.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] De-lint pegTokenizer.pegjs.txt. - change (mediawiki...parsoid)

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

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

Change subject: De-lint pegTokenizer.pegjs.txt.
..

De-lint pegTokenizer.pegjs.txt.

Right now we're eval()ing the tokenizer as soon as PEG generates it...
but if you dumped it to a file you'd notice a few things that
jshint doesn't like.

Change-Id: Ie9fb221a3330167287f8ad215cee6223df1ab328
---
M lib/mediawiki.tokenizer.peg.js
M lib/pegTokenizer.pegjs.txt
2 files changed, 10 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/06/130506/1

diff --git a/lib/mediawiki.tokenizer.peg.js b/lib/mediawiki.tokenizer.peg.js
index 361556b..1cbd8b2 100644
--- a/lib/mediawiki.tokenizer.peg.js
+++ b/lib/mediawiki.tokenizer.peg.js
@@ -112,6 +112,8 @@
// add jshint config
tokenizerSource =
'/* jshint loopfunc:true, latedef:false, 
nonstandard:true */\n' +
+   '/* global Set: false */\n'+
+   'use strict;\n' +
tokenizerSource + ';';
 
// eval is not evil in the case of a grammar-generated 
tokenizer.
diff --git a/lib/pegTokenizer.pegjs.txt b/lib/pegTokenizer.pegjs.txt
index a399e87..8d0bd7a 100644
--- a/lib/pegTokenizer.pegjs.txt
+++ b/lib/pegTokenizer.pegjs.txt
@@ -146,7 +146,7 @@
 
 // XXX: The following code is short-circuited because it is stricter
 // than the standard parser:
-
+/*
 switch (isbn.length) {
 case 10:
 for (i = 0; i  9; i++) {
@@ -156,12 +156,13 @@
 return (checksum % 11 === 0);
 case 13:
 for (i = 0; i  13; i++) {
-/* jshint bitwise:false */
+// jshint bitwise:false
 checksum += parseInt(isbn[i], 10) * ((i  1) ? 3 : 1);
 }
 return (checksum % 10 === 0)  (/^97[89]/.test(isbn));
 }
 return false;
+*/
 };
 
 
@@ -334,9 +335,9 @@
 da.srcTagName = name;
 }
 
-if ( endTag != '' ) {
+if ( endTag !== '' ) {
 tok = new EndTagTk( lcName, attribs, da );
-} else if ( selfClose != '' ) {
+} else if ( selfClose !== '' ) {
 da.selfClose = true;
 tok = new SelfclosingTagTk( lcName, attribs, da );
 } else {
@@ -515,7 +516,10 @@
 }
 tokens = b;
 } else if (b.constructor === String  b.attribs === undefined) {
+/*jshint -W053 */
+// we need to make a non-primitive string in order to add properties
 b = new String( b );
+/*jshint +W053 */
 if (b.dataAttribs === undefined) {
 b.dataAttribs = {};
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9fb221a3330167287f8ad215cee6223df1ab328
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] ApiParse: Add prop=modules - change (mediawiki/core)

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

Change subject: ApiParse: Add prop=modules
..


ApiParse: Add prop=modules

action=parseprop=modules now provides the ResourceLoader modules used
on the page (included in the ParserOutput object). This is intended to
be used by the live preview functionality.

Bug: 24134
Change-Id: Ib5032e4eeaf6bb97dac965c580a5107437c7bbd4
---
M includes/api/ApiParse.php
1 file changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index a7cc436..fcba5b5 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -346,6 +346,13 @@
}
}
 
+   if ( isset( $prop['modules'] ) ) {
+   $result_array['modules'] = array_values( array_unique( 
$p_result-getModules() ) );
+   $result_array['modulescripts'] = array_values( 
array_unique( $p_result-getModuleScripts() ) );
+   $result_array['modulestyles'] = array_values( 
array_unique( $p_result-getModuleStyles() ) );
+   $result_array['modulemessages'] = array_values( 
array_unique( $p_result-getModuleMessages() ) );
+   }
+
if ( isset( $prop['iwlinks'] ) ) {
$result_array['iwlinks'] = $this-formatIWLinks( 
$p_result-getInterwikiLinks() );
}
@@ -399,6 +406,10 @@
'iwlinks' = 'iw',
'sections' = 's',
'headitems' = 'hi',
+   'modules' = 'm',
+   'modulescripts' = 'm',
+   'modulestyles' = 'm',
+   'modulemessages' = 'm',
'properties' = 'pp',
'limitreportdata' = 'lr',
);
@@ -723,6 +734,7 @@
'displaytitle',
'headitems',
'headhtml',
+   'modules',
'iwlinks',
'wikitext',
'properties',
@@ -779,6 +791,7 @@
' displaytitle   - Adds the title of the parsed 
wikitext',
' headitems  - Gives items to put in the 
head of the page',
' headhtml   - Gives parsed head of the 
page',
+   ' modules- Gives the ResourceLoader 
modules used on the page',
' iwlinks- Gives interwiki links in the 
parsed wikitext',
' wikitext   - Gives the original wikitext 
that was parsed',
' properties - Gives various properties 
defined in the parsed wikitext',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib5032e4eeaf6bb97dac965c580a5107437c7bbd4
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] mw.ViewPageTarget: Use .mw-body-content for content styling - change (mediawiki...VisualEditor)

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

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

Change subject: mw.ViewPageTarget: Use .mw-body-content for content styling
..

mw.ViewPageTarget: Use .mw-body-content for content styling

* font-size and line-height differed between read mode and
  edit mode. This makes them match by using the same css class
  as MediaWiki core uses for the body content.
  Depends on I66c56c57 in MediaWiki core.

* Document padding / margin hack on surface, and sync the values.
  In edit mode, the text was being nudged to the right by a few
  pixels.

* Bump the wfUseMw call as this is a symptom of how VisualEditor
  now depends on MediaWiki 1.23.

Bug: 64599
Change-Id: I5818dce626545c4cbc8bd84fd551dc08baedbe32
---
M VisualEditor.hooks.php
M modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
M modules/ve-mw/init/ve.init.mw.Target.js
3 files changed, 12 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/07/130507/1

diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index bf5bd7a..790daae 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -20,7 +20,7 @@
// parties who attempt to install VisualEditor onto non-alpha 
wikis, as
// this should have no impact on deploying to Wikimedia's wiki 
cluster.
// Is fine for release tarballs because 1.22wmf11  1.22alpha  
1.22.0.
-   wfUseMW( '1.22' );
+   wfUseMW( '1.23' );
 
// Add tab messages to the init init module
foreach ( $wgVisualEditorTabMessages as $msg ) {
diff --git a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css 
b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
index 6668d61..b236fe9 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
@@ -6,12 +6,20 @@
  */
 
 .ve-init-mw-viewPageTarget-surface {
+   /*
+   In order to allow placing the text cursor to the start or end of the 
text by
+   clicking in the margin area, we expand the outer boundary of the surface
+   outside the parent container using negative margin. Then we shrink the 
visible
+   rendering by applying inner padding. The end result is that the content 
is
+   the same width as in read mode, except with the padding around it now 
being
+   part of it instead of its parent, thus making it treat the area as part
+   of content editable.
+   */
margin: 0.8em -1.5em 0 -1.5em;
 }
 
 .ve-init-mw-viewPageTarget-surface .ve-ce-documentNode {
-   font-size: 0.8em;
-   padding: 0 1.875em; /* 1.5/0.8 */
+   padding: 0 1.5em;
 }
 
 .ve-init-mw-viewPageTarget-surface .oo-ui-menuWidget {
diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 647f1e6..941db9a 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -1315,6 +1315,7 @@
setTimeout( function () {
// Initialize surface
target.surface.getContext().hide();
+   target.surface.$element.addClass( 
'mw-body-content' );
target.$document = 
target.surface.$element.find( '.ve-ce-documentNode' );
target.$element.append( target.surface.$element 
);
target.setUpToolbar();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5818dce626545c4cbc8bd84fd551dc08baedbe32
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Trevor Parscal tpars...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] mw.ViewPageTarget: Use .mw-body-content for content styling - change (mediawiki...VisualEditor)

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

Change subject: mw.ViewPageTarget: Use .mw-body-content for content styling
..


mw.ViewPageTarget: Use .mw-body-content for content styling

* font-size and line-height differed between read mode and
  edit mode. This makes them match by using the same css class
  as MediaWiki core uses for the body content.
  Depends on I66c56c57 in MediaWiki core.

* Document padding / margin hack on surface, and sync the values.
  In edit mode, the text was being nudged to the right by a few
  pixels.

* Bump the wfUseMw call as this is a symptom of how VisualEditor
  now depends on MediaWiki 1.23.

Bug: 64599
Change-Id: I5818dce626545c4cbc8bd84fd551dc08baedbe32
---
M VisualEditor.hooks.php
M modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
M modules/ve-mw/init/ve.init.mw.Target.js
3 files changed, 12 insertions(+), 3 deletions(-)

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



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index bf5bd7a..790daae 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -20,7 +20,7 @@
// parties who attempt to install VisualEditor onto non-alpha 
wikis, as
// this should have no impact on deploying to Wikimedia's wiki 
cluster.
// Is fine for release tarballs because 1.22wmf11  1.22alpha  
1.22.0.
-   wfUseMW( '1.22' );
+   wfUseMW( '1.23' );
 
// Add tab messages to the init init module
foreach ( $wgVisualEditorTabMessages as $msg ) {
diff --git a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css 
b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
index 6668d61..b236fe9 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
@@ -6,12 +6,20 @@
  */
 
 .ve-init-mw-viewPageTarget-surface {
+   /*
+   In order to allow placing the text cursor to the start or end of the 
text by
+   clicking in the margin area, we expand the outer boundary of the surface
+   outside the parent container using negative margin. Then we shrink the 
visible
+   rendering by applying inner padding. The end result is that the content 
is
+   the same width as in read mode, except with the padding around it now 
being
+   part of it instead of its parent, thus making it treat the area as part
+   of content editable.
+   */
margin: 0.8em -1.5em 0 -1.5em;
 }
 
 .ve-init-mw-viewPageTarget-surface .ve-ce-documentNode {
-   font-size: 0.8em;
-   padding: 0 1.875em; /* 1.5/0.8 */
+   padding: 0 1.5em;
 }
 
 .ve-init-mw-viewPageTarget-surface .oo-ui-menuWidget {
diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 647f1e6..941db9a 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -1315,6 +1315,7 @@
setTimeout( function () {
// Initialize surface
target.surface.getContext().hide();
+   target.surface.$element.addClass( 
'mw-body-content' );
target.$document = 
target.surface.$element.find( '.ve-ce-documentNode' );
target.$element.append( target.surface.$element 
);
target.setUpToolbar();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5818dce626545c4cbc8bd84fd551dc08baedbe32
Gerrit-PatchSet: 11
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org
Gerrit-Reviewer: Catrope roan.katt...@gmail.com
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: c2a2e32..da577b2 - change (mediawiki/extensions)

2014-04-29 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: c2a2e32..da577b2
..


Syncronize VisualEditor: c2a2e32..da577b2

Change-Id: Id5d0b6cf0115c4828f70d5c213ed4630afaec2e9
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index c2a2e32..da577b2 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit c2a2e32ecb8a07121619187c221626a0d36babf2
+Subproject commit da577b21d579270e98e7d4235ff3a0f627ab922a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5d0b6cf0115c4828f70d5c213ed4630afaec2e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org
Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: c2a2e32..da577b2 - change (mediawiki/extensions)

2014-04-29 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: c2a2e32..da577b2
..

Syncronize VisualEditor: c2a2e32..da577b2

Change-Id: Id5d0b6cf0115c4828f70d5c213ed4630afaec2e9
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/08/130508/1

diff --git a/VisualEditor b/VisualEditor
index c2a2e32..da577b2 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit c2a2e32ecb8a07121619187c221626a0d36babf2
+Subproject commit da577b21d579270e98e7d4235ff3a0f627ab922a

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5d0b6cf0115c4828f70d5c213ed4630afaec2e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] docs: Remove JSDuck 4 support - change (mediawiki...VisualEditor)

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

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

Change subject: docs: Remove JSDuck 4 support
..

docs: Remove JSDuck 4 support

And migrate deprecated -no_doc option.

Change-Id: I2e1e89408328c614a89f6c4e408df90d1e346d76
(cherry picked from commit f42cf1f92454cf3504a409da8e81990e6836036f)
---
M .docs/CustomTags.rb
D .docs/MetaTags.rb
M .docs/config.json
M bin/generateDocs.sh
4 files changed, 5 insertions(+), 134 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/09/130509/1

diff --git a/.docs/CustomTags.rb b/.docs/CustomTags.rb
index 768c33c..5e32a89 100644
--- a/.docs/CustomTags.rb
+++ b/.docs/CustomTags.rb
@@ -1,4 +1,4 @@
-# Custom tags for JSDuck 4.x
+# Custom tags for JSDuck 5.x
 # See also:
 # - https://github.com/senchalabs/jsduck/wiki/Tags
 # - https://github.com/senchalabs/jsduck/wiki/Custom-tags
diff --git a/.docs/MetaTags.rb b/.docs/MetaTags.rb
deleted file mode 100644
index 9366886..000
--- a/.docs/MetaTags.rb
+++ /dev/null
@@ -1,120 +0,0 @@
-# Extra meta tags for JSDuck 5+
-# See also:
-# - https://github.com/senchalabs/jsduck/wiki/Tags
-# - https://github.com/senchalabs/jsduck/wiki/Custom-tags
-# - 
https://github.com/senchalabs/jsduck/wiki/Custom-tags/7f5c32e568eab9edc8e3365e935bcb836cb11f1d
-require 'jsduck/meta_tag'
-
-class SourceTag  JsDuck::MetaTag
-  def initialize
-# This defines the name of the @tag
-@name = 'source'
-  end
-
-  # Generate HTML output for this tag.
-  # One can make use of the #format method to easily support
-  # Markdown and {@link} tags inside the contents of the tag.
-  #
-  # @param tags All matches of this tag on one class.
-  def to_html(tags)
-'h3 class=paSource/h3' + tags.map {|tag| format(tag) }.join(\n)
-  end
-end
-
-class UntilTag  JsDuck::MetaTag
-  def initialize
-@name = 'until'
-  end
-
-  # @param tags All matches of this tag on one class.
-  def to_html(tags)
-return [
-  'h3Until/h3',
-  'div class=signature-boxp',
-  'This method provides strongbrowser compatibility/strong for:',
-  tags.map {|tag| format(tag) }.join(\n),
-  '/p/div'
-]
-  end
-end
-
-class SeeTag  JsDuck::MetaTag
-  def initialize
-@name = 'see'
-@multiline = true
-  end
-
-  # @param tags All matches of this tag on one class.
-  def to_html(tags)
-doc = []
-doc  'h3 class=paRelated/h3'
-doc  [
-'ul',
-tags.map {|tag| render_long_see(tag) },
-'/ul',
-  ]
-doc
-  end
-
-  def render_long_see(tag)
-if tag =~ /\A([^\s]+)( .*)?\Z/m
-  name = $1
-  doc = $2 ? ': ' + $2 : ''
-  return [
-'li',
-format({@link #{name}} #{doc}),
-'/li'
-  ]
-end
-  end
-end
-
-class ContextTag  JsDuck::MetaTag
-  def initialize
-@name = 'this'
-  end
-
-  # @param tags All matches of this tag on one class.
-  def to_html(tags)
-return 'h3 class=paContext/h3' +  render_long_context(tags.last)
-  end
-
-  def render_long_context(tag)
-if tag =~ /\A([^\s]+)/m
-  name = $1
-  return format(`this` : {@link #{name}})
-end
-  end
-end
-
-# As of JSDuck 5 this is in core
-class FiresTag  JsDuck::MetaTag
-  def initialize
-@name = 'fires'
-@multiline = true
-  end
-
-  # @param tags All matches of this tag on one class.
-  def to_html(tags)
-doc = []
-doc  'h3 class=paFires/h3'
-doc  [
-'ul',
-tags.map {|tag| render_long_event(tag) },
-'/ul',
-  ]
-doc
-  end
-
-  def render_long_event(tag)
-if tag =~ /\A(\w+)( .*)?\Z/m
-  name = $1
-  doc = $2 ? ': ' + $2 : ''
-  return [
-'li',
-format({@link #event-#{name}} #{doc}),
-'/li'
-  ]
-end
-  end
-end
diff --git a/.docs/config.json b/.docs/config.json
index 38f396f..ff9292a 100644
--- a/.docs/config.json
+++ b/.docs/config.json
@@ -2,8 +2,10 @@
--title: VisualEditor Code Documentation,
--categories: ../.docs/categories.json,
--eg-iframe: ../.docs/eg-iframe.html,
-   --warnings: [-no_doc],
+   --tags: ./CustomTags.rb,
+   --warnings: [-nodoc(class,public)],
--builtin-classes: true,
+   --warnings-exit-nonzero: true,
--external: HTMLDocument,Window,Node,
--output: ../docs,
--: [
diff --git a/bin/generateDocs.sh b/bin/generateDocs.sh
index 7f901bf..f2ebf6e 100755
--- a/bin/generateDocs.sh
+++ b/bin/generateDocs.sh
@@ -1,19 +1,8 @@
 #!/usr/bin/env bash
 cd $(cd $(dirname $0)/..; pwd)
 
-# allow custom path to jsduck, or custom version (eg JSDUCK=jsduck _4.10.4_)
-JSDUCK=${JSDUCK:-jsduck}
-
-# Support jsduck 4.x and 5.x
-jsduckver=$($JSDUCK --version | sed -e 's/[.].*//')
-if [  $jsduckver = JSDuck 4 ]; then
-   jsduckopt=--meta-tags .docs/MetaTags.rb
-else
-   jsduckopt=--tags .docs/CustomTags.rb
-fi
-
 # Disable parallel processing which seems to be causing 

[MediaWiki-commits] [Gerrit] docs: Remove JSDuck 4 support - change (mediawiki...VisualEditor)

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

Change subject: docs: Remove JSDuck 4 support
..


docs: Remove JSDuck 4 support

And migrate deprecated -no_doc option.

Change-Id: I2e1e89408328c614a89f6c4e408df90d1e346d76
(cherry picked from commit f42cf1f92454cf3504a409da8e81990e6836036f)
---
M .docs/CustomTags.rb
D .docs/MetaTags.rb
M .docs/config.json
M bin/generateDocs.sh
4 files changed, 5 insertions(+), 134 deletions(-)

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



diff --git a/.docs/CustomTags.rb b/.docs/CustomTags.rb
index 768c33c..5e32a89 100644
--- a/.docs/CustomTags.rb
+++ b/.docs/CustomTags.rb
@@ -1,4 +1,4 @@
-# Custom tags for JSDuck 4.x
+# Custom tags for JSDuck 5.x
 # See also:
 # - https://github.com/senchalabs/jsduck/wiki/Tags
 # - https://github.com/senchalabs/jsduck/wiki/Custom-tags
diff --git a/.docs/MetaTags.rb b/.docs/MetaTags.rb
deleted file mode 100644
index 9366886..000
--- a/.docs/MetaTags.rb
+++ /dev/null
@@ -1,120 +0,0 @@
-# Extra meta tags for JSDuck 5+
-# See also:
-# - https://github.com/senchalabs/jsduck/wiki/Tags
-# - https://github.com/senchalabs/jsduck/wiki/Custom-tags
-# - 
https://github.com/senchalabs/jsduck/wiki/Custom-tags/7f5c32e568eab9edc8e3365e935bcb836cb11f1d
-require 'jsduck/meta_tag'
-
-class SourceTag  JsDuck::MetaTag
-  def initialize
-# This defines the name of the @tag
-@name = 'source'
-  end
-
-  # Generate HTML output for this tag.
-  # One can make use of the #format method to easily support
-  # Markdown and {@link} tags inside the contents of the tag.
-  #
-  # @param tags All matches of this tag on one class.
-  def to_html(tags)
-'h3 class=paSource/h3' + tags.map {|tag| format(tag) }.join(\n)
-  end
-end
-
-class UntilTag  JsDuck::MetaTag
-  def initialize
-@name = 'until'
-  end
-
-  # @param tags All matches of this tag on one class.
-  def to_html(tags)
-return [
-  'h3Until/h3',
-  'div class=signature-boxp',
-  'This method provides strongbrowser compatibility/strong for:',
-  tags.map {|tag| format(tag) }.join(\n),
-  '/p/div'
-]
-  end
-end
-
-class SeeTag  JsDuck::MetaTag
-  def initialize
-@name = 'see'
-@multiline = true
-  end
-
-  # @param tags All matches of this tag on one class.
-  def to_html(tags)
-doc = []
-doc  'h3 class=paRelated/h3'
-doc  [
-'ul',
-tags.map {|tag| render_long_see(tag) },
-'/ul',
-  ]
-doc
-  end
-
-  def render_long_see(tag)
-if tag =~ /\A([^\s]+)( .*)?\Z/m
-  name = $1
-  doc = $2 ? ': ' + $2 : ''
-  return [
-'li',
-format({@link #{name}} #{doc}),
-'/li'
-  ]
-end
-  end
-end
-
-class ContextTag  JsDuck::MetaTag
-  def initialize
-@name = 'this'
-  end
-
-  # @param tags All matches of this tag on one class.
-  def to_html(tags)
-return 'h3 class=paContext/h3' +  render_long_context(tags.last)
-  end
-
-  def render_long_context(tag)
-if tag =~ /\A([^\s]+)/m
-  name = $1
-  return format(`this` : {@link #{name}})
-end
-  end
-end
-
-# As of JSDuck 5 this is in core
-class FiresTag  JsDuck::MetaTag
-  def initialize
-@name = 'fires'
-@multiline = true
-  end
-
-  # @param tags All matches of this tag on one class.
-  def to_html(tags)
-doc = []
-doc  'h3 class=paFires/h3'
-doc  [
-'ul',
-tags.map {|tag| render_long_event(tag) },
-'/ul',
-  ]
-doc
-  end
-
-  def render_long_event(tag)
-if tag =~ /\A(\w+)( .*)?\Z/m
-  name = $1
-  doc = $2 ? ': ' + $2 : ''
-  return [
-'li',
-format({@link #event-#{name}} #{doc}),
-'/li'
-  ]
-end
-  end
-end
diff --git a/.docs/config.json b/.docs/config.json
index 38f396f..ff9292a 100644
--- a/.docs/config.json
+++ b/.docs/config.json
@@ -2,8 +2,10 @@
--title: VisualEditor Code Documentation,
--categories: ../.docs/categories.json,
--eg-iframe: ../.docs/eg-iframe.html,
-   --warnings: [-no_doc],
+   --tags: ./CustomTags.rb,
+   --warnings: [-nodoc(class,public)],
--builtin-classes: true,
+   --warnings-exit-nonzero: true,
--external: HTMLDocument,Window,Node,
--output: ../docs,
--: [
diff --git a/bin/generateDocs.sh b/bin/generateDocs.sh
index 7f901bf..f2ebf6e 100755
--- a/bin/generateDocs.sh
+++ b/bin/generateDocs.sh
@@ -1,19 +1,8 @@
 #!/usr/bin/env bash
 cd $(cd $(dirname $0)/..; pwd)
 
-# allow custom path to jsduck, or custom version (eg JSDUCK=jsduck _4.10.4_)
-JSDUCK=${JSDUCK:-jsduck}
-
-# Support jsduck 4.x and 5.x
-jsduckver=$($JSDUCK --version | sed -e 's/[.].*//')
-if [  $jsduckver = JSDuck 4 ]; then
-   jsduckopt=--meta-tags .docs/MetaTags.rb
-else
-   jsduckopt=--tags .docs/CustomTags.rb
-fi
-
 # Disable parallel processing which seems to be causing problems under Ruby 1.8
-$JSDUCK --config .docs/config.json 

[MediaWiki-commits] [Gerrit] Remove dependency on sleep - change (mediawiki...OfflineContentGenerator)

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

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

Change subject: Remove dependency on sleep
..

Remove dependency on sleep

Change-Id: I4f5a160562b3f6cdf0b353644e87fff283fa55aa
---
M mw-ocg-service.js
M package.json
2 files changed, 6 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator
 refs/changes/11/130511/1

diff --git a/mw-ocg-service.js b/mw-ocg-service.js
index c989058..dccb4af 100755
--- a/mw-ocg-service.js
+++ b/mw-ocg-service.js
@@ -35,7 +35,6 @@
 var commander = require('commander');
 var os = require('os');
 require('rconsole');
-var sleep = require('sleep');
 
 /* === Configuration Options  File  */
 var config = require('./defaults.js');
@@ -89,8 +88,6 @@
 
/* --- Thread management --- */
var gracefulShutdown = function gracefulShutdown() {
-   var stillAlive;
-
respawnWorkers = false;
console.info('Beginning graceful shutdown');
 
@@ -99,16 +96,17 @@
cluster.workers[id].kill('SIGINT');
}
 
-   do {
-   stillAlive = Object.keys(cluster.workers).length;
+   var infoAndExit = function() {
+   var stillAlive = Object.keys(cluster.workers).length;
if (stillAlive  0) {
console.info('Still awaiting death of %d 
workers', stillAlive);
-   sleep.sleep(1);
+   setTimeout( infoAndExit, 1000 );
} else {
console.info('All threads killed. Exiting.');
process.exit();
}
-   } while (stillAlive  0);
+   };
+   infoAndExit();
};
 
var immediateShutdown = function immediateShutdown() {
diff --git a/package.json b/package.json
index d805678..b21bf6f 100644
--- a/package.json
+++ b/package.json
@@ -21,8 +21,7 @@
commander: ~2.1.0,
 mime: ~1.2.11,
 rconsole: ~0.2.0,
-redis: ~0.9.0,
-sleep: ~1.1.2
+redis: ~0.9.0
   },
   optionalDependencies: {
 hiredis: ~0.1.15

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f5a160562b3f6cdf0b353644e87fff283fa55aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator
Gerrit-Branch: master
Gerrit-Owner: Mwalker mwal...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Tool Labs: fix to tomcat-starter - change (operations/puppet)

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

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

Change subject: Tool Labs: fix to tomcat-starter
..

Tool Labs: fix to tomcat-starter

Remove brain damage introduced by myself.

Change-Id: Ib08d6f7e8379cec49c699367c5c428dd7513ba12
---
M modules/toollabs/files/tomcat-starter
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/10/130510/1

diff --git a/modules/toollabs/files/tomcat-starter 
b/modules/toollabs/files/tomcat-starter
index 9634435..dac3b45 100755
--- a/modules/toollabs/files/tomcat-starter
+++ b/modules/toollabs/files/tomcat-starter
@@ -68,7 +68,7 @@
 /usr/bin/xmlstarlet ed -u /Server/@port -v -1 $conf |
   /usr/bin/xmlstarlet ed -u /Server/Service/Connector/@port -v $port 
$conf.run
 
-export CATALINA_BASE=/data/project/javatest/public_tomcat
+export CATALINA_BASE=/data/project/$tool/public_tomcat
 export CATALINA_HOME=/usr/share/tomcat7
 export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib08d6f7e8379cec49c699367c5c428dd7513ba12
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Tool Labs: fix to tomcat-starter - change (operations/puppet)

2014-04-29 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Tool Labs: fix to tomcat-starter
..


Tool Labs: fix to tomcat-starter

Remove brain damage introduced by myself.

Change-Id: Ib08d6f7e8379cec49c699367c5c428dd7513ba12
---
M modules/toollabs/files/tomcat-starter
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/toollabs/files/tomcat-starter 
b/modules/toollabs/files/tomcat-starter
index 9634435..dac3b45 100755
--- a/modules/toollabs/files/tomcat-starter
+++ b/modules/toollabs/files/tomcat-starter
@@ -68,7 +68,7 @@
 /usr/bin/xmlstarlet ed -u /Server/@port -v -1 $conf |
   /usr/bin/xmlstarlet ed -u /Server/Service/Connector/@port -v $port 
$conf.run
 
-export CATALINA_BASE=/data/project/javatest/public_tomcat
+export CATALINA_BASE=/data/project/$tool/public_tomcat
 export CATALINA_HOME=/usr/share/tomcat7
 export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib08d6f7e8379cec49c699367c5c428dd7513ba12
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Always show the overlay when badge clicked - change (mediawiki...Echo)

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

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

Change subject: Always show the overlay when badge clicked
..

Always show the overlay when badge clicked

The badge is always close to the top of the window (if it's visible), so
this is not necessary. Also, this behavior is definitely not desired
for the upcoming fixed header beta feature (the badge will always be
visible as a part of the fixed header).

Change-Id: I66e8a50b1139f7bcd005cfb3c3576578efe6a653
---
M modules/overlay/ext.echo.overlay.js
1 file changed, 0 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/12/130512/1

diff --git a/modules/overlay/ext.echo.overlay.js 
b/modules/overlay/ext.echo.overlay.js
index 1fa4f77..96fbd4c 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -283,12 +283,6 @@
// log the badge click
mw.echo.logInteraction( 'ui-badge-link-click' );
 
-   // If the link is not near the top of the window, 
showing the overlay below it
-   // will likely look very silly, so let's not do this 
and just go the special page
-   if ( $link.offset().top  0.2 * $( window ).height() ) {
-   return;
-   }
-
e.preventDefault();
 
$target = $( e.target );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66e8a50b1139f7bcd005cfb3c3576578efe6a653
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: JGonera jgon...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Disable JSONP cache breaking in jQuery - change (mediawiki...MultimediaViewer)

2014-04-29 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Disable JSONP cache breaking in jQuery
..

Disable JSONP cache breaking in jQuery

Change-Id: Ie3b80b0c2f8ce734c6d08418c7b19a7e24c2d5eb
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/547
---
M resources/mmv/provider/mmv.provider.UserInfo.js
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer 
refs/changes/13/130513/1

diff --git a/resources/mmv/provider/mmv.provider.UserInfo.js 
b/resources/mmv/provider/mmv.provider.UserInfo.js
index b64d7b4..9f72bda 100644
--- a/resources/mmv/provider/mmv.provider.UserInfo.js
+++ b/resources/mmv/provider/mmv.provider.UserInfo.js
@@ -68,6 +68,8 @@
if ( repoInfo.apiUrl ) {
ajaxOptions.url = repoInfo.apiUrl;
ajaxOptions.dataType = 'jsonp';
+   ajaxOptions.cache = true; // do not append 
`_=timestamp` to the URL
+   ajaxOptions.jsonpCallback = this.getCallbackName( 
username  );
cacheKey = cacheKey + '|' + repoInfo.apiUrl; // local 
and remote user names could conflict
}
 
@@ -90,5 +92,18 @@
} );
};
 
+   /**,
+* Generate JSONP callback function name.
+* jQuery uses a random string by default, which would break caching.
+* On the other hand the callback needs to be unique to avoid surprises 
when multiple
+* requests run in parallel. And of course needs to be a valid JS 
variable name.
+* @param username
+*/
+   UserInfo.prototype.getCallbackName = function ( username ) {
+   return 'mmv_userinfo_' + mw.util.rawurlencode( username )// 
encodes all characters except -.~_
+   .replace( /-/g, '%2D' ).replace( /\./g, '%2E' 
).replace( /~/g, '%7E' ).replace( /_/g, '%5F' )
+   .replace( /%/g, '_' );
+   };
+
mw.mmv.provider.UserInfo = UserInfo;
 }( mediaWiki, jQuery, OO ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3b80b0c2f8ce734c6d08418c7b19a7e24c2d5eb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Revert Revert Preserve textarea state when building WikiEd... - change (mediawiki...WikiEditor)

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

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

Change subject: Revert Revert Preserve textarea state when building 
WikiEditor UI
..

Revert Revert Preserve textarea state when building WikiEditor UI

Ib97f47ef1d66420682bd429c9c12e66c3392e77d Didn't cause
problems so this is now safe to reapply (to wmf2).

This reverts commit 908e7cc56c4ef5db2ab0d213b2dbd8c8034a0da7.

Change-Id: I510536959b58ff0adacd7908f6150c95bfdb3ec1
---
M modules/jquery.wikiEditor.js
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor 
refs/changes/14/130514/1

diff --git a/modules/jquery.wikiEditor.js b/modules/jquery.wikiEditor.js
index c414e19..0b87409 100644
--- a/modules/jquery.wikiEditor.js
+++ b/modules/jquery.wikiEditor.js
@@ -486,6 +486,9 @@
.append( $( 'span' + mediaWiki.msg( 'wikieditor-loading' ) + 
'/span' )
.css( 'marginTop', context.$textarea.height() / 2 ) );
*/
+   /* Preserving cursor and focus state, which will get lost due to 
wrapAll */
+   var hasFocus = context.$textarea.is( ':focus' ),
+   cursorPos = context.$textarea.textSelection( 
'getCaretPosition', { startAndEnd: true } );
// Encapsulate the textarea with some containers for layout
context.$textarea
/* Disabling our loading div for now
@@ -497,6 +500,14 @@
.wrapAll( $( 'div' ).addClass( 'wikiEditor-ui-left' ) )
.wrapAll( $( 'div' ).addClass( 'wikiEditor-ui-bottom' ) )
.wrapAll( $( 'div' ).addClass( 'wikiEditor-ui-text' ) );
+   // Restore scroll position after this wrapAll (tracked by 
mediawiki.action.edit)
+   context.$textarea.prop( 'scrollTop', $( '#wpScrolltop' ).val() );
+   // Restore focus and cursor if needed
+   if ( hasFocus ) {
+   context.$textarea.focus();
+   context.$textarea.textSelection( 'setSelection', { start: 
cursorPos[0], end: cursorPos[1] } );
+   }
+
// Get references to some of the newly created containers
context.$ui = 
context.$textarea.parent().parent().parent().parent().parent();
context.$wikitext = 
context.$textarea.parent().parent().parent().parent();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I510536959b58ff0adacd7908f6150c95bfdb3ec1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Mwalker mwal...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Revert Revert Preserve textarea state when building WikiEd... - change (mediawiki...WikiEditor)

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

Change subject: Revert Revert Preserve textarea state when building 
WikiEditor UI
..


Revert Revert Preserve textarea state when building WikiEditor UI

Ib97f47ef1d66420682bd429c9c12e66c3392e77d Didn't cause
problems so this is now safe to reapply (to wmf2).

This reverts commit 908e7cc56c4ef5db2ab0d213b2dbd8c8034a0da7.

Change-Id: I510536959b58ff0adacd7908f6150c95bfdb3ec1
---
M modules/jquery.wikiEditor.js
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/modules/jquery.wikiEditor.js b/modules/jquery.wikiEditor.js
index c414e19..0b87409 100644
--- a/modules/jquery.wikiEditor.js
+++ b/modules/jquery.wikiEditor.js
@@ -486,6 +486,9 @@
.append( $( 'span' + mediaWiki.msg( 'wikieditor-loading' ) + 
'/span' )
.css( 'marginTop', context.$textarea.height() / 2 ) );
*/
+   /* Preserving cursor and focus state, which will get lost due to 
wrapAll */
+   var hasFocus = context.$textarea.is( ':focus' ),
+   cursorPos = context.$textarea.textSelection( 
'getCaretPosition', { startAndEnd: true } );
// Encapsulate the textarea with some containers for layout
context.$textarea
/* Disabling our loading div for now
@@ -497,6 +500,14 @@
.wrapAll( $( 'div' ).addClass( 'wikiEditor-ui-left' ) )
.wrapAll( $( 'div' ).addClass( 'wikiEditor-ui-bottom' ) )
.wrapAll( $( 'div' ).addClass( 'wikiEditor-ui-text' ) );
+   // Restore scroll position after this wrapAll (tracked by 
mediawiki.action.edit)
+   context.$textarea.prop( 'scrollTop', $( '#wpScrolltop' ).val() );
+   // Restore focus and cursor if needed
+   if ( hasFocus ) {
+   context.$textarea.focus();
+   context.$textarea.textSelection( 'setSelection', { start: 
cursorPos[0], end: cursorPos[1] } );
+   }
+
// Get references to some of the newly created containers
context.$ui = 
context.$textarea.parent().parent().parent().parent().parent();
context.$wikitext = 
context.$textarea.parent().parent().parent().parent();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I510536959b58ff0adacd7908f6150c95bfdb3ec1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Mwalker mwal...@wikimedia.org
Gerrit-Reviewer: Bartosz Dziewoński matma@gmail.com
Gerrit-Reviewer: Greg Grossmeier g...@wikimedia.org
Gerrit-Reviewer: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Revert Revert Preserve textarea state when building WikiEd... - change (mediawiki...WikiEditor)

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

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

Change subject: Revert Revert Preserve textarea state when building 
WikiEditor UI
..

Revert Revert Preserve textarea state when building WikiEditor UI

Ib97f47ef1d66420682bd429c9c12e66c3392e77d Didn't cause
problems so this is now safe to reapply (to wmf2).

This reverts commit 908e7cc56c4ef5db2ab0d213b2dbd8c8034a0da7.

Change-Id: I510536959b58ff0adacd7908f6150c95bfdb3ec1
(cherry picked from commit b5696dc435727bde5f6ae55d616e845519a3a174)
---
M modules/jquery.wikiEditor.js
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiEditor 
refs/changes/15/130515/1

diff --git a/modules/jquery.wikiEditor.js b/modules/jquery.wikiEditor.js
index ab86bd1..d29b53c 100644
--- a/modules/jquery.wikiEditor.js
+++ b/modules/jquery.wikiEditor.js
@@ -486,6 +486,9 @@
.append( $( 'span' + mediaWiki.msg( 'wikieditor-loading' ) + 
'/span' )
.css( 'marginTop', context.$textarea.height() / 2 ) );
*/
+   /* Preserving cursor and focus state, which will get lost due to 
wrapAll */
+   var hasFocus = context.$textarea.is( ':focus' ),
+   cursorPos = context.$textarea.textSelection( 
'getCaretPosition', { startAndEnd: true } );
// Encapsulate the textarea with some containers for layout
context.$textarea
/* Disabling our loading div for now
@@ -497,6 +500,14 @@
.wrapAll( $( 'div' ).addClass( 'wikiEditor-ui-left' ) )
.wrapAll( $( 'div' ).addClass( 'wikiEditor-ui-bottom' ) )
.wrapAll( $( 'div' ).addClass( 'wikiEditor-ui-text' ) );
+   // Restore scroll position after this wrapAll (tracked by 
mediawiki.action.edit)
+   context.$textarea.prop( 'scrollTop', $( '#wpScrolltop' ).val() );
+   // Restore focus and cursor if needed
+   if ( hasFocus ) {
+   context.$textarea.focus();
+   context.$textarea.textSelection( 'setSelection', { start: 
cursorPos[0], end: cursorPos[1] } );
+   }
+
// Get references to some of the newly created containers
context.$ui = 
context.$textarea.parent().parent().parent().parent().parent();
context.$wikitext = 
context.$textarea.parent().parent().parent().parent();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I510536959b58ff0adacd7908f6150c95bfdb3ec1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Mwalker mwal...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix regex bug in 36e9fd2a (which was a fix for ae30ae0b) - change (operations/puppet)

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

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

Change subject: Fix regex bug in 36e9fd2a (which was a fix for ae30ae0b)
..

Fix regex bug in 36e9fd2a (which was a fix for ae30ae0b)

In PCRE regexes, (?!) is a negative look-ahead assertion,
whereas (?!) is a negative look-behind assertion.

The previous iteration of this regex was trying to use
look-ahead as look-behind.  The net result was that the
gettingStartedUserToken= cookies were still causing
cache differentiation.  I also re-ordered things a bit
so that the look-behind is only in the Token part of the
alternation.

Change-Id: I5fa38794ed069bbfc2cf2e411e94ad96500e
---
M templates/varnish/text-common.inc.vcl.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/16/130516/1

diff --git a/templates/varnish/text-common.inc.vcl.erb 
b/templates/varnish/text-common.inc.vcl.erb
index 2c1b8f8..f6e8a43 100644
--- a/templates/varnish/text-common.inc.vcl.erb
+++ b/templates/varnish/text-common.inc.vcl.erb
@@ -39,7 +39,7 @@
/* gettingStarted exclusion is to work around e.g. 
enwikigettingStartedUserToken=
 * which probably shouldn't end in Token= ...
 */
-   if (req.http.Cookie ~ (?!gettingStartedUser)([sS]ession|Token)=) {
+   if (req.http.Cookie ~ ([sS]ession|(?!gettingStartedUser)Token)=) {
set req.hash_ignore_busy = true;
} else {
call cookie_munging;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5fa38794ed069bbfc2cf2e411e94ad96500e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix regex bug in 36e9fd2a (which was a fix for ae30ae0b) - change (operations/puppet)

2014-04-29 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: Fix regex bug in 36e9fd2a (which was a fix for ae30ae0b)
..


Fix regex bug in 36e9fd2a (which was a fix for ae30ae0b)

In PCRE regexes, (?!) is a negative look-ahead assertion,
whereas (?!) is a negative look-behind assertion.

The previous iteration of this regex was trying to use
look-ahead as look-behind.  The net result was that the
gettingStartedUserToken= cookies were still causing
cache differentiation.  I also re-ordered things a bit
so that the look-behind is only in the Token part of the
alternation.

Change-Id: I5fa38794ed069bbfc2cf2e411e94ad96500e
---
M templates/varnish/text-common.inc.vcl.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/templates/varnish/text-common.inc.vcl.erb 
b/templates/varnish/text-common.inc.vcl.erb
index 2c1b8f8..f6e8a43 100644
--- a/templates/varnish/text-common.inc.vcl.erb
+++ b/templates/varnish/text-common.inc.vcl.erb
@@ -39,7 +39,7 @@
/* gettingStarted exclusion is to work around e.g. 
enwikigettingStartedUserToken=
 * which probably shouldn't end in Token= ...
 */
-   if (req.http.Cookie ~ (?!gettingStartedUser)([sS]ession|Token)=) {
+   if (req.http.Cookie ~ ([sS]ession|(?!gettingStartedUser)Token)=) {
set req.hash_ignore_busy = true;
} else {
call cookie_munging;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5fa38794ed069bbfc2cf2e411e94ad96500e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Improve alert and required indicators - change (oojs/ui)

2014-04-29 Thread Trevor Parscal (Code Review)
Trevor Parscal has uploaded a new change for review.

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

Change subject: Improve alert and required indicators
..

Improve alert and required indicators

Also make indicators in outline items 50% transparent.

Change-Id: I85ef4159b960b07831bb618ddc1c91038dff7f27
---
M src/styles/images/indicators/alert.png
M src/styles/images/indicators/alert.svg
M src/styles/images/indicators/required.png
M src/styles/images/indicators/required.svg
M src/themes/apex/widgets/OutlineItemWidget.less
5 files changed, 15 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/17/130517/1

diff --git a/src/styles/images/indicators/alert.png 
b/src/styles/images/indicators/alert.png
index 8d97d1a..bfc83e7 100644
--- a/src/styles/images/indicators/alert.png
+++ b/src/styles/images/indicators/alert.png
Binary files differ
diff --git a/src/styles/images/indicators/alert.svg 
b/src/styles/images/indicators/alert.svg
index 0cb76dc..8ce4b25 100644
--- a/src/styles/images/indicators/alert.svg
+++ b/src/styles/images/indicators/alert.svg
@@ -2,8 +2,7 @@
 !DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN 
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;
 svg version=1.1 xmlns=http://www.w3.org/2000/svg; 
xmlns:xlink=http://www.w3.org/1999/xlink; x=0px y=0px width=12 
height=12 viewBox=0, 0, 12, 12
   g id=deprecated opacity=0.75
-path d=M5,9 L7,9 L7,11 L5,11 z fill=#00/
-path d=M7,1 L7,8 L5,8 L5,1 z fill=#00/
+path d=M6,12 C2.686,12 -0,9.314 -0,6 C-0,2.686 2.686,-0 6,-0 C9.314,-0 
12,2.686 12,6 C12,9.314 9.314,12 6,12 z M5,7 L7,7 L7,2 L5,2 z M5,10 L7,10 L7,8 
L5,8 z fill=#00/
   /g
   defs/
 /svg
diff --git a/src/styles/images/indicators/required.png 
b/src/styles/images/indicators/required.png
index aeb35a3..d10e0d4 100644
--- a/src/styles/images/indicators/required.png
+++ b/src/styles/images/indicators/required.png
Binary files differ
diff --git a/src/styles/images/indicators/required.svg 
b/src/styles/images/indicators/required.svg
index 7c60ec0..ee1baf7 100644
--- a/src/styles/images/indicators/required.svg
+++ b/src/styles/images/indicators/required.svg
@@ -2,7 +2,9 @@
 !DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN 
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;
 svg version=1.1 xmlns=http://www.w3.org/2000/svg; 
xmlns:xlink=http://www.w3.org/1999/xlink; x=0px y=0px width=12 
height=12 viewBox=0, 0, 12, 12
   g id=required opacity=0.75
-path d=M7,0 L7,4.268 L10.696,2.134 L11.696,3.866 L8,6 L11.696,8.134 
L10.696,9.866 L7,7.732 L7,12 L5,12 L5,7.732 L1.304,9.866 L0.304,8.134 L4,6 
L0.304,3.866 L1.304,2.134 L5,4.268 L5,0 z fill=#00/
+path d=M5,1 L7,1 L7,11 L5,11 z fill=#00/
+path d=M9.83,2.634 L10.83,4.366 L2.17,9.366 L1.17,7.634 z 
fill=#00/
+path d=M1.17,4.366 L2.17,2.634 L10.83,7.634 L9.83,9.366 z 
fill=#00/
   /g
   defs/
 /svg
diff --git a/src/themes/apex/widgets/OutlineItemWidget.less 
b/src/themes/apex/widgets/OutlineItemWidget.less
index 331c6f4..6ce4978 100644
--- a/src/themes/apex/widgets/OutlineItemWidget.less
+++ b/src/themes/apex/widgets/OutlineItemWidget.less
@@ -5,6 +5,10 @@
padding-right: 1.5em;
}
 
+   .oo-ui-indicatedElement .oo-ui-indicatedElement-indicator {
+   opacity: 0.5;
+   }
+
-level-0 {
padding-left: 3.5em;
 
@@ -41,11 +45,12 @@
font-style: italic;
}
 
-   .oo-ui-flaggableElement-empty .oo-ui-iconedElement-icon,
-   .oo-ui-flaggableElement-empty .oo-ui-indicatedElement-indicator {
-   opacity: 0.5;
-   }
-   .oo-ui-flaggableElement-empty .oo-ui-labeledElement-label {
-   color: #777;
+   .oo-ui-flaggableElement-empty {
+   .oo-ui-iconedElement-icon {
+   opacity: 0.5;
+   }
+   .oo-ui-labeledElement-label {
+   color: #777;
+   }
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85ef4159b960b07831bb618ddc1c91038dff7f27
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove dependency on sleep - change (mediawiki...OfflineContentGenerator)

2014-04-29 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Remove dependency on sleep
..


Remove dependency on sleep

Change-Id: I4f5a160562b3f6cdf0b353644e87fff283fa55aa
---
M mw-ocg-service.js
M package.json
2 files changed, 6 insertions(+), 9 deletions(-)

Approvals:
  Mwalker: Verified; Looks good to me, approved



diff --git a/mw-ocg-service.js b/mw-ocg-service.js
index c989058..dccb4af 100755
--- a/mw-ocg-service.js
+++ b/mw-ocg-service.js
@@ -35,7 +35,6 @@
 var commander = require('commander');
 var os = require('os');
 require('rconsole');
-var sleep = require('sleep');
 
 /* === Configuration Options  File  */
 var config = require('./defaults.js');
@@ -89,8 +88,6 @@
 
/* --- Thread management --- */
var gracefulShutdown = function gracefulShutdown() {
-   var stillAlive;
-
respawnWorkers = false;
console.info('Beginning graceful shutdown');
 
@@ -99,16 +96,17 @@
cluster.workers[id].kill('SIGINT');
}
 
-   do {
-   stillAlive = Object.keys(cluster.workers).length;
+   var infoAndExit = function() {
+   var stillAlive = Object.keys(cluster.workers).length;
if (stillAlive  0) {
console.info('Still awaiting death of %d 
workers', stillAlive);
-   sleep.sleep(1);
+   setTimeout( infoAndExit, 1000 );
} else {
console.info('All threads killed. Exiting.');
process.exit();
}
-   } while (stillAlive  0);
+   };
+   infoAndExit();
};
 
var immediateShutdown = function immediateShutdown() {
diff --git a/package.json b/package.json
index d805678..b21bf6f 100644
--- a/package.json
+++ b/package.json
@@ -21,8 +21,7 @@
commander: ~2.1.0,
 mime: ~1.2.11,
 rconsole: ~0.2.0,
-redis: ~0.9.0,
-sleep: ~1.1.2
+redis: ~0.9.0
   },
   optionalDependencies: {
 hiredis: ~0.1.15

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f5a160562b3f6cdf0b353644e87fff283fa55aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator
Gerrit-Branch: master
Gerrit-Owner: Mwalker mwal...@wikimedia.org
Gerrit-Reviewer: Mwalker mwal...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Clean parsoid workspaces. - change (integration/jenkins-job-builder-config)

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

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

Change subject: Clean parsoid workspaces.
..

Clean parsoid workspaces.

This matches the change made in ed607c93b33e0212d1eba1ed3754571bf9ee6f05
for most scms.

Change-Id: Ieff22a4a26dfd16e8cbcbf0695440c2dc79577da
---
M parsoidsvc.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/18/130518/1

diff --git a/parsoidsvc.yaml b/parsoidsvc.yaml
index 1a14780..04ffd45 100644
--- a/parsoidsvc.yaml
+++ b/parsoidsvc.yaml
@@ -28,6 +28,8 @@
  - '$ZUUL_COMMIT'
 refspec: '$ZUUL_REF'
 disable-submodules: true
+wipe-workspace: false
+clean: true
 builders:
 - get-mw-core:
 branch: 'master'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieff22a4a26dfd16e8cbcbf0695440c2dc79577da
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Improve alert and required indicators - change (oojs/ui)

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

Change subject: Improve alert and required indicators
..


Improve alert and required indicators

Also make indicators in outline items 50% transparent.

Change-Id: I85ef4159b960b07831bb618ddc1c91038dff7f27
---
M src/styles/images/indicators/alert.png
M src/styles/images/indicators/alert.svg
M src/styles/images/indicators/required.png
M src/styles/images/indicators/required.svg
M src/themes/apex/widgets/OutlineItemWidget.less
5 files changed, 15 insertions(+), 9 deletions(-)

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



diff --git a/src/styles/images/indicators/alert.png 
b/src/styles/images/indicators/alert.png
index 8d97d1a..bfc83e7 100644
--- a/src/styles/images/indicators/alert.png
+++ b/src/styles/images/indicators/alert.png
Binary files differ
diff --git a/src/styles/images/indicators/alert.svg 
b/src/styles/images/indicators/alert.svg
index 0cb76dc..8ce4b25 100644
--- a/src/styles/images/indicators/alert.svg
+++ b/src/styles/images/indicators/alert.svg
@@ -2,8 +2,7 @@
 !DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN 
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;
 svg version=1.1 xmlns=http://www.w3.org/2000/svg; 
xmlns:xlink=http://www.w3.org/1999/xlink; x=0px y=0px width=12 
height=12 viewBox=0, 0, 12, 12
   g id=deprecated opacity=0.75
-path d=M5,9 L7,9 L7,11 L5,11 z fill=#00/
-path d=M7,1 L7,8 L5,8 L5,1 z fill=#00/
+path d=M6,12 C2.686,12 -0,9.314 -0,6 C-0,2.686 2.686,-0 6,-0 C9.314,-0 
12,2.686 12,6 C12,9.314 9.314,12 6,12 z M5,7 L7,7 L7,2 L5,2 z M5,10 L7,10 L7,8 
L5,8 z fill=#00/
   /g
   defs/
 /svg
diff --git a/src/styles/images/indicators/required.png 
b/src/styles/images/indicators/required.png
index aeb35a3..d10e0d4 100644
--- a/src/styles/images/indicators/required.png
+++ b/src/styles/images/indicators/required.png
Binary files differ
diff --git a/src/styles/images/indicators/required.svg 
b/src/styles/images/indicators/required.svg
index 7c60ec0..ee1baf7 100644
--- a/src/styles/images/indicators/required.svg
+++ b/src/styles/images/indicators/required.svg
@@ -2,7 +2,9 @@
 !DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.1//EN 
http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;
 svg version=1.1 xmlns=http://www.w3.org/2000/svg; 
xmlns:xlink=http://www.w3.org/1999/xlink; x=0px y=0px width=12 
height=12 viewBox=0, 0, 12, 12
   g id=required opacity=0.75
-path d=M7,0 L7,4.268 L10.696,2.134 L11.696,3.866 L8,6 L11.696,8.134 
L10.696,9.866 L7,7.732 L7,12 L5,12 L5,7.732 L1.304,9.866 L0.304,8.134 L4,6 
L0.304,3.866 L1.304,2.134 L5,4.268 L5,0 z fill=#00/
+path d=M5,1 L7,1 L7,11 L5,11 z fill=#00/
+path d=M9.83,2.634 L10.83,4.366 L2.17,9.366 L1.17,7.634 z 
fill=#00/
+path d=M1.17,4.366 L2.17,2.634 L10.83,7.634 L9.83,9.366 z 
fill=#00/
   /g
   defs/
 /svg
diff --git a/src/themes/apex/widgets/OutlineItemWidget.less 
b/src/themes/apex/widgets/OutlineItemWidget.less
index 331c6f4..6ce4978 100644
--- a/src/themes/apex/widgets/OutlineItemWidget.less
+++ b/src/themes/apex/widgets/OutlineItemWidget.less
@@ -5,6 +5,10 @@
padding-right: 1.5em;
}
 
+   .oo-ui-indicatedElement .oo-ui-indicatedElement-indicator {
+   opacity: 0.5;
+   }
+
-level-0 {
padding-left: 3.5em;
 
@@ -41,11 +45,12 @@
font-style: italic;
}
 
-   .oo-ui-flaggableElement-empty .oo-ui-iconedElement-icon,
-   .oo-ui-flaggableElement-empty .oo-ui-indicatedElement-indicator {
-   opacity: 0.5;
-   }
-   .oo-ui-flaggableElement-empty .oo-ui-labeledElement-label {
-   color: #777;
+   .oo-ui-flaggableElement-empty {
+   .oo-ui-iconedElement-icon {
+   opacity: 0.5;
+   }
+   .oo-ui-labeledElement-label {
+   color: #777;
+   }
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85ef4159b960b07831bb618ddc1c91038dff7f27
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Do not handle clicks if MediaViewer could not be loaded. - change (mediawiki...MultimediaViewer)

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

Change subject: Do not handle clicks if MediaViewer could not be loaded.
..


Do not handle clicks if MediaViewer could not be loaded.

mmv.bootstrap will not try again to handle clicks if it failed
for the first time.

Change-Id: Idd55d7dc6c1388070895f8630bdcd51763a94d86
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/527
Bug: 63801
---
M resources/mmv/mmv.bootstrap.js
M tests/qunit/mmv/mmv.bootstrap.test.js
2 files changed, 32 insertions(+), 9 deletions(-)

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



diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js
index 99df70d..46c6049 100755
--- a/resources/mmv/mmv.bootstrap.js
+++ b/resources/mmv/mmv.bootstrap.js
@@ -42,6 +42,12 @@
/** @property {mw.mmv.HtmlUtils} htmlUtils - */
this.htmlUtils = new mw.mmv.HtmlUtils();
 
+   /**
+* This flag is set to true when we were unable to load the 
viewer.
+* @property {boolean}
+*/
+   this.viewerIsBroken = false;
+
this.thumbsReadyDeferred = $.Deferred();
this.thumbs = [];
 
@@ -85,6 +91,7 @@
} ).fail( function( message ) {
mw.log.warn( message );
bs.cleanupOverlay();
+   bs.viewerIsBroken = true;
mw.notify( 'Error loading MediaViewer: ' + message );
} );
};
@@ -230,7 +237,7 @@
 
/**
 * Handles a click event on a link
-* @param {Object} element Clicked element
+* @param {HTMLElement} element Clicked element
 * @param {jQuery.Event} e jQuery event object
 * @param {string} title File title
 * @param {boolean} overridePreference Whether to ignore global 
preferences and open
@@ -250,6 +257,11 @@
return;
}
 
+   // Don't load if we already tried loading and it failed
+   if ( this.viewerIsBroken ) {
+   return;
+   }
+
mw.mmv.DurationLogger.start( [ 'click-to-first-image', 
'click-to-first-metadata' ] );
 
if ( $element.is( 'a.image' ) ) {
diff --git a/tests/qunit/mmv/mmv.bootstrap.test.js 
b/tests/qunit/mmv/mmv.bootstrap.test.js
index 734ad8a..d0f4177 100644
--- a/tests/qunit/mmv/mmv.bootstrap.test.js
+++ b/tests/qunit/mmv/mmv.bootstrap.test.js
@@ -64,15 +64,10 @@
}
 
QUnit.test( 'Promise does not hang on ResourceLoader errors', 3, 
function ( assert ) {
-   var oldUsing = mw.loader.using,
-   bootstrap,
+   var bootstrap,
errorMessage = 'loading failed';
 
-   mw.loader.using = function ( module, success, error ) {
-   if ( $.isFunction( error ) ) {
-   error( new Error( errorMessage, ['mmv'] ) );
-   }
-   };
+   this.sandbox.stub( mw.loader, 'using' ).callsArgWith( 2, new 
Error( errorMessage, ['mmv'] ) );
 
bootstrap = createBootstrap();
 
@@ -89,10 +84,26 @@
bootstrap.loadViewer().fail( function ( message ) {
assert.strictEqual( message, errorMessage, 'promise is 
rejected with the error message when loading fails' );
QUnit.start();
-   mw.loader.using = oldUsing;
} );
} );
 
+   QUnit.test( 'Clicks are not captured once the loading fails', 4, 
function ( assert ) {
+   var event, returnValue,
+   bootstrap = new mw.mmv.MultimediaViewerBootstrap();
+
+   this.sandbox.stub( mw.loader, 'using' ).callsArgWith( 2, new 
Error( 'loading failed', ['mmv'] ) );
+
+   event = new $.Event( 'click', { button: 0, which: 1 } );
+   returnValue = bootstrap.click( {}, event, 'foo' );
+   assert.ok( event.isDefaultPrevented(), 'First click is caught' 
);
+   assert.strictEqual( returnValue, false, 'First click is caught' 
);
+
+   event = new $.Event( 'click', { button: 0, which: 1 } );
+   returnValue = bootstrap.click( {}, event, 'foo' );
+   assert.ok( !event.isDefaultPrevented(), 'Click after loading 
failure is not caught' );
+   assert.notStrictEqual( returnValue, false, 'Click after loading 
failure is not caught' );
+   } );
+
QUnit.test( 'Check viewer invoked when clicking on legit image links', 
9, function ( assert ) {
// TODO: Is div class=galleryspan 
class=imageimg//span/div valid ???
var div, link, link2, link3, link4, bootstrap,

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] Revert Revert Preserve textarea state when building WikiEd... - change (mediawiki...WikiEditor)

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

Change subject: Revert Revert Preserve textarea state when building 
WikiEditor UI
..


Revert Revert Preserve textarea state when building WikiEditor UI

Ib97f47ef1d66420682bd429c9c12e66c3392e77d Didn't cause
problems so this is now safe to reapply (to wmf2).

This reverts commit 908e7cc56c4ef5db2ab0d213b2dbd8c8034a0da7.

Change-Id: I510536959b58ff0adacd7908f6150c95bfdb3ec1
(cherry picked from commit b5696dc435727bde5f6ae55d616e845519a3a174)
---
M modules/jquery.wikiEditor.js
1 file changed, 11 insertions(+), 0 deletions(-)

Approvals:
  EBernhardson: Looks good to me, approved
  TheDJ: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/jquery.wikiEditor.js b/modules/jquery.wikiEditor.js
index ab86bd1..d29b53c 100644
--- a/modules/jquery.wikiEditor.js
+++ b/modules/jquery.wikiEditor.js
@@ -486,6 +486,9 @@
.append( $( 'span' + mediaWiki.msg( 'wikieditor-loading' ) + 
'/span' )
.css( 'marginTop', context.$textarea.height() / 2 ) );
*/
+   /* Preserving cursor and focus state, which will get lost due to 
wrapAll */
+   var hasFocus = context.$textarea.is( ':focus' ),
+   cursorPos = context.$textarea.textSelection( 
'getCaretPosition', { startAndEnd: true } );
// Encapsulate the textarea with some containers for layout
context.$textarea
/* Disabling our loading div for now
@@ -497,6 +500,14 @@
.wrapAll( $( 'div' ).addClass( 'wikiEditor-ui-left' ) )
.wrapAll( $( 'div' ).addClass( 'wikiEditor-ui-bottom' ) )
.wrapAll( $( 'div' ).addClass( 'wikiEditor-ui-text' ) );
+   // Restore scroll position after this wrapAll (tracked by 
mediawiki.action.edit)
+   context.$textarea.prop( 'scrollTop', $( '#wpScrolltop' ).val() );
+   // Restore focus and cursor if needed
+   if ( hasFocus ) {
+   context.$textarea.focus();
+   context.$textarea.textSelection( 'setSelection', { start: 
cursorPos[0], end: cursorPos[1] } );
+   }
+
// Get references to some of the newly created containers
context.$ui = 
context.$textarea.parent().parent().parent().parent().parent();
context.$wikitext = 
context.$textarea.parent().parent().parent().parent();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I510536959b58ff0adacd7908f6150c95bfdb3ec1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Mwalker mwal...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Check the content model of pages in EntityPerPageBuilder - change (mediawiki...Wikibase)

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

Change subject: Check the content model of pages in EntityPerPageBuilder
..


Check the content model of pages in EntityPerPageBuilder

Just to make sure the script isn't going to choke on wikitext
pages in the item NS.

This commit introduces WikibaseRepo::getContentMappings() which
should be made us of.

Change-Id: I9e0a5ca212d3ce210d1ca42a4829abf86ae18cde
---
M lib/includes/EntityFactory.php
M repo/includes/WikibaseRepo.php
M repo/includes/content/EntityContentFactory.php
M repo/includes/store/sql/EntityPerPageBuilder.php
M repo/maintenance/rebuildEntityPerPage.php
M repo/tests/phpunit/includes/WikibaseRepoTest.php
M repo/tests/phpunit/includes/content/EntityContentFactoryTest.php
M repo/tests/phpunit/includes/store/sql/EntityPerPageBuilderTest.php
M repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
9 files changed, 84 insertions(+), 37 deletions(-)

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



diff --git a/lib/includes/EntityFactory.php b/lib/includes/EntityFactory.php
index f88c6f4..35e1b88 100644
--- a/lib/includes/EntityFactory.php
+++ b/lib/includes/EntityFactory.php
@@ -24,6 +24,7 @@
 * @var array
 */
protected static $typeMap = array(
+   // @FIXME: Make use of Wikibase.Repo::getContentModelMappings 
and don't hard code query
Item::ENTITY_TYPE = '\Wikibase\Item',
Property::ENTITY_TYPE = '\Wikibase\Property',
 
diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index 927121a..cc3a04e 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -12,6 +12,8 @@
 use Wikibase\DataModel\Entity\BasicEntityIdParser;
 use Wikibase\DataModel\Entity\DispatchingEntityIdParser;
 use Wikibase\DataModel\Entity\EntityIdParser;
+use Wikibase\DataModel\Entity\Item;
+use Wikibase\DataModel\Entity\Property;
 use Wikibase\EntityContentFactory;
 use Wikibase\EntityLookup;
 use Wikibase\i18n\ExceptionLocalizer;
@@ -185,11 +187,7 @@
 * @return EntityContentFactory
 */
public function getEntityContentFactory() {
-   $entityNamespaces = $this-settings-getSetting( 
'entityNamespaces' );
-
-   return new EntityContentFactory(
-   is_array( $entityNamespaces ) ? array_keys( 
$entityNamespaces ) : array()
-   );
+   return new EntityContentFactory( 
$this-getContentModelMappings() );
}
 
/**
@@ -640,4 +638,23 @@
$wgLang
);
}
+
+   /**
+* Get the mapping of entity types = content models
+*
+* @since 0.5
+*
+* @return array
+*/
+   public function getContentModelMappings() {
+   // @TODO: We should have smth. like this for namespaces too
+   $map = array(
+   Item::ENTITY_TYPE = CONTENT_MODEL_WIKIBASE_ITEM,
+   Property::ENTITY_TYPE = CONTENT_MODEL_WIKIBASE_PROPERTY
+   );
+
+   wfRunHooks( 'WikibaseContentModelMapping', array( $map ) );
+
+   return $map;
+   }
 }
diff --git a/repo/includes/content/EntityContentFactory.php 
b/repo/includes/content/EntityContentFactory.php
index d36325a..107aac7 100644
--- a/repo/includes/content/EntityContentFactory.php
+++ b/repo/includes/content/EntityContentFactory.php
@@ -20,16 +20,18 @@
  */
 class EntityContentFactory implements EntityTitleLookup, 
EntityPermissionChecker {
 
-   // TODO: inject this map and allow extensions to somehow extend it
-   protected static $typeMap = array(
-   Item::ENTITY_TYPE = CONTENT_MODEL_WIKIBASE_ITEM,
-   Property::ENTITY_TYPE = CONTENT_MODEL_WIKIBASE_PROPERTY,
-   );
+   /**
+* @since 0.5
+*
+* @var array
+*/
+   protected $typeMap;
 
-   protected $contentModelIds;
-
-   public function __construct( array $contentModelIds ) {
-   $this-contentModelIds = $contentModelIds;
+   /**
+* @param array $typeMap Entity type - content model mapping
+*/
+   public function __construct( array $typeMap ) {
+   $this-typeMap = $typeMap;
}
 
/**
@@ -54,7 +56,7 @@
 * @return array An array of string content model IDs.
 */
public function getEntityContentModels() {
-   return $this-contentModelIds;
+   return $this-typeMap;
}
 
/**
@@ -138,7 +140,7 @@
 * @return int
 */
public function getNamespaceForType( $type ) {
-   return NamespaceUtils::getEntityNamespace( 
self::$typeMap[$type] );
+   return NamespaceUtils::getEntityNamespace( 
$this-typeMap[$type] );
}
 
/**
@@ -188,7 

[MediaWiki-commits] [Gerrit] Update when to 3.1 - change (mediawiki...text_renderer)

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

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

Change subject: Update when to 3.1
..

Update when to 3.1

Change-Id: Ib3abfce1ee0ce8552eee425b58d8cdc20a80f757
---
M package.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/text_renderer
 refs/changes/19/130519/1

diff --git a/package.json b/package.json
index 0e6de4d..05c2143 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
 readable-stream: ~1.1.9,
 sqlite3: ~2.1.19,
 tmp: ~0.0.23,
-when: ~2.7.0
+when: ~3.1.0
   },
   devDependencies: {
 mocha: ~1.17.0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib3abfce1ee0ce8552eee425b58d8cdc20a80f757
Gerrit-PatchSet: 1
Gerrit-Project: 
mediawiki/extensions/Collection/OfflineContentGenerator/text_renderer
Gerrit-Branch: master
Gerrit-Owner: Mwalker mwal...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update when to 3.1 - change (mediawiki...text_renderer)

2014-04-29 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: Update when to 3.1
..


Update when to 3.1

Change-Id: Ib3abfce1ee0ce8552eee425b58d8cdc20a80f757
---
M package.json
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mwalker: Verified; Looks good to me, approved



diff --git a/package.json b/package.json
index 0e6de4d..05c2143 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
 readable-stream: ~1.1.9,
 sqlite3: ~2.1.19,
 tmp: ~0.0.23,
-when: ~2.7.0
+when: ~3.1.0
   },
   devDependencies: {
 mocha: ~1.17.0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3abfce1ee0ce8552eee425b58d8cdc20a80f757
Gerrit-PatchSet: 1
Gerrit-Project: 
mediawiki/extensions/Collection/OfflineContentGenerator/text_renderer
Gerrit-Branch: master
Gerrit-Owner: Mwalker mwal...@wikimedia.org
Gerrit-Reviewer: Mwalker mwal...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update WikiEditor to wmf/1.24wmf2 - change (mediawiki/core)

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

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

Change subject: Update WikiEditor to wmf/1.24wmf2
..

Update WikiEditor to wmf/1.24wmf2

Change-Id: I7225af053e9e8cfa651871824bba4599dc77328a
---
M extensions/WikiEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/130520/1

diff --git a/extensions/WikiEditor b/extensions/WikiEditor
index 58ea478..de5171b 16
--- a/extensions/WikiEditor
+++ b/extensions/WikiEditor
-Subproject commit 58ea4781714216736b9ee359a16d637975c41688
+Subproject commit de5171bc9e3b71ea182b391589647448b5ffd0fb

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7225af053e9e8cfa651871824bba4599dc77328a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update WikiEditor to wmf/1.24wmf2 - change (mediawiki/core)

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

Change subject: Update WikiEditor to wmf/1.24wmf2
..


Update WikiEditor to wmf/1.24wmf2

Change-Id: I7225af053e9e8cfa651871824bba4599dc77328a
---
M extensions/WikiEditor
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/WikiEditor b/extensions/WikiEditor
index 58ea478..de5171b 16
--- a/extensions/WikiEditor
+++ b/extensions/WikiEditor
-Subproject commit 58ea4781714216736b9ee359a16d637975c41688
+Subproject commit de5171bc9e3b71ea182b391589647448b5ffd0fb

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7225af053e9e8cfa651871824bba4599dc77328a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix API postWithToken method - change (mediawiki/core)

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

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

Change subject: Fix API postWithToken method
..

Fix API postWithToken method

Refers to this when actually it means api

Change-Id: I78ba47a614512f6218e23d03e7c688e2c9efbe45
---
A resources/lib/oojs-ui/oojs-ui.css
M resources/src/mediawiki.api/mediawiki.api.js
2 files changed, 1,164 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/21/130521/1

diff --git a/resources/lib/oojs-ui/oojs-ui.css 
b/resources/lib/oojs-ui/oojs-ui.css
new file mode 100644
index 000..3508393
--- /dev/null
+++ b/resources/lib/oojs-ui/oojs-ui.css
@@ -0,0 +1,1163 @@
+/*!
+ * OOjs UI v0.1.0-pre (33c9b1b041)
+ * https://www.mediawiki.org/wiki/OOjs_UI
+ *
+ * Copyright 2011–2014 OOjs Team and other contributors.
+ * Released under the MIT license
+ * http://oojs.mit-license.org
+ *
+ * Date: Fri Apr 25 2014 14:06:53 GMT-0700 (PDT)
+ */
+
+/* Textures */
+
+.oo-ui-texture-pending {
+  background-image: /* @embed */ url(images/textures/pending.gif);
+}
+
+.oo-ui-texture-transparency {
+  background-image: /* @embed */ url(images/textures/transparency.png);
+}
+
+/* RTL Definitions */
+
+/* @noflip */
+
+.oo-ui-rtl {
+  direction: rtl;
+}
+
+/* @noflip */
+
+.oo-ui-ltr {
+  direction: ltr;
+}
+
+.oo-ui-dialog {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  padding: 1em;
+  line-height: 1em;
+  /* Fix for strange opacity-related rendering issues.
+  CAUTION: -webkit-backface-visibility: hidden; is EXTREMELY DANGEROUS.
+  If applied to a VE surface directly, it will break selection of
+  FocusableNodes, and in the past it's caused transparent PNGs to
+  render as opaque black images. For some reason applying it to the 
dialog
+  wrapper in the main document fixes opacity-related behavior in the 
iframe
+  document, but doesn't break the surface inside the iframe. */
+
+  -webkit-backface-visibility: hidden;
+  backface-visibility: hidden;
+}
+
+.oo-ui-dialog .oo-ui-window-frame {
+  position: fixed;
+  right: 0;
+  left: 0;
+  min-height: 12em;
+  margin: auto;
+  overflow: hidden;
+}
+
+.oo-ui-dialog .oo-ui-frame {
+  width: 100%;
+  height: 100%;
+}
+
+.oo-ui-dialog-content .oo-ui-window-foot {
+  bottom: 0;
+  height: 4.8em;
+  padding: 1em;
+}
+
+.oo-ui-dialog-content .oo-ui-window-foot .oo-ui-buttonedElement-framed {
+  float: left;
+  margin: 0.125em 0.25em;
+}
+
+.oo-ui-dialog-content .oo-ui-window-foot .oo-ui-flaggableElement-primary,
+.oo-ui-dialog-content .oo-ui-window-foot .oo-ui-flaggableElement-constructive,
+.oo-ui-dialog-content .oo-ui-window-foot .oo-ui-flaggableElement-destructive {
+  float: right;
+}
+
+.oo-ui-dialog-content-footless .oo-ui-window-body {
+  bottom: 0;
+}
+
+.oo-ui-dialog-content-footless .oo-ui-window-foot {
+  display: none;
+}
+
+.oo-ui-frame {
+  padding: 0;
+  margin: 0;
+}
+
+.oo-ui-frame-body {
+  padding: 0;
+  margin: 0;
+  background: none;
+}
+
+.oo-ui-toolbar {
+  clear: both;
+}
+
+.oo-ui-toolbar-bar {
+  line-height: 1em;
+}
+
+.oo-ui-toolbar-bottom .oo-ui-toolbar-bar {
+  position: absolute;
+}
+
+.oo-ui-toolbar-actions {
+  float: right;
+}
+
+.oo-ui-toolbar-tools {
+  float: left;
+}
+
+.oo-ui-toolbar-tools,
+.oo-ui-toolbar-actions,
+.oo-ui-toolbar-shadow {
+  -webkit-user-select: none;
+ -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+  -webkit-touch-callout: none;
+}
+
+.oo-ui-toolbar-actions .oo-ui-popupWidget {
+  -webkit-user-select: all;
+ -moz-user-select: all;
+  -ms-user-select: all;
+  user-select: all;
+  -webkit-touch-callout: default;
+}
+
+.oo-ui-toolbar-shadow {
+  position: absolute;
+  width: 100%;
+  pointer-events: none;
+  background-position: left top;
+  background-repeat: repeat-x;
+}
+
+.oo-ui-toolGroup {
+  display: inline-block;
+  margin: 0.3em;
+  vertical-align: middle;
+}
+
+.oo-ui-toolGroup-empty {
+  display: none;
+}
+
+.oo-ui-toolGroup .oo-ui-tool-link .oo-ui-iconedElement-icon {
+  background-position: center center;
+  background-repeat: no-repeat;
+}
+
+.oo-ui-window-head {
+  -webkit-user-select: none;
+ -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+  -webkit-touch-callout: none;
+}
+
+.oo-ui-window-icon {
+  float: left;
+  background-position: center center;
+  background-repeat: no-repeat;
+}
+
+.oo-ui-window-title {
+  float: left;
+  white-space: nowrap;
+  cursor: default;
+}
+
+.oo-ui-window-overlay {
+  position: absolute;
+  top: 0;
+  left: 0;
+}
+
+.oo-ui-buttonedElement .oo-ui-buttonedElement-button {
+  display: inline-block;
+  vertical-align: middle;
+  cursor: pointer;
+  -webkit-user-select: none;
+ -moz-user-select: none;
+  -ms-user-select: none;
+  user-select: none;
+  -webkit-touch-callout: none;
+}
+

[MediaWiki-commits] [Gerrit] Include language-0 categories for betawikiversity - change (operations/mediawiki-config)

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

Change subject: Include language-0 categories for betawikiversity
..


Include language-0 categories for betawikiversity

Amending gerrit 129103 to include language-0
categories, per newfound consensus at
https://beta.wikiversity.org/wiki/?oldid=154979#User_XX-0

Bug: 64168
Change-Id: I59e1fa87ee78a11779b08a5fffc49e4bfbc4c931
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  John F. Lewis: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 4d62763..0906c0a 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11341,7 +11341,7 @@
'N' = false,
),
'betawikiversity' = array( // bug 64168
-   '0' = false,
+   '0' = 'User %code%-0',
'1' = 'User %code%-1',
'2' = 'User %code%-2',
'3' = 'User %code%-3',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I59e1fa87ee78a11779b08a5fffc49e4bfbc4c931
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Withoutaname drevit...@gmail.com
Gerrit-Reviewer: John F. Lewis johnflewi...@gmail.com
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Deal better with expired edit tokens - change (mediawiki...MobileFrontend)

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

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

Change subject: Deal better with expired edit tokens
..

Deal better with expired edit tokens

When it hits a badtoken error postWithToken tries to refresh
the cached edit token. Let's take advantage of this by using the
core method postWithToken

In conjunction with this rename our getToken method to getTokenWithEndpoint
Rename all existing instances.

Bug: 64416
Change-Id: I4fa9964e0e256b92b57364c354fd5a4f8ebb3a98
Dependency: I78ba47a614512f6218e23d03e7c688e2c9efbe45
---
M javascripts/common/api.js
M javascripts/modules/editor/EditorApi.js
M javascripts/modules/mf-watchstar.js
M javascripts/modules/notifications/NotificationsOverlay.js
M javascripts/modules/talk/TalkSectionAddOverlay.js
M javascripts/modules/talk/TalkSectionOverlay.js
M javascripts/modules/uploads/PhotoApi.js
M javascripts/specials/notifications.js
M tests/javascripts/common/test_api.js
M tests/javascripts/modules/editor/test_EditorApi.js
M tests/javascripts/modules/uploads/test_PhotoApi.js
11 files changed, 50 insertions(+), 27 deletions(-)


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

diff --git a/javascripts/common/api.js b/javascripts/common/api.js
index 0fd1070..222bb26 100644
--- a/javascripts/common/api.js
+++ b/javascripts/common/api.js
@@ -93,7 +93,8 @@
 
/**
 * Retrieves a token for a given endpoint
-* FIXME: consolidate with mw.Api
+* FIXME: consolidate with mw.Api.getToken
+* use postWithToken / getToken where possible
 *
 * @method
 * @param {String} tokenType Name of the type of token needed 
e.g. edit, upload - defaults to edit
@@ -104,13 +105,13 @@
 * @return {jQuery.Deferred} Object returned by $.ajax(), 
callback will be passed
 *   the token string, false if the user is anon or undefined 
where not available or a warning is set
 */
-   getToken: function( tokenType, endpoint, caToken ) {
+   getTokenWithEndpoint: function( tokenType, endpoint, caToken ) {
var token, data, d = $.Deferred(), isCacheable,
// token types available from mw.user.tokens
easyTokens = [ 'edit', 'watch', 'patrol' ];
 
tokenType = tokenType || 'edit';
-   isCacheable = tokenType !== 'centralauth';
+   isCacheable = false; //tokenType !== 'centralauth';
 
if ( !this.tokenCache[ endpoint ] ) {
this.tokenCache[ endpoint ] = {};
diff --git a/javascripts/modules/editor/EditorApi.js 
b/javascripts/modules/editor/EditorApi.js
index b2886ff..aa7cb4c 100644
--- a/javascripts/modules/editor/EditorApi.js
+++ b/javascripts/modules/editor/EditorApi.js
@@ -102,14 +102,13 @@
throw new Error( 'No changes to save' );
}
 
-   function saveContent( token ) {
+   function saveContent() {
var apiOptions = {
action: 'edit',
title: self.title,
summary: options.summary,
captchaid: options.captchaId,
captchaword: options.captchaWord,
-   token: token,
basetimestamp: self.timestamp,
starttimestamp: self.timestamp
};
@@ -124,7 +123,7 @@
apiOptions.section = self.sectionId;
}
 
-   self.post( apiOptions ).done( function( data ) {
+   self.postWithToken( 'edit', apiOptions ).done( 
function( data ) {
var code, warning;
 
if ( data  data.edit  
data.edit.result === 'Success' ) {
@@ -169,8 +168,7 @@
} ).fail( $.proxy( result, 'reject', { type: 
'error', details: 'http' } ) );
}
 
-   this.getToken().done( saveContent ).fail( $.proxy( 
result, 'reject' ) );
-
+   saveContent();
return result;
},
 
diff --git a/javascripts/modules/mf-watchstar.js 
b/javascripts/modules/mf-watchstar.js
index c4d3db9..3db30da 100644
--- a/javascripts/modules/mf-watchstar.js
+++ b/javascripts/modules/mf-watchstar.js
@@ -95,7 +95,7 @@
}
 

[MediaWiki-commits] [Gerrit] Fix for jsduck 5.x, rearrange categories - change (mediawiki...MultimediaViewer)

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

Change subject: Fix for jsduck 5.x, rearrange categories
..


Fix for jsduck 5.x, rearrange categories

Should make for a nicer documentation experience.

Change-Id: I935cbab2b06c8cf482d3987905d2257d09bea3a3
(cherry picked from commit d137689b34f1cca1fdc634db7161833787aaa0e3)
---
A docs/categories.json
M docs/jsduck-config.json
M resources/mmv/model/mmv.model.License.js
M resources/mmv/provider/mmv.provider.GuessedThumbnailInfo.js
M resources/mmv/ui/mmv.ui.canvas.js
5 files changed, 105 insertions(+), 7 deletions(-)

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



diff --git a/docs/categories.json b/docs/categories.json
new file mode 100644
index 000..eeecc25
--- /dev/null
+++ b/docs/categories.json
@@ -0,0 +1,97 @@
+[
+   {
+   name: Media Viewer classes,
+   groups: [
+   {
+   name: Base,
+   classes: [
+   mw.mmv.Api,
+   mw.mmv.EmbedFileFormatter,
+   mw.mmv.HtmlUtils,
+   mw.mmv.LightboxImage,
+   mw.mmv.LightboxInterface,
+   mw.mmv.Logger,
+   mw.mmv.MultimediaViewer,
+   mw.mmv.MultimediaViewerBootstrap,
+   mw.mmv.Performance,
+   mw.mmv.ThumbnailWidthCalculator
+   ]
+   },
+   {
+   name: Models,
+   classes: [
+   mw.mmv.model.*
+   ]
+   },
+   {
+   name: Providers,
+   classes: [
+   mw.mmv.provider.*
+   ]
+   },
+   {
+   name: Routers,
+   classes: [
+   mw.mmv.routing.*
+   ]
+   },
+   {
+   name: Interface,
+   classes: [
+   mw.mmv.ui.*
+   ]
+   }
+   ]
+   },
+
+   {
+   name: External,
+   groups: [
+   {
+   name: jQuery,
+   classes: [
+   jQuery,
+   jQuery.Promise,
+   jQuery.Deferred,
+   jQuery.Event,
+   jqXHR
+   ]
+   },
+   {
+   name: JavaScript natives,
+   classes: [
+   Array,
+   Boolean,
+   Date,
+   Function,
+   Number,
+   Object,
+   RegExp,
+   String
+   ]
+   },
+   {
+   name: OOUI,
+   classes: [
+   OO.ui.*
+   ]
+   },
+   {
+   name: MediaWiki,
+   classes: [
+   mw,
+   mw.Api,
+   mw.Title
+   ]
+   },
+   {
+   name: Browser native classes,
+   classes: [
+   HTMLElement,
+   HTMLImageElement,
+   XMLHttpRequest
+   ]
+   }
+   ]
+   }
+]
diff --git a/docs/jsduck-config.json b/docs/jsduck-config.json
index 32d795c..e078f3d 100644
--- a/docs/jsduck-config.json
+++ b/docs/jsduck-config.json
@@ -1,5 +1,6 @@
 {
--title: MultimediaViewer extension documentation,
+   --categories: 

[MediaWiki-commits] [Gerrit] Fix for jsduck 5.x, rearrange categories - change (mediawiki...MultimediaViewer)

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

Change subject: Fix for jsduck 5.x, rearrange categories
..


Fix for jsduck 5.x, rearrange categories

Should make for a nicer documentation experience.

Change-Id: I935cbab2b06c8cf482d3987905d2257d09bea3a3
(cherry picked from commit d137689b34f1cca1fdc634db7161833787aaa0e3)
---
A docs/categories.json
M docs/jsduck-config.json
M resources/mmv/model/mmv.model.License.js
M resources/mmv/provider/mmv.provider.GuessedThumbnailInfo.js
M resources/mmv/ui/mmv.ui.canvas.js
5 files changed, 105 insertions(+), 7 deletions(-)

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



diff --git a/docs/categories.json b/docs/categories.json
new file mode 100644
index 000..eeecc25
--- /dev/null
+++ b/docs/categories.json
@@ -0,0 +1,97 @@
+[
+   {
+   name: Media Viewer classes,
+   groups: [
+   {
+   name: Base,
+   classes: [
+   mw.mmv.Api,
+   mw.mmv.EmbedFileFormatter,
+   mw.mmv.HtmlUtils,
+   mw.mmv.LightboxImage,
+   mw.mmv.LightboxInterface,
+   mw.mmv.Logger,
+   mw.mmv.MultimediaViewer,
+   mw.mmv.MultimediaViewerBootstrap,
+   mw.mmv.Performance,
+   mw.mmv.ThumbnailWidthCalculator
+   ]
+   },
+   {
+   name: Models,
+   classes: [
+   mw.mmv.model.*
+   ]
+   },
+   {
+   name: Providers,
+   classes: [
+   mw.mmv.provider.*
+   ]
+   },
+   {
+   name: Routers,
+   classes: [
+   mw.mmv.routing.*
+   ]
+   },
+   {
+   name: Interface,
+   classes: [
+   mw.mmv.ui.*
+   ]
+   }
+   ]
+   },
+
+   {
+   name: External,
+   groups: [
+   {
+   name: jQuery,
+   classes: [
+   jQuery,
+   jQuery.Promise,
+   jQuery.Deferred,
+   jQuery.Event,
+   jqXHR
+   ]
+   },
+   {
+   name: JavaScript natives,
+   classes: [
+   Array,
+   Boolean,
+   Date,
+   Function,
+   Number,
+   Object,
+   RegExp,
+   String
+   ]
+   },
+   {
+   name: OOUI,
+   classes: [
+   OO.ui.*
+   ]
+   },
+   {
+   name: MediaWiki,
+   classes: [
+   mw,
+   mw.Api,
+   mw.Title
+   ]
+   },
+   {
+   name: Browser native classes,
+   classes: [
+   HTMLElement,
+   HTMLImageElement,
+   XMLHttpRequest
+   ]
+   }
+   ]
+   }
+]
diff --git a/docs/jsduck-config.json b/docs/jsduck-config.json
index 32d795c..e078f3d 100644
--- a/docs/jsduck-config.json
+++ b/docs/jsduck-config.json
@@ -1,5 +1,6 @@
 {
--title: MultimediaViewer extension documentation,
+   --categories: 

[MediaWiki-commits] [Gerrit] Enable survey in Spanish. - change (mediawiki...MultimediaViewer)

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

Change subject: Enable survey in Spanish.
..


Enable survey in Spanish.

Related core change: Ibd1a4b14faa11fd764fe078880355d7184b698bf

Change-Id: If44279fff1aad3fb68a01d167ef5cce69dbb3b34
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/525
(cherry picked from commit 184067eb39585bb5db7516a60caf34849d6b3356)
---
M resources/mmv/ui/mmv.ui.stripeButtons.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/resources/mmv/ui/mmv.ui.stripeButtons.js 
b/resources/mmv/ui/mmv.ui.stripeButtons.js
index 5278970..c4d460a 100644
--- a/resources/mmv/ui/mmv.ui.stripeButtons.js
+++ b/resources/mmv/ui/mmv.ui.stripeButtons.js
@@ -194,7 +194,8 @@
SBP.getFeedbackSurveyBaseUrlForLanguage = function ( langcode ) {
var baseLangcode,
baseUrl = 
'https://www.surveymonkey.com/s/media-viewer-1',
-   surveyTranslations = { ca: 'ca', hu: 'hu', fr: 'fr', 
pt: 'pt-br', 'pt-br': 'pt-br', de: 'de' };
+   surveyTranslations = { ca: 'ca', hu: 'hu', fr: 'fr', 
pt: 'pt-br', 'pt-br': 'pt-br',
+   de: 'de', es: 'es' };
 
baseLangcode = langcode.split( /[_-]/ )[0]; // get rid of 
variants
if ( baseLangcode === 'en') {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If44279fff1aad3fb68a01d167ef5cce69dbb3b34
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Enable survey in Dutch - change (mediawiki...MultimediaViewer)

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

Change subject: Enable survey in Dutch
..


Enable survey in Dutch

Related core change: Ic5892e29c6e64d0d015e8b6037c402c42ea1c7d5

Change-Id: I5f939f98f8654c3fd90bcfae1b28fec262da8332
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/545
(cherry picked from commit bbe3429f3858f70fee8b481c302a991004722667)
---
M resources/mmv/ui/mmv.ui.stripeButtons.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/mmv/ui/mmv.ui.stripeButtons.js 
b/resources/mmv/ui/mmv.ui.stripeButtons.js
index c4d460a..896402d 100644
--- a/resources/mmv/ui/mmv.ui.stripeButtons.js
+++ b/resources/mmv/ui/mmv.ui.stripeButtons.js
@@ -195,7 +195,7 @@
var baseLangcode,
baseUrl = 
'https://www.surveymonkey.com/s/media-viewer-1',
surveyTranslations = { ca: 'ca', hu: 'hu', fr: 'fr', 
pt: 'pt-br', 'pt-br': 'pt-br',
-   de: 'de', es: 'es' };
+   de: 'de', es: 'es', nl: 'nl' };
 
baseLangcode = langcode.split( /[_-]/ )[0]; // get rid of 
variants
if ( baseLangcode === 'en') {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f939f98f8654c3fd90bcfae1b28fec262da8332
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Ensure click playback happens at the right time - change (mediawiki...MultimediaViewer)

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

Change subject: Ensure click playback happens at the right time
..


Ensure click playback happens at the right time

The code to replay clicks and clean up the handler was called after
processing each thumbnail, instead of just once at the end.
This might have caused many subtle issues such as clicks on any
but the first image not replaying correctly; more problematically,
of there were no MediaViewer-compatible thumbs, the handler was
never cleaned up and the clicks were never replayed.

Besides fixing that, this commit also adds a try..finally wrapper
so that the click replaying is not broken even if there is an error
in the thumb processing code. This might or might not be a good
idea. The internets say that try..finally without a catch causes
errors in IE8, but only if it is not wrapped in another try..catch,
so we are probably fine. (Adding a catch which just rethrows the
error would be an alternative, but it messes up stack traces.)

Change-Id: I2f645762103274c92c15a0d4b595d18d93b08415
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/497
Bug: 64345
(cherry picked from commit 3be5195ed2c365a4d78c128351c5afe5079cb76b)
---
M resources/mmv/mmv.bootstrap.js
1 file changed, 12 insertions(+), 8 deletions(-)

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



diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js
index 23f0c02..c0c9035 100755
--- a/resources/mmv/mmv.bootstrap.js
+++ b/resources/mmv/mmv.bootstrap.js
@@ -125,9 +125,18 @@
MMVB.processThumbs = function () {
var bs = this;
 
-   this.$thumbs.each( function ( i, thumb ) {
-   bs.processThumb( thumb );
-   } );
+   // if this breaks in IE8, see 
https://github.com/ebryn/backburner.js/pull/50
+   // but it probably won't since there is a catch further up the 
chain
+   try {
+   this.$thumbs.each( function ( i, thumb ) {
+   bs.processThumb( thumb );
+   } );
+   } finally {
+   this.thumbsReadyDeferred.resolve();
+   // now that we have set up our real click handler we 
can we can remove the temporary
+   // handler added in mmv.head.js which just replays 
clicks to the real handler
+   $( document ).off( 'click.mmv-head' );
+   }
};
 
/**
@@ -207,11 +216,6 @@
$link.add( $enlarge ).click( function ( e ) {
return bs.click( this, e, title, alwaysOpen );
} );
-   // now that we have set up our real click handler we can we can 
remove the temporary
-   // handler added in mmv.head.js which just replays clicks to 
the real handler
-   $( document ).off( 'click.mmv-head' );
-
-   this.thumbsReadyDeferred.resolve();
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f645762103274c92c15a0d4b595d18d93b08415
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Handle window.localStorage === null case correctly. - change (mediawiki...MultimediaViewer)

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

Change subject: Handle window.localStorage === null case correctly.
..


Handle window.localStorage === null case correctly.

Change-Id: I49ddf45093daee4988fb7f3b481fb35bfaceb152
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/521
Bug: 64525
(cherry picked from commit a56759d8fe5cfef7a06e115a2cb9d7e8bc403905)
---
M resources/mmv/ui/mmv.ui.metadataPanel.js
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js 
b/resources/mmv/ui/mmv.ui.metadataPanel.js
index 47c3b2f..f1001a3 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanel.js
+++ b/resources/mmv/ui/mmv.ui.metadataPanel.js
@@ -37,8 +37,7 @@
 * @property {boolean}
 * @private
 */
-   this.hasAnimatedMetadata = window.localStorage === undefined ||
-   localStorage.getItem( 'mmv.hasOpenedMetadata' );
+   this.hasAnimatedMetadata = !window.localStorage || 
localStorage.getItem( 'mmv.hasOpenedMetadata' );
 
/** @property {mw.mmv.HtmlUtils} htmlUtils - */
this.htmlUtils = new mw.mmv.HtmlUtils();
@@ -829,7 +828,7 @@
if (
!this.savedHasOpenedMetadata 
scrolled 
-   window.localStorage !== undefined
+   window.localStorage
) {
localStorage.setItem( 'mmv.hasOpenedMetadata', true );
this.savedHasOpenedMetadata = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I49ddf45093daee4988fb7f3b481fb35bfaceb152
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Enable MediaViewer survey on Spanish Wikipedia - change (operations/mediawiki-config)

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

Change subject: Enable MediaViewer survey on Spanish Wikipedia
..


Enable MediaViewer survey on Spanish Wikipedia

Related MediaViewer change:
If44279fff1aad3fb68a01d167ef5cce69dbb3b34

Change-Id: Ibd1a4b14faa11fd764fe078880355d7184b698bf
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Gilles: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 41b1f5d..1d46e3f 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10770,6 +10770,8 @@
'dewiki' = true,
'frwiki' = true,
'ptwiki' = true,
+   // TODO disable 2014-05-28
+   'eswiki' = true,
 ),
 
 'wmgNetworkPerformanceSamplingFactor' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd1a4b14faa11fd764fe078880355d7184b698bf
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: Gilles gdu...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Enable MediaViewer survey on Dutch Wikipedia - change (operations/mediawiki-config)

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

Change subject: Enable MediaViewer survey on Dutch Wikipedia
..


Enable MediaViewer survey on Dutch Wikipedia

Related MediaViewer change:
I5f939f98f8654c3fd90bcfae1b28fec262da8332

Change-Id: Ic5892e29c6e64d0d015e8b6037c402c42ea1c7d5
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  MarkTraceur: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1d46e3f..6d61c7f 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10772,6 +10772,7 @@
'ptwiki' = true,
// TODO disable 2014-05-28
'eswiki' = true,
+   'nlwiki' = true,
 ),
 
 'wmgNetworkPerformanceSamplingFactor' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5892e29c6e64d0d015e8b6037c402c42ea1c7d5
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] mw.ViewPageTarget: Use .mw-body-content for content styling - change (mediawiki...VisualEditor)

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

Change subject: mw.ViewPageTarget: Use .mw-body-content for content styling
..


mw.ViewPageTarget: Use .mw-body-content for content styling

* font-size and line-height differed between read mode and
  edit mode. This makes them match by using the same css class
  as MediaWiki core uses for the body content.
  Depends on I66c56c57 in MediaWiki core.

* Document padding / margin hack on surface, and sync the values.
  In edit mode, the text was being nudged to the right by a few
  pixels.

* Bump the wfUseMw call as this is a symptom of how VisualEditor
  now depends on MediaWiki 1.23.

Bug: 64599
Change-Id: I5818dce626545c4cbc8bd84fd551dc08baedbe32
---
M VisualEditor.hooks.php
M modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
M modules/ve-mw/init/ve.init.mw.Target.js
3 files changed, 12 insertions(+), 3 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index bf5bd7a..790daae 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -20,7 +20,7 @@
// parties who attempt to install VisualEditor onto non-alpha 
wikis, as
// this should have no impact on deploying to Wikimedia's wiki 
cluster.
// Is fine for release tarballs because 1.22wmf11  1.22alpha  
1.22.0.
-   wfUseMW( '1.22' );
+   wfUseMW( '1.23' );
 
// Add tab messages to the init init module
foreach ( $wgVisualEditorTabMessages as $msg ) {
diff --git a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css 
b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
index 6668d61..b236fe9 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget-vector.css
@@ -6,12 +6,20 @@
  */
 
 .ve-init-mw-viewPageTarget-surface {
+   /*
+   In order to allow placing the text cursor to the start or end of the 
text by
+   clicking in the margin area, we expand the outer boundary of the surface
+   outside the parent container using negative margin. Then we shrink the 
visible
+   rendering by applying inner padding. The end result is that the content 
is
+   the same width as in read mode, except with the padding around it now 
being
+   part of it instead of its parent, thus making it treat the area as part
+   of content editable.
+   */
margin: 0.8em -1.5em 0 -1.5em;
 }
 
 .ve-init-mw-viewPageTarget-surface .ve-ce-documentNode {
-   font-size: 0.8em;
-   padding: 0 1.875em; /* 1.5/0.8 */
+   padding: 0 1.5em;
 }
 
 .ve-init-mw-viewPageTarget-surface .oo-ui-menuWidget {
diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 647f1e6..941db9a 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -1315,6 +1315,7 @@
setTimeout( function () {
// Initialize surface
target.surface.getContext().hide();
+   target.surface.$element.addClass( 
'mw-body-content' );
target.$document = 
target.surface.$element.find( '.ve-ce-documentNode' );
target.$element.append( target.surface.$element 
);
target.setUpToolbar();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5818dce626545c4cbc8bd84fd551dc08baedbe32
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] vector: Apply content text style via .mw-body-content instea... - change (mediawiki/core)

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

Change subject: vector: Apply content text style via .mw-body-content instead 
of #bodyContent
..


vector: Apply content text style via .mw-body-content instead of #bodyContent

Font size, line height and positioning styles related to content
rendering should be re-usable for applying in other contexts.
Not just the #bodyContent div.

The use of classes for content styling has been recommended and generally
agreed upon, specifically in the context of the RFC about scoping site CSS:
https://www.mediawiki.org/wiki/Requests_for_comment/Scoping_site_CSS

This change takes the first step toward introducing a reusable class
throughout the UI to apply content-specific styles where needed.

This also makes it possible to resolve a bug in which VisualEditor
does not receive the correct styles because it creates the edit surface
outside the #bodyContent (but within #content) and had no way to
receive the same styling.

Bug: 63985
Change-Id: I66c56c577bad064261c3e4a62a1c1b2566d53972
(cherry picked from commit 9c8592fe786b399d0a321d65d681ba93abd7ce42)
---
M skins/Vector.php
M skins/vector/components/common.less
2 files changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/skins/Vector.php b/skins/Vector.php
index a8d3477..e7a4514 100644
--- a/skins/Vector.php
+++ b/skins/Vector.php
@@ -177,7 +177,7 @@
$this-text( 'pageLanguage' );
?span dir=auto?php $this-html( 'title' ) 
?/span/h1
?php $this-html( 'prebodyhtml' ) ?
-   div id=bodyContent
+   div id=bodyContent class=mw-body-content
?php
if ( $this-data['isarticle'] ) {
?
diff --git a/skins/vector/components/common.less 
b/skins/vector/components/common.less
index 76d1873..f70c7a4 100644
--- a/skins/vector/components/common.less
+++ b/skins/vector/components/common.less
@@ -127,7 +127,9 @@
vertical-align: text-bottom;
 }
 
-#bodyContent {
+/* TODO: Remove #bodyContent selector (kept for backwards compatibility with 
cached html) */
+#bodyContent,
+.mw-body-content {
position: relative;
line-height: @content-line-height;
font-size: @content-font-size;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66c56c577bad064261c3e4a62a1c1b2566d53972
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Jforrester jforres...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update VisualEditor for I5818dce62 - change (mediawiki/core)

2014-04-29 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Update VisualEditor for I5818dce62
..

Update VisualEditor for I5818dce62

Change-Id: I655655e7dc50b9cdbb209acfd3cf0a3d0b4a2e4e
---
M extensions/VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/130523/1

diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index fb69191..4b2eb5b 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit fb691912374e7a242985cd926235247f574b1126
+Subproject commit 4b2eb5b6d6db1ae5e44f44c40c7e2ad44fcdcafb

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I655655e7dc50b9cdbb209acfd3cf0a3d0b4a2e4e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Ori.livneh o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Clean parsoid workspaces - change (integration/jenkins-job-builder-config)

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

Change subject: Clean parsoid workspaces
..


Clean parsoid workspaces

This matches the change made in ed607c93b33e0212d for most scms.

Change-Id: Ieff22a4a26dfd16e8cbcbf0695440c2dc79577da
---
M parsoidsvc.yaml
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/parsoidsvc.yaml b/parsoidsvc.yaml
index 1a14780..04ffd45 100644
--- a/parsoidsvc.yaml
+++ b/parsoidsvc.yaml
@@ -28,6 +28,8 @@
  - '$ZUUL_COMMIT'
 refspec: '$ZUUL_REF'
 disable-submodules: true
+wipe-workspace: false
+clean: true
 builders:
 - get-mw-core:
 branch: 'master'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieff22a4a26dfd16e8cbcbf0695440c2dc79577da
Gerrit-PatchSet: 2
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Cscott canan...@wikimedia.org
Gerrit-Reviewer: Cscott canan...@wikimedia.org
Gerrit-Reviewer: GWicke gwi...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: MarkTraceur mtrac...@member.fsf.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Handle window.localStorage === null case correctly. - change (mediawiki...MultimediaViewer)

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

Change subject: Handle window.localStorage === null case correctly.
..


Handle window.localStorage === null case correctly.

Change-Id: I49ddf45093daee4988fb7f3b481fb35bfaceb152
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/521
Bug: 64525
(cherry picked from commit a56759d8fe5cfef7a06e115a2cb9d7e8bc403905)
---
M resources/mmv/ui/mmv.ui.metadataPanel.js
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js 
b/resources/mmv/ui/mmv.ui.metadataPanel.js
index 26782a7..210ecaa 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanel.js
+++ b/resources/mmv/ui/mmv.ui.metadataPanel.js
@@ -37,8 +37,7 @@
 * @property {boolean}
 * @private
 */
-   this.hasAnimatedMetadata = window.localStorage === undefined ||
-   localStorage.getItem( 'mmv.hasOpenedMetadata' );
+   this.hasAnimatedMetadata = !window.localStorage || 
localStorage.getItem( 'mmv.hasOpenedMetadata' );
 
/** @property {mw.mmv.HtmlUtils} htmlUtils - */
this.htmlUtils = new mw.mmv.HtmlUtils();
@@ -869,7 +868,7 @@
if (
!this.savedHasOpenedMetadata 
scrolled 
-   window.localStorage !== undefined
+   window.localStorage
) {
localStorage.setItem( 'mmv.hasOpenedMetadata', true );
this.savedHasOpenedMetadata = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I49ddf45093daee4988fb7f3b481fb35bfaceb152
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf1
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update VisualEditor for I5818dce62 - change (mediawiki/core)

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

Change subject: Update VisualEditor for I5818dce62
..


Update VisualEditor for I5818dce62

Change-Id: I655655e7dc50b9cdbb209acfd3cf0a3d0b4a2e4e
---
M extensions/VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index fb69191..4b2eb5b 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit fb691912374e7a242985cd926235247f574b1126
+Subproject commit 4b2eb5b6d6db1ae5e44f44c40c7e2ad44fcdcafb

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I655655e7dc50b9cdbb209acfd3cf0a3d0b4a2e4e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.24wmf2
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Convert $status into a Message object before calling methods... - change (mediawiki...TemplateData)

2014-04-29 Thread Trevor Parscal (Code Review)
Trevor Parscal has uploaded a new change for review.

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

Change subject: Convert $status into a Message object before calling methods on 
it
..

Convert $status into a Message object before calling methods on it

Change-Id: I0f6b7715c4713b425467d8a3e72b6fd9f87a9c74
---
M TemplateDataBlob.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TemplateData 
refs/changes/24/130524/1

diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index c6dc2aa..089c975 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -657,7 +657,7 @@
wfMessage( 
'templatedata-doc-param-default-empty' )-inLanguage( $lang )-text()
)
// Status
-   . Html::element( 'td', array(), $status-inLanguage( 
$lang )-text() )
+   . Html::element( 'td', array(), wfMessage( $status 
)-inLanguage( $lang )-text() )
. '/tr';
}
$html .= '/tbody/table'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f6b7715c4713b425467d8a3e72b6fd9f87a9c74
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Trevor Parscal tpars...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Vector: Remove backwards-compatible #bodyContent selector - change (mediawiki/core)

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

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

Change subject: Vector: Remove backwards-compatible #bodyContent selector
..

Vector: Remove backwards-compatible #bodyContent selector

The selector for #bodyContent was needed for a period of 31 days after 9c8592fe
was deployed (i.e., until 1 June 2014), as cache breakage avoidance from the
switch to using .mw-body-content as the selector.

Change-Id: Id3e83fa9bc6188627c0e9e2290bf8594bf4298d8
---
M skins/vector/components/common.less
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/25/130525/1

diff --git a/skins/vector/components/common.less 
b/skins/vector/components/common.less
index f70c7a4..33cd230 100644
--- a/skins/vector/components/common.less
+++ b/skins/vector/components/common.less
@@ -127,8 +127,6 @@
vertical-align: text-bottom;
 }
 
-/* TODO: Remove #bodyContent selector (kept for backwards compatibility with 
cached html) */
-#bodyContent,
 .mw-body-content {
position: relative;
line-height: @content-line-height;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3e83fa9bc6188627c0e9e2290bf8594bf4298d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jforrester jforres...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Enable survey in Spanish - change (mediawiki...MultimediaViewer)

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

Change subject: Enable survey in Spanish
..


Enable survey in Spanish

Related core change: Ibd1a4b14faa11fd764fe078880355d7184b698bf

Change-Id: If44279fff1aad3fb68a01d167ef5cce69dbb3b34
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/525
(cherry picked from commit 184067eb39585bb5db7516a60caf34849d6b3356)
---
M resources/mmv/ui/mmv.ui.stripeButtons.js
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/resources/mmv/ui/mmv.ui.stripeButtons.js 
b/resources/mmv/ui/mmv.ui.stripeButtons.js
index 5278970..c4d460a 100644
--- a/resources/mmv/ui/mmv.ui.stripeButtons.js
+++ b/resources/mmv/ui/mmv.ui.stripeButtons.js
@@ -194,7 +194,8 @@
SBP.getFeedbackSurveyBaseUrlForLanguage = function ( langcode ) {
var baseLangcode,
baseUrl = 
'https://www.surveymonkey.com/s/media-viewer-1',
-   surveyTranslations = { ca: 'ca', hu: 'hu', fr: 'fr', 
pt: 'pt-br', 'pt-br': 'pt-br', de: 'de' };
+   surveyTranslations = { ca: 'ca', hu: 'hu', fr: 'fr', 
pt: 'pt-br', 'pt-br': 'pt-br',
+   de: 'de', es: 'es' };
 
baseLangcode = langcode.split( /[_-]/ )[0]; // get rid of 
variants
if ( baseLangcode === 'en') {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If44279fff1aad3fb68a01d167ef5cce69dbb3b34
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf1
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Enable survey in Dutch - change (mediawiki...MultimediaViewer)

2014-04-29 Thread EBernhardson (Code Review)
EBernhardson has submitted this change and it was merged.

Change subject: Enable survey in Dutch
..


Enable survey in Dutch

Related core change: Ic5892e29c6e64d0d015e8b6037c402c42ea1c7d5

Change-Id: I5f939f98f8654c3fd90bcfae1b28fec262da8332
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/545
(cherry picked from commit bbe3429f3858f70fee8b481c302a991004722667)
---
M resources/mmv/ui/mmv.ui.stripeButtons.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  EBernhardson: Verified; Looks good to me, approved



diff --git a/resources/mmv/ui/mmv.ui.stripeButtons.js 
b/resources/mmv/ui/mmv.ui.stripeButtons.js
index c4d460a..896402d 100644
--- a/resources/mmv/ui/mmv.ui.stripeButtons.js
+++ b/resources/mmv/ui/mmv.ui.stripeButtons.js
@@ -195,7 +195,7 @@
var baseLangcode,
baseUrl = 
'https://www.surveymonkey.com/s/media-viewer-1',
surveyTranslations = { ca: 'ca', hu: 'hu', fr: 'fr', 
pt: 'pt-br', 'pt-br': 'pt-br',
-   de: 'de', es: 'es' };
+   de: 'de', es: 'es', nl: 'nl' };
 
baseLangcode = langcode.split( /[_-]/ )[0]; // get rid of 
variants
if ( baseLangcode === 'en') {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f939f98f8654c3fd90bcfae1b28fec262da8332
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf1
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Ensure click playback happens at the right time - change (mediawiki...MultimediaViewer)

2014-04-29 Thread EBernhardson (Code Review)
EBernhardson has submitted this change and it was merged.

Change subject: Ensure click playback happens at the right time
..


Ensure click playback happens at the right time

The code to replay clicks and clean up the handler was called after
processing each thumbnail, instead of just once at the end.
This might have caused many subtle issues such as clicks on any
but the first image not replaying correctly; more problematically,
of there were no MediaViewer-compatible thumbs, the handler was
never cleaned up and the clicks were never replayed.

Besides fixing that, this commit also adds a try..finally wrapper
so that the click replaying is not broken even if there is an error
in the thumb processing code. This might or might not be a good
idea. The internets say that try..finally without a catch causes
errors in IE8, but only if it is not wrapped in another try..catch,
so we are probably fine. (Adding a catch which just rethrows the
error would be an alternative, but it messes up stack traces.)

Change-Id: I2f645762103274c92c15a0d4b595d18d93b08415
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/497
Bug: 64345
(cherry picked from commit 3be5195ed2c365a4d78c128351c5afe5079cb76b)
---
M resources/mmv/mmv.bootstrap.js
1 file changed, 12 insertions(+), 8 deletions(-)

Approvals:
  EBernhardson: Verified; Looks good to me, approved



diff --git a/resources/mmv/mmv.bootstrap.js b/resources/mmv/mmv.bootstrap.js
index 42eb17f..524a566 100755
--- a/resources/mmv/mmv.bootstrap.js
+++ b/resources/mmv/mmv.bootstrap.js
@@ -120,9 +120,18 @@
MMVB.processThumbs = function () {
var bs = this;
 
-   this.$thumbs.each( function ( i, thumb ) {
-   bs.processThumb( thumb );
-   } );
+   // if this breaks in IE8, see 
https://github.com/ebryn/backburner.js/pull/50
+   // but it probably won't since there is a catch further up the 
chain
+   try {
+   this.$thumbs.each( function ( i, thumb ) {
+   bs.processThumb( thumb );
+   } );
+   } finally {
+   this.thumbsReadyDeferred.resolve();
+   // now that we have set up our real click handler we 
can we can remove the temporary
+   // handler added in mmv.head.js which just replays 
clicks to the real handler
+   $( document ).off( 'click.mmv-head' );
+   }
};
 
/**
@@ -199,11 +208,6 @@
$link.add( $enlarge ).click( function ( e ) {
return bs.click( this, e, title, alwaysOpen );
} );
-   // now that we have set up our real click handler we can we can 
remove the temporary
-   // handler added in mmv.head.js which just replays clicks to 
the real handler
-   $( document ).off( 'click.mmv-head' );
-
-   this.thumbsReadyDeferred.resolve();
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f645762103274c92c15a0d4b595d18d93b08415
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: wmf/1.24wmf1
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


<    1   2   3   4   5   >