RCFilters UI: Select tag when filter item is selected
[lhc/web/wiklou.git] / resources / src / mediawiki.rcfilters / ui / mw.rcfilters.ui.FilterTagItemWidget.js
index cfffc65..f79e013 100644 (file)
@@ -18,6 +18,7 @@
 
                this.controller = controller;
                this.model = model;
+               this.selected = false;
 
                mw.rcfilters.ui.FilterTagItemWidget.parent.call( this, $.extend( {
                        data: this.model.getName(),
                }
        };
 
+       /**
+        * Get the selected state of this widget
+        *
+        * @return {boolean} Tag is selected
+        */
+       mw.rcfilters.ui.FilterTagItemWidget.prototype.isSelected = function () {
+               return this.selected;
+       };
+
        /**
         * Get item name
         *