Merge "resourceloader: Simplify StringSet fallback"
[lhc/web/wiklou.git] / resources / src / mediawiki.rcfilters / dm / mw.rcfilters.dm.SavedQueryItemModel.js
index c066a1f..46344cb 100644 (file)
@@ -1,4 +1,4 @@
-( function ( mw ) {
+( function () {
        /**
         * View model for a single saved query
         *
@@ -10,7 +10,7 @@
         * @param {string} label Saved query label
         * @param {Object} data Saved query data
         * @param {Object} [config] Configuration options
-        * @param {boolean} [default] This item is the default
+        * @cfg {boolean} [default] This item is the default
         */
        mw.rcfilters.dm.SavedQueryItemModel = function MwRcfiltersDmSavedQueriesModel( id, label, data, config ) {
                config = config || {};
@@ -42,7 +42,7 @@
        /**
         * Get an object representing the state of this item
         *
-        * @returns {Object} Object representing the current data state
+        * @return {Object} Object representing the current data state
         *  of the object
         */
        mw.rcfilters.dm.SavedQueryItemModel.prototype.getState = function () {
                return this.data;
        };
 
+       /**
+        * Get the combined data of this item as a flat object of parameters
+        *
+        * @return {Object} Combined parameter data
+        */
+       mw.rcfilters.dm.SavedQueryItemModel.prototype.getCombinedData = function () {
+               return $.extend( true, {}, this.data.params, this.data.highlights );
+       };
+
        /**
         * Check whether this item is the default
         *
                        this.emit( 'update' );
                }
        };
-}( mediaWiki ) );
+}() );