Merge "mediawiki.skinning: Vertical align inline media in Parsoid output"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 24 Aug 2017 01:55:10 +0000 (01:55 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 24 Aug 2017 01:55:10 +0000 (01:55 +0000)
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.SavedLinksListItemWidget.less
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js

index 2daa76e..e7433e2 100644 (file)
                // then the icon needs to be slightly smaller as well, so that
                // when we toggle 'default' the icon doesn't bounce the option
                // height up a little
-               width: 1.7em;
-               height: 1.7em;
+               width: 1.2em;
+               height: 1.2em;
+               min-width: 16px;
+               min-height: 16px;
+               opacity: 0.5;
        }
 
        &-icon span {
index 3655c16..71e3b55 100644 (file)
@@ -93,6 +93,7 @@
                } );
                this.$element.on( { click: this.onClick.bind( this ) } );
                this.$label.on( { click: this.onClick.bind( this ) } );
+               this.$icon.on( { click: this.onDefaultIconClick.bind( this ) } );
                // Prevent propagation on mousedown for the save button
                // so the menu doesn't close
                this.saveButton.$element.on( { mousedown: function () { return false; } } );
                        this.emit( 'click' );
                }
        };
+
+       /**
+        * Respond to click on the 'default' icon. Open the submenu where the
+        * default state can be changed.
+        *
+        * @return {boolean} false
+        */
+       mw.rcfilters.ui.SavedLinksListItemWidget.prototype.onDefaultIconClick = function () {
+               this.menu.toggle();
+               return false;
+       };
+
        /**
         * Respond to popup button click event
         */