[MediaWiki-commits] [Gerrit] Backport IE and tipsy bugfixes - change (mediawiki...MultimediaViewer)

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

Change subject: Backport IE and tipsy bugfixes
..


Backport IE and tipsy bugfixes

This is a compilation of those commits:
2adf7a200886838ff0de5a8b4b61e3bfbbbf231a
184d59e2bfc59ab79fb8830c8a30e76b83518af7

Bug: 72516
Bug: 73337
Change-Id: I4cda3b508a16b7320ff367b269763aebd8949478
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/1005
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/996
---
M resources/mmv/mmv.lightboxinterface.js
M resources/mmv/ui/mmv.ui.canvas.js
M resources/mmv/ui/mmv.ui.canvasButtons.js
M resources/mmv/ui/mmv.ui.metadataPanel.js
M resources/mmv/ui/mmv.ui.metadataPanelScroller.js
M resources/mmv/ui/mmv.ui.stripeButtons.js
M resources/mmv/ui/mmv.ui.tipsyDialog.js
7 files changed, 50 insertions(+), 48 deletions(-)

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



diff --git a/resources/mmv/mmv.lightboxinterface.js 
b/resources/mmv/mmv.lightboxinterface.js
index 2850671..0eac0bf 100644
--- a/resources/mmv/mmv.lightboxinterface.js
+++ b/resources/mmv/mmv.lightboxinterface.js
@@ -224,11 +224,12 @@
LIP.unattach = function () {
mw.mmv.actionLogger.log( 'close' );
 
+   // Has to happen first so that the scroller can freeze with 
visible elements
+   this.panel.unattach();
+
this.$wrapper.detach();
 
this.currentlyAttached = false;
-
-   this.panel.unattach();
 
this.canvas.unattach();
 
diff --git a/resources/mmv/ui/mmv.ui.canvas.js 
b/resources/mmv/ui/mmv.ui.canvas.js
index 0e07180..43ee9d0 100644
--- a/resources/mmv/ui/mmv.ui.canvas.js
+++ b/resources/mmv/ui/mmv.ui.canvas.js
@@ -233,10 +233,6 @@
$( window ).off( 'resize.mmv-canvas' );
 
this.$imageDiv.off( 'click.mmv-canvas' );
-
-   if ( this.$image ) {
-   this.$image.tipsy( 'hide' );
-   }
};
 
/**
diff --git a/resources/mmv/ui/mmv.ui.canvasButtons.js 
b/resources/mmv/ui/mmv.ui.canvasButtons.js
index 414951b..9f2af0e 100644
--- a/resources/mmv/ui/mmv.ui.canvasButtons.js
+++ b/resources/mmv/ui/mmv.ui.canvasButtons.js
@@ -240,17 +240,30 @@
this.handleEvent( 'mmv-options-closed', function () {
buttons.$options.removeClass( 'open' );
} );
+
+   this.$download
+   .add( this.$reuse )
+   .add( this.$options )
+   .add( this.$close )
+   .add( this.$fullscreen )
+   .each( function () {
+   $( this ).tipsy( 'enable' );
+   } );
};
 
/**
 * Removes all UI things from the DOM, or hides them
 */
CBP.unattach = function () {
-   this.$download.off( 'click.mmv-canvasButtons' ).tipsy( 'hide' );
-   this.$reuse.off( 'click.mmv-canvasButtons' ).tipsy( 'hide' );
-   this.$options.off( 'click.mmv-canvasButtons' ).tipsy( 'hide' );
-   this.$close.tipsy( 'hide' );
-   this.$fullscreen.tipsy( 'hide' );
+   this.$download
+   .add( this.$reuse )
+   .add( this.$options )
+   .add( this.$close )
+   .add( this.$fullscreen )
+   .off( 'click.mmv-canvasButtons' )
+   .each( function () {
+   $( this ).tipsy( 'hide' ).tipsy( 'disable' );
+   } );
};
 
CBP.empty = function () {
diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js 
b/resources/mmv/ui/mmv.ui.metadataPanel.js
index 82c5ab3..c88392c 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanel.js
+++ b/resources/mmv/ui/mmv.ui.metadataPanel.js
@@ -80,11 +80,26 @@
this.handleEvent( 'jq-fullscreen-change.lip', function() {
panel.hideTruncatedText();
} );
+
+   this.$title
+   .add( this.title.$ellipsis )
+   .add( this.$authorAndSource )
+   .add( this.creditField.$ellipsis )
+   .each( function () {
+   $( this ).tipsy( 'enable' );
+   } );
};
 
MPP.unattach = function() {
-   this.$title.add( this.title.$ellipsis ).tipsy( 'hide' );
-   this.$authorAndSource.add( this.creditField.$ellipsis ).tipsy( 
'hide' );
+   this.scroller.freezeHeight();
+
+   this.$title
+   .add( this.title.$ellipsis )
+   .add( this.$authorAndSource )
+   .add( this.creditField.$ellipsis )
+   .each( fun

[MediaWiki-commits] [Gerrit] Backport IE and tipsy bugfixes - change (mediawiki...MultimediaViewer)

2014-11-20 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Backport IE and tipsy bugfixes
..

Backport IE and tipsy bugfixes

This is a compilation of those commits:
2adf7a200886838ff0de5a8b4b61e3bfbbbf231a
184d59e2bfc59ab79fb8830c8a30e76b83518af7

Bug: 72516
Bug: 73337
Change-Id: I4cda3b508a16b7320ff367b269763aebd8949478
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/1005
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/996
---
M resources/mmv/mmv.lightboxinterface.js
M resources/mmv/ui/mmv.ui.canvas.js
M resources/mmv/ui/mmv.ui.canvasButtons.js
M resources/mmv/ui/mmv.ui.metadataPanel.js
M resources/mmv/ui/mmv.ui.metadataPanelScroller.js
M resources/mmv/ui/mmv.ui.stripeButtons.js
M resources/mmv/ui/mmv.ui.tipsyDialog.js
7 files changed, 50 insertions(+), 48 deletions(-)


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

diff --git a/resources/mmv/mmv.lightboxinterface.js 
b/resources/mmv/mmv.lightboxinterface.js
index 2850671..0eac0bf 100644
--- a/resources/mmv/mmv.lightboxinterface.js
+++ b/resources/mmv/mmv.lightboxinterface.js
@@ -224,11 +224,12 @@
LIP.unattach = function () {
mw.mmv.actionLogger.log( 'close' );
 
+   // Has to happen first so that the scroller can freeze with 
visible elements
+   this.panel.unattach();
+
this.$wrapper.detach();
 
this.currentlyAttached = false;
-
-   this.panel.unattach();
 
this.canvas.unattach();
 
diff --git a/resources/mmv/ui/mmv.ui.canvas.js 
b/resources/mmv/ui/mmv.ui.canvas.js
index 0e07180..43ee9d0 100644
--- a/resources/mmv/ui/mmv.ui.canvas.js
+++ b/resources/mmv/ui/mmv.ui.canvas.js
@@ -233,10 +233,6 @@
$( window ).off( 'resize.mmv-canvas' );
 
this.$imageDiv.off( 'click.mmv-canvas' );
-
-   if ( this.$image ) {
-   this.$image.tipsy( 'hide' );
-   }
};
 
/**
diff --git a/resources/mmv/ui/mmv.ui.canvasButtons.js 
b/resources/mmv/ui/mmv.ui.canvasButtons.js
index 414951b..9f2af0e 100644
--- a/resources/mmv/ui/mmv.ui.canvasButtons.js
+++ b/resources/mmv/ui/mmv.ui.canvasButtons.js
@@ -240,17 +240,30 @@
this.handleEvent( 'mmv-options-closed', function () {
buttons.$options.removeClass( 'open' );
} );
+
+   this.$download
+   .add( this.$reuse )
+   .add( this.$options )
+   .add( this.$close )
+   .add( this.$fullscreen )
+   .each( function () {
+   $( this ).tipsy( 'enable' );
+   } );
};
 
/**
 * Removes all UI things from the DOM, or hides them
 */
CBP.unattach = function () {
-   this.$download.off( 'click.mmv-canvasButtons' ).tipsy( 'hide' );
-   this.$reuse.off( 'click.mmv-canvasButtons' ).tipsy( 'hide' );
-   this.$options.off( 'click.mmv-canvasButtons' ).tipsy( 'hide' );
-   this.$close.tipsy( 'hide' );
-   this.$fullscreen.tipsy( 'hide' );
+   this.$download
+   .add( this.$reuse )
+   .add( this.$options )
+   .add( this.$close )
+   .add( this.$fullscreen )
+   .off( 'click.mmv-canvasButtons' )
+   .each( function () {
+   $( this ).tipsy( 'hide' ).tipsy( 'disable' );
+   } );
};
 
CBP.empty = function () {
diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js 
b/resources/mmv/ui/mmv.ui.metadataPanel.js
index 82c5ab3..c88392c 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanel.js
+++ b/resources/mmv/ui/mmv.ui.metadataPanel.js
@@ -80,11 +80,26 @@
this.handleEvent( 'jq-fullscreen-change.lip', function() {
panel.hideTruncatedText();
} );
+
+   this.$title
+   .add( this.title.$ellipsis )
+   .add( this.$authorAndSource )
+   .add( this.creditField.$ellipsis )
+   .each( function () {
+   $( this ).tipsy( 'enable' );
+   } );
};
 
MPP.unattach = function() {
-   this.$title.add( this.title.$ellipsis ).tipsy( 'hide' );
-   this.$authorAndSource.add( this.creditField.$ellipsis ).tipsy( 
'hide' );
+   this.scroller.freezeHeight();
+
+   this.$title
+   .add( this.title.$ellipsis )
+   .add( this.$authorAndSource )
+   .add(

[MediaWiki-commits] [Gerrit] Backport IE and tipsy bugfixes - change (mediawiki...MultimediaViewer)

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

Change subject: Backport IE and tipsy bugfixes
..


Backport IE and tipsy bugfixes

This is a compilation of those commits:
2adf7a200886838ff0de5a8b4b61e3bfbbbf231a
184d59e2bfc59ab79fb8830c8a30e76b83518af7

Bug: 72516
Bug: 73337
Change-Id: I4cda3b508a16b7320ff367b269763aebd8949478
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/1005
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/996
---
M resources/mmv/mmv.lightboxinterface.js
M resources/mmv/ui/mmv.ui.canvas.js
M resources/mmv/ui/mmv.ui.canvasButtons.js
M resources/mmv/ui/mmv.ui.metadataPanel.js
M resources/mmv/ui/mmv.ui.metadataPanelScroller.js
M resources/mmv/ui/mmv.ui.stripeButtons.js
M resources/mmv/ui/mmv.ui.tipsyDialog.js
7 files changed, 50 insertions(+), 48 deletions(-)

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



diff --git a/resources/mmv/mmv.lightboxinterface.js 
b/resources/mmv/mmv.lightboxinterface.js
index e33a6ad..92aa5cc 100644
--- a/resources/mmv/mmv.lightboxinterface.js
+++ b/resources/mmv/mmv.lightboxinterface.js
@@ -224,11 +224,12 @@
LIP.unattach = function () {
mw.mmv.actionLogger.log( 'close' );
 
+   // Has to happen first so that the scroller can freeze with 
visible elements
+   this.panel.unattach();
+
this.$wrapper.detach();
 
this.currentlyAttached = false;
-
-   this.panel.unattach();
 
this.canvas.unattach();
 
diff --git a/resources/mmv/ui/mmv.ui.canvas.js 
b/resources/mmv/ui/mmv.ui.canvas.js
index 0e07180..43ee9d0 100644
--- a/resources/mmv/ui/mmv.ui.canvas.js
+++ b/resources/mmv/ui/mmv.ui.canvas.js
@@ -233,10 +233,6 @@
$( window ).off( 'resize.mmv-canvas' );
 
this.$imageDiv.off( 'click.mmv-canvas' );
-
-   if ( this.$image ) {
-   this.$image.tipsy( 'hide' );
-   }
};
 
/**
diff --git a/resources/mmv/ui/mmv.ui.canvasButtons.js 
b/resources/mmv/ui/mmv.ui.canvasButtons.js
index 414951b..9f2af0e 100644
--- a/resources/mmv/ui/mmv.ui.canvasButtons.js
+++ b/resources/mmv/ui/mmv.ui.canvasButtons.js
@@ -240,17 +240,30 @@
this.handleEvent( 'mmv-options-closed', function () {
buttons.$options.removeClass( 'open' );
} );
+
+   this.$download
+   .add( this.$reuse )
+   .add( this.$options )
+   .add( this.$close )
+   .add( this.$fullscreen )
+   .each( function () {
+   $( this ).tipsy( 'enable' );
+   } );
};
 
/**
 * Removes all UI things from the DOM, or hides them
 */
CBP.unattach = function () {
-   this.$download.off( 'click.mmv-canvasButtons' ).tipsy( 'hide' );
-   this.$reuse.off( 'click.mmv-canvasButtons' ).tipsy( 'hide' );
-   this.$options.off( 'click.mmv-canvasButtons' ).tipsy( 'hide' );
-   this.$close.tipsy( 'hide' );
-   this.$fullscreen.tipsy( 'hide' );
+   this.$download
+   .add( this.$reuse )
+   .add( this.$options )
+   .add( this.$close )
+   .add( this.$fullscreen )
+   .off( 'click.mmv-canvasButtons' )
+   .each( function () {
+   $( this ).tipsy( 'hide' ).tipsy( 'disable' );
+   } );
};
 
CBP.empty = function () {
diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js 
b/resources/mmv/ui/mmv.ui.metadataPanel.js
index 82c5ab3..c88392c 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanel.js
+++ b/resources/mmv/ui/mmv.ui.metadataPanel.js
@@ -80,11 +80,26 @@
this.handleEvent( 'jq-fullscreen-change.lip', function() {
panel.hideTruncatedText();
} );
+
+   this.$title
+   .add( this.title.$ellipsis )
+   .add( this.$authorAndSource )
+   .add( this.creditField.$ellipsis )
+   .each( function () {
+   $( this ).tipsy( 'enable' );
+   } );
};
 
MPP.unattach = function() {
-   this.$title.add( this.title.$ellipsis ).tipsy( 'hide' );
-   this.$authorAndSource.add( this.creditField.$ellipsis ).tipsy( 
'hide' );
+   this.scroller.freezeHeight();
+
+   this.$title
+   .add( this.title.$ellipsis )
+   .add( this.$authorAndSource )
+   .add( this.creditField.$ellipsis )
+   .each( fun

[MediaWiki-commits] [Gerrit] Backport IE and tipsy bugfixes - change (mediawiki...MultimediaViewer)

2014-11-20 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Backport IE and tipsy bugfixes
..

Backport IE and tipsy bugfixes

This is a compilation of those commits:
2adf7a200886838ff0de5a8b4b61e3bfbbbf231a
184d59e2bfc59ab79fb8830c8a30e76b83518af7

Bug: 72516
Bug: 73337
Change-Id: I4cda3b508a16b7320ff367b269763aebd8949478
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/1005
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/996
---
M resources/mmv/mmv.lightboxinterface.js
M resources/mmv/ui/mmv.ui.canvas.js
M resources/mmv/ui/mmv.ui.canvasButtons.js
M resources/mmv/ui/mmv.ui.metadataPanel.js
M resources/mmv/ui/mmv.ui.metadataPanelScroller.js
M resources/mmv/ui/mmv.ui.stripeButtons.js
M resources/mmv/ui/mmv.ui.tipsyDialog.js
7 files changed, 50 insertions(+), 48 deletions(-)


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

diff --git a/resources/mmv/mmv.lightboxinterface.js 
b/resources/mmv/mmv.lightboxinterface.js
index e33a6ad..92aa5cc 100644
--- a/resources/mmv/mmv.lightboxinterface.js
+++ b/resources/mmv/mmv.lightboxinterface.js
@@ -224,11 +224,12 @@
LIP.unattach = function () {
mw.mmv.actionLogger.log( 'close' );
 
+   // Has to happen first so that the scroller can freeze with 
visible elements
+   this.panel.unattach();
+
this.$wrapper.detach();
 
this.currentlyAttached = false;
-
-   this.panel.unattach();
 
this.canvas.unattach();
 
diff --git a/resources/mmv/ui/mmv.ui.canvas.js 
b/resources/mmv/ui/mmv.ui.canvas.js
index 0e07180..43ee9d0 100644
--- a/resources/mmv/ui/mmv.ui.canvas.js
+++ b/resources/mmv/ui/mmv.ui.canvas.js
@@ -233,10 +233,6 @@
$( window ).off( 'resize.mmv-canvas' );
 
this.$imageDiv.off( 'click.mmv-canvas' );
-
-   if ( this.$image ) {
-   this.$image.tipsy( 'hide' );
-   }
};
 
/**
diff --git a/resources/mmv/ui/mmv.ui.canvasButtons.js 
b/resources/mmv/ui/mmv.ui.canvasButtons.js
index 414951b..9f2af0e 100644
--- a/resources/mmv/ui/mmv.ui.canvasButtons.js
+++ b/resources/mmv/ui/mmv.ui.canvasButtons.js
@@ -240,17 +240,30 @@
this.handleEvent( 'mmv-options-closed', function () {
buttons.$options.removeClass( 'open' );
} );
+
+   this.$download
+   .add( this.$reuse )
+   .add( this.$options )
+   .add( this.$close )
+   .add( this.$fullscreen )
+   .each( function () {
+   $( this ).tipsy( 'enable' );
+   } );
};
 
/**
 * Removes all UI things from the DOM, or hides them
 */
CBP.unattach = function () {
-   this.$download.off( 'click.mmv-canvasButtons' ).tipsy( 'hide' );
-   this.$reuse.off( 'click.mmv-canvasButtons' ).tipsy( 'hide' );
-   this.$options.off( 'click.mmv-canvasButtons' ).tipsy( 'hide' );
-   this.$close.tipsy( 'hide' );
-   this.$fullscreen.tipsy( 'hide' );
+   this.$download
+   .add( this.$reuse )
+   .add( this.$options )
+   .add( this.$close )
+   .add( this.$fullscreen )
+   .off( 'click.mmv-canvasButtons' )
+   .each( function () {
+   $( this ).tipsy( 'hide' ).tipsy( 'disable' );
+   } );
};
 
CBP.empty = function () {
diff --git a/resources/mmv/ui/mmv.ui.metadataPanel.js 
b/resources/mmv/ui/mmv.ui.metadataPanel.js
index 82c5ab3..c88392c 100644
--- a/resources/mmv/ui/mmv.ui.metadataPanel.js
+++ b/resources/mmv/ui/mmv.ui.metadataPanel.js
@@ -80,11 +80,26 @@
this.handleEvent( 'jq-fullscreen-change.lip', function() {
panel.hideTruncatedText();
} );
+
+   this.$title
+   .add( this.title.$ellipsis )
+   .add( this.$authorAndSource )
+   .add( this.creditField.$ellipsis )
+   .each( function () {
+   $( this ).tipsy( 'enable' );
+   } );
};
 
MPP.unattach = function() {
-   this.$title.add( this.title.$ellipsis ).tipsy( 'hide' );
-   this.$authorAndSource.add( this.creditField.$ellipsis ).tipsy( 
'hide' );
+   this.scroller.freezeHeight();
+
+   this.$title
+   .add( this.title.$ellipsis )
+   .add( this.$authorAndSource )
+   .add(