[MediaWiki-commits] [Gerrit] Fix search input dimensions on non-Webkit browsers - change (mediawiki...MobileFrontend)

2013-03-21 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix search input dimensions on non-Webkit browsers
..

Fix search input dimensions on non-Webkit browsers

In particular Firefox, possibly other.

Change-Id: I36857139e718c9f8996b3f3710c7a5026d065a7e
---
M less/modules/mf-search.less
M stylesheets/modules/mf-search.css
2 files changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/less/modules/mf-search.less b/less/modules/mf-search.less
index 7bbc40f..aa5e091 100644
--- a/less/modules/mf-search.less
+++ b/less/modules/mf-search.less
@@ -33,6 +33,7 @@
height: @searchBoxHeight;
vertical-align: middle; /* don't use line height here as placeholder on 
ripple positions incorrectly */
background-color: white; /* remove fennec default background */
+   .box-sizing( border-box );
&::-webkit-search-cancel-button {
-webkit-appearance: none;
}
diff --git a/stylesheets/modules/mf-search.css 
b/stylesheets/modules/mf-search.css
index 1d7889b..c4c6ab6 100644
--- a/stylesheets/modules/mf-search.css
+++ b/stylesheets/modules/mf-search.css
@@ -31,6 +31,10 @@
   background-color: white;
   /* remove fennec default background */
 
+  -moz-box-sizing: border-box;
+  -o-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
   /* visual indication that search is happening */
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I36857139e718c9f8996b3f3710c7a5026d065a7e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix ugly menu borders in Firefox - change (mediawiki...MobileFrontend)

2013-03-21 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix ugly menu borders in Firefox
..

Fix ugly menu borders in Firefox

This doesn't change anything in Webkit-based browsers.

Change-Id: If5e61fc417ff494256baede35e250ece9a16d8fd
---
M less/common/mf-navigation.less
M stylesheets/common/mf-navigation.css
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/less/common/mf-navigation.less b/less/common/mf-navigation.less
index f2cd442..ed1fd92 100644
--- a/less/common/mf-navigation.less
+++ b/less/common/mf-navigation.less
@@ -126,7 +126,7 @@
 
 #mw-mf-menu-main li {
text-shadow: 0 1px 0 black;
-   border-bottom: 1px inset #717171;
+   border-bottom: 1px solid #717171;
font-weight: normal;
 }
 
@@ -138,7 +138,7 @@
background-repeat: no-repeat;
.background-size(24px, 24px);
background-position: 10px 50%;
-   border-bottom: 1px inset #3e3e3e;
+   border-bottom: 1px solid #3e3e3e;
 }
 
 #mw-mf-menu-main li a:hover {
diff --git a/stylesheets/common/mf-navigation.css 
b/stylesheets/common/mf-navigation.css
index 3241356..b005bf5 100644
--- a/stylesheets/common/mf-navigation.css
+++ b/stylesheets/common/mf-navigation.css
@@ -223,7 +223,7 @@
 }
 #mw-mf-menu-main li {
   text-shadow: 0 1px 0 black;
-  border-bottom: 1px inset #717171;
+  border-bottom: 1px solid #717171;
   font-weight: normal;
 }
 #mw-mf-menu-main li a {
@@ -239,7 +239,7 @@
   -webkit-background-size: 24px 24px;
   background-size: 24px 24px;
   background-position: 10px 50%;
-  border-bottom: 1px inset #3e3e3e;
+  border-bottom: 1px solid #3e3e3e;
 }
 #mw-mf-menu-main li a:hover {
   text-decoration: none;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5e61fc417ff494256baede35e250ece9a16d8fd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix search input dimensions on non-Webkit browsers - change (mediawiki...MobileFrontend)

2013-03-22 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Fix search input dimensions on non-Webkit browsers
..


Fix search input dimensions on non-Webkit browsers

In particular Firefox, possibly other.

Change-Id: I36857139e718c9f8996b3f3710c7a5026d065a7e
---
M less/common/ui.less
M less/modules/mf-search.less
M stylesheets/common/ui.css
3 files changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/less/common/ui.less b/less/common/ui.less
index ddc1120..99ece2e 100644
--- a/less/common/ui.less
+++ b/less/common/ui.less
@@ -70,6 +70,7 @@
height: @searchBoxHeight;
vertical-align: middle; /* don't use line height here as placeholder on 
ripple positions incorrectly */
background-color: white; /* remove fennec default background */
+   .box-sizing( border-box );
&::-webkit-search-cancel-button {
-webkit-appearance: none;
}
diff --git a/less/modules/mf-search.less b/less/modules/mf-search.less
index b3c74b0..1f2a03b 100644
--- a/less/modules/mf-search.less
+++ b/less/modules/mf-search.less
@@ -6,7 +6,6 @@
 @import "../mf-mixins.less";
 
 input.search {
-
/* visual indication that search is happening */
&.searching {
background-color: #eee;
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 0479f00..a0f031d 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -267,9 +267,6 @@
   -webkit-appearance: none;
   line-height: normal;
   background: none;
-  -moz-box-sizing: border-box;
-  -webkit-box-sizing: border-box;
-  box-sizing: border-box;
   -webkit-border-radius: 3px;
   -moz-border-radius: 3px;
   border-radius: 3px;
@@ -286,6 +283,10 @@
   background-color: white;
   /* remove fennec default background */
 
+  -moz-box-sizing: border-box;
+  -o-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
 }
 input.search::-webkit-search-cancel-button {
   -webkit-appearance: none;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36857139e718c9f8996b3f3710c7a5026d065a7e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
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 ugly menu borders in Firefox - change (mediawiki...MobileFrontend)

2013-03-22 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Fix ugly menu borders in Firefox
..


Fix ugly menu borders in Firefox

This doesn't change anything in Webkit-based browsers.

Change-Id: If5e61fc417ff494256baede35e250ece9a16d8fd
---
M less/common/mainmenu.less
M stylesheets/common/ui.css
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/less/common/mainmenu.less b/less/common/mainmenu.less
index c8ca882..b39e37c 100644
--- a/less/common/mainmenu.less
+++ b/less/common/mainmenu.less
@@ -27,7 +27,7 @@
 
li {
text-shadow: 0 1px 0 black;
-   border-bottom: 1px inset #717171;
+   border-bottom: 1px solid #717171;
font-weight: normal;
&:hover {
background-color: #5C5C5C;
@@ -44,7 +44,7 @@
.background-size(24px, 24px);
background-position: 10px 50%;
margin-left: 10px;
-   border-bottom: 1px inset #3e3e3e;
+   border-bottom: 1px solid #3e3e3e;
&:hover {
text-decoration: none;
}
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 0479f00..2e89615 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -147,7 +147,7 @@
 }
 #mw-mf-page-left #mw-mf-menu-main li {
   text-shadow: 0 1px 0 black;
-  border-bottom: 1px inset #717171;
+  border-bottom: 1px solid #717171;
   font-weight: normal;
 }
 #mw-mf-page-left #mw-mf-menu-main li:hover {
@@ -169,7 +169,7 @@
   background-size: 24px 24px;
   background-position: 10px 50%;
   margin-left: 10px;
-  border-bottom: 1px inset #3e3e3e;
+  border-bottom: 1px solid #3e3e3e;
 }
 #mw-mf-page-left #mw-mf-menu-main li a:hover {
   text-decoration: none;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5e61fc417ff494256baede35e250ece9a16d8fd
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Increase left padding in search input - change (mediawiki...MobileFrontend)

2013-03-22 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Increase left padding in search input
..

Increase left padding in search input

Makes the distance between input's border and text uniform.
Also, remove redundant CSS.

This was already merged but the changes have been reverted by 0cfeb1f
(Maintenance: Load minimum possible css / reorg css).

Change-Id: I9bedd7faae16e09fd24236482ddef5baed4d754b
---
M less/common/ui.less
M stylesheets/common/ui.css
2 files changed, 2 insertions(+), 11 deletions(-)


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

diff --git a/less/common/ui.less b/less/common/ui.less
index 99ece2e..e7eeb53 100644
--- a/less/common/ui.less
+++ b/less/common/ui.less
@@ -55,17 +55,12 @@
 /* Search */
 input.search {
-webkit-appearance: none;
-   line-height: normal;
-   background: none;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
-   box-sizing: border-box;
.border-radius( 3px );
-   margin-top: 0;
-   width: 99%;
border: @searchBorderHeight solid #c9c9c9;
outline: none;
-   padding: 0 0 0 2px;
+   padding: 0 0 0 5px;
width: 100%;
height: @searchBoxHeight;
vertical-align: middle; /* don't use line height here as placeholder on 
ripple positions incorrectly */
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 8d555bc..f485d9c 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -265,16 +265,12 @@
 /* Search */
 input.search {
   -webkit-appearance: none;
-  line-height: normal;
-  background: none;
   -webkit-border-radius: 3px;
   -moz-border-radius: 3px;
   border-radius: 3px;
-  margin-top: 0;
-  width: 99%;
   border: 1px solid #c9c9c9;
   outline: none;
-  padding: 0 0 0 2px;
+  padding: 0 0 0 5px;
   width: 100%;
   height: 30px;
   vertical-align: middle;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9bedd7faae16e09fd24236482ddef5baed4d754b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Increase left padding in search input - change (mediawiki...MobileFrontend)

2013-03-22 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Increase left padding in search input
..


Increase left padding in search input

Makes the distance between input's border and text uniform.
Also, remove redundant CSS.

This was already merged but the changes have been reverted by 0cfeb1f
(Maintenance: Load minimum possible css / reorg css).

Change-Id: I9bedd7faae16e09fd24236482ddef5baed4d754b
---
M less/common/ui.less
M stylesheets/common/ui.css
2 files changed, 2 insertions(+), 11 deletions(-)

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



diff --git a/less/common/ui.less b/less/common/ui.less
index 99ece2e..e7eeb53 100644
--- a/less/common/ui.less
+++ b/less/common/ui.less
@@ -55,17 +55,12 @@
 /* Search */
 input.search {
-webkit-appearance: none;
-   line-height: normal;
-   background: none;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
-   box-sizing: border-box;
.border-radius( 3px );
-   margin-top: 0;
-   width: 99%;
border: @searchBorderHeight solid #c9c9c9;
outline: none;
-   padding: 0 0 0 2px;
+   padding: 0 0 0 5px;
width: 100%;
height: @searchBoxHeight;
vertical-align: middle; /* don't use line height here as placeholder on 
ripple positions incorrectly */
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 8d555bc..f485d9c 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -265,16 +265,12 @@
 /* Search */
 input.search {
   -webkit-appearance: none;
-  line-height: normal;
-  background: none;
   -webkit-border-radius: 3px;
   -moz-border-radius: 3px;
   border-radius: 3px;
-  margin-top: 0;
-  width: 99%;
   border: 1px solid #c9c9c9;
   outline: none;
-  padding: 0 0 0 2px;
+  padding: 0 0 0 5px;
   width: 100%;
   height: 30px;
   vertical-align: middle;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9bedd7faae16e09fd24236482ddef5baed4d754b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 
Gerrit-Reviewer: JGonera 
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 wrong margin for menu items - change (mediawiki...MobileFrontend)

2013-03-22 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix wrong margin for menu items
..

Fix wrong margin for menu items

Broken in 0cfeb1f (Maintenance: Load minimum possible css / reorg css)

Change-Id: I40ecee43c8151feee0ed58967bc9be3e79103833
---
M less/common/mainmenu.less
M stylesheets/common/ui.css
2 files changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/less/common/mainmenu.less b/less/common/mainmenu.less
index b39e37c..fd10e06 100644
--- a/less/common/mainmenu.less
+++ b/less/common/mainmenu.less
@@ -43,7 +43,6 @@
background-repeat: no-repeat;
.background-size(24px, 24px);
background-position: 10px 50%;
-   margin-left: 10px;
border-bottom: 1px solid #3e3e3e;
&:hover {
text-decoration: none;
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 8d555bc..410773f 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -168,7 +168,6 @@
   -webkit-background-size: 24px 24px;
   background-size: 24px 24px;
   background-position: 10px 50%;
-  margin-left: 10px;
   border-bottom: 1px solid #3e3e3e;
 }
 #mw-mf-page-left #mw-mf-menu-main li a:hover {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40ecee43c8151feee0ed58967bc9be3e79103833
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix the page being wider than the screen on watched pages - change (mediawiki...MobileFrontend)

2013-03-22 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix the page being wider than the screen on watched pages
..

Fix the page being wider than the screen on watched pages

In alpha, when the watchstar was rotated using transformation, the whole
element was rotated and therefore was sticking out.

Change-Id: I8b5fbbb772a567f076988ab6e636684e8fcfb7df
---
M less/common/ui.less
M stylesheets/common/ui.css
2 files changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/less/common/ui.less b/less/common/ui.less
index 99ece2e..5f15829 100644
--- a/less/common/ui.less
+++ b/less/common/ui.less
@@ -19,6 +19,7 @@
padding: 0;
min-height: @headerHeight;
margin: 0;
+   overflow: hidden;
 
h1 {
color: @chromeHeadingColor;
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 8d555bc..63d2a3c 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -227,6 +227,7 @@
   padding: 0;
   min-height: 46px;
   margin: 0;
+  overflow: hidden;
 }
 .header h1,
 #mw-mf-header h1 {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b5fbbb772a567f076988ab6e636684e8fcfb7df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Prevent search focus when closing menu using hamburger - change (mediawiki...MobileFrontend)

2013-03-22 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Prevent search focus when closing menu using hamburger
..

Prevent search focus when closing menu using hamburger

Change-Id: Ie091d03bbdb22df68e07181e4cc9ca4ce44cdd18
---
M javascripts/common/mf-navigation.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/javascripts/common/mf-navigation.js 
b/javascripts/common/mf-navigation.js
index c60dc02..b053f66 100644
--- a/javascripts/common/mf-navigation.js
+++ b/javascripts/common/mf-navigation.js
@@ -158,6 +158,8 @@
$( '#' + mfePrefix + 'main-menu-button' ).click( function( ev ) 
{
toggleNavigation();
ev.preventDefault();
+   } ).on( 'touchend', function( ev ) {
+   ev.stopPropagation();
} );
 
// close navigation if content tapped

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie091d03bbdb22df68e07181e4cc9ca4ce44cdd18
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Add mobile target to jquery.getAttrs - change (mediawiki/core)

2013-03-23 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Add mobile target to jquery.getAttrs
..

Add mobile target to jquery.getAttrs

For some reason mediawiki.tests.qunit.testrunner depends on it now.

Change-Id: Iffa7166362fe568ce8ed95db427c432e111d65a1
---
M resources/Resources.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/resources/Resources.php b/resources/Resources.php
index 9593fa8..4374b09 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -198,6 +198,7 @@
),
'jquery.getAttrs' => array(
'scripts' => 'resources/jquery/jquery.getAttrs.js',
+   'targets' => array( 'desktop', 'mobile' ),
),
'jquery.hidpi' => array(
'scripts' => 'resources/jquery/jquery.hidpi.js',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffa7166362fe568ce8ed95db427c432e111d65a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Load hi-res icons for JS-enabled devices (regression) - change (mediawiki...MobileFrontend)

2013-03-25 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Load hi-res icons for JS-enabled devices (regression)
..

Load hi-res icons for JS-enabled devices (regression)

Hi-res menu icons were never loaded resulting in blurry icons for all
modern phones because ".jsEnabled #mw-mf-menu-main li.icon-home a" is a
weaker rule than "#mw-mf-page-left #mw-mf-menu-main li.icon-home a"
(rule started with id has preference).

Also, move all icon rules to mainmenu.less and avoid nested id rules (id
are unique anyway).

Regression introduced in 149f609.

Change-Id: Ic6fd7585d25a051895e1eea26acb2f4934c97120
---
M less/common/mainmenu.less
M less/common/mf-navigation.less
M stylesheets/common/mf-navigation.css
M stylesheets/common/ui.css
4 files changed, 113 insertions(+), 112 deletions(-)


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

diff --git a/less/common/mainmenu.less b/less/common/mainmenu.less
index fd10e06..19d05ed 100644
--- a/less/common/mainmenu.less
+++ b/less/common/mainmenu.less
@@ -9,63 +9,94 @@
position: absolute;
border-right: solid 1px #AAA;
display: none; /* JS only */
+}
 
-   #mw-mf-content-left {
-   height: 100%;
-   border-left: solid 12px #252525;
-   border-right: solid 1px black;
-   }
+#mw-mf-content-left {
+   height: 100%;
+   border-left: solid 12px #252525;
+   border-right: solid 1px black;
+}
 
-   #mw-mf-menu-main {
-   background-color: @mainMenuBackgroundColor;
-   list-style: none;
-   margin: 0;
-   padding: 0;
-   height: 100%;
-   border-left: solid 12px #252525;
-   border-right: solid 1px black;
+#mw-mf-menu-main {
+   background-color: @mainMenuBackgroundColor;
+   list-style: none;
+   margin: 0;
+   padding: 0;
+   height: 100%;
+   border-left: solid 12px #252525;
+   border-right: solid 1px black;
 
-   li {
-   text-shadow: 0 1px 0 black;
-   border-bottom: 1px solid #717171;
-   font-weight: normal;
+   li {
+   text-shadow: 0 1px 0 black;
+   border-bottom: 1px solid #717171;
+   font-weight: normal;
+   &:hover {
+   background-color: #5C5C5C;
+   border-left: solid 12px #3366BB;
+   margin-left: -12px;
+   }
+
+   a {
+   color: white;
+   display: block;
+   padding: 13px 10px 11px 42px;
+   line-height: 22px;
+   background-repeat: no-repeat;
+   .background-size(24px, 24px);
+   background-position: 10px 50%;
+   border-bottom: 1px solid #3e3e3e;
&:hover {
-   background-color: #5C5C5C;
-   border-left: solid 12px #3366BB;
-   margin-left: -12px;
-   }
-
-   a {
-   color: white;
-   display: block;
-   padding: 13px 10px 11px 42px;
-   line-height: 22px;
-   background-repeat: no-repeat;
-   .background-size(24px, 24px);
-   background-position: 10px 50%;
-   border-bottom: 1px solid #3e3e3e;
-   &:hover {
-   text-decoration: none;
-   }
-   }
-
-   // low-res icons for old phones that don't support 
background-size
-   &.icon-home a {
-   background-image: 
url(images/menu/lowres/home.png);
-   }
-
-   &.icon-random a {
-   background-image: 
url(images/menu/lowres/random.png);
-   }
-
-   &.icon-settings a {
-   background-image: 
url(images/menu/lowres/settings.png);
-   }
-
-   &.icon-loginout a {
-   background-image: /* @embed 
*/url(images/menu/lowres/loginout.png);
+   text-decoration: none;
}
}
+
+   // low-res icons for old phones that don't support 
background-size
+   &.icon-home a {
+   background-image: url(images/menu/lowres/home.png);
+   }
+
+  

[MediaWiki-commits] [Gerrit] Add animation to popups and drawers (alpha) - change (mediawiki...MobileFrontend)

2013-03-25 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Add animation to popups and drawers (alpha)
..

Add animation to popups and drawers (alpha)

This affects notifications, references and CTAs in alpha on supported
browsers (for now new Android Browser, Chrome, Safari and Firefox).
Might require clearing browser cache.

Change-Id: I8a56c62284c718bfcb524fdb13cf05b8a058972b
---
M javascripts/common/mf-application.js
M javascripts/common/mf-navigation.js
M javascripts/common/mf-notification.js
M less/common/mf-navigation.less
M less/mf-mixins.less
M stylesheets/common/mf-navigation.css
M stylesheets/modules/mf-watchstar.css
7 files changed, 85 insertions(+), 14 deletions(-)


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

diff --git a/javascripts/common/mf-application.js 
b/javascripts/common/mf-application.js
index 8b4d00f..2b8f0b5 100644
--- a/javascripts/common/mf-application.js
+++ b/javascripts/common/mf-application.js
@@ -86,6 +86,31 @@
return support;
}
 
+   // http://stackoverflow.com/a/12621264/365238
+   function supports3dTransforms() {
+   var el = $( 'p' )[0], has3d, t,
+   transforms = {
+   'webkitTransform': '-webkit-transform',
+   //'OTransform': '-o-transform',
+   //'msTransform': '-ms-transform',
+   'transform': 'transform'
+   };
+
+   // Add it to the body to get the computed style
+   document.body.insertBefore(el, null);
+
+   for ( t in transforms ) {
+   if ( el.style[t] !== undefined ) {
+   el.style[t] = 'translate3d(1px,1px,1px)';
+   has3d = window.getComputedStyle( el 
).getPropertyValue( transforms[t] );
+   }
+   }
+
+   document.body.removeChild(el);
+
+   return ( has3d !== undefined && has3d.length > 0 && has3d !== 
"none" );
+   }
+
// Try to scroll and hide URL bar
scrollY = window.scrollY || 0;
if( !window.location.hash && scrollY < 10 ) {
@@ -112,6 +137,9 @@
if( supportsPositionFixed() ) {
$doc.addClass( 'supportsPositionFixed' );
}
+   if ( supports3dTransforms() ) {
+   $doc.addClass( 'transforms' );
+   }
 
// when rotating to landscape stop page zooming on ios
// allow disabling of transitions in android ics 4.0.2
diff --git a/javascripts/common/mf-navigation.js 
b/javascripts/common/mf-navigation.js
index e9070e1..e32ca47 100644
--- a/javascripts/common/mf-navigation.js
+++ b/javascripts/common/mf-navigation.js
@@ -23,18 +23,19 @@
$( window ).on( 'scroll click', function() {
self.hide();
} );
-   },
-
-   show: function() {
this.appendTo( '#mw-mf-page-center' );
},
 
+   show: function() {
+   this.$el.addClass( 'visible' );
+   },
+
hide: function() {
-   this.detach();
+   this.$el.removeClass( 'visible' );
},
 
isVisible: function() {
-   return this.$el.is( ':visible' );
+   return this.$el.hasClass( 'visible' );
}
} );
 
diff --git a/javascripts/common/mf-notification.js 
b/javascripts/common/mf-notification.js
index 362f2a2..57b0ffd 100644
--- a/javascripts/common/mf-notification.js
+++ b/javascripts/common/mf-notification.js
@@ -22,17 +22,18 @@
function show( html, classes ) {
$( '#mf-notification div' ).html( html );
calculatePosition();
-   return $( '#mf-notification' ).removeAttr( 'class' ).
-   addClass( 'position-fixed-element' ).
-   addClass( classes ).show();
+   return $( '#mf-notification' ).
+   removeAttr( 'class' ).
+   addClass( classes ).
+   addClass( 'position-fixed visible' );
}
 
function close( forceClose ) {
var $notification = $( '#mf-notification' );
-   if ( !$notification.is( ':visible' ) ) {
+   if ( !$notification.hasClass( 'visible' ) ) {
return;
} else if ( !$notification.hasClass( 'locked' ) || 
forceClose ) {
-  

[MediaWiki-commits] [Gerrit] Maintenance: Provide valid css - change (mediawiki...MobileFrontend)

2013-03-25 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Maintenance: Provide valid css
..


Maintenance: Provide valid css

* zoom is not a css property - whatever it is it is a hack and should be 
documented
and in the hack file if it is indeed doing anything
* word-break: break-word - i think what was meant was word-wrap: break-word
* correct a bad argument to background position

Change-Id: Icafa1090d3640465c787989a8f7783a0e222b25d
---
M less/common/mf-common.less
M less/common/mf-enwp.less
M less/common/mf-navigation.less
M stylesheets/common/mf-common.css
M stylesheets/common/mf-enwp.css
M stylesheets/common/mf-navigation.css
6 files changed, 10 insertions(+), 11 deletions(-)

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

Objections:
  Massaf: There's a problem with this change, please improve



diff --git a/less/common/mf-common.less b/less/common/mf-common.less
index a0dc398..a64b129 100644
--- a/less/common/mf-common.less
+++ b/less/common/mf-common.less
@@ -45,7 +45,6 @@
 
 .divclearable {
display: block;
-   zoom: 1;
vertical-align: middle;
position: relative;
 }
diff --git a/less/common/mf-enwp.less b/less/common/mf-enwp.less
index a7eafe2..0f7db97 100644
--- a/less/common/mf-enwp.less
+++ b/less/common/mf-enwp.less
@@ -65,7 +65,7 @@
 .navbox .hlist dt,
 .navbox .hlist li {
white-space: pre-wrap !important;
-   word-break: break-word;
+   word-wrap: break-word;
 }
 
 /* force portals to use a one column layout on mobile */
diff --git a/less/common/mf-navigation.less b/less/common/mf-navigation.less
index f2cd442..1134f65 100644
--- a/less/common/mf-navigation.less
+++ b/less/common/mf-navigation.less
@@ -5,7 +5,8 @@
 @overlayAlertSuccessColor: green;
 @overlayAlertErrorBorderColor: #D00;
 @overlayAlertErrorBackgroundColor: #FAE1E1;
-@overlayAlertPadding: 0.5em 1em;
+@overlayAlertPaddingHorizontal: 1em;
+@overlayAlertPadding: 0.5em @overlayAlertPaddingHorizontal;
 @overlayBorderWidth: 1px;
 @toastNotificationColor: #373737;
 
@@ -281,7 +282,7 @@
 .alert {
padding: @overlayAlertPadding;
background-repeat: no-repeat;
-   background-position: @overlayAlertPadding center;
+   background-position: @overlayAlertPaddingHorizontal center;
margin-bottom: 1em;
min-height: 64px;
font-size: @baseFontSize;
@@ -407,7 +408,7 @@
 }
 
 .supportsPositionFixed #mw-mf-page-center {
-   min-height: none !important;
+   min-height: auto !important;
 }
 
 @media all and (max-width: 240px) {
@@ -491,7 +492,7 @@
width: 100%;
background-color: @searchBoxColorTo;
.boxshadow( 0, -1px, 8px, 0, rgba(0, 0, 0, 0.35) );
-   word-break: break-word;
+   word-wrap: break-word;
z-index: 3;
 }
 
diff --git a/stylesheets/common/mf-common.css b/stylesheets/common/mf-common.css
index 46af7b2..25b215a 100644
--- a/stylesheets/common/mf-common.css
+++ b/stylesheets/common/mf-common.css
@@ -38,7 +38,6 @@
 }
 .divclearable {
   display: block;
-  zoom: 1;
   vertical-align: middle;
   position: relative;
 }
diff --git a/stylesheets/common/mf-enwp.css b/stylesheets/common/mf-enwp.css
index 1c1433b..4b2dc07 100644
--- a/stylesheets/common/mf-enwp.css
+++ b/stylesheets/common/mf-enwp.css
@@ -54,7 +54,7 @@
 .navbox .hlist dt,
 .navbox .hlist li {
   white-space: pre-wrap !important;
-  word-break: break-word;
+  word-wrap: break-word;
 }
 /* force portals to use a one column layout on mobile */
 .mobile .portal-column-left-wide,
diff --git a/stylesheets/common/mf-navigation.css 
b/stylesheets/common/mf-navigation.css
index 3241356..f3b204c 100644
--- a/stylesheets/common/mf-navigation.css
+++ b/stylesheets/common/mf-navigation.css
@@ -368,7 +368,7 @@
 .alert {
   padding: 0.5em 1em;
   background-repeat: no-repeat;
-  background-position: 0.5em 1em center;
+  background-position: 1em center;
   margin-bottom: 1em;
   min-height: 64px;
   font-size: 1em;
@@ -476,7 +476,7 @@
   background-color: #F1F1F1;
 }
 .supportsPositionFixed #mw-mf-page-center {
-  min-height: none !important;
+  min-height: auto !important;
 }
 @media all and (max-width: 240px) {
   #mw-mf-search {
@@ -545,7 +545,7 @@
   width: 100%;
   background-color: #f3f3f3;
   box-shadow: 0 -1px 8px 0 rgba(0, 0, 0, 0.35);
-  word-break: break-word;
+  word-wrap: break-word;
   z-index: 3;
 }
 #mf-notification {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icafa1090d3640465c787989a8f7783a0e222b25d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Massaf 
Gerrit-Reviewer: jenkins-bot

___
MediaWiki-commits mailing list
MediaWiki-comm

[MediaWiki-commits] [Gerrit] Alpha: Create CTA for watchlist only once - change (mediawiki...MobileFrontend)

2013-03-25 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Alpha: Create CTA for watchlist only once
..


Alpha: Create CTA for watchlist only once

It seems in alpha due to the page-loaded event currently firing (see 45299)
this gets created twice resulting in two DOM elements

Should probably be done globally to avoid this in the meantime

Change-Id: I64a2ebff747af7c1ff0d63e9d4b584dabb06a19f
---
M javascripts/modules/mf-watchstar.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/javascripts/modules/mf-watchstar.js 
b/javascripts/modules/mf-watchstar.js
index b1c162b..8c97cf5 100644
--- a/javascripts/modules/mf-watchstar.js
+++ b/javascripts/modules/mf-watchstar.js
@@ -1,7 +1,8 @@
 (function( M, $ ) {
 
 var api = M.require( 'api' ), w = ( function() {
-   var lastToken, nav = M.require( 'navigation' ), popup = M.require( 
'notifications' );
+   var lastToken, nav = M.require( 'navigation' ), popup = M.require( 
'notifications' ),
+   drawer = new nav.CtaDrawer( { content: mw.msg( 
'mobile-frontend-watchlist-cta' ) } );
 
// FIXME: this should live in a separate module and make use of 
MobileFrontend events
function logWatchEvent( eventType ) {
@@ -140,7 +141,6 @@
}
 
function initWatchListIcon( container, title ) {
-   var drawer = new nav.CtaDrawer( { content: mw.msg( 
'mobile-frontend-watchlist-cta' ) } );
 
api.getToken( 'watch' ).done( function( token ) {
lastToken = token;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I64a2ebff747af7c1ff0d63e9d4b584dabb06a19f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix gazillions of JS errors on some pages (regression) - change (mediawiki...MobileFrontend)

2013-03-25 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix gazillions of JS errors on some pages (regression)
..

Fix gazillions of JS errors on some pages (regression)

Regression from 2f03308 (lesson: don't make small changes to external
code without testing them well).

Change-Id: I1085848ab9e60d5745bf719fa2535902adf9c89f
---
M javascripts/common/mf-application.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/javascripts/common/mf-application.js 
b/javascripts/common/mf-application.js
index 2b8f0b5..86c4ec8 100644
--- a/javascripts/common/mf-application.js
+++ b/javascripts/common/mf-application.js
@@ -88,7 +88,7 @@
 
// http://stackoverflow.com/a/12621264/365238
function supports3dTransforms() {
-   var el = $( 'p' )[0], has3d, t,
+   var el = document.createElement( 'p' ), has3d, t,
transforms = {
'webkitTransform': '-webkit-transform',
//'OTransform': '-o-transform',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1085848ab9e60d5745bf719fa2535902adf9c89f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Add configuration for Special:LoginHandshake workaround - change (operations/mediawiki-config)

2013-03-26 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Add configuration for Special:LoginHandshake workaround
..

Add configuration for Special:LoginHandshake workaround

Change-Id: Icd62805cc7a23f42097a7347f37c258e6269e938
---
M wmf-config/InitialiseSettings.php
M wmf-config/mobile.php
2 files changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/19/56019/1

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1a34299..5d129f8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -11005,6 +11005,9 @@
 'wmgMFPhotoUploadAppendToDesc' => array(
'default' => '{{Uploaded from Mobile|platform=Web|version=}}',
 ),
+'wmgMFLoginHandshakeUrl' => array(
+   'default' => 
'//commons.wikimedia.org/wiki/Special:LoginHandshake?useformat=mobile'
+),
 
 'wgExtraGenderNamespaces' => array(
'default' => array(),
diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index de90639..6a318ac 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -165,3 +165,6 @@
 
 // Force HTTPS for login/account creation
 $wgMFForceSecureLogin = $wmgMFForceSecureLogin;
+
+// Point to Common's Special:LoginHandshake page
+$wgMFLoginHandshakeUrl = $wmgMFLoginHandshakeUrl;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd62805cc7a23f42097a7347f37c258e6269e938
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Remove event logging for Commons CentralAuth image errors - change (mediawiki...MobileFrontend)

2013-03-26 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Remove event logging for Commons CentralAuth image errors
..

Remove event logging for Commons CentralAuth image errors

Now userlogin.js is loaded at the top of the page to issue a redirect to
Commons as quickly as possible, so we can't assume that
mf-application.js needed for EL (getSessionId()) is loaded.

Change-Id: I60ecaacfc053167eae75b8b37a729ec43a15e265
---
M javascripts/specials/userlogin.js
1 file changed, 5 insertions(+), 26 deletions(-)


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

diff --git a/javascripts/specials/userlogin.js 
b/javascripts/specials/userlogin.js
index 1767e42..c854851 100644
--- a/javascripts/specials/userlogin.js
+++ b/javascripts/specials/userlogin.js
@@ -24,40 +24,19 @@
$( '#mw-returnto' ).addClass( 'loaded' );
}
 
-   function error() {
-   M.log( 'MobileWebCentralAuthError', {
-   token: M.getSessionId(),
-   mobileMode: mw.config.get( 'wgMFMode' ),
-   userAgent: window.navigator.userAgent,
-   error: 'commonsImageError'
-   } );
-   // show the return to link anyway after logging the 
event
-   done();
-   }
-
-   // define event logging schema here until
-   // https://gerrit.wikimedia.org/r/#/c/52053/ is merged and/or 
we properly
-   // track dependencies for event logging schemas
-   if ( mw.eventLog ) {
-   mw.eventLog.setSchema("MobileWebCentralAuthError", 
{"schema":{"properties":{"token":{"type":"string","required":true,"description":"User
 
token"},"error":{"type":"string","required":true,"enum":["commonsImageError"],"description":"Kind
 of error. commonsImageError - when CentralAuth Commons image failed to load 
(detected in 
JavaScript)"},"mobileMode":{"type":"string","required":true,"enum":["stable","beta","alpha"],"description":"Whether
 the user is seeing the regular non-beta, beta, or alpha version of the mobile 
site."},"userAgent":{"type":"string","description":"Useragent 
string."}}},"revision":5294684});
-   }
-
// make sure Commons image is loaded after login
if ( $commonsImage.length ) {
// http://stackoverflow.com/a/3877079/365238
$commonsImage.
one( 'load', done ).
-   on( 'error', error ).
+   // show the return to link anyway even if image 
fails to load
+   one( 'error', done ).
each( function() {
-   if ( this.complete ) {
-   // 
http://stackoverflow.com/a/1977898/365238
-   if ( this.naturalWidth === 0 ) {
-   error();
-   } else {
+   if ( this.complete ) {
+   // 
http://stackoverflow.com/a/1977898/365238
done();
}
-   }
-   } );
+   } );
} else {
done();
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60ecaacfc053167eae75b8b37a729ec43a15e265
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix Android Browser quirks in transforms support check - change (mediawiki...MobileFrontend)

2013-03-26 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix Android Browser quirks in transforms support check
..

Fix Android Browser quirks in transforms support check

Also, load the code responsible for the check only in alpha.

Change-Id: Ifed61141c679e33fdcb9ae99136341264d01506b
---
M MobileFrontend.php
A javascripts/common/application-alpha.js
M javascripts/common/mf-application.js
3 files changed, 32 insertions(+), 28 deletions(-)


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

diff --git a/MobileFrontend.php b/MobileFrontend.php
index 98014e5..8a5093d 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -340,6 +340,7 @@
'stylesheets/modules/mf-tables.css',
),
'scripts' => array(
+   'javascripts/common/application-alpha.js',
'javascripts/modules/mf-inline-style-scrubber.js',
'javascripts/common/mf-history-jquery.js',
'javascripts/modules/mf-random.js',
diff --git a/javascripts/common/application-alpha.js 
b/javascripts/common/application-alpha.js
new file mode 100644
index 000..462a480
--- /dev/null
+++ b/javascripts/common/application-alpha.js
@@ -0,0 +1,31 @@
+jQuery( function( $ ) {
+   // http://stackoverflow.com/a/12621264/365238
+   function supports3dTransforms() {
+   var el = $( '' )[0], $iframe = $( '' ), has3d, t,
+   transforms = {
+   'webkitTransform': '-webkit-transform',
+   //'OTransform': '-o-transform',
+   //'msTransform': '-ms-transform',
+   'transform': 'transform'
+   };
+
+   // Add it to the body to get the computed style
+   // Sandbox it inside an iframe to avoid Android Browser quirks
+   $iframe.appendTo( 'body' ).contents().find( 'body' ).append( el 
);
+
+   for ( t in transforms ) {
+   if ( el.style[t] !== undefined ) {
+   el.style[t] = 'translate3d(1px,1px,1px)';
+   has3d = window.getComputedStyle( el 
).getPropertyValue( transforms[t] );
+   }
+   }
+
+   $iframe.remove();
+
+   return has3d !== undefined && has3d.length > 0 && has3d !== 
"none";
+   }
+
+   if ( supports3dTransforms() ) {
+   $( 'html' ).addClass( 'transforms' );
+   }
+} );
diff --git a/javascripts/common/mf-application.js 
b/javascripts/common/mf-application.js
index 86c4ec8..8b4d00f 100644
--- a/javascripts/common/mf-application.js
+++ b/javascripts/common/mf-application.js
@@ -86,31 +86,6 @@
return support;
}
 
-   // http://stackoverflow.com/a/12621264/365238
-   function supports3dTransforms() {
-   var el = document.createElement( 'p' ), has3d, t,
-   transforms = {
-   'webkitTransform': '-webkit-transform',
-   //'OTransform': '-o-transform',
-   //'msTransform': '-ms-transform',
-   'transform': 'transform'
-   };
-
-   // Add it to the body to get the computed style
-   document.body.insertBefore(el, null);
-
-   for ( t in transforms ) {
-   if ( el.style[t] !== undefined ) {
-   el.style[t] = 'translate3d(1px,1px,1px)';
-   has3d = window.getComputedStyle( el 
).getPropertyValue( transforms[t] );
-   }
-   }
-
-   document.body.removeChild(el);
-
-   return ( has3d !== undefined && has3d.length > 0 && has3d !== 
"none" );
-   }
-
// Try to scroll and hide URL bar
scrollY = window.scrollY || 0;
if( !window.location.hash && scrollY < 10 ) {
@@ -136,9 +111,6 @@
$doc.removeClass( 'page-loading' );
if( supportsPositionFixed() ) {
$doc.addClass( 'supportsPositionFixed' );
-   }
-   if ( supports3dTransforms() ) {
-   $doc.addClass( 'transforms' );
}
 
// when rotating to landscape stop page zooming on ios

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifed61141c679e33fdcb9ae99136341264d01506b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wi

[MediaWiki-commits] [Gerrit] Urgent fix: Provide greater expect-ations (fix breaking tests) - change (mediawiki...MobileFrontend)

2013-03-29 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Urgent fix: Provide greater expect-ations (fix breaking tests)
..


Urgent fix: Provide greater expect-ations (fix breaking tests)

Make use of expect in qunit tests
(see change I214b3d4da46f3f3bb0fcde313ac2d82439e40e3c)
Avoid using module and test as a global

(All tests are currently failing with latest core so please merge
this asap)

Change-Id: I545cd1520ac4b0f945b71f76479473bcebe66573
---
M .jshintrc
M tests/js/common/mf-navigation.js
M tests/js/specials/mobilediff.js
M tests/js/specials/uploads.js
M tests/js/test_application.js
M tests/js/test_banner.js
M tests/js/test_beta_opensearch.js
M tests/js/test_eventemitter.js
M tests/js/test_mf-api.js
M tests/js/test_mf-edit.js
M tests/js/test_mf-history.js
M tests/js/test_mf-last-modified.js
M tests/js/test_mf-oop.js
M tests/js/test_mf-photo.js
M tests/js/test_mf-view.js
M tests/js/test_mf-watchstar.js
M tests/js/test_references.js
M tests/js/test_settings.js
M tests/js/test_toggle.js
M tests/js/widgets/test_progress-bar.js
20 files changed, 109 insertions(+), 108 deletions(-)

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



diff --git a/.jshintrc b/.jshintrc
index 3975b29..9093094 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -8,11 +8,8 @@
"mw": true,
"mwMobileFrontendConfig": true,
 
-   "module": true,
"strictEqual": true,
"deepEqual": true,
-   "throws": true,
-   "test": true,
"ok": true,
"sinon": true
},
diff --git a/tests/js/common/mf-navigation.js b/tests/js/common/mf-navigation.js
index 378c5f6..57d9255 100644
--- a/tests/js/common/mf-navigation.js
+++ b/tests/js/common/mf-navigation.js
@@ -1,15 +1,15 @@
 ( function( nav, $ ) {
 
-module( 'MobileFrontend: mf-navigation.js', {} );
+QUnit.module( 'MobileFrontend: mf-navigation.js' );
 
-test( 'Simple overlay', function() {
+QUnit.test( 'Simple overlay', 2, function() {
var overlay = new nav.Overlay( { heading: 'Title', content: 
'Text' } );
overlay.show();
strictEqual( overlay.$el[0].parentNode, document.body, 'In DOM' );
strictEqual( overlay.$el.html(), 'Title/Text' );
 } );
 
-test( 'HTML overlay', function() {
+QUnit.test( 'HTML overlay', 1, function() {
var overlay = new nav.Overlay( {
heading: 'Awesome: ',
content: 'YO'
@@ -17,14 +17,14 @@
strictEqual( overlay.$el.html(), 'Awesome: /YO' );
 } );
 
-test( 'Close overlay', function() {
+QUnit.test( 'Close overlay', 1, function() {
var overlay = new nav.Overlay( { heading: 'Title', content: 
'Text' } );
overlay.show();
overlay.hide();
strictEqual( overlay.$el[0].parentNode, null, 'No longer in DOM' );
 } );
 
-test( 'Stacked overlays', function() {
+QUnit.test( 'Stacked overlays', 6, function() {
var overlay = new nav.Overlay( { heading: 'Overlay 1', content: 'Text' 
} ),
overlayTwo = new nav.Overlay( { heading: 'Overlay 2', content: 
'Text cancel',
parent: overlay } );
diff --git a/tests/js/specials/mobilediff.js b/tests/js/specials/mobilediff.js
index e209abf..502c438 100644
--- a/tests/js/specials/mobilediff.js
+++ b/tests/js/specials/mobilediff.js
@@ -2,9 +2,9 @@
 
 var m = M.require( 'diff' );
 
-module( 'MobileFrontend: mobilediff.js', {} );
+QUnit.module( 'MobileFrontend: mobilediff.js' );
 
-test( 'makePrettyDiff', function() {
+QUnit.test( 'makePrettyDiff', function() {
var testCases = [
[ $( 'foo' ), 'foo' ],
[
@@ -25,6 +25,7 @@
]
];
 
+   QUnit.expect( testCases.length );
$.each( testCases, function( i, test ) {
strictEqual( m.makePrettyDiff( test[0] ).html(), test[1], 'Test 
case ' + i );
} );
diff --git a/tests/js/specials/uploads.js b/tests/js/specials/uploads.js
index 25519d8..52031e2 100644
--- a/tests/js/specials/uploads.js
+++ b/tests/js/specials/uploads.js
@@ -1,15 +1,16 @@
 ( function ( M, $ ) {
 
 var m = M.require( 'userGallery' );
-module( 'MobileFrontend donate image' );
+QUnit.module( 'MobileFrontend donate image' );
 
-test( 'extractDescription', function() {
+QUnit.test( 'extractDescription', function() {
var tests = [
[ '== {{int:filedesc}} ==\nHello world', 'Hello world' 
],
[ '==Foo 1==\nbar 1\n==Foo 2==\nbar 2\n== 
{{int:filedesc}} ==\npicture of cat\n', 'picture of cat' ],
[ '==Foo 1==\nbar 1\n== {{int:filedesc}} ==\npicture of 
dog\n==Foo 2==\nbar 2\n', 'picture of dog' ],
[ '== Yo ==\nother text', '' ]
];
+   QUnit.expect( tests.length );
$( tests ).each( function( i ) {
var val = m.extractDescription( this[0] );
st

[MediaWiki-commits] [Gerrit] Regression: Stop low res main menu icon from 404ing due to move - change (mediawiki...MobileFrontend)

2013-03-29 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Regression: Stop low res main menu icon from 404ing due to move
..


Regression: Stop low res main menu icon from 404ing due to move

Follow up to I4365f914f95a8b4d1f2d9ab2e37614e835cc2fc5

Change-Id: Id95b18a22fac371b1e0aa7682e18be073305ed2c
---
R stylesheets/common/images/menu/lowres/main.png
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/stylesheets/specials/images/menu/lowres/main.png 
b/stylesheets/common/images/menu/lowres/main.png
similarity index 100%
rename from stylesheets/specials/images/menu/lowres/main.png
rename to stylesheets/common/images/menu/lowres/main.png
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id95b18a22fac371b1e0aa7682e18be073305ed2c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Use file name for images with descriptions with templates - change (mediawiki...MobileFrontend)

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

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


Change subject: Use file name for images with descriptions with templates
..

Use file name for images with descriptions with templates

Strip File: and extension.

Change-Id: Ie1fc7f0591b6312fbdd45d9889895d74b25ded02
---
M javascripts/specials/uploads.js
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/javascripts/specials/uploads.js b/javascripts/specials/uploads.js
index 654f284..c0f93be 100644
--- a/javascripts/specials/uploads.js
+++ b/javascripts/specials/uploads.js
@@ -55,6 +55,10 @@
index = text.indexOf( '== {{int:filedesc}} ==' );
if ( index > - 1 ) {
summary = $.trim( text.substr( index ).split( '==' )[ 2 
] );
+   // if description contains templates, don't use it 
(FIXME?)
+   if ( summary.indexOf( '{{' ) !== -1 ) {
+   summary = '';
+   }
}
return summary;
}
@@ -81,7 +85,7 @@
} );
$( pages ).each( function() {
imageData[ this.title ].description = 
extractDescription( this.revisions[0]['*'] ) ||
-   mw.msg( 
'mobile-frontend-listed-image-no-description' );
+   this.title.replace( /^File:/, '' 
).replace( /\.[^\.]+$/, '' );
} );
callback( imageData );
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1fc7f0591b6312fbdd45d9889895d74b25ded02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Story 400: Deal with first time user upload - change (mediawiki...MobileFrontend)

2013-03-29 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Story 400: Deal with first time user upload
..


Story 400: Deal with first time user upload

Update photo success handler to show the upload count in case it has
been hidden and destroy the carousel

Change-Id: Idc891a2b420f1e9b715694519a710c7686e91657
---
M MobileFrontend.i18n.php
M MobileFrontend.php
M includes/MobileFrontend.hooks.php
M javascripts/specials/uploads.js
A javascripts/widgets/carousel.js
M less/mf-mixins.less
M less/mf-variables.less
M less/specials/uploads.less
A stylesheets/specials/images/uploads/Indicator_active.png
A stylesheets/specials/images/uploads/Indicator_default.png
A stylesheets/specials/images/uploads/SplashScreen1.png
A stylesheets/specials/images/uploads/SplashScreen2.png
A stylesheets/specials/images/uploads/SplashScreen3.png
A stylesheets/specials/images/uploads/Tour_1.png
A stylesheets/specials/images/uploads/Tour_2.png
A stylesheets/specials/images/uploads/Tour_3.png
A stylesheets/specials/images/uploads/chevron_left.png
A stylesheets/specials/images/uploads/chevron_right.png
M stylesheets/specials/uploads.css
A templates/specials/uploads/carousel.html
M tests/js/fixtures-templates.js
A tests/js/widgets/carousel.js
22 files changed, 309 insertions(+), 7 deletions(-)

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



diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 95fd39d..4a254ce 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -181,6 +181,9 @@
'mobile-frontend-listed-image-no-description' => 'No description',
'mobile-frontend-donate-photo-upload-success' => 'Success! Your image 
can now be used on {{SITENAME}}!',
'mobile-frontend-donate-photo-first-upload-success' => 'Success! Thanks 
for your first contribution!',
+   'mobile-frontend-first-upload-wizard-page-1' => '{{SITENAME}} needs 
your photos to bring its pages to life!',
+   'mobile-frontend-first-upload-wizard-page-2' => 'Please only donate 
photos that you took yourself.',
+   'mobile-frontend-first-upload-wizard-page-3' => 'Your donated photos 
can be shared, reused, and remixed by millions.',
 
// watchlist
'mobile-frontend-watchlist-add' => 'Added $1 to your watchlist',
@@ -232,7 +235,7 @@
'mobile-frontend-photo-ownership' => 'I, $1, created this image.',
'mobile-frontend-photo-ownership-help' => 'What does this mean?',
'mobile-frontend-photo-ownership-confirm' => 'Got it!',
-   'mobile-frontend-photo-ownership-bullet-one' => 'We can only accept 
images that you took yourself. Please do not upload images you found somewhere 
else on the Internet.',
+   'mobile-frontend-photo-ownership-bullet-one' => 'We can only accept 
photos that you took yourself. Please do not upload images you found somewhere 
else on the Internet.',
'mobile-frontend-photo-ownership-bullet-two' => 'Copyrighted and 
inappropriate images will be removed.',
'mobile-frontend-photo-ownership-bullet-three' => 'Your uploads are 
released under a free license and can be reused by anyone for free.',
'mobile-frontend-image-uploading-wait' => 'Uploading image, please 
wait.',
@@ -534,6 +537,9 @@
'mobile-frontend-listed-image-no-description' => 'What to show when no 
description available',
'mobile-frontend-donate-photo-upload-success' => 'On upload page - 
notification shown after a successful upload',
'mobile-frontend-donate-photo-first-upload-success' => 'On upload page 
- notification shown after a successful upload when it is the first upload by 
that user',
+   'mobile-frontend-first-upload-wizard-page-1' => 'Message shown to users 
who have never uploaded a photo to commons. Explain why photos are important.',
+   'mobile-frontend-first-upload-wizard-page-2' => 'Explains important of 
the photos being owned by the person uploading them.',
+   'mobile-frontend-first-upload-wizard-page-3' => 'Explains implications 
of uploading a photo.',
'mobile-frontend-watchlist-add' => 'Notification message when you add 
an article to your watchlist
 *$1 - the title of the article',
'mobile-frontend-watchlist-removed' => 'Notification message when you 
remove an article from your watchlist
diff --git a/MobileFrontend.php b/MobileFrontend.php
index d1f9b14..2567ac0 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -157,6 +157,15 @@
'targets' => 'mobile',
 );
 
+/**
+ * A boilerplate for the MFResourceLoaderModule that supports templates
+ */
+$wgMFMobileResourceTemplateBoilerplate = array(
+   'localBasePath' => $localBasePath,
+   'localTemplateBasePath' => $localBasePath . '/templates',
+   'class' => 'MFResourceLoaderModule',
+);
+
 // Filepages
 $wgResourceModules['mobile.file.styles'] = $wgMFMobileResourceBoilerplate + 
array(
'dependencies' =>

[MediaWiki-commits] [Gerrit] Minor QUnit test fixes - change (mediawiki...MobileFrontend)

2013-04-01 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Minor QUnit test fixes
..


Minor QUnit test fixes

Avoid using globals
Tell test how many to expect

Change-Id: Ied1cd5f0ae56951bfad37772a0a73dcd251b51b3
---
M tests/js/widgets/carousel.js
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/tests/js/widgets/carousel.js b/tests/js/widgets/carousel.js
index c812382..904b87e 100644
--- a/tests/js/widgets/carousel.js
+++ b/tests/js/widgets/carousel.js
@@ -2,9 +2,9 @@
 
var Carousel = M.require( 'widgets/carousel' );
 
-   module( 'MobileFrontend Carousel' );
+   QUnit.module( 'MobileFrontend Carousel' );
 
-   test( '#next', function() {
+   QUnit.test( '#next', 5, function() {
var c = new Carousel();
strictEqual( c.totalPages, 3, 'There are 3 pages in the 
carousel' );
strictEqual( c.page, 0, 'Initialises to page 0' );
@@ -16,7 +16,7 @@
strictEqual( c.page, 2, 'Still page 2 (no more pages)' );
} );
 
-   test( '#prev', function() {
+   QUnit.test( '#prev', 4, function() {
var c = new Carousel();
strictEqual( c.page, 0, 'Initialises to page 0' );
c.previous();
@@ -27,7 +27,7 @@
strictEqual( c.page, 0, 'Back on page 0' );
} );
 
-   test( '#showCurrentPage', function() {
+   QUnit.test( '#showCurrentPage', 3, function() {
var c = new Carousel();
strictEqual( c.page, 0, 'Initialises to page 0' );
c.next();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied1cd5f0ae56951bfad37772a0a73dcd251b51b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: JGonera 
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 missing dependency - change (mediawiki...MobileFrontend)

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

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


Change subject: Add missing dependency
..

Add missing dependency

carousel.js and uploads.js depend on View and Api which are in
mobile.stable.

Change-Id: I0b6ad6ebc2d2664fca898b857ab14ecf29c4db8c
---
M MobileFrontend.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/MobileFrontend.php b/MobileFrontend.php
index 2567ac0..e4f830a 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -592,6 +592,7 @@
 $wgResourceModules['mobile.uploads.scripts'] = $wgMFMobileResourceBoilerplate 
+ array(
'dependencies' => array(
'mobile.uploads.plumbing',
+   'mobile.stable',
),
'messages' => array(
'mobile-frontend-photo-upload-generic',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b6ad6ebc2d2664fca898b857ab14ecf29c4db8c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Add requirements.txt - change (analytics/limn-mobile-data)

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

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


Change subject: Add requirements.txt
..

Add requirements.txt

Change-Id: I2120db1066c676864707a9d336f2839c9ba60c4b
---
A requirements.txt
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-mobile-data 
refs/changes/29/57129/1

diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000..30f9421
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,3 @@
+Jinja2==2.6
+MySQL-python==1.2.4
+PyYAML==3.10

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2120db1066c676864707a9d336f2839c9ba60c4b
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-mobile-data
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Add top context modules as well as styles - make login js run - change (mediawiki...MobileFrontend)

2013-04-02 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Add top context modules as well as styles - make login js run
..


Add top context modules as well as styles - make login js run

Currently this is not being added but should be
Change-Id: I4156e53d72aa411de4045cf47bf8cda3c3836b87
---
M includes/skins/SkinMobile.php
1 file changed, 12 insertions(+), 5 deletions(-)

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



diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 4b557fd..3bca8ac 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -252,9 +252,14 @@
 
// attach styles
$out->addModuleStyles( 'mobile.styles' );
-   if ( count( $contextModules['top'] ) > 0 ) {
-   $out->addModuleStyles( $contextModules['top'] );
+   if ( count( $contextModules['styles'] ) > 0 ) {
+   $out->addModuleStyles( $contextModules['styles'] );
}
+
+   if ( count( $contextModules['top'] ) > 0 ) {
+   $out->addModules( $contextModules['top'] );
+   }
+
// add device specific CSS separately to avoid cache 
fragmentation
if ( $wgMFVaryResources ) {
$out->addModuleStyles( 'mobile.device.detect' );
@@ -352,11 +357,12 @@
 
$moduleNames = array();
$headModuleNames = array();
+   $styles = array();
 
// specific to current context
if ( $isFilePage ) {
$moduleNames[] = 'mobile.file.scripts';
-   $headModuleNames[] = 'mobile.file.styles';
+   $styles[] = 'mobile.file.styles';
}
 
if ( $isSpecialPage ) {
@@ -366,7 +372,7 @@
$specialScriptModuleName = 'mobile.' . $id . '.scripts';
 
if ( isset( $wgResourceModules[ $specialStyleModuleName 
] ) ) {
-   $headModuleNames[] = $specialStyleModuleName;
+   $styles[] = $specialStyleModuleName;
}
 
if ( isset( $wgResourceModules[ 
$specialScriptModuleName ] ) ) {
@@ -378,7 +384,7 @@
}
}
} else {
-   $headModuleNames[] = 'mobile.styles.page';
+   $styles[] = 'mobile.styles.page';
}
 
if ( $action === 'edit' ) {
@@ -390,6 +396,7 @@
return array(
'top' => $headModuleNames,
'bottom' => $moduleNames,
+   'styles' => $styles,
);
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4156e53d72aa411de4045cf47bf8cda3c3836b87
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: awjrichards 
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 upload errors graph for Web - change (analytics/limn-mobile-data)

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

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


Change subject: Fix upload errors graph for Web
..

Fix upload errors graph for Web

SQL for error and success uploads was the same for Web...

Change-Id: Ic12ae21dcffd69428c29b629a3639b5eba848658
---
M mobile/error-uploads.sql
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-mobile-data 
refs/changes/86/57186/1

diff --git a/mobile/error-uploads.sql b/mobile/error-uploads.sql
index 152915d..7e9f683 100644
--- a/mobile/error-uploads.sql
+++ b/mobile/error-uploads.sql
@@ -31,7 +31,7 @@
 SUM(1) AS Web
 
 FROM {{ tables.upload_web }} WHERE
-event_action = 'success' AND
+event_action = 'error' AND
 wiki != 'testwiki'
 GROUP BY Date
 ) AS Web ON Month.Date = Web.Date;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic12ae21dcffd69428c29b629a3639b5eba848658
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-mobile-data
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix upload errors graph for Web - change (analytics/limn-mobile-data)

2013-04-02 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Fix upload errors graph for Web
..


Fix upload errors graph for Web

SQL for error and success uploads was the same for Web...

Change-Id: Ic12ae21dcffd69428c29b629a3639b5eba848658
---
M mobile/error-uploads.sql
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/mobile/error-uploads.sql b/mobile/error-uploads.sql
index 152915d..7e9f683 100644
--- a/mobile/error-uploads.sql
+++ b/mobile/error-uploads.sql
@@ -31,7 +31,7 @@
 SUM(1) AS Web
 
 FROM {{ tables.upload_web }} WHERE
-event_action = 'success' AND
+event_action = 'error' AND
 wiki != 'testwiki'
 GROUP BY Date
 ) AS Web ON Month.Date = Web.Date;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic12ae21dcffd69428c29b629a3639b5eba848658
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-mobile-data
Gerrit-Branch: master
Gerrit-Owner: JGonera 
Gerrit-Reviewer: JGonera 

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


[MediaWiki-commits] [Gerrit] Don't add more than one photo upload button - change (mediawiki...MobileFrontend)

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

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


Change subject: Don't add more than one photo upload button
..

Don't add more than one photo upload button

Even if the page has more than one  element.

Change-Id: I0189617f93a1874b7133af0d3a195d67874bf9fc
---
M javascripts/modules/mf-photo.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index 142f93d..32b918d 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -519,7 +519,7 @@
namespace = mw.config.get( 'wgNamespaceNumber' ),
validNamespace = ( namespace === namespaceIds[''] || 
namespace === namespaceIds.user ),
$page = $( '#content' ),
-   $pageHeading = $page.find( 'h1' ),
+   $pageHeading = $page.find( 'h1:first' ),
photoUploader;
 
if ( !validNamespace || mw.util.getParamValue( 'action' ) || 
!needsPhoto( $page ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0189617f93a1874b7133af0d3a195d67874bf9fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Alpha: Diff words rather than chars - change (mediawiki...MobileFrontend)

2013-04-04 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Alpha: Diff words rather than chars
..


Alpha: Diff words rather than chars

Experimenting this seems like a much better idea
I think this will make jgonera happier :)

Change-Id: I78b37acb0a85575870f316a9ad679a1305da7093
---
M javascripts/specials/mobilediff.js
M tests/js/specials/mobilediff.js
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/javascripts/specials/mobilediff.js 
b/javascripts/specials/mobilediff.js
index eeef134..1c70966 100644
--- a/javascripts/specials/mobilediff.js
+++ b/javascripts/specials/mobilediff.js
@@ -27,7 +27,7 @@
$add = $add.next();
}
 
-   diffChars = JsDiff.diffChars( 
$del.text(), $add.text() );
+   diffChars = JsDiff.diffWords( 
$del.text(), $add.text() );
diffChars.forEach( function( change ) {
var tag;
if ( change.added ) {
diff --git a/tests/js/specials/mobilediff.js b/tests/js/specials/mobilediff.js
index 26f2d15..c2e4c37 100644
--- a/tests/js/specials/mobilediff.js
+++ b/tests/js/specials/mobilediff.js
@@ -17,7 +17,7 @@
],
[
$( 'A total of 40 
consulates-generals and 24 honorary consulates have offices in the San 
Francisco Bay Area.A total of 41 consulates-generals and 24 honorary 
consulates have offices in the San Francisco Bay Area.' ),
-   'A total of 
410 consulates-generals and 24 honorary 
consulates have offices in the San Francisco Bay Area.'
+   'A total of 
4140 consulates-generals and 24 honorary 
consulates have offices in the San Francisco Bay Area.'
],
[
$( '== 
Fliberty gibbit ==Foobar!' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I78b37acb0a85575870f316a9ad679a1305da7093
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Bring watch star css/html markup closer to desktop - change (mediawiki...MobileFrontend)

2013-04-04 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Bring watch star css/html markup closer to desktop
..


Bring watch star css/html markup closer to desktop

Change-Id: I4d67fd48586541e0f11c15f0088e3a2126221d71
---
M includes/skins/SkinMobileTemplate.php
M javascripts/modules/mf-watchstar.js
M less/common/mf-navigation.less
M less/modules/mf-watchstar.less
R stylesheets/common/images/watch.png
R stylesheets/common/images/watched.png
M stylesheets/common/mf-navigation.css
M stylesheets/modules/mf-watchstar.css
8 files changed, 65 insertions(+), 44 deletions(-)

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



diff --git a/includes/skins/SkinMobileTemplate.php 
b/includes/skins/SkinMobileTemplate.php
index 81e0960..bcc9c70 100644
--- a/includes/skins/SkinMobileTemplate.php
+++ b/includes/skins/SkinMobileTemplate.php
@@ -182,7 +182,7 @@



-   
+   
' ).appendTo( 
nav.getPageMenu() )[ 0 ];
title = title || pageTitle;
// initialise on current page
if ( container ) {
diff --git a/less/common/mf-navigation.less b/less/common/mf-navigation.less
index e234766..b550ef2 100644
--- a/less/common/mf-navigation.less
+++ b/less/common/mf-navigation.less
@@ -9,9 +9,37 @@
 @overlayAlertPadding: 0.5em @overlayAlertPaddingHorizontal;
 @overlayBorderWidth: 1px;
 @toastNotificationColor: #373737;
+@watchThisArticleSize: 22px;
 
 #mw-mf-menu-page {
right: 0;
+   list-style: none;
+
+   li.watch-this-article,
+   li.watch-this-article a {
+   position: absolute;
+   right: 0;
+   top: 0;
+   left: 0;
+   bottom: 0;
+   }
+}
+
+li.watch-this-article,
+a.watch-this-article { // FIXME: Make the page watch star appear to 
non-javascript users so this css rule is used on non-js devices
+   background-image: url(images/watch.png);
+   background-position: center center;
+   .background-size( auto, @watchThisArticleSize );
+   position: absolute;
+   top: 0;
+   right: 0;
+   text-indent: -px;
+   background-repeat: no-repeat;
+
+   &#ca-watch,
+   &.watched {
+   background-image: url(images/watched.png);
+   }
 }
 
 .client-js {
diff --git a/less/modules/mf-watchstar.less b/less/modules/mf-watchstar.less
index 9f9cbfe..be0604e 100644
--- a/less/modules/mf-watchstar.less
+++ b/less/modules/mf-watchstar.less
@@ -1,20 +1,6 @@
 @import "../mf-mixins.less";
 
-@watchThisArticleSize: 22px;
-
 a.watch-this-article {
-   background-image: url(images/watch.png);
-   background-position: center center;
-   .background-size( auto, @watchThisArticleSize );
-   position: absolute;
-   top: 0;
-   right: 0;
-   text-indent: -px;
-   background-repeat: no-repeat;
-
-   &.watched {
-   background-image: url(images/watched.png);
-   }
 
&.loading {
background-image: @ajaxLoadingImage;
@@ -45,12 +31,9 @@
 }
 
 #mw-mf-menu-page {
-   a.watch-this-article {
-   position: absolute;
+   li a.watch-this-article {
right: 0;
-   top: 0;
-   left: 0;
-   bottom: 0;
+   width: @searchBarPaddingLeft;
}
 }
 
diff --git a/stylesheets/modules/images/watch.png 
b/stylesheets/common/images/watch.png
similarity index 100%
rename from stylesheets/modules/images/watch.png
rename to stylesheets/common/images/watch.png
Binary files differ
diff --git a/stylesheets/modules/images/watched.png 
b/stylesheets/common/images/watched.png
similarity index 100%
rename from stylesheets/modules/images/watched.png
rename to stylesheets/common/images/watched.png
Binary files differ
diff --git a/stylesheets/common/mf-navigation.css 
b/stylesheets/common/mf-navigation.css
index d2f52b0..c0b93ec 100644
--- a/stylesheets/common/mf-navigation.css
+++ b/stylesheets/common/mf-navigation.css
@@ -1,5 +1,36 @@
 #mw-mf-menu-page {
   right: 0;
+  list-style: none;
+}
+#mw-mf-menu-page li.watch-this-article,
+#mw-mf-menu-page li.watch-this-article a {
+  position: absolute;
+  right: 0;
+  top: 0;
+  left: 0;
+  bottom: 0;
+}
+li.watch-this-article,
+a.watch-this-article {
+  background-image: url(images/watch.png);
+  background-position: center center;
+  /* use -webkit prefix for older android browsers eg. nexus 1 */
+
+  -moz-background-size: auto 22px;
+  -o-background-size: auto 22px;
+  -webkit-background-size: auto 22px;
+  background-size: auto 22px;
+  position: absolute;
+  top: 0;
+  right: 0;
+  text-indent: -px;
+  background-repeat: no-repeat;
+}
+li.watch-this-article#ca-watch,
+a.watch-this-article#ca-watch,
+li.watch-this-article.watched,
+a.watch-this-article.watched {
+  background-i

[MediaWiki-commits] [Gerrit] Hide a drawer when another drawer is shown - change (mediawiki...MobileFrontend)

2013-06-24 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Hide a drawer when another drawer is shown
..

Hide a drawer when another drawer is shown

Bug: 49209

Change-Id: I8b32c2f559b5a380b681a548d9196c5ffef60835
---
M javascripts/common/Drawer.js
M javascripts/common/uploads/PhotoUploader.js
M javascripts/common/user.js
M javascripts/modules/mf-watchstar.js
4 files changed, 11 insertions(+), 24 deletions(-)


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

diff --git a/javascripts/common/Drawer.js b/javascripts/common/Drawer.js
index 7ed747e..caa7d6f 100644
--- a/javascripts/common/Drawer.js
+++ b/javascripts/common/Drawer.js
@@ -13,14 +13,18 @@
ev.preventDefault();
self.hide();
} );
-   $( window ).on( 'scroll click', function() {
-   self.hide();
-   } );
this.appendTo( '#mw-mf-page-center' );
},
 
show: function() {
-   this.$el.addClass( 'visible' );
+   var self = this;
+   if ( !this.isVisible() ) {
+   this.$el.addClass( 'visible' );
+   // ignore a possible click that called show()
+   setTimeout( function() {
+   $( window ).one( 'scroll click', 
$.proxy( self, 'hide' ) );
+   }, 0 );
+   }
},
 
hide: function() {
@@ -29,14 +33,6 @@
 
isVisible: function() {
return this.$el.hasClass( 'visible' );
-   },
-
-   toggle: function() {
-   if ( this.isVisible() ) {
-   this.hide();
-   } else {
-   this.show();
-   }
}
} );
 
diff --git a/javascripts/common/uploads/PhotoUploader.js 
b/javascripts/common/uploads/PhotoUploader.js
index 9c78baa..1232422 100644
--- a/javascripts/common/uploads/PhotoUploader.js
+++ b/javascripts/common/uploads/PhotoUploader.js
@@ -111,13 +111,8 @@
returnToQuery: 
'article_action=photo-upload'
} );
this.$el.click( function( ev ) {
-   if ( !ctaDrawer.isVisible() ) {
-   ctaDrawer.show();
-   } else {
-   ctaDrawer.hide();
-   }
+   ctaDrawer.show();
ev.preventDefault();
-   ev.stopPropagation();
} );
return;
}
diff --git a/javascripts/common/user.js b/javascripts/common/user.js
index a06e58c..ee012d0 100644
--- a/javascripts/common/user.js
+++ b/javascripts/common/user.js
@@ -8,8 +8,7 @@
 
$( '#user-button' ).on( 'click', function( ev ) {
ev.preventDefault();
-   ev.stopPropagation();
-   drawer.toggle();
+   drawer.show();
} );
}
 }( mw.mobileFrontend, jQuery ) );
diff --git a/javascripts/modules/mf-watchstar.js 
b/javascripts/modules/mf-watchstar.js
index 2f65c7a..4089352 100644
--- a/javascripts/modules/mf-watchstar.js
+++ b/javascripts/modules/mf-watchstar.js
@@ -172,15 +172,12 @@
createWatchListButton( container, title, 
status[ title ] );
} );
} else {
-   $( createButton( container ) ).click( function( ev ) {
+   $( createButton( container ) ).click( function() {
if ( !drawer.isVisible() ) {
// log if enabled
logWatchEvent( 2 );
drawer.show();
-   } else {
-   drawer.hide();
}
-   ev.stopPropagation();
} );
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b32c2f559b5a380b681a548d9196c5ffef60835
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Br

[MediaWiki-commits] [Gerrit] Update CSS file - change (mediawiki...MobileFrontend)

2013-06-24 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Update CSS file
..

Update CSS file

Didn't run make less, apparently block level comments are copied from
LESS files.

Change-Id: I188c59a31803e4cbd62a5ae4f6949a4895bc134f
---
M stylesheets/common/notifications.css
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/stylesheets/common/notifications.css 
b/stylesheets/common/notifications.css
index df5489a..8506bd3 100644
--- a/stylesheets/common/notifications.css
+++ b/stylesheets/common/notifications.css
@@ -20,6 +20,10 @@
 .animations #mf-notification,
 .animations .drawer {
   display: block;
+  /* we can't determine the actual size of the drawer in CSS, so this is
+* an estimate; it doesn't have to be exact because it's used 
only for
+* the sliding animation, not for hiding the drawer */
+
   bottom: -11em;
   opacity: 0;
   -webkit-backface-visibility: hidden;
@@ -33,6 +37,9 @@
 .animations #mf-notification.visible,
 .animations .drawer.visible {
   opacity: 1;
+  /* -0.2em to avoid a weird glitch in some browsers where the popup moves
+* slightly when scrolling */
+
   -webkit-transform: translate3d(0, -10.8em, 0);
   transform: translate3d(0, -10.8em, 0);
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I188c59a31803e4cbd62a5ae4f6949a4895bc134f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Regression: show uploads tutorial for users with no uploads - change (mediawiki...MobileFrontend)

2013-06-25 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Regression: show uploads tutorial for users with no uploads
..

Regression: show uploads tutorial for users with no uploads

We missed that after adding infinite scroll. Also, remove the code for
hiding the uploads count, this is done in PHP now.

Change-Id: I60a09354052613312fc88eeafd1c097177ed3ac9
---
M javascripts/specials/uploads.js
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/javascripts/specials/uploads.js b/javascripts/specials/uploads.js
index 165e915..ba6b3a1 100644
--- a/javascripts/specials/uploads.js
+++ b/javascripts/specials/uploads.js
@@ -111,6 +111,9 @@
} );
} else {
self.$end.remove();
+   if ( self.isEmpty() ) {
+   self.emit( 'empty' );
+   }
}
} );
}
@@ -148,7 +151,6 @@
userGallery = new PhotoList().
appendTo( '#content' ).
on( 'empty', function() {
-   $( '.ctaUploadPhoto h2' ).hide(); // hide the 
count if 0 uploads have been made
new CarouselOverlay( {
pages: [
{

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60a09354052613312fc88eeafd1c097177ed3ac9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Temporarily enable animations in nag overlay in stable - change (mediawiki...MobileFrontend)

2013-06-25 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Temporarily enable animations in nag overlay in stable
..

Temporarily enable animations in nag overlay in stable

Disregard the animations check for now, assume that phones capable of
uploads are capable of showing the animation.

Change-Id: Idfe4182f8835f5e879dfa96489f482cd5b5afc0c
---
M less/modules/mf-photo.less
M stylesheets/modules/mf-photo.css
2 files changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/less/modules/mf-photo.less b/less/modules/mf-photo.less
index da1e51a..def388a 100644
--- a/less/modules/mf-photo.less
+++ b/less/modules/mf-photo.less
@@ -142,7 +142,8 @@
}
 }
 
-.animations .photo-nag {
+// FIXME: readd .animations to this when animations are in stable
+.photo-nag {
label div {
&.active {
.animation( pulse, 1s );
diff --git a/stylesheets/modules/mf-photo.css b/stylesheets/modules/mf-photo.css
index 7dcea74..957aaf0 100644
--- a/stylesheets/modules/mf-photo.css
+++ b/stylesheets/modules/mf-photo.css
@@ -147,7 +147,7 @@
   font-size: 1.2em;
   line-height: 1;
 }
-.animations .photo-nag label div.active {
+.photo-nag label div.active {
   -webkit-animation: pulse 1s ease-in-out infinite alternate;
   animation: pulse 1s ease-in-out infinite alternate;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfe4182f8835f5e879dfa96489f482cd5b5afc0c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Add unique uploaders per day graph - change (analytics/limn-mobile-data)

2013-06-25 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Add unique uploaders per day graph
..

Add unique uploaders per day graph

Also, add LIMIT to the unique uploaders per month query.

Change-Id: I1ed4eb7749c5c516c913de0d0ce670c20b9b3b26
---
M dashboards/reportcard.json
M datasources/cancelled-uploads.json
M datasources/deleted-uploads.json
M datasources/error-uploads.json
M datasources/month-uploads.json
M datasources/no-cats.json
M datasources/performance-rendering.json
M datasources/share-attempts.json
M datasources/successful-logins.json
M datasources/successful-uploads.json
A datasources/unique-uploaders-day.json
M datasources/unique-uploaders.json
A graphs/unique-uploaders-day.json
M mobile/config.yaml
A mobile/unique-uploaders-day.sql
M mobile/unique-uploaders.sql
16 files changed, 275 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-mobile-data 
refs/changes/66/70466/1

diff --git a/dashboards/reportcard.json b/dashboards/reportcard.json
index 4c6e710..a0f2779 100644
--- a/dashboards/reportcard.json
+++ b/dashboards/reportcard.json
@@ -14,6 +14,7 @@
 {
 "name": "Uploads daily",
 "graph_ids": [
+"unique-uploaders-day",
 "successful-uploads",
 "error-uploads",
 "no-cats",
diff --git a/datasources/cancelled-uploads.json 
b/datasources/cancelled-uploads.json
index 29664f1..b4fba89 100644
--- a/datasources/cancelled-uploads.json
+++ b/datasources/cancelled-uploads.json
@@ -5,7 +5,7 @@
 "step": "1d",
 "end": "2013/03/19"
 },
-"url": 
"http://stat1001.wikimedia.org/limn-public-data/mobile/datafiles/cancelled-uploads.csv";,
+"url": "/data/datafiles/mobile/cancelled-uploads.csv",
 "notes": "",
 "format": "csv",
 "slug": null,
diff --git a/datasources/deleted-uploads.json b/datasources/deleted-uploads.json
index 32bf497..6968a05 100644
--- a/datasources/deleted-uploads.json
+++ b/datasources/deleted-uploads.json
@@ -1,6 +1,6 @@
 {
 "name": "Uploads deleted (per month)",
-"url": 
"http://stat1001.wikimedia.org/limn-public-data/mobile/datafiles/deleted-uploads.csv";,
+"url": "/data/datafiles/mobile/deleted-uploads.csv",
 "format": "csv",
 "shortName": "deleted-uploads",
 "type": "timeseries",
diff --git a/datasources/error-uploads.json b/datasources/error-uploads.json
index 0fa843a..71ab995 100644
--- a/datasources/error-uploads.json
+++ b/datasources/error-uploads.json
@@ -5,7 +5,7 @@
 "step": "1d",
 "end": "2013/03/19"
 },
-"url": 
"http://stat1001.wikimedia.org/limn-public-data/mobile/datafiles/error-uploads.csv";,
+"url": "/data/datafiles/mobile/error-uploads.csv",
 "notes": "",
 "format": "csv",
 "slug": null,
diff --git a/datasources/month-uploads.json b/datasources/month-uploads.json
index 6b82a99..48e508d 100644
--- a/datasources/month-uploads.json
+++ b/datasources/month-uploads.json
@@ -1,6 +1,6 @@
 {
 "name": "Uploads (per month)",
-"url": 
"http://stat1001.wikimedia.org/limn-public-data/mobile/datafiles/month-uploads.csv";,
+"url": "/data/datafiles/mobile/month-uploads.csv",
 "format": "csv",
 "shortName": "month-uploads",
 "type": "timeseries",
diff --git a/datasources/no-cats.json b/datasources/no-cats.json
index 3e09cee..8340cd6 100644
--- a/datasources/no-cats.json
+++ b/datasources/no-cats.json
@@ -5,7 +5,7 @@
 "step": "1d",
 "end": "2013/03/19"
 },
-"url": 
"http://stat1001.wikimedia.org/limn-public-data/mobile/datafiles/no-cats.csv";,
+"url": "/data/datafiles/mobile/no-cats.csv",
 "notes": "",
 "format": "csv",
 "slug": null,
diff --git a/datasources/performance-rendering.json 
b/datasources/performance-rendering.json
index 87f54a6..d8d8cec 100644
--- a/datasources/performance-rendering.json
+++ b/datasources/performance-rendering.json
@@ -5,7 +5,7 @@
 "step": "1d",
 "end": "2013/03/19"
 },
-"url": 
"http://stat1001.wikimedia.org/limn-public-data/mobile/datafiles/performance-rendering.csv";,
+"url": "/data/datafiles/mobile/performance-rendering.csv",
 "notes": "",
 "format": "csv",
 "slug": null,
diff --git a/datasources/share-attempts.json b/datasources/share-attempts.json
index d79d425..5de5a32 100644
--- a/datasources/share-attempts.json
+++ b/datasources/share-attempts.json
@@ -5,7 +5,7 @@
 "step": "1d",
 "end": "2013/03/19"
 },
-"url": 
"http://stat1001.wikimedia.org/limn-public-data/mobile/datafiles/share-attempts.csv";,
+"url": "/data/datafiles/mobile/share-attempts.csv",
 "notes": "",
 "format": "csv",
 "slug": null,
diff --git a/datasources/successful-logins.json 
b/datasources/successful-logins.json
index d419fba..f043a52 100644
--- a/datasources/successful-logins.json
+++ b/datasourc

[MediaWiki-commits] [Gerrit] Add unique uploaders per day graph - change (analytics/limn-mobile-data)

2013-06-25 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Add unique uploaders per day graph
..


Add unique uploaders per day graph

Also, add LIMIT to the unique uploaders per month query.

Change-Id: I1ed4eb7749c5c516c913de0d0ce670c20b9b3b26
---
M dashboards/reportcard.json
A datasources/unique-uploaders-day.json
A graphs/unique-uploaders-day.json
M mobile/config.yaml
A mobile/unique-uploaders-day.sql
M mobile/unique-uploaders.sql
6 files changed, 265 insertions(+), 0 deletions(-)

Approvals:
  Yuvipanda: Looks good to me, approved
  JGonera: Verified; Looks good to me, approved



diff --git a/dashboards/reportcard.json b/dashboards/reportcard.json
index 4c6e710..a0f2779 100644
--- a/dashboards/reportcard.json
+++ b/dashboards/reportcard.json
@@ -14,6 +14,7 @@
 {
 "name": "Uploads daily",
 "graph_ids": [
+"unique-uploaders-day",
 "successful-uploads",
 "error-uploads",
 "no-cats",
diff --git a/datasources/unique-uploaders-day.json 
b/datasources/unique-uploaders-day.json
new file mode 100644
index 000..eaf10b5
--- /dev/null
+++ b/datasources/unique-uploaders-day.json
@@ -0,0 +1,36 @@
+{
+"name": "Unique uploaders (per day)",
+"timespan": {
+"start": "2013/02/18",
+"step": "1d",
+"end": "2013/03/19"
+},
+"url": 
"http://stat1001.wikimedia.org/limn-public-data/mobile/datafiles/unique-uploaders-day.csv";,
+"format": "csv",
+"slug": null,
+"shortName": "unique-uploaders-day",
+"type": "timeseries",
+"id": "unique-uploaders-day",
+"columns": [
+{
+"type": "date",
+"label": "date"
+},
+{
+"type": "int",
+"label": "Total"
+},
+{
+"type": "int",
+"label": "Android"
+},
+{
+"type": "int",
+"label": "iOS"
+},
+{
+"type": "int",
+"label": "Web"
+}
+]
+}
diff --git a/graphs/unique-uploaders-day.json b/graphs/unique-uploaders-day.json
new file mode 100644
index 000..a6798ad
--- /dev/null
+++ b/graphs/unique-uploaders-day.json
@@ -0,0 +1,170 @@
+{
+  "graph_version": "0.6.0", 
+  "name": "Unique uploaders (per day)", 
+  "slug": "unique-uploaders-day", 
+  "root": {
+"scaling": "linear", 
+"nodeType": "canvas", 
+"minWidth": 750, 
+"minHeight": 500, 
+"height": 500, 
+"disabled": false, 
+"width": "auto", 
+"children": [
+  {
+"disabled": false, 
+"nodeType": "axis", 
+"options": {
+  "tickFormat": "MMM YY", 
+  "dimension": "x", 
+  "orient": "bottom"
+}
+  }, 
+  {
+"disabled": false, 
+"nodeType": "axis", 
+"options": {
+  "tickFormat": "MMM YY", 
+  "dimension": "y", 
+  "orient": "left"
+}
+  }, 
+  {
+"disabled": false, 
+"nodeType": "grid", 
+"options": {
+  "ticks": 10, 
+  "dimension": "x"
+}
+  }, 
+  {
+"disabled": false, 
+"nodeType": "grid", 
+"options": {
+  "ticks": 10, 
+  "dimension": "y"
+}
+  }, 
+  {
+"disabled": false, 
+"nodeType": "zoom-brush", 
+"options": {
+  "allowY": true, 
+  "allowX": true
+}
+  }, 
+  {
+"nodeType": "callout", 
+"target": "latest", 
+"disabled": false, 
+"steps": [
+  "1y", 
+  "1M"
+], 
+"metricRef": 0, 
+"options": {
+  "deltaPercent": true, 
+  "dateFormat": "MMM ", 
+  "colorDelta": true
+}
+  }, 
+  {
+"disabled": false, 
+"nodeType": "legend", 
+"options": {
+  "valueFormat": ",.2s", 
+  "dateFormat": "MMM "
+}, 
+"label": "Aug 2012"
+  }, 
+  {
+"disabled": false, 
+"nodeType": "line-group", 
+"options": {
+  "palette": "wmf_projects", 
+  "scale": "log", 
+  "stroke": {
+"opacity": 1, 
+"width": 2
+  }, 
+  "dateFormat": "MMM "
+}, 
+"children": [
+  {
+"disabled": false, 
+"index": 0, 
+"metric": {
+  "source_id": "unique-uploaders-day", 
+  "type": "int", 
+  "source_col": 1
+}, 
+"nodeType": "line", 
+"options": {
+  "stroke": {
+"width": 2
+  }, 
+  "label": "Total",
+  "noLegend": false, 
+  "dateFormat": "MMM "
+}
+  }, 
+  {
+"disabled": false, 
+"index": 

[MediaWiki-commits] [Gerrit] Enable animations in nag overlay in stable - change (mediawiki...MobileFrontend)

2013-06-25 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Enable animations in nag overlay in stable
..


Enable animations in nag overlay in stable

Make sure others only run in beta / alpha to allow
for further testing.

Change-Id: Idfe4182f8835f5e879dfa96489f482cd5b5afc0c
---
M includes/Resources.php
D javascripts/common/application-beta.js
M javascripts/common/mf-application.js
M less/common/notifications.less
M less/modules/mf-watchstar.less
M less/specials/uploads.less
M stylesheets/common/notifications.css
M stylesheets/modules/mf-watchstar.css
M stylesheets/specials/uploads.css
9 files changed, 67 insertions(+), 55 deletions(-)

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



diff --git a/includes/Resources.php b/includes/Resources.php
index 998d2c2..32c093e 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -265,7 +265,6 @@
'scripts' => array(
'javascripts/common/history-beta.js',
'javascripts/views/page.js',
-   'javascripts/common/application-beta.js',
),
'messages' => array(
// page.js and talk.js (alpha)
diff --git a/javascripts/common/application-beta.js 
b/javascripts/common/application-beta.js
deleted file mode 100644
index c77145a..000
--- a/javascripts/common/application-beta.js
+++ /dev/null
@@ -1,39 +0,0 @@
-jQuery( function( $ ) {
-   /**
-* Checks browser support for CSS transforms, transitions
-* and CSS animation.
-* Currently assumes support for the latter 2 in the case of the
-* former.
-* See http://stackoverflow.com/a/12621264/365238
-*
-* @returns {boolean}
-*/
-   function supportsAnimations() {
-   var el = $( '' )[0], $iframe = $( '' ), has3d, t,
-   transforms = {
-   'webkitTransform': '-webkit-transform',
-   //'OTransform': '-o-transform',
-   //'msTransform': '-ms-transform',
-   'transform': 'transform'
-   };
-
-   // Add it to the body to get the computed style
-   // Sandbox it inside an iframe to avoid Android Browser quirks
-   $iframe.appendTo( 'body' ).contents().find( 'body' ).append( el 
);
-
-   for ( t in transforms ) {
-   if ( el.style[t] !== undefined ) {
-   el.style[t] = 'translate3d(1px,1px,1px)';
-   has3d = window.getComputedStyle( el 
).getPropertyValue( transforms[t] );
-   }
-   }
-
-   $iframe.remove();
-
-   return has3d !== undefined && has3d.length > 0 && has3d !== 
"none";
-   }
-
-   if ( mw.config.get( 'wgMFEnableCssAnimations' ) && supportsAnimations() 
) {
-   $( 'html' ).addClass( 'animations' );
-   }
-} );
diff --git a/javascripts/common/mf-application.js 
b/javascripts/common/mf-application.js
index eaa51f1..324f178 100644
--- a/javascripts/common/mf-application.js
+++ b/javascripts/common/mf-application.js
@@ -131,6 +131,44 @@
}
}
fixBrowserBugs();
+
+   /**
+* Checks browser support for CSS transforms, transitions
+* and CSS animation.
+* Currently assumes support for the latter 2 in the case of the
+* former.
+* See http://stackoverflow.com/a/12621264/365238
+*
+* @returns {boolean}
+*/
+   function supportsAnimations() {
+   var el = $( '' )[0], $iframe = $( '' ), 
has3d, t,
+   transforms = {
+   'webkitTransform': '-webkit-transform',
+   //'OTransform': '-o-transform',
+   //'msTransform': '-ms-transform',
+   'transform': 'transform'
+   };
+
+   // Add it to the body to get the computed style
+   // Sandbox it inside an iframe to avoid Android Browser 
quirks
+   $iframe.appendTo( 'body' ).contents().find( 'body' 
).append( el );
+
+   for ( t in transforms ) {
+   if ( el.style[t] !== undefined ) {
+   el.style[t] = 
'translate3d(1px,1px,1px)';
+   has3d = window.getComputedStyle( el 
).getPropertyValue( transforms[t] );
+   }
+   }
+
+   $iframe.remove();
+
+   return has3d !== undefined && has3d.length >

[MediaWiki-commits] [Gerrit] Story 831: Improve left nav - change (mediawiki...MobileFrontend)

2013-06-27 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Story 831: Improve left nav
..

Story 831: Improve left nav

* Make left nav scrollable on smaller screens if it doesn't fit.
* Remove nav headings (new layout approved by Jared and Maryana).
* Make two bottom horizontal links text more dimmed (Jared's
  suggestion).
* Make menu narrower (fixed 15em on small devices, Jared's suggestion).
* Fix a slight misalignment of the blue left border of hovered menu
  items.
* Add shadow to the menu (consulted with Jared).
* Remove and refactor lots of CSS in the process.

Also:
* use mouseup fallback for closing the menu (touchend doesn't work in IE)
* don't close the menu when scrolling
* set default background for body (#fff)

Changes tested on:
* Safari on iOS 6.0.1 and 6.1.2
* Android browser 4.2 and 2.3
* Chrome for Android (latest)
* Firefox for Android (latest)
* IE on Windows Phone 7.5
* latest desktop Chrome
* latest desktop Firefox
* Opera 14 for Android
* Opera Mini 7.5 for Android
* Nokia C3 browser

Bug: 49455
Change-Id: I670d81eb949b866472dde0498bf2402dda254214
---
M MobileFrontend.i18n.php
M includes/skins/MinervaTemplate.php
M includes/skins/SkinMobile.php
M javascripts/common/mf-navigation.js
M javascripts/common/mf-notification.js
M less/common/mainmenu.less
M less/common/mf-navigation.less
M less/common/ui.less
M stylesheets/common/mf-navigation.css
M stylesheets/common/ui.css
10 files changed, 161 insertions(+), 228 deletions(-)


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

diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 21e790a..83a8358 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -105,8 +105,6 @@
'mobile-frontend-main-menu-watchlist' => 'Watchlist',
'mobile-frontend-main-menu-settings' => 'Settings',
'mobile-frontend-main-menu-upload' => 'Uploads',
-   'mobile-frontend-main-menu-discovery' => 'Discovery',
-   'mobile-frontend-main-menu-personal' => 'My Stuff',
'mobile-frontend-main-menu-about' => 'About {{SITENAME}}',
'mobile-frontend-main-menu-disclaimer' => 'Disclaimer',
 
diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index 2397f11..6539fcd 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -110,16 +110,12 @@
 
protected function render( $data ) { // FIXME: replace with template 
engines
$isSpecialPage = $this->getSkin()->getTitle()->isSpecialPage();
-   $showMenuHeaders = isset( $this->data['_show_menu_headers'] ) 
&& $this->data['_show_menu_headers'];
 
// begin rendering
echo $data[ 'headelement' ];
?>


-   
-   text() ?>
-   

getDiscoveryTools() as $key => 
$val ):
@@ -127,9 +123,6 @@
endforeach;
?>

-   
-   text() ?>
-   

getPersonalTools() as $key => 
$val ):
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 8ff52d1..e425e88 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -108,16 +108,12 @@
parent::prepareData( $tpl );
$context = MobileContext::singleton();
$inBeta = $context->isBetaGroupMember();
-   $menuHeaders = true;
$search = $tpl->data['searchBox'];
if ( $context->isAlphaGroupMember() ) {
$search['placeholder'] = wfMessage( 
'mobile-frontend-placeholder-alpha' )->escaped();
} else if ( $inBeta ) {
$search['placeholder'] = wfMessage( 
'mobile-frontend-placeholder-beta' )->escaped();
-   } else { // stable mode
-   $menuHeaders = false;
}
-   $tpl->set( '_show_menu_headers', $menuHeaders );
$tpl->set( 'searchBox', $search );
 
if ( $inBeta ) {
diff --git a/javascripts/common/mf-navigation.js 
b/javascripts/common/mf-navigation.js
index 4da8d70..983e0c5 100644
--- a/javascripts/common/mf-navigation.js
+++ b/javascripts/common/mf-navigation.js
@@ -16,6 +16,7 @@
 
$( function() {
var
+   moved = false,
search = document.getElementById(  'searchInput' );
 
$( '#mw-mf-menu-main a' ).click( function() {
@@ -36,16 +37,20 @@
$( '#' + mfePre

[MediaWiki-commits] [Gerrit] Remove useless HTML comments - change (mediawiki...MobileFrontend)

2013-06-27 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Remove useless HTML comments
..

Remove useless HTML comments

They are not needed. The code is indented and when inspecting code in
Chrome Developer Tools or Firebug, they provide absolutely no value.

Plus, we don't strip them in production.

Change-Id: I2cad742d26a6bbe50e8f21a26b2b562df37c6e83
---
M includes/skins/MinervaTemplate.php
M includes/skins/MobileTemplateBeta.php
2 files changed, 6 insertions(+), 7 deletions(-)


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

diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index e4303fe..f05c05d 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -112,8 +112,8 @@
$this->renderLanguages();
$this->renderHistoryLink( $data );
?>
-   
-   
+   
+   



-   
data['banners'] as 
$banner ):
echo $banner;
@@ -177,8 +176,8 @@
$this->renderContentWrapper( $data );
$this->renderFooter( $data );
?>
-   
-   
+   
+   
renderLanguages( $data );
$this->renderHistoryLink( $data );
?>
-   
-   
+   
+   
https://gerrit.wikimedia.org/r/70935
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cad742d26a6bbe50e8f21a26b2b562df37c6e83
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Remove unused .full-screen-search CSS rules - change (mediawiki...MobileFrontend)

2013-06-27 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Remove unused .full-screen-search CSS rules
..

Remove unused .full-screen-search CSS rules

They are not needed anymore since search is an overlay now.

Change-Id: I7eacdab23a81a81b436918408fc3f7569f10a6cb
---
M less/common/mf-navigation.less
M less/modules/mf-search.less
M stylesheets/common/mf-navigation.css
M stylesheets/modules/mf-search.css
4 files changed, 0 insertions(+), 71 deletions(-)


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

diff --git a/less/common/mf-navigation.less b/less/common/mf-navigation.less
index 30634c9..8f264c0 100644
--- a/less/common/mf-navigation.less
+++ b/less/common/mf-navigation.less
@@ -153,10 +153,3 @@
}
}
 }
-
-/* Page actions */
-.full-screen-search {
-   #mw-mf-menu-page {
-   display: none;
-   }
-}
diff --git a/less/modules/mf-search.less b/less/modules/mf-search.less
index b58e0e0..16cd52f 100644
--- a/less/modules/mf-search.less
+++ b/less/modules/mf-search.less
@@ -11,12 +11,6 @@
}
 }
 
-.full-screen-search {
-   .search-box {
-   padding-right: 8px;
-   }
-}
-
 form {
 
.clear {
@@ -30,32 +24,6 @@
.background-size( auto, 12px );
cursor: pointer;
position: absolute;
-   }
-}
-
-.full-screen-search {
-
-   .header {
-   z-index: 2;
-   color: white;
-   .vertical-gradient( @searchBoxColor, darken( @searchBoxColor, 
2.75% ) );
-   }
-
-   #results,
-   .search-box.notEmpty .clearlink,
-   #remove-results {
-   display: block;
-   }
-
-   #mw-mf-page-left,
-   #mw-mf-main-menu-button,
-   #footer,
-   #zero-rated-banner-red, // FIXME: Move to ZeroRatedMobileAccess 
extension
-   #zero-rated-banner, // FIXME: Move to ZeroRatedMobileAccess extension
-   #mw-mf-logo,
-   #content_wrapper,
-   .goButton {
-   display: none !important;
}
 }
 
diff --git a/stylesheets/common/mf-navigation.css 
b/stylesheets/common/mf-navigation.css
index 808ac18..41c51e3 100644
--- a/stylesheets/common/mf-navigation.css
+++ b/stylesheets/common/mf-navigation.css
@@ -112,7 +112,3 @@
 .supportsPositionFixed body.navigation-enabled #mw-mf-viewport {
   overflow-y: auto;
 }
-/* Page actions */
-.full-screen-search #mw-mf-menu-page {
-  display: none;
-}
diff --git a/stylesheets/modules/mf-search.css 
b/stylesheets/modules/mf-search.css
index 5dab7ad..be5dde0 100644
--- a/stylesheets/modules/mf-search.css
+++ b/stylesheets/modules/mf-search.css
@@ -9,9 +9,6 @@
 input.search.searching {
   background-color: #eee;
 }
-.full-screen-search .search-box {
-  padding-right: 8px;
-}
 form .clear {
   top: 9px;
   right: 10px;
@@ -28,31 +25,6 @@
   background-size: auto 12px;
   cursor: pointer;
   position: absolute;
-}
-.full-screen-search .header {
-  z-index: 2;
-  color: white;
-  background-color: #f3f3f3;
-  background-image: -moz-linear-gradient(top, #fafafa 0, #f3f3f3 100%);
-  background-image: -ms-linear-gradient(top, #fafafa 0, #f3f3f3 100%);
-  background-image: -webkit-gradient(linear, left top, left bottom, 
color-stop(0, #fafafa), color-stop(100%, #f3f3f3));
-  background-image: -webkit-linear-gradient(top, #fafafa 0, #f3f3f3 100%);
-  background-image: linear-gradient(#fafafa 0, #f3f3f3 100%);
-}
-.full-screen-search #results,
-.full-screen-search .search-box.notEmpty .clearlink,
-.full-screen-search #remove-results {
-  display: block;
-}
-.full-screen-search #mw-mf-page-left,
-.full-screen-search #mw-mf-main-menu-button,
-.full-screen-search #footer,
-.full-screen-search #zero-rated-banner-red,
-.full-screen-search #zero-rated-banner,
-.full-screen-search #mw-mf-logo,
-.full-screen-search #content_wrapper,
-.full-screen-search .goButton {
-  display: none !important;
 }
 .suggestions-results .error {
   color: #666;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7eacdab23a81a81b436918408fc3f7569f10a6cb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Remove #mw-mf-page-left id - change (mediawiki...MobileFrontend)

2013-06-27 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Remove #mw-mf-page-left id
..

Remove #mw-mf-page-left id

Also, make JS use #mw-mf-page-left instead since that's what contains
the entire left nav now.

Change-Id: Id42763987186b1025ced30c9985cc65b57b12a38
---
M includes/skins/MinervaTemplate.php
M javascripts/common/mf-navigation.js
M javascripts/modules/lazyload.js
3 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index e4303fe..8fcd79f 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -119,7 +119,7 @@
 
protected function renderMainMenu( $data ) {
?>
-   
+   
getDiscoveryTools() as $key => $val ):
echo $this->makeListItem( $key, $val );
diff --git a/javascripts/common/mf-navigation.js 
b/javascripts/common/mf-navigation.js
index 983e0c5..855a5f7 100644
--- a/javascripts/common/mf-navigation.js
+++ b/javascripts/common/mf-navigation.js
@@ -19,7 +19,7 @@
moved = false,
search = document.getElementById(  'searchInput' );
 
-   $( '#mw-mf-menu-main a' ).click( function() {
+   $( '#mw-mf-page-left a' ).click( function() {
toggleNavigation(); // close before following link so 
that certain browsers on back don't show menu open
} );
 
diff --git a/javascripts/modules/lazyload.js b/javascripts/modules/lazyload.js
index 58e7f07..244b634 100644
--- a/javascripts/modules/lazyload.js
+++ b/javascripts/modules/lazyload.js
@@ -15,7 +15,7 @@
 
// Change UI to reflect new current page - Fix menu 
item returnto link
// FIXME: give menu items with returnto=[article] 
generic class name
-   $( '#mw-mf-menu-main' ).find( '.icon-settings, 
.icon-loginout' ).find( 'a' ).each( function() {
+   $( '#mw-mf-page-left' ).find( '.icon-settings, 
.icon-loginout' ).find( 'a' ).each( function() {
var href = $( this ).attr( 'href' );
$( this ).attr( 'href', 
history.updateQueryStringParameter( href, 'returnto', title ) );
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id42763987186b1025ced30c9985cc65b57b12a38
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Evict demons from uploads tutorial on iOS - change (mediawiki...MobileFrontend)

2013-06-27 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Evict demons from uploads tutorial on iOS
..

Evict demons from uploads tutorial on iOS

Showing the tutorial overlay in Safari triggered a scroll event which
in turn triggered an empty event of PhotoList which created another
tutorial overlay which then again triggered a scroll event, etc.

Bug: 50201
Change-Id: I0385440102abe4c83b8f4cc453e8ab936dd00d0e
---
M javascripts/specials/uploads.js
1 file changed, 10 insertions(+), 6 deletions(-)


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

diff --git a/javascripts/specials/uploads.js b/javascripts/specials/uploads.js
index de064e7..cf2c643 100644
--- a/javascripts/specials/uploads.js
+++ b/javascripts/specials/uploads.js
@@ -70,7 +70,7 @@
initialize: function() {
// how close a spinner needs to be to the viewport to 
trigger loading (px)
this.threshold = 1000;
-   this.loading = false;
+   this.shouldLoad = true;
this.api = new UserGalleryApi();
this._super();
},
@@ -101,22 +101,26 @@
_loadPhotos: function() {
var self = this;
 
-   if ( this._isEndNear() && !this.loading ) {
-   this.loading = true;
+   if ( this.shouldLoad && this._isEndNear() ) {
+   // don't try to load more until current request 
is finished
+   this.shouldLoad = false;
 
-   this.api.getPhotos().always( function() {
-   self.loading = false;
-   } ).done( function( photos ) {
+   this.api.getPhotos().done( function( photos ) {
if ( photos.length ) {
$.each( photos, function() {
self.appendPhoto( this 
);
} );
+   // try loading more when end is 
near only if we got photos last time
+   self.shouldLoad = true;
} else {
self.$end.remove();
if ( self.isEmpty() ) {
self.emit( 'empty' );
}
}
+   } ).fail( function() {
+   // try loading again if request failed
+   self.shouldLoad = true;
} );
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0385440102abe4c83b8f4cc453e8ab936dd00d0e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Story 883: Remove previous and next buttons from editor - change (mediawiki...MobileFrontend)

2013-06-28 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Story 883: Remove previous and next buttons from editor
..

Story 883: Remove previous and next buttons from editor

Also solves bug 50301 since we never try to load more than one section
per editor overlay.

Bug: 50301
Change-Id: I15522e6e52dfef505f1d6322ceacc9eca33856c0
---
M MobileFrontend.i18n.php
M javascripts/modules/editor/EditorOverlay.js
M javascripts/modules/editor/editor.js
M templates/overlays/editor.html
M tests/javascripts/modules/editor/test_EditorOverlay.js
5 files changed, 8 insertions(+), 71 deletions(-)


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

diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 30cdc99..aa2cd2a 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -242,10 +242,7 @@
'mobile-frontend-editor-save' => 'Save',
'mobile-frontend-editor-cancel' => 'Cancel',
'mobile-frontend-editor-confirm' => 'Confirm',
-   'mobile-frontend-editor-previous' => 'Previous',
-   'mobile-frontend-editor-next' => 'Next',
'mobile-frontend-editor-license' => 'By clicking "Confirm", you agree 
to our [//wikimediafoundation.org/wiki/Terms_of_use Terms of Use] and agree to 
release your text under the [//creativecommons.org/licenses/by-sa/3.0/ Creative 
Commons Attribution-ShareAlike 3.0 License].',
-   'mobile-frontend-editor-section-count' => 'You are about to save 
{{PLURAL:$1|1 section|$1 sections}}.',
'mobile-frontend-editor-cancel-confirm' => 'Do you really want to 
abandon your edit?',
'mobile-frontend-editor-wait' => 'Saving edit, please wait.',
'mobile-frontend-editor-success' => 'Success! Your edit was saved.',
diff --git a/javascripts/modules/editor/EditorOverlay.js 
b/javascripts/modules/editor/EditorOverlay.js
index 098be85..483a4b1 100644
--- a/javascripts/modules/editor/EditorOverlay.js
+++ b/javascripts/modules/editor/EditorOverlay.js
@@ -13,9 +13,7 @@
saveMsg: mw.msg( 'mobile-frontend-editor-save' ),
cancelMsg: mw.msg( 'mobile-frontend-editor-cancel' ),
confirmMsg: mw.msg( 'mobile-frontend-editor-confirm' ),
-   previousMsg: mw.msg ( 'mobile-frontend-editor-previous' 
),
previewMsg: mw.msg( 'mobile-frontend-editor-preview' ),
-   nextMsg: mw.msg ( 'mobile-frontend-editor-next' ),
licenseMsg: mw.msg( 'mobile-frontend-editor-license' ),
waitMsg: mw.msg( 'mobile-frontend-editor-wait' )
},
@@ -42,7 +40,6 @@
 
initialize: function( options ) {
this.api = new EditorApi( { title: options.title, 
isNew: options.isNew } );
-   this.sectionCount = options.sectionCount;
this._super( options );
},
 
@@ -66,20 +63,9 @@
self.$( '.save' ).prop( 'disabled', 
false );
self._resizeContent();
} );
-   this.$prev = this.$( '.prev-section' ).
-   on( 'click', function() {
-   self._loadSection( self.sectionId - 1 );
-   self.log( 'sectionPrevious' );
-   } );
-   this.$next = this.$( '.next-section' ).
-   on( 'click', function() {
-   self._loadSection( self.sectionId + 1 );
-   self.log( 'sectionNext' );
-   } );
this.$( '.save' ).on( 'click', function() {
// log save button click
self.log( 'save' );
-   self.$( '.count' ).text( mw.msg( 
'mobile-frontend-editor-section-count', self.api.getStagedCount() ) );
self.$( '.initial-bar' ).hide();
self.$( '.confirm-bar' ).show();
} );
@@ -129,33 +115,18 @@
this.$content.hide();
this.$spinner.show();
 
-   this.$prev.prop( 'disabled', id === 0 );
-   this.$next.prop( 'disabled', id === this.sectionCount - 
1 );
this.sectionId = id;
 
this.api.getSection( id ).
done( function( section ) {
-   // prevent delayed response overriding 
content on multiple prev/next clicks
-   if ( section.id === id ) {
-

[MediaWiki-commits] [Gerrit] Regression: fix a JS error on upload with a nag - change (mediawiki...MobileFrontend)

2013-07-02 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Regression: fix a JS error on upload with a nag
..

Regression: fix a JS error on upload with a nag

NagOverlay wasn't calling its parent constructor.

Change-Id: I2bca90676185d690e4081b7648fd4dc8d00baa3f
---
M javascripts/common/uploads/NagOverlay.js
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/javascripts/common/uploads/NagOverlay.js 
b/javascripts/common/uploads/NagOverlay.js
index e63ab89..da896dc 100644
--- a/javascripts/common/uploads/NagOverlay.js
+++ b/javascripts/common/uploads/NagOverlay.js
@@ -10,7 +10,7 @@
 
template: M.template.get( 'photoNag' ),
 
-   initialize: function() {
+   initialize: function( options ) {
this.learnMoreOverlay = new LearnMoreOverlay( {
parent: this,
heading: mw.msg( 
'mobile-frontend-photo-nag-learn-more-heading' ),
@@ -20,6 +20,8 @@
mw.msg( 
'mobile-frontend-photo-nag-learn-more-3' )
]
} );
+
+   this._super( options );
},
 
postRender: function( options ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2bca90676185d690e4081b7648fd4dc8d00baa3f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fixes to animations (transitions) and notifications - change (mediawiki...MobileFrontend)

2013-07-03 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fixes to animations (transitions) and notifications
..

Fixes to animations (transitions) and notifications

Make those animations buttery smooth, glitchless and awesome.

* Put all notifications into a separate #notifications div (helps
  sandbox those transformed elements better, seems to fix blurry text
  for good).
* Create a more universal transition LESS mixin (accepts arbitrary
  number of transitions just like transition CSS property).
* Animate only the required properties for notifications (not all
  properties).
* Provide a reliable fallback for browsers that don't support
  position: fixed (that works both with and without animations).
* Stop treating Firefox and MSIE 10 (Windows Phone 8) as if they didn't
  support position: fixed.

Change-Id: I9aa603fae53c36184421c520e911f6e4b9ba5300
---
M includes/skins/MinervaTemplate.php
M javascripts/common/Drawer.js
M javascripts/common/mf-application.js
M javascripts/common/mf-notification.js
M less/common/mainmenu.less
M less/common/mf-common.less
M less/common/notifications.less
M less/mf-mixins.less
M less/modules/mf-watchstar.less
M less/specials/mobilediff.less
M less/specials/uploads.less
M stylesheets/common/mf-common.css
M stylesheets/common/notifications.css
M stylesheets/common/ui.css
M stylesheets/modules/mf-watchstar.css
M stylesheets/specials/mobilediff.css
M stylesheets/specials/uploads.css
17 files changed, 134 insertions(+), 102 deletions(-)


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

diff --git a/includes/skins/MinervaTemplate.php 
b/includes/skins/MinervaTemplate.php
index eea79c5..164298b 100644
--- a/includes/skins/MinervaTemplate.php
+++ b/includes/skins/MinervaTemplate.php
@@ -177,6 +177,7 @@
$this->renderFooter( $data );
?>

+   

http://www.quirksmode.org/blog/archives/2010/12/the_fifth_posit.html
// https://github.com/Modernizr/Modernizr/issues/167
+   // http://mobilehtml5.org/
function supportsPositionFixed() {
-   // TODO: don't use device detection
-   var agent = navigator.userAgent,
-   support = false,
-   supportedAgents = [
-   // match anything over Webkit 534
+   var support = false;
+   [
+   // Webkit 534+
/AppleWebKit\/(53[4-9]|5[4-9]\d?|[6-9])\d?\d?/,
// Android 3+
-   /Android [3-9]/
-   ];
-   supportedAgents.forEach( function( item ) {
-   if( agent.match( item ) ) {
+   /Android [3-9]/,
+   // any Firefox
+   /Firefox/,
+   // MSIE 10+
+   /MSIE 1\d/
+   ].forEach( function( item ) {
+   if ( item.test( navigator.userAgent ) ) {
support = true;
}
} );
@@ -85,18 +86,20 @@
}
 
function lockViewport() {
-   $viewport.attr( 'content', 'minimum-scale=1.0, 
maximum-scale=1.0' );
+   $viewportMeta.attr( 'content', 'minimum-scale=1.0, 
maximum-scale=1.0' );
}
 
function unlockViewport() {
-   $viewport.attr( 'content', viewport );
+   $viewportMeta.attr( 'content', viewport );
}
 
// TODO: separate main menu navigation code into separate module
function init() {
var
mode, $body = $( 'body' ),
-   $doc = $( 'html' );
+   $doc = $( 'html' ),
+   $viewport = $( '#mw-mf-viewport' ),
+   $pageCenter = $( '#mw-mf-page-center' );
 
if ( $body.hasClass( 'alpha' ) ) {
mode = 'alpha';
@@ -106,12 +109,29 @@
mw.config.set( 'wgMFMode', mode );
 
$doc.removeClass( 'page-loading' ); // FIXME: Kill with fire. 
This is here for historic reasons in case old HTML is cached
-   if( supportsPositionFixed() ) {
-   $doc.addClass( 'supportsPositionFixed' );
+   if ( !supportsPositionFixed() ) {
+   $doc.addClass( 'no-position-fixed' );
+
+   $( window ).on( 'scroll', function() {
+   var scrollTop = $( window ).scrollTop(),
+   scrollBottom = scrollTop + $( window 
).height();
+
+   if ( scrollTop === 0 ) {
+  

[MediaWiki-commits] [Gerrit] Regression: re-enable new page creation - change (mediawiki...MobileFrontend)

2013-07-03 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Regression: re-enable new page creation
..

Regression: re-enable new page creation

Bug: 50410
Change-Id: Icd713ed7bf69ddf35203c6de0ff41a1d33e0b643
---
M javascripts/modules/editor/editor.js
1 file changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/javascripts/modules/editor/editor.js 
b/javascripts/modules/editor/editor.js
index b71a65d..2f42490 100644
--- a/javascripts/modules/editor/editor.js
+++ b/javascripts/modules/editor/editor.js
@@ -17,19 +17,22 @@
}
 
function init() {
+   // FIXME: this doesn't work when loading page dynamically
+   var isNew = mw.config.get( 'wgArticleId' ) === 0;
+
M.router.route( /^editor-(\d+)$/, function( section ) {
var title = mw.config.get( 'wgTitle' ), ns = 
mw.config.get( 'wgCanonicalNamespace' );
section = parseInt( section, 10 );
new EditorOverlay( {
title: ns ? ns + ':' + title : title,
-   isNew: mw.config.get( 'wgArticleId' ) === 0,
+   isNew: isNew,
section: section
} ).show();
} );
$( '#ca-edit' ).addClass( 'enabled' );
 
// FIXME: unfortunately the main page is special cased.
-   if ( mw.config.get( 'wgIsMainPage' ) || $( '#content_0' 
).text() ) {
+   if ( mw.config.get( 'wgIsMainPage' ) || isNew || $( 
'#content_0' ).text() ) {
// if lead section is not empty, open editor with lead 
section
addEditButton( 0, '#ca-edit' );
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd713ed7bf69ddf35203c6de0ff41a1d33e0b643
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Regression: fix background glitch in left nav - change (mediawiki...MobileFrontend)

2013-07-03 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Regression: fix background glitch in left nav
..

Regression: fix background glitch in left nav

Introduced in f532ca60e85530456aea9a9c5ddd4d363816a5f1
Without this, when the screen height was greater than left nav's height,
grey background would extend below article's content.

Change-Id: I3b28e823698de078dbf480f11b427976ccc1b446
---
M less/common/mainmenu.less
M stylesheets/common/ui.css
2 files changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/less/common/mainmenu.less b/less/common/mainmenu.less
index 9f831f3..44797f3 100644
--- a/less/common/mainmenu.less
+++ b/less/common/mainmenu.less
@@ -118,6 +118,7 @@
margin-left: -@menuBorder;
// disable horizontal scrolling
overflow: hidden;
+   min-height: 100%;
height: auto !important;
}
 
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 2df0653..0cfe9d7 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -305,6 +305,7 @@
 body.navigation-enabled #mw-mf-viewport {
   margin-left: -12px;
   overflow: hidden;
+  min-height: 100%;
   height: auto !important;
 }
 body.navigation-enabled #mw-mf-page-center {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b28e823698de078dbf480f11b427976ccc1b446
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix delay property of notification transition (CSS) - change (mediawiki...MobileFrontend)

2013-07-05 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix delay property of notification transition (CSS)
..

Fix delay property of notification transition (CSS)

Delay is time and time can't be unitless in CSS:

"Even if all units represent the same time for the value 0, the unit may
not be omitted in that case as it isn't a : 0 is invalid and
does not represent 0s, 0ms."
https://developer.mozilla.org/en-US/docs/Web/CSS/time

This fixes the hiding transition in Firefox.

Change-Id: I4f4001897691ef860ae321bae3913d8338fb897f
---
M less/common/notifications.less
M stylesheets/common/notifications.css
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/less/common/notifications.less b/less/common/notifications.less
index 252da5a..05cc953 100644
--- a/less/common/notifications.less
+++ b/less/common/notifications.less
@@ -42,8 +42,8 @@
.transform( translate3d(0, 100px, 0) );
opacity: 0;
// delay visibility transition to make other transitions visible
-   // http://fvsch.com/code/transition-fade/test5.html/
-   .transition( transform @duration, opacity @duration, visibility 
0 @duration );
+   // http://fvsch.com/code/transition-fade/test5.html
+   .transition( transform @duration, opacity @duration, visibility 
0s @duration );
 
&.visible {
.transition( transform @duration, opacity @duration );
diff --git a/stylesheets/common/notifications.css 
b/stylesheets/common/notifications.css
index 358858f..959eb86 100644
--- a/stylesheets/common/notifications.css
+++ b/stylesheets/common/notifications.css
@@ -33,8 +33,8 @@
   transform: translate3d(0, 100px, 0);
   opacity: 0;
   -webkit-backface-visibility: hidden;
-  -webkit-transition: -webkit-transform 0.25s, opacity 0.25s, visibility 0 
0.25s;
-  transition: transform 0.25s, opacity 0.25s, visibility 0 0.25s;
+  -webkit-transition: -webkit-transform 0.25s, opacity 0.25s, visibility 0s 
0.25s;
+  transition: transform 0.25s, opacity 0.25s, visibility 0s 0.25s;
 }
 .animations .beta #mf-notification.visible,
 .animations .alpha #mf-notification.visible,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4f4001897691ef860ae321bae3913d8338fb897f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Remove .border-radius LESS mixin and use border-radius - change (mediawiki...MobileFrontend)

2013-07-05 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Remove .border-radius LESS mixin and use border-radius
..

Remove .border-radius LESS mixin and use border-radius

border-radius is supported without vendor specific prefix in all modern
browsers (https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius).

In many places, the mixin wasn't even used and only old properties with
vendor prefixes were present.

Change-Id: Ib27fb844279a24452b75929ce097ca7e7b80a2e7
---
M less/common/mf-buttons.less
M less/common/mf-common.less
M less/common/mf-typography.less
M less/common/notifications.less
M less/common/ui.less
M less/common/user.less
M less/mf-mixins.less
M less/modules/mf-photo.less
M less/specials/uploads.less
M less/specials/userlogin.less
M stylesheets/common/mf-common.css
M stylesheets/common/mf-typography.css
M stylesheets/common/notifications.css
M stylesheets/common/ui.css
M stylesheets/common/user.css
M stylesheets/modules/mf-photo.css
M stylesheets/specials/uploads.css
M stylesheets/specials/userlogin.css
18 files changed, 15 insertions(+), 45 deletions(-)


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

diff --git a/less/common/mf-buttons.less b/less/common/mf-buttons.less
index d34ae36..823e76f 100644
--- a/less/common/mf-buttons.less
+++ b/less/common/mf-buttons.less
@@ -11,7 +11,7 @@
 button,
 input[type=submit] {
display: inline-block;
-   .border-radius( 3px );
+   border-radius: 3px;
white-space: nowrap;
line-height: 1;
cursor: pointer;
@@ -86,7 +86,7 @@
display: inline-block;
 
.button, button {
-   .border-radius( 0 );
+   border-radius: 0;
border-right: none;
 
&:disabled {
@@ -109,13 +109,13 @@
 
&:first-child {
.button, button {
-   .border-radius( 3px 0 0 3px );
+   border-radius: 3px 0 0 3px;
}
}
 
&:last-child {
.button, button {
-   .border-radius( 0 3px 3px 0 );
+   border-radius: 0 3px 3px 0;
border-right: 1px solid #9ea0a3;
}
}
diff --git a/less/common/mf-common.less b/less/common/mf-common.less
index 47a769b..ebe80f2 100644
--- a/less/common/mf-common.less
+++ b/less/common/mf-common.less
@@ -99,7 +99,7 @@
 .mwm-notice {
padding: 5px;
background: #dd;
-   -webkit-border-radius: 5px;
+   border-radius: 5px;
margin-top: 5px;
text-align: center;
border: 1px solid gray;
diff --git a/less/common/mf-typography.less b/less/common/mf-typography.less
index adacf81..02092c9 100644
--- a/less/common/mf-typography.less
+++ b/less/common/mf-typography.less
@@ -103,8 +103,7 @@
 
.thumb {
border: 1px solid #cc;
-   -webkit-border-radius: 5px;
-   -moz-border-radius: 5px;
+   border-radius: 5px;
background: #f9f9f9;
text-align: center;
}
diff --git a/less/common/notifications.less b/less/common/notifications.less
index 252da5a..e362480 100644
--- a/less/common/notifications.less
+++ b/less/common/notifications.less
@@ -77,7 +77,7 @@
margin: 0 auto 20px auto;
width: 80%;
text-align: center;
-   .border-radius( 1px );
+   border-radius: 1px;
.boxshadow( 0, 0, 1px, 3px, @toastNotificationColor );
 
button {
diff --git a/less/common/ui.less b/less/common/ui.less
index 258a0f7..abc41ce 100644
--- a/less/common/ui.less
+++ b/less/common/ui.less
@@ -63,7 +63,7 @@
 /* Search */
 input.search {
-webkit-appearance: none;
-   .border-radius( 3px );
+   border-radius: 3px;
border: @headerElementBorderHeight solid #c9c9c9;
outline: none;
padding: 0 0 0 5px;
diff --git a/less/common/user.less b/less/common/user.less
index 208190c..a1109bf 100644
--- a/less/common/user.less
+++ b/less/common/user.less
@@ -16,7 +16,7 @@
line-height: 1;
padding: 1px 4px;
background: #c91f2c;
-   .border-radius( 3px );
+   border-radius: 3px;
 
&.zero {
display: none;
diff --git a/less/mf-mixins.less b/less/mf-mixins.less
index e496a8f..96945ca 100644
--- a/less/mf-mixins.less
+++ b/less/mf-mixins.less
@@ -14,12 +14,6 @@
background

[MediaWiki-commits] [Gerrit] Remove .boxshadow LESS mixin - change (mediawiki...MobileFrontend)

2013-07-05 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Remove .boxshadow LESS mixin
..

Remove .boxshadow LESS mixin

Not needed, box-shadow is supported without vendor prefixes in modern
browsers. Old browsers probably shouldn't have shadows enabled anyway
because it reduces performance on slower devices (especially scrolling).

http://nerds.airbnb.com/box-shadows-are-expensive-to-paint
http://daneden.me/2011/11/a-non-scientific-box-shadow-experiment/

Change-Id: I32801030958fcff9cd108e1ffa6f66f93671abe0
---
M less/common/common-js.less
M less/common/notifications.less
M less/mf-mixins.less
M less/modules/mf-tables.less
M stylesheets/common/common-js.css
5 files changed, 5 insertions(+), 9 deletions(-)


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

diff --git a/less/common/common-js.less b/less/common/common-js.less
index 53fff19..9e4f0bb 100644
--- a/less/common/common-js.less
+++ b/less/common/common-js.less
@@ -17,7 +17,7 @@
width: 100%;
height: 8px;
border: 1px solid #9ea0a3;
-   .boxshadow( inset, 0, 0, 4px, #bbb );
+   box-shadow: inset 0 0 4px #bbb;
 
.value {
width: 0;
diff --git a/less/common/notifications.less b/less/common/notifications.less
index 252da5a..8412f77 100644
--- a/less/common/notifications.less
+++ b/less/common/notifications.less
@@ -17,7 +17,7 @@
bottom: 0;
width: 100%;
background-color: @searchBoxColorTo;
-   .boxshadow( 0, -1px, 8px, 0, rgba(0, 0, 0, 0.35) );
+   box-shadow: 0 -1px 8px 0 rgba(0, 0, 0, 0.35);
word-wrap: break-word;
// needs to be higher than for overlays to show on top of overlays
z-index: 5;
@@ -78,7 +78,7 @@
width: 80%;
text-align: center;
.border-radius( 1px );
-   .boxshadow( 0, 0, 1px, 3px, @toastNotificationColor );
+   box-shadow: 0 0 1px 3px @toastNotificationColor;
 
button {
display: none;
diff --git a/less/mf-mixins.less b/less/mf-mixins.less
index e496a8f..c1ea348 100644
--- a/less/mf-mixins.less
+++ b/less/mf-mixins.less
@@ -20,10 +20,6 @@
border-radius: @radius;
 }
 
-.boxshadow(@horizontalOffset, @verticalOffset, @blurRadius, @spreadDistance, 
@color) {
-   box-shadow: @horizontalOffset @verticalOffset @blurRadius 
@spreadDistance @color;
-}
-
 .box-sizing( @value ) {
-moz-box-sizing: @value;
-o-box-sizing: @value;
diff --git a/less/modules/mf-tables.less b/less/modules/mf-tables.less
index c084f8c..9adb22e 100644
--- a/less/modules/mf-tables.less
+++ b/less/modules/mf-tables.less
@@ -2,7 +2,7 @@
 
 .mw-mf-overlay {
.tableContent > table {
-   .boxshadow( -4px, 10px, 10px, -1px, #aaa );
+   box-shadow: -4px 10px 10px -1px #aaa ;
}
 }
 
diff --git a/stylesheets/common/common-js.css b/stylesheets/common/common-js.css
index 90c2dab..c0277e2 100644
--- a/stylesheets/common/common-js.css
+++ b/stylesheets/common/common-js.css
@@ -13,7 +13,7 @@
   width: 100%;
   height: 8px;
   border: 1px solid #9ea0a3;
-  box-shadow: inset 0 0 4px #bb;
+  box-shadow: inset 0 0 4px #bbb;
 }
 .progress-bar .value {
   width: 0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32801030958fcff9cd108e1ffa6f66f93671abe0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Remove -o-box-sizing from .box-sizing LESS mixin - change (mediawiki...MobileFrontend)

2013-07-05 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Remove -o-box-sizing from .box-sizing LESS mixin
..

Remove -o-box-sizing from .box-sizing LESS mixin

I doubt it even exists. MDN and caniuse.com don't mention it:
https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing
http://caniuse.com/css3-boxsizing

Change-Id: I04fe604d380d8d7fbc7dc83fc80be4046989bc71
---
M less/mf-mixins.less
M stylesheets/common/mf-common.css
M stylesheets/common/ui.css
M stylesheets/modules/editor.css
M stylesheets/modules/mf-cleanuptemplates.css
M stylesheets/specials/uploads.css
M stylesheets/specials/userlogin.css
7 files changed, 0 insertions(+), 9 deletions(-)


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

diff --git a/less/mf-mixins.less b/less/mf-mixins.less
index e496a8f..5ca6a9d 100644
--- a/less/mf-mixins.less
+++ b/less/mf-mixins.less
@@ -26,7 +26,6 @@
 
 .box-sizing( @value ) {
-moz-box-sizing: @value;
-   -o-box-sizing: @value;
-webkit-box-sizing: @value;
box-sizing: @value;
 }
diff --git a/stylesheets/common/mf-common.css b/stylesheets/common/mf-common.css
index 35ebeb7..f3a3402 100644
--- a/stylesheets/common/mf-common.css
+++ b/stylesheets/common/mf-common.css
@@ -112,7 +112,6 @@
 }
 table {
   -moz-box-sizing: border-box;
-  -o-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 0cfe9d7..671cbb2 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -215,7 +215,6 @@
   background: #4e4e4e;
   border-left: solid 12px #252525;
   -moz-box-sizing: border-box;
-  -o-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
@@ -423,7 +422,6 @@
   /* remove fennec default background */
 
   -moz-box-sizing: border-box;
-  -o-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
diff --git a/stylesheets/modules/editor.css b/stylesheets/modules/editor.css
index 7fe9cc4..cf5f330 100644
--- a/stylesheets/modules/editor.css
+++ b/stylesheets/modules/editor.css
@@ -22,7 +22,6 @@
   border: none;
   resize: none;
   -moz-box-sizing: border-box;
-  -o-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
diff --git a/stylesheets/modules/mf-cleanuptemplates.css 
b/stylesheets/modules/mf-cleanuptemplates.css
index c02f4a1..f16f34f 100644
--- a/stylesheets/modules/mf-cleanuptemplates.css
+++ b/stylesheets/modules/mf-cleanuptemplates.css
@@ -31,7 +31,6 @@
   display: block;
   width: 100%;
   -moz-box-sizing: border-box;
-  -o-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
   text-align: center !important;
@@ -42,7 +41,6 @@
 td.mbox-image,
 table.ambox-content {
   -moz-box-sizing: border-box;
-  -o-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
diff --git a/stylesheets/specials/uploads.css b/stylesheets/specials/uploads.css
index 9525699..46f5666 100644
--- a/stylesheets/specials/uploads.css
+++ b/stylesheets/specials/uploads.css
@@ -10,7 +10,6 @@
   padding-left: 23px;
   padding-right: 23px;
   -moz-box-sizing: border-box;
-  -o-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }
diff --git a/stylesheets/specials/userlogin.css 
b/stylesheets/specials/userlogin.css
index dfe41f6..bc4136e 100644
--- a/stylesheets/specials/userlogin.css
+++ b/stylesheets/specials/userlogin.css
@@ -53,7 +53,6 @@
   -moz-border-radius: 0;
   border-radius: 0;
   -moz-box-sizing: border-box;
-  -o-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I04fe604d380d8d7fbc7dc83fc80be4046989bc71
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Remove -moz-background-size from .background-size LESS mixin - change (mediawiki...MobileFrontend)

2013-07-05 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Remove -moz-background-size from .background-size LESS mixin
..

Remove -moz-background-size from .background-size LESS mixin

This is only used by Firefox 3.6. Firefox 4 supports it without the
vendor prefix and Firefox <= 3.5 doesn't support it at all. Not worth
it.
https://developer.mozilla.org/en-US/docs/Web/CSS/background-size

Change-Id: Ib1e876f75a7f331cae0300914eea1e69858915bb
---
M less/mf-mixins.less
M stylesheets/common/mf-navigation.css
M stylesheets/common/notifications.css
M stylesheets/common/overlays.css
M stylesheets/common/pageactions.css
M stylesheets/common/pagelist.css
M stylesheets/common/ui.css
M stylesheets/common/user.css
M stylesheets/modules/editor.css
M stylesheets/modules/mf-cleanuptemplates.css
M stylesheets/modules/mf-photo.css
M stylesheets/modules/mf-search.css
M stylesheets/modules/mf-toggle.css
M stylesheets/specials/mobilediff.css
M stylesheets/specials/uploads.css
M stylesheets/specials/watchlist.css
16 files changed, 0 insertions(+), 25 deletions(-)


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

diff --git a/less/mf-mixins.less b/less/mf-mixins.less
index e496a8f..54563ff 100644
--- a/less/mf-mixins.less
+++ b/less/mf-mixins.less
@@ -33,7 +33,6 @@
 
 .background-size( @width: auto, @height: auto ) {
/* use -webkit prefix for older android browsers eg. nexus 1 */
-   -moz-background-size: @width @height;
-o-background-size: @width @height;
-webkit-background-size: @width @height;
background-size: @width @height;
diff --git a/stylesheets/common/mf-navigation.css 
b/stylesheets/common/mf-navigation.css
index 61aec15..683daa8 100644
--- a/stylesheets/common/mf-navigation.css
+++ b/stylesheets/common/mf-navigation.css
@@ -15,7 +15,6 @@
   background-position: center center;
   /* use -webkit prefix for older android browsers eg. nexus 1 */
 
-  -moz-background-size: auto 22px;
   -o-background-size: auto 22px;
   -webkit-background-size: auto 22px;
   background-size: auto 22px;
diff --git a/stylesheets/common/notifications.css 
b/stylesheets/common/notifications.css
index 358858f..6c1951f 100644
--- a/stylesheets/common/notifications.css
+++ b/stylesheets/common/notifications.css
@@ -58,7 +58,6 @@
   background-position: 23px 50%;
   /* use -webkit prefix for older android browsers eg. nexus 1 */
 
-  -moz-background-size: 32px auto;
   -o-background-size: 32px auto;
   -webkit-background-size: 32px auto;
   background-size: 32px auto;
@@ -119,7 +118,6 @@
   background-position: right center;
   /* use -webkit prefix for older android browsers eg. nexus 1 */
 
-  -moz-background-size: auto 12px;
   -o-background-size: auto 12px;
   -webkit-background-size: auto 12px;
   background-size: auto 12px;
diff --git a/stylesheets/common/overlays.css b/stylesheets/common/overlays.css
index a68662f..499d3dd 100644
--- a/stylesheets/common/overlays.css
+++ b/stylesheets/common/overlays.css
@@ -56,7 +56,6 @@
   text-indent: -999px;
   /* use -webkit prefix for older android browsers eg. nexus 1 */
 
-  -moz-background-size: auto 30px;
   -o-background-size: auto 30px;
   -webkit-background-size: auto 30px;
   background-size: auto 30px;
diff --git a/stylesheets/common/pageactions.css 
b/stylesheets/common/pageactions.css
index 2cfca2d..24b64d3 100644
--- a/stylesheets/common/pageactions.css
+++ b/stylesheets/common/pageactions.css
@@ -23,7 +23,6 @@
   background-repeat: no-repeat;
   /* use -webkit prefix for older android browsers eg. nexus 1 */
 
-  -moz-background-size: auto 22px;
   -o-background-size: auto 22px;
   -webkit-background-size: auto 22px;
   background-size: auto 22px;
diff --git a/stylesheets/common/pagelist.css b/stylesheets/common/pagelist.css
index 39bb7be..6fdc25b 100644
--- a/stylesheets/common/pagelist.css
+++ b/stylesheets/common/pagelist.css
@@ -5,7 +5,6 @@
 .listThumb.needsPhoto {
   /* use -webkit prefix for older android browsers eg. nexus 1 */
 
-  -moz-background-size: 100% auto;
   -o-background-size: 100% auto;
   -webkit-background-size: 100% auto;
   background-size: 100% auto;
@@ -15,7 +14,6 @@
 .listThumbH {
   /* use -webkit prefix for older android browsers eg. nexus 1 */
 
-  -moz-background-size: auto 100%;
   -o-background-size: auto 100%;
   -webkit-background-size: auto 100%;
   background-size: auto 100%;
@@ -23,7 +21,6 @@
 .listThumbV {
   /* use -webkit prefix for older android browsers eg. nexus 1 */
 
-  -moz-background-size: 100% auto;
   -o-background-size: 100% auto;
   -webkit-background-size: 100% auto;
   background-size: 100% auto;
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 0cfe9d7..950c646 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -249,7 +249,6 @@
   background-repeat: no-repeat;
   /* use -webkit prefix

[MediaWiki-commits] [Gerrit] Remove -ms-linear-gradient from .vertical-gradient LESS mixin - change (mediawiki...MobileFrontend)

2013-07-05 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Remove -ms-linear-gradient from .vertical-gradient LESS mixin
..

Remove -ms-linear-gradient from .vertical-gradient LESS mixin

Comment claims that it's for IE 10, but it's not the case. IE 10 supports
it without a vendor prefix, and IE < 10 doesn't support it at all
(tested on Windows Phone 8). Possibly a non-final version of IE 10 needed
it.

https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient
http://caniuse.com/css-gradients

Change-Id: I09add76ef5db3a990a8769ea8771bfa7931ebc29
---
M less/mf-mixins.less
M stylesheets/common/ui.css
M stylesheets/specials/mobileoptions.css
3 files changed, 0 insertions(+), 10 deletions(-)


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

diff --git a/less/mf-mixins.less b/less/mf-mixins.less
index e496a8f..9b08f43 100644
--- a/less/mf-mixins.less
+++ b/less/mf-mixins.less
@@ -73,7 +73,6 @@
 .vertical-gradient ( @startColor: gray, @endColor: white, @startPos: 0, 
@endPos: 100% ) {
background-color: @endColor;
background-image: -moz-linear-gradient( top, @startColor @startPos, 
@endColor @endPos ); // Firefox 3.6+
-   background-image: -ms-linear-gradient( top, @startColor @startPos, 
@endColor @endPos );  // IE10
background-image: -webkit-gradient( linear, left top, left bottom, 
color-stop( @startPos, @startColor ), color-stop( @endPos, @endColor ) ); // 
Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient( top, @startColor @startPos, 
@endColor @endPos ); // Safari 5.1+, Chrome 10+
background-image: linear-gradient( @startColor @startPos, @endColor 
@endPos ); // Standard
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 0cfe9d7..8a513c3 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -31,7 +31,6 @@
   text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
   background-color: #3366bb;
   background-image: -moz-linear-gradient(top, #3670c8 0, #3366bb 100%);
-  background-image: -ms-linear-gradient(top, #3670c8 0, #3366bb 100%);
   background-image: -webkit-gradient(linear, left top, left bottom, 
color-stop(0, #3670c8), color-stop(100%, #3366bb));
   background-image: -webkit-linear-gradient(top, #3670c8 0, #3366bb 100%);
   background-image: linear-gradient(#3670c8 0, #3366bb 100%);
@@ -47,7 +46,6 @@
 .drawer input[type=submit]:hover {
   background-color: #3f77d7;
   background-image: -moz-linear-gradient(top, #4c84da 0, #3f77d7 100%);
-  background-image: -ms-linear-gradient(top, #4c84da 0, #3f77d7 100%);
   background-image: -webkit-gradient(linear, left top, left bottom, 
color-stop(0, #4c84da), color-stop(100%, #3f77d7));
   background-image: -webkit-linear-gradient(top, #4c84da 0, #3f77d7 100%);
   background-image: linear-gradient(#4c84da 0, #3f77d7 100%);
@@ -63,7 +61,6 @@
 .drawer input[type=submit]:active {
   background-color: #2a549c;
   background-image: -moz-linear-gradient(top, #2d5ea9 0, #2a549c 100%);
-  background-image: -ms-linear-gradient(top, #2d5ea9 0, #2a549c 100%);
   background-image: -webkit-gradient(linear, left top, left bottom, 
color-stop(0, #2d5ea9), color-stop(100%, #2a549c));
   background-image: -webkit-linear-gradient(top, #2d5ea9 0, #2a549c 100%);
   background-image: linear-gradient(#2d5ea9 0, #2a549c 100%);
@@ -91,7 +88,6 @@
   color: #bed1f1;
   background-color: #7798d2;
   background-image: -moz-linear-gradient(top, #7798d2 0, #7798d2 100%);
-  background-image: -ms-linear-gradient(top, #7798d2 0, #7798d2 100%);
   background-image: -webkit-gradient(linear, left top, left bottom, 
color-stop(0, #7798d2), color-stop(100%, #7798d2));
   background-image: -webkit-linear-gradient(top, #7798d2 0, #7798d2 100%);
   background-image: linear-gradient(#7798d2 0, #7798d2 100%);
@@ -144,7 +140,6 @@
   text-decoration: none;
   background-color: #e9e9ea;
   background-image: -moz-linear-gradient(top, #ff 45%, #e9e9ea 100%);
-  background-image: -ms-linear-gradient(top, #ff 45%, #e9e9ea 100%);
   background-image: -webkit-gradient(linear, left top, left bottom, 
color-stop(45%, #ff), color-stop(100%, #e9e9ea));
   background-image: -webkit-linear-gradient(top, #ff 45%, #e9e9ea 100%);
   background-image: linear-gradient(#ff 45%, #e9e9ea 100%);
@@ -172,7 +167,6 @@
 .header .button-bar li:active button {
   background-color: #e9e9ea;
   background-image: -moz-linear-gradient(top, #c8cacb 0, #e9e9ea 100%);
-  background-image: -ms-linear-gradient(top, #c8cacb 0, #e9e9ea 100%);
   background-image: -webkit-gradient(linear, left top, left bottom, 
color-stop(0, #c8cacb), color-stop(100%, #e9e9ea));
   background-image: -webkit-linear-gradient(top, #c8cacb 0, #e9e9ea 100%);
   background-image: linear-gradient(#c8cacb 0, #e9e9ea 100%);
@@ -355,7 +349,6 @@
   color: black;
   background-color: #f3f3f

[MediaWiki-commits] [Gerrit] Simplify .animation LESS mixin - change (mediawiki...MobileFrontend)

2013-07-05 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Simplify .animation LESS mixin
..

Simplify .animation LESS mixin

Make it more general and explicit (no arbitrary defaults). Now it is
simply an alias for animation and -webkit-animation CSS properties.

Change-Id: I8e7383a18ffb0bf3d6f56fd185e96c87524bbc20
---
M less/mf-mixins.less
M less/modules/mf-photo.less
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/less/mf-mixins.less b/less/mf-mixins.less
index e496a8f..c390a9e 100644
--- a/less/mf-mixins.less
+++ b/less/mf-mixins.less
@@ -99,7 +99,7 @@
transition: @args;
 }
 
-.animation( @name, @duration, @function: ease-in-out, @iterationCount: 
infinite, @direction: alternate ) {
-   -webkit-animation: @name @duration @function @iterationCount @direction;
-   animation: @name @duration @function @iterationCount @direction
+.animation( @args ) {
+   -webkit-animation: @args;
+   animation: @args;
 }
diff --git a/less/modules/mf-photo.less b/less/modules/mf-photo.less
index da1e51a..8eee6f9 100644
--- a/less/modules/mf-photo.less
+++ b/less/modules/mf-photo.less
@@ -145,7 +145,7 @@
 .animations .photo-nag {
label div {
&.active {
-   .animation( pulse, 1s );
+   .animation( pulse 1s ease-in-out infinite alternate );
}
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e7383a18ffb0bf3d6f56fd185e96c87524bbc20
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Show notifications (toasts) when overlay is open - change (mediawiki...MobileFrontend)

2013-07-05 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Show notifications (toasts) when overlay is open
..

Show notifications (toasts) when overlay is open

A regression caused toasts not to be shown when overlays were open
(e.g. errors in editor overlay).

Change-Id: I91d3972e7a2806e2b7a9e845e801fe8841ef0544
---
M less/common/overlays.less
M stylesheets/common/overlays.css
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/less/common/overlays.less b/less/common/overlays.less
index f6d9fc8..73e8f82 100644
--- a/less/common/overlays.less
+++ b/less/common/overlays.less
@@ -29,7 +29,7 @@
}
 
#mw-mf-viewport {
-   display: none;
+   overflow: hidden;
}
 
#footer {
diff --git a/stylesheets/common/overlays.css b/stylesheets/common/overlays.css
index 684c9b5..ba5f5bb 100644
--- a/stylesheets/common/overlays.css
+++ b/stylesheets/common/overlays.css
@@ -21,7 +21,7 @@
   display: block;
 }
 html.overlay #mw-mf-viewport {
-  display: none;
+  overflow: hidden;
 }
 html.overlay #footer {
   display: none !important;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91d3972e7a2806e2b7a9e845e801fe8841ef0544
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix jumping watchstar spinner - change (mediawiki...MobileFrontend)

2013-07-05 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix jumping watchstar spinner
..

Fix jumping watchstar spinner

Change-Id: Ibb6e022b5996f30007785e0c5e0b25e938ce53cd
---
M less/modules/mf-watchstar.less
M stylesheets/modules/mf-watchstar.css
2 files changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/less/modules/mf-watchstar.less b/less/modules/mf-watchstar.less
index 0846d6c..2534768 100644
--- a/less/modules/mf-watchstar.less
+++ b/less/modules/mf-watchstar.less
@@ -1,10 +1,9 @@
 @import "../mf-mixins.less";
 
 a.watch-this-article {
-
&.loading {
background-image: @ajaxLoadingImage;
-   min-height: auto;
+   min-height: 0;
}
 }
 
diff --git a/stylesheets/modules/mf-watchstar.css 
b/stylesheets/modules/mf-watchstar.css
index 18dde1f..a8c7a0b 100644
--- a/stylesheets/modules/mf-watchstar.css
+++ b/stylesheets/modules/mf-watchstar.css
@@ -1,6 +1,6 @@
 a.watch-this-article.loading {
   background-image: url(../common/images/ajax-loader.gif);
-  min-height: auto;
+  min-height: 0;
 }
 .animations .beta .watch-this-article,
 .animations .alpha .watch-this-article {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb6e022b5996f30007785e0c5e0b25e938ce53cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Story 839: Save from preview in editor - change (mediawiki...MobileFrontend)

2013-07-08 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Story 839: Save from preview in editor
..

Story 839: Save from preview in editor

Remove PreviewOverlay and treat preview as the last stage of the
EditorOverlay. Add summary to EditorApi.

Change-Id: Icac5b5f1418528ef08acfb6b5047d7d24e0e924e
---
M MobileFrontend.i18n.php
M includes/Resources.php
M javascripts/modules/editor/EditorApi.js
M javascripts/modules/editor/EditorOverlay.js
D javascripts/modules/editor/PreviewOverlay.js
M less/common/notifications.less
M less/common/overlays.less
M less/modules/editor.less
M stylesheets/common/notifications.css
M stylesheets/common/overlays.css
M stylesheets/modules/editor.css
D templates/overlays/editPreview.html
M templates/overlays/editor.html
M tests/javascripts/modules/editor/test_EditorApi.js
14 files changed, 144 insertions(+), 147 deletions(-)


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

diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 120c34d..26cd214 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -241,17 +241,18 @@
// edit
'mobile-frontend-editor-cta' => 'You must be logged in to edit pages on 
mobile.',
'mobile-frontend-editor-edit' => 'Edit',
+   'mobile-frontend-editor-continue' => 'Continue',
'mobile-frontend-editor-save' => 'Save',
'mobile-frontend-editor-cancel' => 'Cancel',
-   'mobile-frontend-editor-confirm' => 'Confirm',
-   'mobile-frontend-editor-license' => 'By clicking "Confirm", you agree 
to our [//wikimediafoundation.org/wiki/Terms_of_use Terms of Use] and agree to 
release your text under the [//creativecommons.org/licenses/by-sa/3.0/ Creative 
Commons Attribution-ShareAlike 3.0 License].',
+   'mobile-frontend-editor-keep-editing' => 'Keep editing',
+   'mobile-frontend-editor-license' => 'By clicking "Save", you agree to 
our [//wikimediafoundation.org/wiki/Terms_of_use Terms of Use] and agree to 
release your text under the [//creativecommons.org/licenses/by-sa/3.0/ Creative 
Commons Attribution-ShareAlike 3.0 License].',
+   'mobile-frontend-editor-summary-placeholder' => 'Tell us what you 
changed (Optional)',
'mobile-frontend-editor-cancel-confirm' => 'Do you really want to 
abandon your edit?',
'mobile-frontend-editor-wait' => 'Saving edit, please wait.',
'mobile-frontend-editor-success' => 'Success! Your edit was saved.',
'mobile-frontend-editor-error' => 'Error, edit not saved.',
'mobile-frontend-editor-error-conflict' => 'Error, another user has 
edited this page.',
'mobile-frontend-editor-error-loading' => 'Error, can\'t load section.',
-   'mobile-frontend-editor-preview' => 'Preview',
'mobile-frontend-editor-preview-explanation' => 'A preview of this edit 
will be shown below.',
'mobile-frontend-editor-error-preview' => 'Error, something unexpected 
happened upon loading the preview. Please close and try again.',
 
@@ -657,16 +658,17 @@
'mobile-frontend-editor-cta' => "Caption for call to action when an 
anonymous user clicks on edit icon. (Note the mobile site currently doesn't 
allow anonymous editing.)",
'mobile-frontend-editor-edit' => 'Caption for the link showing edit 
form.
 {{Identical|Edit}}',
+   'mobile-frontend-editor-continue' => 'Caption for the continue button 
on edit form which takes you to the screen that shows a preview and license 
information.',
'mobile-frontend-editor-save' => 'Caption for save button on edit form.
+
+Should be consistent with the following message:
+* {{msg-mw|mobile-frontend-editor-license}}
 {{Identical|Save}}',
'mobile-frontend-editor-cancel' => 'Caption for cancel button on edit 
form.
 {{Identical|Cancel}}',
-   'mobile-frontend-editor-confirm' => 'Caption for confirm button on edit 
form.
-
-Should be consistent with the following message:
-* {{msg-mw|Mobile-frontend-editor-license}}
-{{Identical|Confirm}}',
+   'mobile-frontend-editor-keep-editing' => 'Caption for a button that 
takes you back to editing from edit preview screen.',
'mobile-frontend-editor-license' => 'Text notifying user of license 
that text will be published under. You can change the URL to a "local" 
Wikipedia URL, but you cannot make it point to the country specific CC BY-SA 
3.0 license. See also: {{msg-mw|mobile-frontend-editor-confirm}}.',
+   'mobile-frontend-editor-summary-placeholder' => 'A placeholder for the 
summary input field asking user what they changed (the field is optional).',
'mobile-frontend-editor-cancel-confirm' => 'Question asking user if 
they are positive about abandoning unsaved edit.',
'mobile-frontend-editor-wait' => 'Text that displays while a page edit 
is being saved.',
'mobile-frontend-editor-succ

[MediaWiki-commits] [Gerrit] Remove deleted messages from Resources.php - change (mediawiki...MobileFrontend)

2013-07-08 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Remove deleted messages from Resources.php
..

Remove deleted messages from Resources.php

Change-Id: Iebf6a00defad7c3411769f9d45ab7824e861afc8
---
M includes/Resources.php
1 file changed, 0 insertions(+), 3 deletions(-)


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

diff --git a/includes/Resources.php b/includes/Resources.php
index aa49bf2..1d21baa 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -236,10 +236,7 @@
'mobile-frontend-editor-save',
'mobile-frontend-editor-cancel',
'mobile-frontend-editor-confirm',
-   'mobile-frontend-editor-previous',
-   'mobile-frontend-editor-next',
'mobile-frontend-editor-license' => array( 'parse' ),
-   'mobile-frontend-editor-section-count',
'mobile-frontend-editor-cancel-confirm',
'mobile-frontend-editor-wait',
'mobile-frontend-editor-success',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iebf6a00defad7c3411769f9d45ab7824e861afc8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Make editor license links open in separate tabs - change (mediawiki...MobileFrontend)

2013-07-08 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Make editor license links open in separate tabs
..

Make editor license links open in separate tabs

Change-Id: Ib2588d6e34b14e0d7ad950496296af44158d979a
---
M javascripts/modules/editor/EditorOverlay.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/javascripts/modules/editor/EditorOverlay.js 
b/javascripts/modules/editor/EditorOverlay.js
index 2cacf95..c6f6f3d 100644
--- a/javascripts/modules/editor/EditorOverlay.js
+++ b/javascripts/modules/editor/EditorOverlay.js
@@ -75,6 +75,8 @@
// log cancel attempt
self.log( 'cancel' );
} );
+   // make license links open in separate tabs
+   this.$( '.license a' ).attr( 'target', '_blank' );
 
// This is used to avoid position: fixed weirdness in 
mobile Safari when
// the keyboard is visible

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2588d6e34b14e0d7ad950496296af44158d979a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Style all the inputs and textareas in the same way - change (mediawiki...MobileFrontend)

2013-07-08 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Style all the inputs and textareas in the same way
..

Style all the inputs and textareas in the same way

Rounded corners, same kind of border. Also, simplify search input's CSS
a bit (and its clear button).

Change-Id: I9775185114bffe45debaf167e1b80e15ef7f0f67
---
M less/common/mf-buttons.less
M less/common/mf-common.less
M less/common/ui.less
M less/mf-variables.less
M less/modules/editor.less
M less/modules/mf-search.less
M stylesheets/common/mf-common.css
M stylesheets/common/ui.css
M stylesheets/modules/editor.css
M stylesheets/modules/mf-search.css
10 files changed, 21 insertions(+), 21 deletions(-)


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

diff --git a/less/common/mf-buttons.less b/less/common/mf-buttons.less
index 823e76f..a3cb69e 100644
--- a/less/common/mf-buttons.less
+++ b/less/common/mf-buttons.less
@@ -71,12 +71,13 @@
.button,
button,
input[type=submit] {
-   line-height: @headerElementHeight - 2 * 
@headerElementBorderHeight;
+   // 2 is top and bottom border
+   line-height: @headerElementHeight - 2;
padding: 0 1.25em;
text-decoration: none;
.vertical-gradient(#fff, #e9e9ea, 45%, 100%);
color: #58595b;
-   border: @headerElementBorderHeight solid #9ea0a3;
+   border: 1px solid #9ea0a3;
}
 
.button-bar {
diff --git a/less/common/mf-common.less b/less/common/mf-common.less
index ebe80f2..3e2234d 100644
--- a/less/common/mf-common.less
+++ b/less/common/mf-common.less
@@ -32,6 +32,8 @@
 input:not([type=submit]), textarea {
background: #fff;
border: 1px solid #ccc;
+   border-radius: 3px;
+   padding: 5px;
 }
 
 button.disabled {
diff --git a/less/common/ui.less b/less/common/ui.less
index 284bcea..0be531f 100644
--- a/less/common/ui.less
+++ b/less/common/ui.less
@@ -63,10 +63,7 @@
 /* Search */
 input.search {
-webkit-appearance: none;
-   border-radius: 3px;
-   border: @headerElementBorderHeight solid #c9c9c9;
outline: none;
-   padding: 0 0 0 5px;
width: 100%;
height: @headerElementHeight;
// FIXME: unable to check but the important may not be needed for Nokia 
S60;
diff --git a/less/mf-variables.less b/less/mf-variables.less
index aaf47ee..1555671 100644
--- a/less/mf-variables.less
+++ b/less/mf-variables.less
@@ -4,7 +4,6 @@
 @searchBoxColor: #fafafa;
 @headerHeight: 46px;
 @headerElementHeight: @headerHeight - 16;
-@headerElementBorderHeight: 1px;
 @headerBorderBottom: #e3e3e3;
 
 // page actions
@@ -45,7 +44,6 @@
 
 // calculated values
 @secondaryNavWidth: @headerElementHeight;
-@searchMarginTop: ( ( @headerHeight - @headerElementHeight ) / 2 ) + 
@headerElementBorderHeight;
 
 // calculated colors
 @searchBoxColorTo: darken( @searchBoxColor, 2.75% );
diff --git a/less/modules/editor.less b/less/modules/editor.less
index f1bdf3a..4fbd830 100644
--- a/less/modules/editor.less
+++ b/less/modules/editor.less
@@ -46,6 +46,7 @@
input {
margin: .7em 0 0;
width: 100%;
+   .box-sizing( border-box );
}
 
.preview {
diff --git a/less/modules/mf-search.less b/less/modules/mf-search.less
index 16cd52f..229108f 100644
--- a/less/modules/mf-search.less
+++ b/less/modules/mf-search.less
@@ -3,24 +3,24 @@
 Change-Id: Id7715a83f8dc42cbdb23d8cbf982801606236f7c
 */
 @import "../mf-mixins.less";
+@clearWidth: 24px;
 
 input.search {
/* visual indication that search is happening */
&.searching {
background-color: #eee;
}
+   padding-right: @clearWidth;
 }
 
 form {
 
.clear {
-   top: @searchMarginTop;
+   top: 0;
+   bottom: 0;
right: 10px;
-   width: 24px;
-   height: @headerElementHeight;
-   background: url(../common/images/close-button-beta.png) 
no-repeat scroll 0 0 transparent;
-   margin: 0;
-   background-position: right center;
+   width: @clearWidth;
+   background: url(../common/images/close-button-beta.png) 
no-repeat scroll 100% 50%;
.background-size( auto, 12px );
cursor: pointer;
position: absolute;
diff --git a/stylesheets/common/mf-common.css b/stylesheets/common/mf-common.css
index 9d8b554..360 100644
--- a/stylesheets/common/mf-common.css
+++ b/stylesheets/common/mf-common.css
@@ -27,6 +27,8 @@
 textarea {
   background: #fff;
   border: 1px solid #ccc;
+  border-radius: 3px;
+  padding: 5px;
 }
 button.disabled {
   opacity: 0.2;
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 06f4236..3

[MediaWiki-commits] [Gerrit] Make photo upload overlay look consistent with the editor - change (mediawiki...MobileFrontend)

2013-07-08 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Make photo upload overlay look consistent with the editor
..

Make photo upload overlay look consistent with the editor

Move the license below the buttons. In the process make the photo
preview an overlay.

Change-Id: I00010926affb48fa3bda69d08e1452d821941350
---
M javascripts/common/uploads/PhotoUploader.js
M javascripts/common/uploads/PhotoUploaderPreview.js
M less/common/overlays.less
M less/modules/editor.less
M less/modules/mf-photo.less
M stylesheets/common/overlays.css
M stylesheets/modules/editor.css
M stylesheets/modules/mf-photo.css
M templates/photoUploadPreview.html
9 files changed, 58 insertions(+), 77 deletions(-)


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

diff --git a/javascripts/common/uploads/PhotoUploader.js 
b/javascripts/common/uploads/PhotoUploader.js
index b4f252c..5379fb3 100644
--- a/javascripts/common/uploads/PhotoUploader.js
+++ b/javascripts/common/uploads/PhotoUploader.js
@@ -135,7 +135,6 @@
// nag if never nagged and shouldNag 
and then keep nagging (3 times)
if ( ( nagCount === 0 && shouldNag ) || 
( nagCount > 0 && nagCount < 3 ) ) {
// FIXME: possibly set 
self.preview.parent = nagOverlay when nagOverlay is present
-   // and when 
PhotoUploaderPreview is rewritten as an overlay
nagOverlay = 
self._showNagOverlay( nagCount );
} else {
self._showPreview();
@@ -203,7 +202,7 @@
self._submit();
} );
 
-   self.preview.overlay.show();
+   self.preview.show();
// skip the URL bar if possible
window.scrollTo( 0, 1 );
},
@@ -215,7 +214,7 @@
progressPopup = new PhotoUploadProgress();
 
this.emit( 'start' );
-   this.preview.overlay.hide();
+   this.preview.hide();
popup.show( progressPopup.$el, 'locked noButton 
loading' );
progressPopup.on( 'cancel', function() {
api.abort();
diff --git a/javascripts/common/uploads/PhotoUploaderPreview.js 
b/javascripts/common/uploads/PhotoUploaderPreview.js
index 82ca588..9f9bdce 100644
--- a/javascripts/common/uploads/PhotoUploaderPreview.js
+++ b/javascripts/common/uploads/PhotoUploaderPreview.js
@@ -1,12 +1,11 @@
 ( function( M, $ ) {
-   var View = M.require( 'view' ),
-   popup = M.require( 'notifications' ),
+   var popup = M.require( 'notifications' ),
Overlay = M.require( 'Overlay' ),
LearnMoreOverlay = M.require( 'uploads/LearnMoreOverlay' ),
ownershipMessage = mw.msg( 'mobile-frontend-photo-ownership', 
mw.config.get( 'wgUserName' ), mw.user ),
PhotoUploaderPreview;
 
-   PhotoUploaderPreview = View.extend( {
+   PhotoUploaderPreview = Overlay.extend( {
defaults: {
loadingMessage: mw.msg( 'mobile-frontend-image-loading' 
),
license: mw.msg( 'mobile-frontend-photo-license' ),
@@ -17,6 +16,8 @@
ownerStatement: ownershipMessage
},
 
+   className: 'mw-mf-overlay photo-overlay',
+
template: M.template.get( 'photoUploadPreview' ),
 
initialize: function( options ) {
@@ -25,20 +26,20 @@
},
 
postRender: function() {
-   var self = this,
-   $overlay, $description, $submitButton;
+   var self = this, $description, $submitButton;
 
-   this.overlay = new Overlay( {
-   content: $( '' ).html( this.$el ).html()
+   this._super();
+
+   this.$description = $description = this.$( 'textarea' );
+   $submitButton = this.$( '.submit' ).on( 'click', 
function() {
+   self.emit( 'submit' );
} );
-   $overlay = this.overlay.$el;
-
-   $description = $overlay.find( 'textarea' );
-   $submitButton = $overlay.find( 'button.submit' );
-   this.$description = $description;
+   this.$( '.cancel' ).on( 'click', function() {
+   self.emit( 'cancel' );
+   

[MediaWiki-commits] [Gerrit] Fix text being cut off at the bottom of inline buttons - change (mediawiki...MobileFrontend)

2013-07-08 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix text being cut off at the bottom of inline buttons
..

Fix text being cut off at the bottom of inline buttons

E.g. letter g, y, etc.

Change-Id: I2614e583ae2c4177f5be70e7c1be6f7019a198d1
---
M less/common/mf-buttons.less
M stylesheets/common/ui.css
2 files changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/less/common/mf-buttons.less b/less/common/mf-buttons.less
index 823e76f..7cfa336 100644
--- a/less/common/mf-buttons.less
+++ b/less/common/mf-buttons.less
@@ -55,6 +55,7 @@
&.inline {
display: inline;
padding: 0;
+   line-height: inherit;
color: #002bb8;
background: none;
border: none;
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 06f4236..441abc8 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -114,6 +114,7 @@
 .drawer input[type=submit].inline {
   display: inline;
   padding: 0;
+  line-height: inherit;
   color: #002bb8;
   background: none;
   border: none;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2614e583ae2c4177f5be70e7c1be6f7019a198d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix talk overlay button - change (mediawiki...MobileFrontend)

2013-07-08 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix talk overlay button
..

Fix talk overlay button

Regression after redoing editor preview.

Change-Id: I6e9087bd0cdcca3c28b553ef4f936c299a104e5d
---
M includes/Resources.php
M javascripts/modules/talk.js
2 files changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/includes/Resources.php b/includes/Resources.php
index 827ad59..8fe9d64 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -234,7 +234,6 @@
'mobile-frontend-editor-edit',
// modules/editor/EditorOverlay.js
'mobile-frontend-editor-continue',
-   'mobile-frontend-editor-save',
'mobile-frontend-editor-cancel',
'mobile-frontend-editor-keep-editing',
'mobile-frontend-editor-license' => array( 'parse' ),
@@ -249,6 +248,8 @@
// modules/editor/PreviewOverlay.js
'mobile-frontend-editor-error-preview',
'mobile-frontend-editor-preview-explanation',
+   // modules/editor/EditorOverlay.js and modules/talk.js
+   'mobile-frontend-editor-save',
// page.js
'mobile-frontend-talk-overlay-header',
// history-beta.js
diff --git a/javascripts/modules/talk.js b/javascripts/modules/talk.js
index e38fcf9..d773bd2 100644
--- a/javascripts/modules/talk.js
+++ b/javascripts/modules/talk.js
@@ -8,7 +8,7 @@
TalkSectionAddOverlay = Overlay.extend( {
defaults: {
cancelMsg: mw.msg( 
'mobile-frontend-editor-cancel' ),
-   confirmMsg: mw.msg( 
'mobile-frontend-editor-confirm' ),
+   confirmMsg: mw.msg( 
'mobile-frontend-editor-save' ),
licenseMsg: mw.msg( 
'mobile-frontend-editor-license' ),
topicAdd: mw.msg( 
'mobile-frontend-talk-add-overlay-submit' ),
topicTitlePlaceHolder: mw.msg( 
'mobile-frontend-talk-add-overlay-subject-placeholder' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6e9087bd0cdcca3c28b553ef4f936c299a104e5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Prevent cutting off license image - change (mediawiki...MobileFrontend)

2013-07-08 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Prevent cutting off license image
..

Prevent cutting off license image

On big screens when license text is only a single line.

Change-Id: I3cb28545d6cfd9a969c3496b8fbfde949cb8decb
---
M less/common/overlays.less
M stylesheets/common/overlays.css
2 files changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/less/common/overlays.less b/less/common/overlays.less
index ba65c1a..3cfece5 100644
--- a/less/common/overlays.less
+++ b/less/common/overlays.less
@@ -118,12 +118,14 @@
 
.license {
// FIXME: move this image?
-   background: url('../modules/images/cc-by-sa.png') 0 
.2em no-repeat;
+   background: url('../modules/images/cc-by-sa.png') 0 2px 
no-repeat;
background-size: auto 16px;
padding: 0 0 0 55px;
margin-bottom: 1.2em;
color: #707070;
font-size: .75em !important;
+   // if license is only one line (big screens) prevent 
cutting off the image
+   min-height: 18px;
}
}
 
diff --git a/stylesheets/common/overlays.css b/stylesheets/common/overlays.css
index 5e429ed..8c72101 100644
--- a/stylesheets/common/overlays.css
+++ b/stylesheets/common/overlays.css
@@ -93,12 +93,13 @@
   text-align: left;
 }
 .mw-mf-overlay .buttonBar .license {
-  background: url('../modules/images/cc-by-sa.png') 0 0.2em no-repeat;
+  background: url('../modules/images/cc-by-sa.png') 0 2px no-repeat;
   background-size: auto 16px;
   padding: 0 0 0 55px;
   margin-bottom: 1.2em;
   color: #707070;
   font-size: .75em !important;
+  min-height: 18px;
 }
 .mw-mf-overlay .mw-mf-overlay-footer,
 .mw-mf-overlay .mw-mf-overlay-header {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3cb28545d6cfd9a969c3496b8fbfde949cb8decb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix JS errors reported by jshint 2.1.4 - change (mediawiki...MobileFrontend)

2013-07-09 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix JS errors reported by jshint 2.1.4
..

Fix JS errors reported by jshint 2.1.4

Change-Id: Ice92f6102e285d3f92d13d839589aa6a1924e666
---
M javascripts/modules/nearby/NearbyApi.js
M javascripts/widgets/carousel.js
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/javascripts/modules/nearby/NearbyApi.js 
b/javascripts/modules/nearby/NearbyApi.js
index 905c37e..2f49c10 100644
--- a/javascripts/modules/nearby/NearbyApi.js
+++ b/javascripts/modules/nearby/NearbyApi.js
@@ -103,7 +103,7 @@
page.anchor = 'item_' + i;
page.url = M.history.getArticleUrl( 
page.title );
if ( page.coordinates ) { // FIXME: 
protect against bug 47133 (remove when resolved)
-   coords = page.coordinates[0],
+   coords = page.coordinates[0];
lngLat = { latitude: 
coords.lat, longitude: coords.lon };
page.dist = calculateDistance( 
location, lngLat );
page.latitude = coords.lat;
diff --git a/javascripts/widgets/carousel.js b/javascripts/widgets/carousel.js
index 240be95..00a21ea 100644
--- a/javascripts/widgets/carousel.js
+++ b/javascripts/widgets/carousel.js
@@ -49,7 +49,7 @@
}
this.showCurrentPage();
}
-   } ),
+   } );
 
M.define( 'widgets/carousel', Carousel );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ice92f6102e285d3f92d13d839589aa6a1924e666
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Story 839: Add preview header (follow-up) - change (mediawiki...MobileFrontend)

2013-07-09 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Story 839: Add preview header (follow-up)
..

Story 839: Add preview header (follow-up)

I forgot to add that in the original commit implementing the new
preview. Added now to avoid Vibha's wrath.

Change-Id: Icbdfe1fc5bf42e7978db4660d3e4ef4335a22ea3
---
M MobileFrontend.i18n.php
M includes/Resources.php
M javascripts/modules/editor/EditorOverlay.js
M less/modules/editor.less
M stylesheets/modules/editor.css
A stylesheets/modules/images/preview-bg.png
M templates/overlays/editor.html
7 files changed, 38 insertions(+), 6 deletions(-)


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

diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 12e99a3..986b6fe 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -258,7 +258,7 @@
'mobile-frontend-editor-error' => 'Error, edit not saved.',
'mobile-frontend-editor-error-conflict' => 'Error, another user has 
edited this page.',
'mobile-frontend-editor-error-loading' => 'Error, can\'t load section.',
-   'mobile-frontend-editor-preview-explanation' => 'A preview of this edit 
will be shown below.',
+   'mobile-frontend-editor-preview-header' => 'Preview',
'mobile-frontend-editor-error-preview' => 'Error, something unexpected 
happened upon loading the preview. Please close and try again.',
 
// Change tags
@@ -693,7 +693,7 @@
'mobile-frontend-editor-error-loading' => 'Text that displays when 
there have been errors when loading a page section in the editor.
 
 Used as "toast" error message.',
-   'mobile-frontend-editor-preview-explanation' => 'A summary explaining 
that the preview is being prepared and will appear below.',
+   'mobile-frontend-editor-preview-header' => 'A header explaining that 
user is viewing a preview of the changes they made in the editor.',
'mobile-frontend-editor-error-preview' => 'Error message for when a 
preview fails to load for an unknown reason',
'tag-mobile_edit' => 'Short change tag name that appears e.g. in 
[[Special:RecentChanges]].
 
diff --git a/includes/Resources.php b/includes/Resources.php
index f4094b4..a7f832d 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -246,9 +246,8 @@
'mobile-frontend-editor-error',
'mobile-frontend-editor-error-conflict',
'mobile-frontend-editor-error-loading',
-   // modules/editor/PreviewOverlay.js
+   'mobile-frontend-editor-preview-header',
'mobile-frontend-editor-error-preview',
-   'mobile-frontend-editor-preview-explanation',
// modules/editor/EditorOverlay.js and modules/talk.js
'mobile-frontend-editor-save',
// page.js
diff --git a/javascripts/modules/editor/EditorOverlay.js 
b/javascripts/modules/editor/EditorOverlay.js
index c6f6f3d..91fc0c0 100644
--- a/javascripts/modules/editor/EditorOverlay.js
+++ b/javascripts/modules/editor/EditorOverlay.js
@@ -17,6 +17,7 @@
keepEditingMsg: mw.msg( 
'mobile-frontend-editor-keep-editing' ),
summaryMsg: mw.msg( 
'mobile-frontend-editor-summary-placeholder' ),
licenseMsg: mw.msg( 'mobile-frontend-editor-license' ),
+   previewMsg: mw.msg( 
'mobile-frontend-editor-preview-header' ),
waitMsg: mw.msg( 'mobile-frontend-editor-wait' )
},
template: M.template.get( 'overlays/editor' ),
@@ -137,7 +138,7 @@
$tmp.find( 'h2' ).eq( 0 ).remove();
 
new Section( {
-   el: self.$preview,
+   el: self.$preview.find( '.content' ),
index: 'preview',
// doesn't account for headings with 
html inside
heading: heading,
diff --git a/less/modules/editor.less b/less/modules/editor.less
index b17352e..ec32a0a 100644
--- a/less/modules/editor.less
+++ b/less/modules/editor.less
@@ -48,6 +48,20 @@
.preview {
display: none;
padding-bottom: 15em;
+
+   > h2 {
+   font: bold .75em @fontFamily;
+   color: #707070;
+   text-align: center;
+   background: #f3f3f3 url('images/preview-bg.png') 50% 
50% repeat-x;
+   .background-size( auto, .8em );
+   line-height: 1.7;
+   text-transform: uppercase;
+   // F

[MediaWiki-commits] [Gerrit] Small fixes to page actions - change (mediawiki...MobileFrontend)

2013-07-09 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Small fixes to page actions
..

Small fixes to page actions

* Reduce page actions top and bottom padding slightly.
* Align the pencil icon with the left edge of the content.

Consulted with May.

Change-Id: Icb94f9cec460ec9b773fcdf5deb93bd47cd2d5aa
---
M less/common/pageactions.less
M less/mf-variables.less
M stylesheets/common/pageactions.css
3 files changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/less/common/pageactions.less b/less/common/pageactions.less
index 6d07daa..902f83f 100644
--- a/less/common/pageactions.less
+++ b/less/common/pageactions.less
@@ -13,7 +13,7 @@
 }
 
 #page-actions {
-   padding: 10px @contentMarginRight 8px;
+   padding: 8px @contentMarginRight 8px @contentMarginLeft - 8;
// end hacks
border-bottom: solid 1px #CACACA;
height: 30px;
diff --git a/less/mf-variables.less b/less/mf-variables.less
index 1555671..d984855 100644
--- a/less/mf-variables.less
+++ b/less/mf-variables.less
@@ -9,6 +9,8 @@
 // page actions
 @watchStarSize: 22px;
 
+// FIXME: rename to contentMargin and remove one of those, they're always the 
same
+// FIXME: when page actions move to stable, reduce slightly (May suggested 
16px)
 @contentMarginRight: 23px;
 @contentMarginLeft: @contentMarginRight;
 // information messages, e.g. empty watchlist message
diff --git a/stylesheets/common/pageactions.css 
b/stylesheets/common/pageactions.css
index 6029c1f..97d2a19 100644
--- a/stylesheets/common/pageactions.css
+++ b/stylesheets/common/pageactions.css
@@ -8,7 +8,7 @@
   border-bottom: dotted 1px #CACACA;
 }
 #page-actions {
-  padding: 10px 23px 8px;
+  padding: 8px 23px 8px 15px;
   border-bottom: solid 1px #CACACA;
   height: 30px;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb94f9cec460ec9b773fcdf5deb93bd47cd2d5aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Provide a higher resolution AJAX spinner - change (mediawiki...MobileFrontend)

2013-07-09 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Provide a higher resolution AJAX spinner
..

Provide a higher resolution AJAX spinner

The previous one was only 32x32 and looked blurry on retina displays,
the new one is 64x64.

This one was generated using only 8 colors and optimized using gifsicle
to keep the size small (3.3KB 64x64 vs. 1.8KB 32x32).

Change-Id: Ie4db93ce819fe8a41fa98b717b2ff5443258b7df
---
M less/common/common-js.less
M stylesheets/common/common-js.css
M stylesheets/common/images/ajax-loader.gif
3 files changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/less/common/common-js.less b/less/common/common-js.less
index 9e4f0bb..38d1ff7 100644
--- a/less/common/common-js.less
+++ b/less/common/common-js.less
@@ -5,6 +5,7 @@
min-height: 56px;
background-repeat: no-repeat;
background-position: center;
+   .background-size( 32px, auto );
 
&.content {
padding-top: 48px;
diff --git a/stylesheets/common/common-js.css b/stylesheets/common/common-js.css
index 673e78d..96baae0 100644
--- a/stylesheets/common/common-js.css
+++ b/stylesheets/common/common-js.css
@@ -10,6 +10,11 @@
   min-height: 56px;
   background-repeat: no-repeat;
   background-position: center;
+  /* use -webkit prefix for older android browsers eg. nexus 1 */
+
+  -o-background-size: 32px auto;
+  -webkit-background-size: 32px auto;
+  background-size: 32px auto;
 }
 .loading.content {
   padding-top: 48px;
diff --git a/stylesheets/common/images/ajax-loader.gif 
b/stylesheets/common/images/ajax-loader.gif
index 72203fd..b38a952 100644
--- a/stylesheets/common/images/ajax-loader.gif
+++ b/stylesheets/common/images/ajax-loader.gif
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4db93ce819fe8a41fa98b717b2ff5443258b7df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Remove redundant CSS rules - change (mediawiki...MobileFrontend)

2013-07-09 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Remove redundant CSS rules
..

Remove redundant CSS rules

Style headings only inside .content, don't make h1 black, leave it the
same color as other headings.

Change-Id: I75bb9cff3df62ada0fbbdf74a18dbbc185683c6e
---
M less/common/mf-typography.less
M less/common/ui.less
M less/mf-variables.less
M less/modules/editor.less
M stylesheets/common/mf-typography.css
M stylesheets/common/ui.css
M stylesheets/modules/editor.css
7 files changed, 16 insertions(+), 30 deletions(-)


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

diff --git a/less/common/mf-typography.less b/less/common/mf-typography.less
index bcee305..586abac 100644
--- a/less/common/mf-typography.less
+++ b/less/common/mf-typography.less
@@ -16,13 +16,15 @@
color: #252525;
 }
 
-h1, h2, h3, h4, h5, h6 {
+h1 {
font-family: @fontFamilyHeading;
-   margin-bottom: 9pt;
 }
 
-h2, h3, h4, h5, h6 {
-   margin-top: @headingMarginTop;
+.content {
+   h2, h3, h4, h5, h6 {
+   font-family: @fontFamilyHeading;
+   margin: @headingMarginTop 0 9pt;
+   }
 }
 
 p {
@@ -48,7 +50,6 @@
 h1 {
font-size: @baseFontSize * 1.833;
line-height: @headingLineHeight;
-   color: black;
 }
 
 h2 {
diff --git a/less/common/ui.less b/less/common/ui.less
index 12b6162..7b9cacc 100644
--- a/less/common/ui.less
+++ b/less/common/ui.less
@@ -9,7 +9,6 @@
 #mw-mf-header, // FIXME: This line deals with caching problems expected to be 
deployed 7th May 2013 (kill with fire)
 .header {
z-index: 2;
-   color: black;
.vertical-gradient( @searchBoxColor, @searchBoxColorTo );
border-bottom: 1px solid #e2e2e2;
line-height: @headerHeight;
@@ -20,8 +19,8 @@
padding: 0 @searchBarPaddingRight 0 @searchBarPaddingLeft;
 
h1, h2 {
+   font-family: @fontFamilyHeading;
font-size: @baseFontSize * 1.6;
-   color: @chromeHeadingColor;
margin: @headerHeight*0.22 0 0;
}
 }
diff --git a/less/mf-variables.less b/less/mf-variables.less
index a6e211f..5cbbf0a 100644
--- a/less/mf-variables.less
+++ b/less/mf-variables.less
@@ -23,7 +23,6 @@
 @greenBase : #008740;
 @redBase : #CC;
 @overlayContentBackground: white;
-@chromeHeadingColor: black;
 @mainMenuBackgroundColor: #4E4E4E;
 
 @overlayHeadingIndent: 0.4em;
diff --git a/less/modules/editor.less b/less/modules/editor.less
index 036cd77..77a1928 100644
--- a/less/modules/editor.less
+++ b/less/modules/editor.less
@@ -56,10 +56,6 @@
.background-size( auto, .8em );
line-height: 1.7;
text-transform: uppercase;
-   // FIXME: possibly the default styling of headings 
should apply to
-   // headings in #content only and this wouldn't be 
necessary?
-   margin: 0;
-   padding: 0;
}
}
 
diff --git a/stylesheets/common/mf-typography.css 
b/stylesheets/common/mf-typography.css
index 7011712..dfc8233 100644
--- a/stylesheets/common/mf-typography.css
+++ b/stylesheets/common/mf-typography.css
@@ -20,21 +20,16 @@
   line-height: 1.em;
   color: #252525;
 }
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
+h1 {
   font-family: Georgia, serif;
-  margin-bottom: 9pt;
 }
-h2,
-h3,
-h4,
-h5,
-h6 {
-  margin-top: 14pt;
+.content h2,
+.content h3,
+.content h4,
+.content h5,
+.content h6 {
+  font-family: Georgia, serif;
+  margin: 14pt 0 9pt;
 }
 p {
   margin-bottom: 8pt;
@@ -54,7 +49,6 @@
 h1 {
   font-size: 1.833em;
   line-height: 22pt;
-  color: black;
 }
 h2 {
   font-size: 1.5em;
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 91acfaa..e4706a7 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -344,7 +344,6 @@
 #mw-mf-header,
 .header {
   z-index: 2;
-  color: black;
   background-color: #f3f3f3;
   background-image: -moz-linear-gradient(top, #fafafa 0, #f3f3f3 100%);
   background-image: -webkit-gradient(linear, left top, left bottom, 
color-stop(0, #fafafa), color-stop(100%, #f3f3f3));
@@ -362,8 +361,8 @@
 .header h1,
 #mw-mf-header h2,
 .header h2 {
+  font-family: Georgia, serif;
   font-size: 1.6em;
-  color: #00;
   margin: 10.12px 0 0;
 }
 /* Menu buttons */
diff --git a/stylesheets/modules/editor.css b/stylesheets/modules/editor.css
index 8d44c4b..c4a4d0f 100644
--- a/stylesheets/modules/editor.css
+++ b/stylesheets/modules/editor.css
@@ -59,8 +59,6 @@
   background-size: auto 0.8em;
   line-height: 1.7;
   text-transform: uppercase;
-  margin: 0;
-  padding: 0;
 }
 .editor-overlay .license {
   background: url('images/cc-by-sa.png') 0 0.2em no-repeat;

-- 
To view, visit https://gerrit.wikimedia.org/r/72874
To unsubscrib

[MediaWiki-commits] [Gerrit] Remove CSS rules for #mw-mf-header - change (mediawiki...MobileFrontend)

2013-07-09 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Remove CSS rules for #mw-mf-header
..

Remove CSS rules for #mw-mf-header

This was removed May 7th, no longer in cache and can be removed.

Change-Id: Ib352c3321ec7261229bc68353afca75d652b10cc
---
M less/common/ui.less
M stylesheets/common/ui.css
2 files changed, 0 insertions(+), 4 deletions(-)


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

diff --git a/less/common/ui.less b/less/common/ui.less
index 12b6162..25d5383 100644
--- a/less/common/ui.less
+++ b/less/common/ui.less
@@ -6,7 +6,6 @@
height: @headerHeight;
 }
 
-#mw-mf-header, // FIXME: This line deals with caching problems expected to be 
deployed 7th May 2013 (kill with fire)
 .header {
z-index: 2;
color: black;
diff --git a/stylesheets/common/ui.css b/stylesheets/common/ui.css
index 91acfaa..5c8ce29 100644
--- a/stylesheets/common/ui.css
+++ b/stylesheets/common/ui.css
@@ -341,7 +341,6 @@
 .header form {
   height: 46px;
 }
-#mw-mf-header,
 .header {
   z-index: 2;
   color: black;
@@ -358,9 +357,7 @@
   position: relative;
   padding: 0 40px 0 40px;
 }
-#mw-mf-header h1,
 .header h1,
-#mw-mf-header h2,
 .header h2 {
   font-size: 1.6em;
   color: #00;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib352c3321ec7261229bc68353afca75d652b10cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Add M#getSessionId - change (mediawiki...MobileFrontend)

2013-02-20 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Add M#getSessionId
..

Add M#getSessionId

Use it to generate/fetch a random session ID stored in localStorage.

Change-Id: I501e5a7a4e04797dcc372346262771e8f97aa58b
---
M javascripts/common/mf-application.js
M tests/js/test_application.js
2 files changed, 37 insertions(+), 0 deletions(-)


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

diff --git a/javascripts/common/mf-application.js 
b/javascripts/common/mf-application.js
index c22d425..fd4a72e 100644
--- a/javascripts/common/mf-application.js
+++ b/javascripts/common/mf-application.js
@@ -187,6 +187,32 @@
}
}
 
+   /**
+* Retrieve and, if not present, generate a random session ID
+* (32 alphanumeric characters).
+*
+* @return {string}
+*/
+   function getSessionId() {
+   var sessionId;
+   if ( typeof localStorage === 'undefined' ) {
+   return null;
+   }
+   sessionId = localStorage.getItem( 'sessionId' );
+
+   if ( !sessionId ) {
+   // FIXME: use mw.user.generateRandomSessionId when we 
can,
+   // as of now mediawiki.user has no mobile target (yay, 
targets in RL!)
+   sessionId = '';
+   while ( sessionId.length < 32 ) {
+   // http://stackoverflow.com/a/8084248/365238
+   sessionId += 
Math.random().toString(36).slice(2, 32 + 2 - sessionId.length);
+   }
+   localStorage.setItem( 'sessionId', sessionId );
+   }
+   return sessionId;
+   }
+
$( init );
 
$.extend( M, {
@@ -196,6 +222,7 @@
getApiUrl: getApiUrl,
getOrigin: getOrigin,
getPageArrayFromApiResponse: getPageArrayFromApiResponse,
+   getSessionId: getSessionId,
isLoggedIn: isLoggedIn,
log: log,
message: message,
diff --git a/tests/js/test_application.js b/tests/js/test_application.js
index f599f07..867bdd5 100644
--- a/tests/js/test_application.js
+++ b/tests/js/test_application.js
@@ -42,4 +42,14 @@
strictEqual( MFE.require( 'testModule2' ), 'test module 2' );
 } );
 
+
+module( 'MobileFrontend common functions' );
+
+test( '#getSessionId', function() {
+   var sessionId = MFE.getSessionId();
+   strictEqual( typeof sessionId, 'string', 'session ID is a string' );
+   strictEqual( sessionId.length, 32, 'session ID is 32 chars long' );
+   strictEqual( MFE.getSessionId(), sessionId, 'session ID is not 
regenerated if present' );
+} );
+
 }( jQuery, mw.mobileFrontend ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I501e5a7a4e04797dcc372346262771e8f97aa58b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Add event logging to photo uploads - change (mediawiki...MobileFrontend)

2013-02-20 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Add event logging to photo uploads
..

Add event logging to photo uploads

Change-Id: Ie344a292dd3289d35cf222ac7a846a18080b7f51
---
M javascripts/modules/mf-photo.js
M javascripts/modules/mf-watchlist.js
M javascripts/specials/donateimage.js
3 files changed, 48 insertions(+), 18 deletions(-)


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

diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index 2f56e71..4f1e62e 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -30,6 +30,20 @@
);
}
 
+   function getLog( funnel ) {
+   return function( data ) {
+   M.log( 'MobileWebUploads', $.extend( {
+   token: M.getSessionId(),
+   funnel: funnel,
+   // FIXME: this gives wrong results when page 
loaded dynamically
+   pageId: mw.config.get( 'wgArticleId' ),
+   isEditable: M.getConfig( 'can_edit' ),
+   mobileMode: M.getConfig( 'alpha' ) ? 'alpha' : 
( M.getConfig( 'beta' ) ? 'beta' : 'stable' ),
+   userAgent: window.navigator.userAgent
+   }, data ) );
+   }
+   }
+
function generateFileName( file, pageTitle ) {
// FIXME: deal with long and invalid names
var name = 'Lead_Photo_For_' + pageTitle.replace( / /g, '_' ) + 
Math.random(),
@@ -56,7 +70,8 @@
},
 
save: function( options, callback ) {
-   var self = this;
+   var self = this, result = $.Deferred();
+
options.editSummaryMessage = options.insertInPage ?
'mobile-frontend-photo-article-edit-comment' :
'mobile-frontend-photo-article-donate-comment';
@@ -89,8 +104,8 @@
} ).done( function( data ) {
var descriptionUrl = '';
if ( !data || !data.upload ) {
-   // FIXME: use event logging to 
log errors
-   callback( null );
+   // error uploading image
+   result.reject( data.error ? 
data.error.info : '' );
return;
}
options.fileName = data.upload.filename 
|| data.upload.warnings.duplicate['0'];
@@ -99,15 +114,24 @@
descriptionUrl = 
data.upload.imageinfo.descriptionurl;
}
if ( options.insertInPage ) {
-   self.updatePage( options, 
function() {
-   // FIXME: check for 
errors here too?
-   callback( 
options.fileName, descriptionUrl );
+   self.updatePage( options, 
function( data ) {
+   if ( !data || 
data.error ) {
+   // error 
updating page's wikitext
+   result.reject( 
data.error.info );
+   } else {
+   result.resolve( 
options.fileName, descriptionUrl );
+   }
} );
} else {
-   callback( options.fileName, 
descriptionUrl );
+   result.resolve( 
options.fileName, descriptionUrl );
}
+   } ).fail( function( xhr, status, error ) {
+   // error on the server side
+   result.reject( status + ': ' + error );
} );
}, endpoint );
+
+   return result;
}
} );
 
@@ -124,7 +148,7 @@
 
template: M.template.get( 'photoUploadPreview' ),
 
-   initialize: function() {
+   initialize: function( options 

[MediaWiki-commits] [Gerrit] Add photo upload schema for event logging - change (operations/mediawiki-config)

2013-02-20 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Add photo upload schema for event logging
..

Add photo upload schema for event logging

Change-Id: Iecb3c4a45319560c31107864e029684461774930
---
M wmf-config/mobile.php
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/09/50109/1

diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index 98326de..1773797 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -153,6 +153,14 @@
'targets' => 'mobile',
'mobileTargets' => array( 'stable', 'beta', 'alpha' ),
);
+
+   $wgResourceModules['mobile.uploads.schema'] = array(
+   'class' => 'ResourceLoaderSchemaModule',
+   'schema' => 'MobileWebUploads',
+   'revision' => 5246000,
+   'targets' => 'mobile',
+   'mobileTargets' => array( 'stable', 'beta', 'alpha' ),
+   );
 }
 
 // Force HTTPS for login/account creation

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iecb3c4a45319560c31107864e029684461774930
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix photo upload button not working after error - change (mediawiki...MobileFrontend)

2013-02-20 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix photo upload button not working after error
..

Fix photo upload button not working after error

When an error occured when adding a lead photo to an article, the photo
upload button no longer worked and the user was be unable to
retry.

This was caused by jQuery's .remove() unbinding all DOM events, .detach()
should be used instead.

Change-Id: Iba136eeb77ec4eea0b01eb0ded52e813471b50d2
---
M javascripts/common/mf-view.js
M javascripts/modules/mf-photo.js
M tests/js/test_mf-view.js
3 files changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/javascripts/common/mf-view.js b/javascripts/common/mf-view.js
index 52050e5..de21571 100644
--- a/javascripts/common/mf-view.js
+++ b/javascripts/common/mf-view.js
@@ -109,7 +109,8 @@
'before',
'insertAfter',
'insertBefore',
-   'remove'
+   'remove',
+   'detach'
].forEach( function( prop ) {
View.prototype[prop] = function() {
this.$el[prop].apply( this.$el, arguments );
diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index a86de73..fd6e8d7 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -388,7 +388,7 @@
} ).
insertAfter( $page.find( 'h1' ) ).
on( 'start', function() {
-   photoUploader.remove();
+   photoUploader.detach();
} ).
on( 'success', function( data ) {
popup.show( mw.msg( 
'mobile-frontend-photo-upload-success-article' ), 'toast' );
diff --git a/tests/js/test_mf-view.js b/tests/js/test_mf-view.js
index 2031e53..4aa0f11 100644
--- a/tests/js/test_mf-view.js
+++ b/tests/js/test_mf-view.js
@@ -21,7 +21,8 @@
'before',
'insertAfter',
'insertBefore',
-   'remove'
+   'remove',
+   'detach'
].forEach( function( prop ) {
var stub = sinon.stub( view.$el, prop );
view[prop]( 'test', 1 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba136eeb77ec4eea0b01eb0ded52e813471b50d2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] (bug 45217) Fix dependencies support in MFResourceLoaderModule - change (mediawiki...MobileFrontend)

2013-02-21 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: (bug 45217) Fix dependencies support in MFResourceLoaderModule
..

(bug 45217) Fix dependencies support in MFResourceLoaderModule

Add support for 'dependencies' key in MFResourceLoaderModule. Also
always depend on 'mobile.startup' (which contains code responsible for
compiling templates).

Change-Id: I148c6db90bf837f9813194a7835fa3edb9aa0247
---
M includes/modules/MFResourceLoaderModule.php
M tests/modules/MFResourceLoaderModuleTest.php
2 files changed, 41 insertions(+), 11 deletions(-)


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

diff --git a/includes/modules/MFResourceLoaderModule.php 
b/includes/modules/MFResourceLoaderModule.php
index 66d4d7f..7183b94 100644
--- a/includes/modules/MFResourceLoaderModule.php
+++ b/includes/modules/MFResourceLoaderModule.php
@@ -4,6 +4,7 @@
  * Allows basic parsing of messages without arguments
  */
 class MFResourceLoaderModule extends ResourceLoaderModule {
+   protected $dependencies = array();
protected $parsedMessages = array();
protected $messages = array();
protected $templates = array();
@@ -16,18 +17,34 @@
 * Registers core modules and runs registration hooks.
 */
public function __construct( $options ) {
-   if ( isset( $options[ 'localTemplateBasePath' ] ) ) {
-   $this->localTemplateBasePath = $options[ 
'localTemplateBasePath' ];
+   foreach ( $options as $member => $option ) {
+   switch ( $member ) {
+   case 'localTemplateBasePath':
+   case 'localBasePath':
+   $this->{$member} = (string) $option;
+   break;
+   case 'templates':
+   case 'dependencies':
+   $this->{$member} = (array) $option;
+   break;
+   case 'messages':
+   $this->processMessages( $option );
+   break;
+   }
}
-   if ( isset( $options[ 'messages' ] ) ) {
-   $this->processMessages( $options[ 'messages'] );
-   }
-   if ( isset( $options[ 'localBasePath' ] ) ) {
-   $this->localBasePath = $options[ 'localBasePath' ];
-   }
-   if ( isset( $options[ 'templates' ] ) ) {
-   $this->templates = $options['templates'];
-   }
+
+   // MFResourceLoaderModule must depend on mobile.startup because
+   // mobile.startup contains code responsible for compiling 
templates
+   $this->dependencies[] = 'mobile.startup';
+   }
+
+   /**
+* Gets list of names of modules this module depends on.
+*
+* @return Array: List of module names
+*/
+   public function getDependencies() {
+   return $this->dependencies;
}
 
/**
diff --git a/tests/modules/MFResourceLoaderModuleTest.php 
b/tests/modules/MFResourceLoaderModuleTest.php
index af571ae..8aff7d2 100644
--- a/tests/modules/MFResourceLoaderModuleTest.php
+++ b/tests/modules/MFResourceLoaderModuleTest.php
@@ -25,6 +25,10 @@
'templates' => array(
'template', 'template2',
)
+   ),
+
+   'dependenciesModule' => array(
+   'dependencies' => array( 'dependency1', 'dependency2' )
)
);
// providers
@@ -139,4 +143,13 @@
 
$this->assertEquals( $js, $expected );
}
+
+   public function testGetDependencies() {
+   $rlModule = new MFResourceLoaderModule( 
$this->modules['dependenciesModule'] );
+   $dependencies = $rlModule->getDependencies();
+
+   $this->assertContains( 'dependency1', $dependencies );
+   $this->assertContains( 'dependency2', $dependencies );
+   $this->assertContains( 'mobile.startup', $dependencies );
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I148c6db90bf837f9813194a7835fa3edb9aa0247
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Run only MobileFrontend's PHPUnit tests on make phpunit - change (mediawiki...MobileFrontend)

2013-02-21 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Run only MobileFrontend's PHPUnit tests on make phpunit
..

Run only MobileFrontend's PHPUnit tests on make phpunit

Change-Id: I0c08ad761741e0ada3ab7bcd06b50a3ee3400eb9
---
M Makefile
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/Makefile b/Makefile
index 6a97736..a23431b 100644
--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@
lessc stylesheets/less/specials/donateimage.less > 
stylesheets/specials/donateimage.css
 
 phpunit:
-   cd ../../tests/phpunit && php phpunit.php --configuration 
../../extensions/MobileFrontend/tests/mfe.suite.xml
+   cd ../../tests/phpunit && php phpunit.php --group MobileFrontend 
--configuration ../../extensions/MobileFrontend/tests/mfe.suite.xml
 
 qunit:
@tests/qunit.sh

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c08ad761741e0ada3ab7bcd06b50a3ee3400eb9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Send all upload request parameters inside FormData - change (mediawiki...MobileFrontend)

2013-02-21 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Send all upload request parameters inside FormData
..

Send all upload request parameters inside FormData

There is no reason for concatenating some of them as a querystring.

Change-Id: Ifacbaa89f80a25a9cd7fada96fe7e9ee7da1d05b
---
M javascripts/modules/mf-photo.js
1 file changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index a86de73..edb2e29 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -83,6 +83,11 @@
var formData = new FormData();
options.fileName = generateFileName( 
options.file, options.pageTitle );
 
+   formData.append( 'action', 'upload' );
+   formData.append( 'format', 'json' );
+   // send useformat=mobile for sites where 
endpoint is a desktop url so that they are mobile edit tagged
+   formData.append( 'useformat', 'mobile' );
+   formData.append( 'origin', M.getOrigin() );
formData.append( 'filename', options.fileName );
formData.append( 'comment', mw.msg( 
options.editSummaryMessage ) );
formData.append( 'file', options.file );
@@ -94,8 +99,7 @@
 
self.post( formData, {
// iOS seems to ignore the cache 
parameter so sending r parameter
-   // send useformat=mobile for sites 
where endpoint is a desktop url so that they are mobile edit tagged
-   url: apiUrl + 
'?action=upload&format=json&useformat=mobile&r=' + Math.random() + '&origin=' + 
M.getOrigin(),
+   url: apiUrl + '?r=' + Math.random(),
xhrFields: { 'withCredentials': true },
cache: false,
contentType: false,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifacbaa89f80a25a9cd7fada96fe7e9ee7da1d05b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Add photo upload support for Firefox - change (mediawiki...MobileFrontend)

2013-02-21 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Add photo upload support for Firefox
..

Add photo upload support for Firefox

And possibly any other browser that supports FormData and FileReader.

Change-Id: Id54befc5c5aab662d9a1b9eaf170b5f9c4a75a77
---
M javascripts/modules/mf-photo.js
1 file changed, 8 insertions(+), 5 deletions(-)


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

diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index edb2e29..c765086 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -18,9 +18,7 @@
function isSupported() {
// FIXME: create a module for browser detection stuff
var browserSupported = (
-   typeof FileReader !== 'undefined' && typeof FormData 
!== 'undefined' &&
-   // webkit only for time being
-   window.navigator.userAgent.indexOf( 'WebKit' ) > -1
+   typeof FileReader !== 'undefined' && typeof FormData 
!== 'undefined'
);
 
return (
@@ -87,7 +85,10 @@
formData.append( 'format', 'json' );
// send useformat=mobile for sites where 
endpoint is a desktop url so that they are mobile edit tagged
formData.append( 'useformat', 'mobile' );
-   formData.append( 'origin', M.getOrigin() );
+   // add origin only when doing CORS
+   if ( endpoint ) {
+   formData.append( 'origin', 
M.getOrigin() );
+   }
formData.append( 'filename', options.fileName );
formData.append( 'comment', mw.msg( 
options.editSummaryMessage ) );
formData.append( 'file', options.file );
@@ -164,7 +165,9 @@
// make license links open in separate tabs
this.$( '.license a' ).attr( 'target', '_blank' );
 
-   $description.on( 'keyup', function() {
+   // use input event too, Firefox doesn't fire keyup on 
many devices:
+   // https://bugzilla.mozilla.org/show_bug.cgi?id=737658
+   $description.on( 'keyup input', function() {
if ( $description.val() ) {
$submitButton.removeAttr( 'disabled' );
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id54befc5c5aab662d9a1b9eaf170b5f9c4a75a77
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Don't show or log an error when user cancels photo upload - change (mediawiki...MobileFrontend)

2013-02-21 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Don't show or log an error when user cancels photo upload
..

Don't show or log an error when user cancels photo upload

This is a regression after introducing event logging.

Change-Id: I75b75e4d3c884ca76140a9bf55ebb59e679bb45c
---
M javascripts/modules/mf-photo.js
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index a86de73..4a42384 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -129,8 +129,10 @@
result.resolve( 
options.fileName, descriptionUrl );
}
} ).fail( function( xhr, status, error ) {
-   // error on the server side
-   result.reject( status + ': ' + error );
+   // error on the server side (abort 
happens when user cancels the upload)
+   if ( status !== 'abort' ) {
+   result.reject( status + ': ' + 
error );
+   }
} );
}, endpoint );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75b75e4d3c884ca76140a9bf55ebb59e679bb45c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Show upload button again if user cancels upload - change (mediawiki...MobileFrontend)

2013-02-21 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Show upload button again if user cancels upload
..

Show upload button again if user cancels upload

Previously, after cancelling an upload the page would remain with no
button (unless refreshed).

Change-Id: Ia3361d4ccea8c582a2d2d59864b79381b95b5d69
---
M javascripts/modules/mf-photo.js
1 file changed, 9 insertions(+), 2 deletions(-)


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

diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index 4a42384..f7d362c 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -264,6 +264,7 @@
 * @fires PhotoUploader#start
 * @fires PhotoUploader#success
 * @fires PhotoUploader#error
+* @fires PhotoUploader#cancel
 */
/**
 * Triggered when image upload starts.
@@ -284,6 +285,11 @@
 * Triggered when image upload fails.
 *
 * @event PhotoUploader#error
+*/
+   /**
+* Triggered when image upload is cancelled.
+*
+* @event PhotoUploader#cancel
 */
PhotoUploader = View.extend( {
template: M.template.get( 'photoUploader' ),
@@ -341,8 +347,9 @@
nav.closeOverlay();
popup.show( progressPopup.$el, 'locked noButton 
loading' );
progressPopup.on( 'cancel', function() {
-   self.log( { action: 'cancel' } );
api.abort();
+   self.log( { action: 'cancel' } );
+   self.emit( 'cancel' );
} );
 
api.save( {
@@ -400,7 +407,7 @@
caption: data.description
} ).prependTo( '#content_0' ).animate();
} ).
-   on( 'error', function() {
+   on( 'error cancel', function() {
photoUploader.insertAfter( $page.find( 'h1' ) );
} );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3361d4ccea8c582a2d2d59864b79381b95b5d69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Refactor the way we run mobile JavaScript tests - change (mediawiki...MobileFrontend)

2013-02-22 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Refactor the way we run mobile JavaScript tests
..

Refactor the way we run mobile JavaScript tests

This introduces a few changes:

* /tests/javascripts follows the directory structure of /javascripts.

* onResourceLoaderTestModules hook automatically checks if there is a
  test file for every JavaScript file we use in our ResourceLoader
  modules and if it finds it, creates a corresponding RL test module.
  No more dependency problems when adding new JavaScript test files!

* Messages and templates are loaded for tests just as they are loaded in
  the extension itself (hence the change in test_mf-photo.js).

* Our JavaScript tests now have to be run using mobile version of
  Special:JavaScriptTest page, this also ensures they run in the
  environment they were written for.

This commit depends on a change to core.

WIP: Running in PhantomJS doesn't work because of (probably) some RL
weirdness on our side.

Change-Id: I593a9c0e8edcb04a351a06a457327f63d698a298
---
M MobileFrontend.php
M includes/MobileContext.php
M includes/MobileFrontend.hooks.php
R tests/javascripts/actions/test_mf-edit.js
R tests/javascripts/common/test_eventemitter.js
R tests/javascripts/common/test_mf-api.js
R tests/javascripts/common/test_mf-application.js
R tests/javascripts/common/test_mf-history.js
R tests/javascripts/common/test_mf-oop.js
R tests/javascripts/common/test_mf-settings.js
R tests/javascripts/common/test_mf-view.js
R tests/javascripts/fixtures-templates.js
R tests/javascripts/fixtures.js
R tests/javascripts/modules/test_mf-banner.js
R tests/javascripts/modules/test_mf-last-modified.js
R tests/javascripts/modules/test_mf-photo.js
R tests/javascripts/modules/test_mf-references.js
R tests/javascripts/modules/test_mf-search.js
R tests/javascripts/modules/test_mf-toggle.js
R tests/javascripts/modules/test_mf-watchlist.js
R tests/javascripts/specials/donateimage.js
R tests/javascripts/widgets/test_progress-bar.js
M tests/qunit.sh
23 files changed, 43 insertions(+), 48 deletions(-)


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

diff --git a/MobileFrontend.php b/MobileFrontend.php
index 09d002b..22ce05d 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -245,7 +245,6 @@
'scripts' => array(
'javascripts/common/mf-history-jquery.js',
'javascripts/modules/mf-toggle-dynamic.js',
-   'javascripts/modules/mf-search.js',
'javascripts/modules/mf-languages.js',
'javascripts/modules/mf-last-modified.js',
'javascripts/modules/mf-photo.js',
@@ -313,7 +312,6 @@
'styles' => array( 'stylesheets/modules/mf-toggle.css' ),
'scripts' => array(
'javascripts/modules/mf-toggle.js',
-   'javascripts/modules/mf-search.js',
),
'mobileTargets' => array( 'stable' ),
 );
@@ -382,6 +380,7 @@
'javascripts/common/mf-api.js',
'javascripts/common/mf-view.js',
'javascripts/widgets/progress-bar.js',
+   'javascripts/modules/mf-search.js',
'javascripts/common/mf-navigation.js',
'javascripts/common/mf-notification.js', 
'javascripts/modules/mf-homepage.js',
'javascripts/modules/mf-cleanuptemplates.js',
diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index 3da1f58..6e03e87 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -257,6 +257,7 @@
 * @return bool Value for shouldDisplayMobileView()
 */
private function shouldDisplayMobileViewInternal() {
+   global $wgResourceModules;
// always display non-mobile view for edit/history/diff
$action = $this->getAction();
$req = $this->getRequest();
@@ -264,12 +265,6 @@
$isDiff = $req->getText( 'diff' );
if ( ( $action === 'edit' && $stableMode ) ||
 ( $action === 'history' && $stableMode ) ) {
-   return false;
-   }
-
-   $title = $this->getTitle() ? $this->getTitle()->getText() : 
false;
-   // Can't use Title::isSpecial() due to infinite recursion
-   if ( $title && $title == SpecialPage::getTitleFor( 
'JavaScriptTest', 'qunit' )->getText() ) {
return false;
}
 
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 07cbca0..056c1b2 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -115,39 +115,43 @@
 * @return bool
 */
public static function onResourceLoaderTestModules( array 
&$testModules, ResourceLoader &$resourceLoader ) {
- 

[MediaWiki-commits] [Gerrit] Add mobile target to QUnit and its dependencies - change (mediawiki/core)

2013-02-22 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Add mobile target to QUnit and its dependencies
..

Add mobile target to QUnit and its dependencies

This allows us to run mobile JavaScript tests in the environment (skin)
they were written for.

Change-Id: I84e0512590de9ff2dbdf519d983a0c1c2d007194
---
M resources/Resources.php
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/48/50448/1

diff --git a/resources/Resources.php b/resources/Resources.php
index 51bf05f..712680d 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -144,6 +144,7 @@
),
'jquery.checkboxShiftClick' => array(
'scripts' => 'resources/jquery/jquery.checkboxShiftClick.js',
+   'targets' => array( 'desktop', 'mobile' ),
),
'jquery.client' => array(
'scripts' => 'resources/jquery/jquery.client.js',
@@ -204,12 +205,14 @@
'scripts' => 'resources/jquery/jquery.makeCollapsible.js',
'styles' => 'resources/jquery/jquery.makeCollapsible.css',
'messages' => array( 'collapsible-expand', 
'collapsible-collapse' ),
+   'targets' => array( 'desktop', 'mobile' ),
),
'jquery.mockjax' => array(
'scripts' => 'resources/jquery/jquery.mockjax.js',
),
'jquery.mw-jump' => array(
'scripts' => 'resources/jquery/jquery.mw-jump.js',
+   'targets' => array( 'desktop', 'mobile' ),
),
'jquery.mwExtension' => array(
'scripts' => 'resources/jquery/jquery.mwExtension.js',
@@ -217,15 +220,18 @@
),
'jquery.placeholder' => array(
'scripts' => 'resources/jquery/jquery.placeholder.js',
+   'targets' => array( 'desktop', 'mobile' ),
),
'jquery.qunit' => array(
'scripts' => 'resources/jquery/jquery.qunit.js',
'styles' => 'resources/jquery/jquery.qunit.css',
'position' => 'top',
+   'targets' => array( 'desktop', 'mobile' ),
),
'jquery.qunit.completenessTest' => array(
'scripts' => 
'resources/jquery/jquery.qunit.completenessTest.js',
'dependencies' => 'jquery.qunit',
+   'targets' => array( 'desktop', 'mobile' ),
),
'jquery.spinner' => array(
'scripts' => 'resources/jquery/jquery.spinner.js',
@@ -813,6 +819,7 @@
'jquery.mw-jump',
'mediawiki.util',
),
+   'targets' => array( 'desktop', 'mobile' ),
),
'mediawiki.page.startup' => array(
'scripts' => 
'resources/mediawiki.page/mediawiki.page.startup.js',
@@ -821,6 +828,7 @@
'mediawiki.util',
),
'position' => 'top',
+   'targets' => array( 'desktop', 'mobile' ),
),
'mediawiki.page.patrol.ajax' => array(
'scripts' => 
'resources/mediawiki.page/mediawiki.page.patrol.ajax.js',
@@ -935,6 +943,7 @@
) ),
'dependencies' => array( 'jquery.qunit' ),
'position' => 'top',
+   'targets' => array( 'desktop', 'mobile' ),
),
 
/* MediaWiki Tests */
@@ -948,6 +957,7 @@
'mediawiki.page.ready',
),
'position' => 'top',
+   'targets' => array( 'desktop', 'mobile' ),
),
 
/* MediaWiki Legacy */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I84e0512590de9ff2dbdf519d983a0c1c2d007194
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix left and right margin in uploads dashboard - change (mediawiki...MobileFrontend)

2013-02-22 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix left and right margin in uploads dashboard
..

Fix left and right margin in uploads dashboard

Regression introduced in Ibcb8b571204ab9e1651957ff0e286d67f743b95d

Change-Id: I3e401390d0f19bea68cb4572de6ef4eda8cc3749
---
A stylesheets/.css
M stylesheets/less/specials/donateimage.less
M stylesheets/specials/donateimage.css
3 files changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/stylesheets/.css b/stylesheets/.css
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/stylesheets/.css
diff --git a/stylesheets/less/specials/donateimage.less 
b/stylesheets/less/specials/donateimage.less
index 631332e..bb0e957 100644
--- a/stylesheets/less/specials/donateimage.less
+++ b/stylesheets/less/specials/donateimage.less
@@ -1,3 +1,5 @@
+@import "../mf-variables.less";
+
 .ctaUploadPhoto {
padding: 8px;
background-color: #F3F3F3;
@@ -13,7 +15,7 @@
 ul.mobileUserGallery {
// FIXME: this shouldn't be needed with reset.css
list-style: none;
-   margin: 20px 0;
+   margin: 20px @contentMarginRight 0 @contentMarginLeft;
 
li {
text-align: center;
diff --git a/stylesheets/specials/donateimage.css 
b/stylesheets/specials/donateimage.css
index e662293..67e009d 100644
--- a/stylesheets/specials/donateimage.css
+++ b/stylesheets/specials/donateimage.css
@@ -10,7 +10,7 @@
 }
 ul.mobileUserGallery {
   list-style: none;
-  margin: 20px 0;
+  margin: 20px 23px 0 23px;
 }
 ul.mobileUserGallery li {
   text-align: center;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e401390d0f19bea68cb4572de6ef4eda8cc3749
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] (bug 43271) Workaround for missing #content_0 - change (mediawiki...MobileFrontend)

2013-02-22 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: (bug 43271) Workaround for missing #content_0
..

(bug 43271) Workaround for missing #content_0

This enables the photo upload button in short articles.

Change-Id: Iaa3df3754c2e55973b4402991bd0a69689260169
---
M javascripts/modules/mf-photo.js
M tests/js/test_mf-photo.js
2 files changed, 33 insertions(+), 12 deletions(-)


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

diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index 81e2c04..5c7a37f 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -6,13 +6,18 @@
ProgressBar = M.require( 'widgets/progress-bar' ),
nav = M.require( 'navigation' ),
popup = M.require( 'notifications' ),
-   $page = $( '#content' ),
endpoint = M.getConfig( 'photo-upload-endpoint' ),
apiUrl = endpoint || M.getApiUrl(),
PhotoApi, PhotoUploaderPreview, LeadPhoto, PhotoUploadProgress, 
PhotoUploader;
 
function needsPhoto( $container ) {
-   return $container.find( '#content_0' ).find( '.thumb img, 
.navbox, .infobox' ).length === 0;
+   var $content_0 = $container.find( '#content_0' );
+   // workaround for 
https://bugzilla.wikimedia.org/show_bug.cgi?id=43271
+   if ( $content_0.length ) {
+   $container = $content_0;
+   }
+
+   return $container.find( '.thumb img, .navbox, .infobox' 
).length === 0;
}
 
function isSupported() {
@@ -387,9 +392,11 @@
var namespaceIds = mw.config.get( 'wgNamespaceIds' ),
namespace = mw.config.get( 'wgNamespaceNumber' ),
validNamespace = ( namespace === namespaceIds[''] || 
namespace === namespaceIds.user ),
+   $page = $( '#content' ),
+   $pageHeading = $page.find( 'h1' ),
photoUploader;
 
-   if ( !validNamespace || mw.util.getParamValue( 'action' ) || 
!needsPhoto( $( '#content' ) ) ) {
+   if ( !validNamespace || mw.util.getParamValue( 'action' ) || 
!needsPhoto( $page ) ) {
return;
}
 
@@ -399,7 +406,7 @@
pageTitle: M.getConfig( 'title' ),
funnel: 'article'
} ).
-   insertAfter( $page.find( 'h1' ) ).
+   insertAfter( $pageHeading ).
on( 'start', function() {
photoUploader.remove();
} ).
@@ -409,10 +416,10 @@
url: data.url,
pageUrl: data.descriptionUrl,
caption: data.description
-   } ).prependTo( '#content_0' ).animate();
+   } ).insertAfter( $pageHeading ).animate();
} ).
on( 'error', function() {
-   photoUploader.insertAfter( $page.find( 'h1' ) );
+   photoUploader.insertAfter( $pageHeading );
} );
}
 
diff --git a/tests/js/test_mf-photo.js b/tests/js/test_mf-photo.js
index ea93eb6..69a5a89 100644
--- a/tests/js/test_mf-photo.js
+++ b/tests/js/test_mf-photo.js
@@ -2,12 +2,26 @@
 
 var photo = M.require( 'photo' ),
articles = [
-   [ $( '' ), true ], // 
blank content_0 section
-   [ $( '' 
), true ], // infobox
-   [ $( '' ), false ], // infobox
-   [ $( '' ), true ], // nav box
-   [ $( '' ), false ], // nav box
-   [ $( '' ), false ] // lead section with thumbnail
+   // blank #content_0
+   [ $( '' ), true ],
+   // infobox in #content_1
+   [ $( '' ), true ],
+   // infobox in #content_0
+   [ $( '' ), false ],
+   // navbox in #content_1
+   [ $( '' ), true ],
+   // navbox in #content_0
+   [ $( '' ), false ],
+   // thumbnail in #content_0
+   [ $( '' ), false ],
+   // no #content_0 and no thumbnail, infobox or navbox
+   [ $( '' ), true ],
+   // no #content_0 and a thumbnail
+   [ $( '' ), false ],
+   // no #content_0 and an infobox
+   [ $( '' ), false ],
+   // no #content_0 and a navbox
+   [ $( '' ), false ]
];
 
 module( 'MobileFrontend photo', {

-- 
To view, visit https://gerrit.wikimedia.org/r/50465
To unsubscribe, visit h

[MediaWiki-commits] [Gerrit] Move lead photo upload to stable - change (mediawiki...MobileFrontend)

2013-02-22 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Move lead photo upload to stable
..

Move lead photo upload to stable

Change-Id: I2c160255445ae61c4370c55132c78a2d0106e20e
---
M MobileFrontend.php
M javascripts/modules/mf-photo.js
2 files changed, 29 insertions(+), 24 deletions(-)


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

diff --git a/MobileFrontend.php b/MobileFrontend.php
index 09d002b..4b94e4b 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -217,7 +217,7 @@
'mobileTargets' => array( 'stable', 'beta', 'alpha' ),
 );
 
-$wgResourceModules['mobile.beta.dependencies'] = array(
+$wgResourceModules['mobile.stable.dependencies'] = array(
'messages' => array(
// mf-photo.js
'mobile-frontend-photo-license' => array( 'parse' ),
@@ -230,17 +230,13 @@
'photoUploadPreview',
),
'class' => 'MFResourceLoaderModule',
-   'mobileTargets' => array( 'beta', 'alpha' ),
+   'mobileTargets' => array( 'stable', 'beta', 'alpha' ),
 );
 
 $wgResourceModules['mobile.beta'] = $wgMFMobileResourceBoilerplate + array(
'dependencies' => array(
'mobile.stable',
-   'mobile.beta.dependencies',
'mediawiki.jqueryMsg',
-   ),
-   'styles' => array(
-   'stylesheets/modules/mf-photo.css',
),
'scripts' => array(
'javascripts/common/mf-history-jquery.js',
@@ -248,7 +244,6 @@
'javascripts/modules/mf-search.js',
'javascripts/modules/mf-languages.js',
'javascripts/modules/mf-last-modified.js',
-   'javascripts/modules/mf-photo.js',
),
'position' => 'bottom',
'messages' => array(
@@ -265,21 +260,6 @@
// for mf-toggle-dynamic.js
'mobile-frontend-show-button',
'mobile-frontend-hide-button',
-
-   // mf-photo.js
-   'mobile-frontend-photo-article-edit-comment',
-   'mobile-frontend-photo-article-donate-comment',
-   'mobile-frontend-photo-upload-error',
-   'mobile-frontend-photo-upload-success-article',
-   'mobile-frontend-photo-caption-placeholder',
-   'mobile-frontend-image-loading',
-   'mobile-frontend-image-uploading-wait',
-   'mobile-frontend-image-uploading-long',
-   'mobile-frontend-image-uploading-cancel',
-   'mobile-frontend-photo-upload',
-   'mobile-frontend-photo-upload-comment',
-   'mobile-frontend-photo-submit',
-   'mobile-frontend-photo-cancel',
 
// for mf-languages.js
'mobile-frontend-language-site-choose',
@@ -370,11 +350,15 @@
 );
 
 $wgResourceModules['mobile.stable'] = $wgMFMobileResourceBoilerplate + array(
-   'dependencies' => array( 'mobile.startup' ),
+   'dependencies' => array(
+   'mobile.startup',
+   'mobile.stable.dependencies',
+   ),
'styles' => array(
'stylesheets/modules/mf-references.css',
'stylesheets/modules/mf-cleanuptemplates.css',
'stylesheets/modules/mf-watchlist.css',
+   'stylesheets/modules/mf-photo.css',
),
'scripts' => array(
'javascripts/externals/hogan.js',
@@ -386,6 +370,7 @@
'javascripts/common/mf-notification.js', 
'javascripts/modules/mf-homepage.js',
'javascripts/modules/mf-cleanuptemplates.js',
'javascripts/modules/mf-watchlist.js',
+   'javascripts/modules/mf-photo.js',
'javascripts/modules/mf-references.js'
),
'messages' => array(
@@ -403,6 +388,21 @@
'mobile-frontend-watchlist-cta',
'mobile-frontend-watchlist-cta-button-signup',
'mobile-frontend-watchlist-cta-button-login',
+
+   // mf-photo.js
+   'mobile-frontend-photo-article-edit-comment',
+   'mobile-frontend-photo-article-donate-comment',
+   'mobile-frontend-photo-upload-error',
+   'mobile-frontend-photo-upload-success-article',
+   'mobile-frontend-photo-caption-placeholder',
+   'mobile-frontend-image-loading',
+   'mobile-frontend-image-uploading-wait',
+   'mobile-frontend-image-uploading-long',
+   'mobile-frontend-image-uploading-cancel',
+   'mobile-frontend-photo-upload',
+   'mobile-frontend-photo-upload-comment',
+   'mobile-frontend-photo-submit',
+   'mobile-frontend-photo-cancel',
),
'mobileTargets' => array( 'stable', 'beta', 'alpha' ),
 );
diff --

[MediaWiki-commits] [Gerrit] Show upload button again if user cancels upload - change (mediawiki...MobileFrontend)

2013-02-25 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Show upload button again if user cancels upload
..


Show upload button again if user cancels upload

Previously, after cancelling an upload the page would remain with no
button (unless refreshed).

Change-Id: Ia3361d4ccea8c582a2d2d59864b79381b95b5d69
---
M javascripts/modules/mf-photo.js
1 file changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index ddbbaa1..970ac64 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -279,6 +279,7 @@
 * @fires PhotoUploader#start
 * @fires PhotoUploader#success
 * @fires PhotoUploader#error
+* @fires PhotoUploader#cancel
 */
/**
 * Triggered when image upload starts.
@@ -299,6 +300,11 @@
 * Triggered when image upload fails.
 *
 * @event PhotoUploader#error
+*/
+   /**
+* Triggered when image upload is cancelled.
+*
+* @event PhotoUploader#cancel
 */
PhotoUploader = View.extend( {
template: M.template.get( 'photoUploader' ),
@@ -357,8 +363,9 @@
nav.closeOverlay();
popup.show( progressPopup.$el, 'locked noButton 
loading' );
progressPopup.on( 'cancel', function() {
-   self.log( { action: 'cancel' } );
api.abort();
+   self.log( { action: 'cancel' } );
+   self.emit( 'cancel' );
} );
 
api.save( {
@@ -418,7 +425,7 @@
caption: data.description
} ).insertAfter( $pageHeading ).animate();
} ).
-   on( 'error', function() {
+   on( 'error cancel', function() {
photoUploader.insertAfter( $pageHeading );
} );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3361d4ccea8c582a2d2d59864b79381b95b5d69
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Detect disabled file upload controls on Firefox OS 1.0 - change (mediawiki...MobileFrontend)

2013-02-25 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Detect disabled file upload controls on Firefox OS 1.0
..


Detect disabled file upload controls on Firefox OS 1.0

Firefox for Android and desktop support file uploads, but the actual
 is not yet supported on Firefox OS. As of 1.0, it
silently drops the "type='file'" and turns file upload controls into
text fields.

This is kind of annoying, as otherwise all the infrastructure is there,
such as FormData and FileReader.

Patch adds detection for the Firefox OS case which will gracefully
start picking up the functioning controls when they get added in future
versions.

Change-Id: I9bfefa39b56c97b65116c9e1f18409cb10d06867
---
M javascripts/modules/mf-photo.js
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index 83aaedf..dd80993 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -18,7 +18,9 @@
function isSupported() {
// FIXME: create a module for browser detection stuff
var browserSupported = (
-   typeof FileReader !== 'undefined' && typeof FormData 
!== 'undefined'
+   typeof FileReader !== 'undefined' &&
+   typeof FormData !== 'undefined' &&
+   ($('').prop('type') === 'file') // 
Firefox OS 1.0 turns  into 
);
 
return (

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9bfefa39b56c97b65116c9e1f18409cb10d06867
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Brion VIBBER 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: JGonera 
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 margin for thumbnails in watchlist (alpha) - change (mediawiki...MobileFrontend)

2013-02-25 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix margin for thumbnails in watchlist (alpha)
..

Fix margin for thumbnails in watchlist (alpha)

Change-Id: If926a6c1c4ac11625b3c0c075b27befbee8b17c4
---
M stylesheets/less/specials/watchlist.less
M stylesheets/specials/watchlist.css
2 files changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/stylesheets/less/specials/watchlist.less 
b/stylesheets/less/specials/watchlist.less
index 8876298..9ae3fed 100644
--- a/stylesheets/less/specials/watchlist.less
+++ b/stylesheets/less/specials/watchlist.less
@@ -133,7 +133,7 @@
}
 }
 
-body.beta {
+.beta, .alpha {
ul.mw-mf-watchlist-results {
li {
a.title {
diff --git a/stylesheets/specials/watchlist.css 
b/stylesheets/specials/watchlist.css
index 9a201b1..e3e9d30 100644
--- a/stylesheets/specials/watchlist.css
+++ b/stylesheets/specials/watchlist.css
@@ -118,7 +118,8 @@
 ul.mw-mf-watchlist-results li .mw-mf-user {
   margin: .5em 0 0;
 }
-body.beta ul.mw-mf-watchlist-results li a.title {
+.beta ul.mw-mf-watchlist-results li a.title,
+.alpha ul.mw-mf-watchlist-results li a.title {
   padding-left: 77px;
 }
 #mw-mf-diffview h2 {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If926a6c1c4ac11625b3c0c075b27befbee8b17c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Move lead photo upload to stable - change (mediawiki...MobileFrontend)

2013-02-25 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Move lead photo upload to stable
..

Move lead photo upload to stable

Fixed version, including mediawiki.util as a RL dependency.

Change-Id: I4074cad79282713d99ff20257d8182278ad2644d
---
M MobileFrontend.php
M javascripts/modules/mf-photo.js
2 files changed, 30 insertions(+), 24 deletions(-)


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

diff --git a/MobileFrontend.php b/MobileFrontend.php
index 09d002b..c3c10aa 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -217,7 +217,7 @@
'mobileTargets' => array( 'stable', 'beta', 'alpha' ),
 );
 
-$wgResourceModules['mobile.beta.dependencies'] = array(
+$wgResourceModules['mobile.stable.dependencies'] = array(
'messages' => array(
// mf-photo.js
'mobile-frontend-photo-license' => array( 'parse' ),
@@ -230,17 +230,13 @@
'photoUploadPreview',
),
'class' => 'MFResourceLoaderModule',
-   'mobileTargets' => array( 'beta', 'alpha' ),
+   'mobileTargets' => array( 'stable', 'beta', 'alpha' ),
 );
 
 $wgResourceModules['mobile.beta'] = $wgMFMobileResourceBoilerplate + array(
'dependencies' => array(
'mobile.stable',
-   'mobile.beta.dependencies',
'mediawiki.jqueryMsg',
-   ),
-   'styles' => array(
-   'stylesheets/modules/mf-photo.css',
),
'scripts' => array(
'javascripts/common/mf-history-jquery.js',
@@ -248,7 +244,6 @@
'javascripts/modules/mf-search.js',
'javascripts/modules/mf-languages.js',
'javascripts/modules/mf-last-modified.js',
-   'javascripts/modules/mf-photo.js',
),
'position' => 'bottom',
'messages' => array(
@@ -265,21 +260,6 @@
// for mf-toggle-dynamic.js
'mobile-frontend-show-button',
'mobile-frontend-hide-button',
-
-   // mf-photo.js
-   'mobile-frontend-photo-article-edit-comment',
-   'mobile-frontend-photo-article-donate-comment',
-   'mobile-frontend-photo-upload-error',
-   'mobile-frontend-photo-upload-success-article',
-   'mobile-frontend-photo-caption-placeholder',
-   'mobile-frontend-image-loading',
-   'mobile-frontend-image-uploading-wait',
-   'mobile-frontend-image-uploading-long',
-   'mobile-frontend-image-uploading-cancel',
-   'mobile-frontend-photo-upload',
-   'mobile-frontend-photo-upload-comment',
-   'mobile-frontend-photo-submit',
-   'mobile-frontend-photo-cancel',
 
// for mf-languages.js
'mobile-frontend-language-site-choose',
@@ -370,11 +350,16 @@
 );
 
 $wgResourceModules['mobile.stable'] = $wgMFMobileResourceBoilerplate + array(
-   'dependencies' => array( 'mobile.startup' ),
+   'dependencies' => array(
+   'mobile.startup',
+   'mobile.stable.dependencies',
+   'mediawiki.util',
+   ),
'styles' => array(
'stylesheets/modules/mf-references.css',
'stylesheets/modules/mf-cleanuptemplates.css',
'stylesheets/modules/mf-watchlist.css',
+   'stylesheets/modules/mf-photo.css',
),
'scripts' => array(
'javascripts/externals/hogan.js',
@@ -386,6 +371,7 @@
'javascripts/common/mf-notification.js', 
'javascripts/modules/mf-homepage.js',
'javascripts/modules/mf-cleanuptemplates.js',
'javascripts/modules/mf-watchlist.js',
+   'javascripts/modules/mf-photo.js',
'javascripts/modules/mf-references.js'
),
'messages' => array(
@@ -403,6 +389,21 @@
'mobile-frontend-watchlist-cta',
'mobile-frontend-watchlist-cta-button-signup',
'mobile-frontend-watchlist-cta-button-login',
+
+   // mf-photo.js
+   'mobile-frontend-photo-article-edit-comment',
+   'mobile-frontend-photo-article-donate-comment',
+   'mobile-frontend-photo-upload-error',
+   'mobile-frontend-photo-upload-success-article',
+   'mobile-frontend-photo-caption-placeholder',
+   'mobile-frontend-image-loading',
+   'mobile-frontend-image-uploading-wait',
+   'mobile-frontend-image-uploading-long',
+   'mobile-frontend-image-uploading-cancel',
+   'mobile-frontend-photo-upload',
+   'mobile-frontend-photo-upload-comment',
+   'mobile-frontend-photo-submit',
+   'mobile-frontend-photo

[MediaWiki-commits] [Gerrit] Disable photo upload button on main and protected pages - change (mediawiki...MobileFrontend)

2013-02-26 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Disable photo upload button on main and protected pages
..

Disable photo upload button on main and protected pages

Change-Id: Ia7236a76a18c81289a72515ed80629566eb5cee5
---
M javascripts/modules/mf-photo.js
M tests/js/test_mf-photo.js
2 files changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index 4f9ceb2..31f2418 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -17,7 +17,7 @@
$container = $content_0;
}
 
-   return $container.find( '.thumb img, .navbox, .infobox' 
).length === 0;
+   return $container.find( 'img, .navbox, .infobox' ).length === 0;
}
 
function isSupported() {
@@ -432,7 +432,7 @@
} );
}
 
-   if ( isSupported() ) {
+   if ( isSupported() && M.getConfig( 'can_edit' ) ) {
// FIXME: https://bugzilla.wikimedia.org/show_bug.cgi?id=45299
if ( M.getConfig( 'beta' ) ) {
M.on( 'page-loaded', initialize );
diff --git a/tests/js/test_mf-photo.js b/tests/js/test_mf-photo.js
index 69a5a89..05aec3a 100644
--- a/tests/js/test_mf-photo.js
+++ b/tests/js/test_mf-photo.js
@@ -21,7 +21,9 @@
// no #content_0 and an infobox
[ $( '' ), false ],
// no #content_0 and a navbox
-   [ $( '' ), false ]
+   [ $( '' ), false ],
+   // no #content_0, image not in .thumb (happens on main pages)
+   [ $( '' ), false ]
];
 
 module( 'MobileFrontend photo', {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7236a76a18c81289a72515ed80629566eb5cee5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix no edit comment after adding image to article - change (mediawiki...MobileFrontend)

2013-02-26 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix no edit comment after adding image to article
..

Fix no edit comment after adding image to article

Change-Id: I319c774cd323479b3ea5a3dce2a3b574d019ee10
---
M javascripts/modules/mf-photo.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index 31f2418..4722a6f 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -71,7 +71,7 @@
action: 'edit',
title: options.pageTitle,
token: tokenData.tokens.edittoken,
-   comment: mw.msg( 
'mobile-frontend-photo-upload-comment' ),
+   summary: mw.msg( 
'mobile-frontend-photo-upload-comment' ),
prependtext: '[[File:' + 
options.fileName + '|thumbnail|' + options.description + ']]\n\n'
} ).done( callback );
} );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I319c774cd323479b3ea5a3dce2a3b574d019ee10
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Fix photo uploads not being marked as mobile edits - change (mediawiki...MobileFrontend)

2013-02-26 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Fix photo uploads not being marked as mobile edits
..

Fix photo uploads not being marked as mobile edits

useformat=mobile has to be in the URL.

Change-Id: I89add5097503bd08d966d69d28d429bee97e719a
---
M javascripts/modules/mf-photo.js
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index 4722a6f..80cbb98 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -92,8 +92,6 @@
 
formData.append( 'action', 'upload' );
formData.append( 'format', 'json' );
-   // send useformat=mobile for sites where 
endpoint is a desktop url so that they are mobile edit tagged
-   formData.append( 'useformat', 'mobile' );
// add origin only when doing CORS
if ( endpoint ) {
formData.append( 'origin', 
M.getOrigin() );
@@ -110,7 +108,8 @@
 
self.post( formData, {
// iOS seems to ignore the cache 
parameter so sending r parameter
-   url: apiUrl + '?r=' + Math.random(),
+   // send useformat=mobile for sites 
where endpoint is a desktop url so that they are mobile edit tagged
+   url: apiUrl + 'useformat=mobile&r=' + 
Math.random(),
xhrFields: { 'withCredentials': true },
cache: false,
contentType: false,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I89add5097503bd08d966d69d28d429bee97e719a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 

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


[MediaWiki-commits] [Gerrit] Bug 45459: Fix photo uploads not being marked as mobile edits - change (mediawiki...MobileFrontend)

2013-02-26 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: Bug 45459: Fix photo uploads not being marked as mobile edits
..


Bug 45459: Fix photo uploads not being marked as mobile edits

useformat=mobile has to be in the URL.

Change-Id: I89add5097503bd08d966d69d28d429bee97e719a
---
M javascripts/modules/mf-photo.js
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/javascripts/modules/mf-photo.js b/javascripts/modules/mf-photo.js
index 4722a6f..35ef0c3 100644
--- a/javascripts/modules/mf-photo.js
+++ b/javascripts/modules/mf-photo.js
@@ -92,8 +92,6 @@
 
formData.append( 'action', 'upload' );
formData.append( 'format', 'json' );
-   // send useformat=mobile for sites where 
endpoint is a desktop url so that they are mobile edit tagged
-   formData.append( 'useformat', 'mobile' );
// add origin only when doing CORS
if ( endpoint ) {
formData.append( 'origin', 
M.getOrigin() );
@@ -110,7 +108,8 @@
 
self.post( formData, {
// iOS seems to ignore the cache 
parameter so sending r parameter
-   url: apiUrl + '?r=' + Math.random(),
+   // send useformat=mobile for sites 
where endpoint is a desktop url so that they are mobile edit tagged
+   url: apiUrl + '?useformat=mobile&r=' + 
Math.random(),
xhrFields: { 'withCredentials': true },
cache: false,
contentType: false,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I89add5097503bd08d966d69d28d429bee97e719a
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: JGonera 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove noMargins and the need for addArticleClass() - change (mediawiki...MobileFrontend)

2013-02-26 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Remove noMargins and the need for addArticleClass()
..

Remove noMargins and the need for addArticleClass()

Also set isOverlay to false (it was adding a .content div to many
special pages) and prepare for its removal.

Change-Id: Ie77849e636a4d7420cabae88ef7fffd9a6f85b04
---
M includes/MobileContext.php
M includes/skins/SkinMobile.php
M includes/skins/UserAccountCreateMobileTemplate.php
M includes/skins/UserLoginMobileTemplate.php
M includes/specials/SpecialDonateImage.php
M includes/specials/SpecialMobileDiff.php
M includes/specials/SpecialMobileFeedback.php
M includes/specials/SpecialMobileOptions.php
M includes/specials/SpecialMobileWatchlist.php
M includes/specials/SpecialNearby.php
M stylesheets/common/mf-typography.css
M stylesheets/less/common/mf-typography.less
M stylesheets/less/specials/userlogin.less
M stylesheets/less/specials/watchlist.less
M stylesheets/specials/userlogin.css
M stylesheets/specials/watchlist.css
16 files changed, 38 insertions(+), 99 deletions(-)


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

diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index 3da1f58..2778e21 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -27,7 +27,7 @@
 
private $forceMobileView = false;
/** @var boolean whether to render as an overlay skin or an article 
skin */
-   private $isOverlay = true;
+   private $isOverlay = false;
private $forceLeftMenu = false;
private $contentTransformations = true;
private $mobileView = null;
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index ff6abbf..8941df8 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -713,11 +713,15 @@
html( 'notice' ) ?>
renderArticleHeader() ?>
' 
id='content_wrapper'>
+   data[ 'isSpecialPage' ] ) { ?>

+   
html( 'prebodytext' ) ?>
html( 'bodytext' ) ?>
html( 'postbodytext' ) ?>
+   data[ 'isSpecialPage' ] ) { ?>

+   

data[ 'isSpecialPage' ] ) {
@@ -741,9 +745,7 @@

renderOverlayHeader() ?>

-   
html( 'bodytext' ) ?>
-   


handleCaptcha( $this->data['header'] );
$headMsg = $this->getHeadMsg();
 
-   MobileContext::singleton()->getSkin()->addArticleClass( 
'noMargins' );
-
-   $accountCreation = Html::openElement( 'div', array( 'id' => 
'mw-mf-accountcreate' ) );
+   $accountCreation = Html::openElement( 'div', array( 'id' => 
'mw-mf-accountcreate', 'class' => 'content' ) );
 
// @TODO refactor this into base class
if ( $headMsg ) {
diff --git a/includes/skins/UserLoginMobileTemplate.php 
b/includes/skins/UserLoginMobileTemplate.php
index 24538ea..50775ac 100644
--- a/includes/skins/UserLoginMobileTemplate.php
+++ b/includes/skins/UserLoginMobileTemplate.php
@@ -18,8 +18,6 @@
$msgBox = ''; // placeholder for displaying any login-related 
system messages (eg errors)
$headMsg = $this->getHeadMsg();
 
-   MobileContext::singleton()->getSkin()->addArticleClass( 
'noMargins' );
-
// @TODO make sure this also includes returnto and 
returntoquery from the request
$query = array(
'type' => 'signup',
@@ -37,7 +35,7 @@
wfMessage( 'mobile-frontend-main-menu-account-create' 
)->text(),
array( 'class'=> 'mw-mf-create-account' ), $query );
 
-   $login = Html::openElement( 'div', array( 'id' => 'mw-mf-login' 
) );
+   $login = Html::openElement( 'div', array( 'id' => 
'mw-mf-login', 'class' => 'content' ) );
 
if ( $headMsg ) {
$msgBox .= Html::Element( 'div', array( 'class' => 
'headmsg' ), $headMsg );
@@ -60,7 +58,7 @@
'class' => 'watermark' ) );
}
 
-   $form = Html::openElement( 'div', array( 'id' => 
'userloginForm' ) ) .
+   $form = Html::openElement( 'div', array() ) .
Html::openElement( 'form',
array( 'name' => 'userlogin',
'method' => 'post',
diff --git a/includes/specials/SpecialDonateImage.php 
b/includes/specials/SpecialDonat

[MediaWiki-commits] [Gerrit] Standardize the hamburger and remove isOverlay (#375) - change (mediawiki...MobileFrontend)

2013-02-26 Thread JGonera (Code Review)
JGonera has uploaded a new change for review.

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


Change subject: Standardize the hamburger and remove isOverlay (#375)
..

Standardize the hamburger and remove isOverlay (#375)

isOverlay is not needed anymore because all pages are supposed to have
the hamburger. Articles have a searchbox, special pages have a heading.

Change-Id: Ie43b568221a067a0eaf2923bfc3a779bb8ca21ca
---
M includes/MobileContext.php
M includes/skins/SkinMobile.php
M includes/specials/SpecialDonateImage.php
M includes/specials/SpecialMobileMenu.php
M includes/specials/SpecialMobileWatchlist.php
M stylesheets/common/mf-navigation.css
M stylesheets/less/common/mf-navigation.less
7 files changed, 11 insertions(+), 92 deletions(-)


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

diff --git a/includes/MobileContext.php b/includes/MobileContext.php
index 2778e21..c94b19b 100644
--- a/includes/MobileContext.php
+++ b/includes/MobileContext.php
@@ -26,8 +26,6 @@
protected $mobileAction;
 
private $forceMobileView = false;
-   /** @var boolean whether to render as an overlay skin or an article 
skin */
-   private $isOverlay = false;
private $forceLeftMenu = false;
private $contentTransformations = true;
private $mobileView = null;
@@ -138,22 +136,6 @@
 
public function setForceLeftMenu( $value ) {
$this->forceLeftMenu = $value;
-   }
-
-   /**
-* Tell the skin to render in overlay or article mode
-* @param boolean
-*/
-   public function setOverlay( $value ) {
-   $this->isOverlay = $value;
-   }
-
-   /**
-* Decides whether the page should render in the article skin or an 
overlay skin
-* @return boolean
-*/
-   public function isOverlay() {
-   return $this->isOverlay;
}
 
/**
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 8941df8..2724b0e 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -25,19 +25,6 @@
$inBeta = $context->isBetaGroupMember();
$inAlpha = $context->isAlphaGroupMember();
 
-   /**
-* force all non-special pages to render in article skin
-* 
-* NB not all special pages are overlays, so
-* $context->setOverlay( $specialPage ) will not work!
-* @TODO does setOverlay really belong in MobileContext?
-*  probably not. ~awjr
-*/
-   if ( !$specialPage ) {
-   $context->setOverlay( false );
-   }
-
-   $tpl->set( 'isOverlay',  $context->isOverlay() );
$tpl->set( 'action', $context->getRequest()->getText( 'action' 
) );
$tpl->set( 'imagesDisabled', $context->imagesDisabled() );
$tpl->set( 'isAlphaGroupMember', $inAlpha );
@@ -188,23 +175,19 @@
 
/**
 * Prepares the header and the content of a page
-* Stores in QuickTemplate prebodytext, postbodytext, htmlHeader keys
+* Stores in QuickTemplate prebodytext, postbodytext keys
 * @param QuickTemplate
 */
function prepareTemplatePageContent( QuickTemplate $tpl ) {
-   $ctx = MobileContext::singleton();
$title = $this->getTitle();
$isSpecialPage = $title->isSpecialPage();
$isMainPage = $title->isMainPage();
-   $isOverlay = $ctx->isOverlay();
$user = $this->getUser();
$userLogin = $title->isSpecial( 'Userlogin' );
$out = $this->getOutput();
$inBeta = MobileContext::singleton()->isBetaGroupMember();
 
-   if ( $isSpecialPage && !$isOverlay ) {
-   $pageHeading = '';
-   } else if ( $userLogin ) {
+   if ( $userLogin ) {
$pageHeading = $this->getLoginPageHeading();
} else {
$pageHeading = $out->getPageTitle();
@@ -238,14 +221,8 @@
}
 
$htmlHeader = $this->getHtmlHeader();
-   if ( is_null( $htmlHeader ) ) {
-   if ( $isOverlay ) {
-   $htmlHeader = Html::rawElement( 'h1', array( 
'class' => 'header' ),
-   $pageHeading
-   );
-   } else {
-   $htmlHeader = '';
-   }
+   if ( !$htmlHeader && $isSpecialPage ) {
+   $htmlHeader = Html::rawElement( 'h1', array( 'class' => 
'header' ), $pageHeading );
}
 
$tpl->set( 'prebodytext', $preBodyTex

[MediaWiki-commits] [Gerrit] bug 45462: correct nearby dependencies (regression) - change (mediawiki...MobileFrontend)

2013-02-27 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: bug 45462: correct nearby dependencies (regression)
..


bug 45462: correct nearby dependencies (regression)

add the required dependency.. make nearby work again.

Change-Id: I88076867a14c2b7c9bac40316748eec78da17fb9
---
M MobileFrontend.php
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/MobileFrontend.php b/MobileFrontend.php
index c3c10aa..4dd05c2 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -445,6 +445,9 @@
'mobile-frontend-nearby-lookup-error',
'mobile-frontend-nearby-noresults',
),
+   'dependencies' => array(
+   'mobile.stable',
+   ),
),
'search' => array( 'css' => true ),
'watchlist' => array( 'css' => true, 'js' => false,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88076867a14c2b7c9bac40316748eec78da17fb9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] bug 45449 regression: fix diff dependencies - change (mediawiki...MobileFrontend)

2013-02-27 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: bug 45449 regression: fix diff dependencies
..


bug 45449 regression: fix diff dependencies

Change-Id: I75e142717c2a1ed160a3173a629f3f2273d8946d
---
M MobileFrontend.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/MobileFrontend.php b/MobileFrontend.php
index c3c10aa..a1f63fb 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -432,7 +432,10 @@
   * @see ExtMobileFrontend::registerMobileSpecialPageModules()
   */
 $wgMFSpecialModuleStubs = array(
-   'mobilediff' => array( 'alias' => 'watchlist' ),
+   'mobilediff' => array(
+   'alias' => 'watchlist',
+   'dependencies' => array( 'mobile.stable' ),
+   ),
'mobilefeedback' => array( 'css' => true ),
'mobileoptions' => array( 'css' => true, 'js' => true ),
'nearby' => array( 'js' => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I75e142717c2a1ed160a3173a629f3f2273d8946d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] bug 45137: Kill close this section in stable - change (mediawiki...MobileFrontend)

2013-02-27 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: bug 45137: Kill close this section in stable
..


bug 45137: Kill close this section in stable

EventLogging shows this is not getting high usage. Remove in javascript
so users without javascript in mean time can use jump back a section to
get around a large page.

Change-Id: I52c8416aabf1636d981a62fd4c2801932c30abb8
---
M javascripts/modules/mf-toggle.js
M tests/js/test_toggle.js
2 files changed, 4 insertions(+), 19 deletions(-)

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



diff --git a/javascripts/modules/mf-toggle.js b/javascripts/modules/mf-toggle.js
index a7580a9..12eb4e8 100644
--- a/javascripts/modules/mf-toggle.js
+++ b/javascripts/modules/mf-toggle.js
@@ -1,4 +1,4 @@
-( function( M ) {
+( function( M, $ ) {
 
 var toggle = ( function() {
 
@@ -90,11 +90,7 @@
for( i = 0; i < sectionHeadings.length; i++ ) {
heading = sectionHeadings[i];
heading.insertBefore( createButton(), 
heading.firstChild );
-   a = document.getElementById( 'anchor_' + 
heading.id.split( '_' )[ 1 ] );
-   if( a ) {
-   u( a ).text( message( 
'mobile-frontend-close-section' ) );
-   u( a ).bind( 'click', openSectionHandler );
-   }
+   $( '#anchor_' + heading.id.split( '_' )[ 1 ] ).remove();
u( heading ).bind( 'mousedown', openSectionHandler );
}

@@ -124,4 +120,4 @@
 
 M.define( 'toggle', toggle );
 
-}( mw.mobileFrontend ));
+}( mw.mobileFrontend, jQuery ) );
diff --git a/tests/js/test_toggle.js b/tests/js/test_toggle.js
index 51c5283..cab9570 100644
--- a/tests/js/test_toggle.js
+++ b/tests/js/test_toggle.js
@@ -27,13 +27,11 @@
strictEqual($("#section_1").hasClass("openSection"), true, "openSection 
class present");
toggle.wm_toggle_section( '1' );
strictEqual($("#content_1").hasClass("openSection"), false, "check 
content is closed on a toggle");
-   strictEqual($("#anchor_1").hasClass("openSection"), false, "check 
anchor is closed on toggle");
strictEqual($("#section_1").hasClass("openSection"), false, "check 
section is closed");

// perform second toggle
toggle.wm_toggle_section( '1' );
strictEqual($("#content_1").hasClass("openSection"), true, "check 
content reopened");
-   strictEqual($("#anchor_1").hasClass("openSection"), true, "check anchor 
reopened");
strictEqual($("#section_1").hasClass("openSection"), true, "check 
section has reopened");
 });
 
@@ -46,14 +44,12 @@
 test("wm_reveal_for_hash", function() {
toggle.wm_reveal_for_hash( '#First_Section_2' );
strictEqual($("#content_1").hasClass("openSection"), true, "check 
content is visible on a toggle");
-   strictEqual($("#anchor_1").hasClass("openSection"), true, "check anchor 
is visible on toggle");
strictEqual($("#section_1").hasClass("openSection"), true, "check 
section is marked as open");
 });
 
 test("clicking hash links", function() {
$( '[href=#First_Section_2]' ).trigger( 'click' );
strictEqual($("#content_1").hasClass("openSection"), true, "check 
content is visible on a toggle");
-   strictEqual($("#anchor_1").hasClass("openSection"), true, "check anchor 
is visible on toggle");
strictEqual($("#section_1").hasClass("openSection"), true, "check 
section marked as open");
 });
 
@@ -79,14 +75,7 @@
 });
 
 test("close a section", function() {
-   var startVisibility = $("#content_1").hasClass("openSection"), 
endVisibility,
-   closeLink = $("#anchor_1")[0];
-
-   $(closeLink).trigger("click");
-   endVisibility = $("#content_1").hasClass("openSection");
-   strictEqual($(closeLink).text(), 
MFE.message("mobile-frontend-close-section"), "text has been updated");
-   strictEqual(startVisibility, true, "it is open at start");
-   strictEqual(endVisibility, false, "clicking has hidden section 
content");
+   strictEqual( $( '#anchor_1' ).length, 0, 'check anchor is no longer 
present' );
 });
 
 }( jQuery, mw.mobileFrontend, mw.mobileFrontend.require( 'toggle' ) ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I52c8416aabf1636d981a62fd4c2801932c30abb8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] bug 44965: no longer lowercase save settings button - change (mediawiki...MobileFrontend)

2013-02-27 Thread JGonera (Code Review)
JGonera has submitted this change and it was merged.

Change subject: bug 44965: no longer lowercase save settings button
..


bug 44965: no longer lowercase save settings button

Change-Id: I4eefc5f88fdd1cfa9eff0a6e6568d33f841a57a9
---
M stylesheets/less/specials/mobileoptions.less
M stylesheets/specials/mobileoptions.css
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/stylesheets/less/specials/mobileoptions.less 
b/stylesheets/less/specials/mobileoptions.less
index 7f3b044..74aaa72 100644
--- a/stylesheets/less/specials/mobileoptions.less
+++ b/stylesheets/less/specials/mobileoptions.less
@@ -67,6 +67,7 @@
min-width: 50%;
text-align: center;
display: block;
+   text-transform: none;
&:hover {
text-decoration: none;
background-color: @btnblue;
diff --git a/stylesheets/specials/mobileoptions.css 
b/stylesheets/specials/mobileoptions.css
index 2374cb3..09c78b7 100644
--- a/stylesheets/specials/mobileoptions.css
+++ b/stylesheets/specials/mobileoptions.css
@@ -41,6 +41,7 @@
   min-width: 50%;
   text-align: center;
   display: block;
+  text-transform: none;
 }
 form.mw-mf-settings ul li #mw-mf-settings-save:hover {
   text-decoration: none;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4eefc5f88fdd1cfa9eff0a6e6568d33f841a57a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: JGonera 
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   >