MarkTraceur has uploaded a new change for review.

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

Change subject: Move dialogs to the left, make arrows point right
......................................................................

Move dialogs to the left, make arrows point right

Change-Id: If8fc4ca5f902b3dc3271a33c44554d4e46faadb8
---
M resources/mmv/ui/mmv.ui.dialog.js
M resources/mmv/ui/mmv.ui.dialog.less
M resources/mmv/ui/mmv.ui.download.dialog.less
M resources/mmv/ui/mmv.ui.reuse.dialog.less
4 files changed, 7 insertions(+), 33 deletions(-)


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

diff --git a/resources/mmv/ui/mmv.ui.dialog.js 
b/resources/mmv/ui/mmv.ui.dialog.js
index fab6a78..ef2ec01 100644
--- a/resources/mmv/ui/mmv.ui.dialog.js
+++ b/resources/mmv/ui/mmv.ui.dialog.js
@@ -91,7 +91,6 @@
        DP.openDialog = function () {
                this.startListeningToOutsideClick();
                this.$dialog.show();
-               this.fixDownArrowPosition();
                this.isOpen = true;
                this.$openButton.addClass( 'mw-mmv-dialog-open' );
        };
@@ -130,28 +129,6 @@
         */
        DP.stopListeningToOutsideClick = function () {
                $( document ).off( 'click.mmv', this.outsideClickHandler );
-       };
-
-       /**
-        * Fixes the tip of the container to point to the icon which opens it.
-        */
-       DP.fixDownArrowPosition = function() {
-               var buttonPosition,
-                       arrowPositionBase,
-                       buttonWidth,
-                       arrowWidth,
-                       offset;
-
-               buttonPosition = this.$openButton.offset().left;
-               arrowPositionBase = 
this.$downArrow.offsetParent().offset().left;
-               buttonWidth = this.$openButton.outerWidth();
-               arrowWidth = this.$downArrow.outerWidth();
-
-               // this is the correct position of the arrow relative to the 
viewport - we want
-               // the middle of the arrow to be positioned over the middle of 
the button
-               offset = buttonPosition + ( buttonWidth - arrowWidth ) / 2;
-
-               this.$downArrow.css( 'left', ( offset - arrowPositionBase ) + 
'px' );
        };
 
        /**
diff --git a/resources/mmv/ui/mmv.ui.dialog.less 
b/resources/mmv/ui/mmv.ui.dialog.less
index 59df11a..43023b9 100644
--- a/resources/mmv/ui/mmv.ui.dialog.less
+++ b/resources/mmv/ui/mmv.ui.dialog.less
@@ -7,6 +7,7 @@
        @dialog-width: 450px;
 
        position: fixed;
+       right: 58px;
        display: none;
        width: @dialog-width;
        height: @dialog-height;
@@ -18,13 +19,11 @@
        .mw-mmv-dialog-down-arrow {
                @arrow-border-color: #aaaaaa;
 
+               right: 48px;
                background-color: @background-color;
                width: @arrow-size;
                height: @arrow-size;
-               /* @noflip */
-               border-right: @arrow-border-size solid @arrow-border-color;
-               border-bottom: @arrow-border-size solid @arrow-border-color;
-               .rotate(45deg);
+               .rotate(-45deg);
                position: fixed;
        }
 }
diff --git a/resources/mmv/ui/mmv.ui.download.dialog.less 
b/resources/mmv/ui/mmv.ui.download.dialog.less
index 7a83ea2..a0cd33d 100644
--- a/resources/mmv/ui/mmv.ui.download.dialog.less
+++ b/resources/mmv/ui/mmv.ui.download.dialog.less
@@ -9,8 +9,7 @@
 
        // positioned relative to the download button
        position: fixed;
-       right: 5px;
-       bottom: @metadatabar-above-fold-height + @progress-bar-height + 81px;
+       bottom: @metadatabar-above-fold-height + @progress-bar-height + 35px;
 
        .oo-ui-optionWidget {
                @tab-border-height: 3px;
@@ -37,7 +36,7 @@
        }
 
        .mw-mmv-dialog-down-arrow {
-               bottom: @metadatabar-above-fold-height + 76px + ( @arrow-size / 
2 ) - @arrow-border-size;
+               bottom: @metadatabar-above-fold-height + @progress-bar-height + 
45px;
                background-color: #F2F2F2;
        }
 }
diff --git a/resources/mmv/ui/mmv.ui.reuse.dialog.less 
b/resources/mmv/ui/mmv.ui.reuse.dialog.less
index a031b26..6dc1e99 100644
--- a/resources/mmv/ui/mmv.ui.reuse.dialog.less
+++ b/resources/mmv/ui/mmv.ui.reuse.dialog.less
@@ -5,8 +5,7 @@
        @divider-border-height: 1px;
 
        // positioned relative to the reuse button
-       right: 5px;
-       bottom: @metadatabar-above-fold-height + @progress-bar-height + 38px + 
5px;
+       bottom: @metadatabar-above-fold-height + @progress-bar-height - 5px;
 
        .mw-mmv-reuse-tabs {
                @divider-color: rgb(204, 204, 204);
@@ -55,6 +54,6 @@
        }
 
        .mw-mmv-dialog-down-arrow {
-               bottom: @metadatabar-above-fold-height + 38px + ( @arrow-size / 
2 ) - @arrow-border-size;
+               bottom: @metadatabar-above-fold-height + @progress-bar-height + 
5px;
        }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8fc4ca5f902b3dc3271a33c44554d4e46faadb8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to