X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.rcfilters%2Fui%2Fmw.rcfilters.ui.SavedLinksListItemWidget.js;h=71e3b55c01fb7e3aa14075b5f9c594cfddcece1a;hb=f6870e58acb0828b0b7a3437e00a8989f2437888;hp=3655c1647c0f18fb76ae405abe6e002c206f5e57;hpb=d5618d1e0ff4142ecfc3e953a5ae10189ca2a0e8;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js index 3655c1647c..71e3b55c01 100644 --- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js +++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js @@ -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; } } ); @@ -178,6 +179,18 @@ 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 */