If there are 2 or less options for a filterheader, disable multiple toggle

This commit is contained in:
Nathan Gray 2016-05-11 19:56:06 +00:00
parent e38fa525ef
commit da4fd02a7f

View File

@ -3292,6 +3292,19 @@ var et2_nextmatch_filterheader = (function(){ "use strict"; return et2_taglist.e
this._super.apply(this, arguments);
},
/**
* Disable toggle if there are 2 or less options
* @param {Object[]} options
*/
set_select_options: function(options)
{
if(options && options.length <= 2 && this.options.multiple == 'toggle')
{
this.set_multiple(false)
}
this._super.apply(this, arguments);
},
/**
* Set nextmatch is the function which has to be implemented for the
* et2_INextmatchHeader interface.