Merge "Use "break" instead of "continue""
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets / mw.widgets.TitleOptionWidget.js
index 638f461..76d4bfb 100644 (file)
@@ -23,6 +23,7 @@
         * @cfg {boolean} [redirect] Page is a redirect
         * @cfg {boolean} [disambiguation] Page is a disambiguation page
         * @cfg {string} [query] Matching query string to highlight
+        * @cfg {string} [compare] String comparison function for query highlighting
         */
        mw.widgets.TitleOptionWidget = function MwWidgetsTitleOptionWidget( config ) {
                var icon;
@@ -50,6 +51,9 @@
                // Parent constructor
                mw.widgets.TitleOptionWidget.parent.call( this, config );
 
+               // Remove check icon
+               this.checkIcon.$element.remove();
+
                // Initialization
                this.$label.attr( 'href', config.url );
                this.$element.addClass( 'mw-widget-titleOptionWidget' );
@@ -69,7 +73,7 @@
 
                // Highlight matching parts of link suggestion
                if ( config.query ) {
-                       this.setHighlightedQuery( config.data, config.query );
+                       this.setHighlightedQuery( config.data, config.query, config.compare );
                }
                this.$label.attr( 'title', config.data );