Remove doubled taglist header

This commit is contained in:
nathangray 2018-09-13 11:17:30 -06:00
parent 075c7851db
commit 4bafc12326

View File

@ -3527,92 +3527,6 @@ var et2_nextmatch_taglistheader = (function(){ "use strict"; return et2_taglist.
});}).call(this);
et2_register_widget(et2_nextmatch_taglistheader, ['nextmatch-taglistheader']);
/**
* Filter allowing multiple values to be selected, base on a taglist instead
* of a regular selectbox
*
* @augments et2_taglist
*/
var et2_nextmatch_taglistheader = (function(){ "use strict"; return et2_taglist.extend([et2_INextmatchHeader, et2_IResizeable],
{
attributes: {
autocomplete_url: { default: ''},
multiple: { default: 'toggle'},
onchange: {
default: function(event) {
if(typeof this.nextmatch === 'undefined')
{
// Not fully set up yet
return;
}
var col_filter = {};
col_filter[this.id] = this.getValue();
// Set value so it's there for response (otherwise it gets cleared if options are updated)
//event.data.set_value(event.data.input.val());
this.nextmatch.applyFilters({col_filter: col_filter});
}
},
rows: { default: 2},
class: {default: 'nm_filterheader_taglist'}
},
/**
* Override to add change handler
*
* @memberOf et2_nextmatch_filterheader
*/
createInputWidget: function() {
// Make sure there's an option for all
if(!this.options.empty_label && (!this.options.select_options || !this.options.select_options[""]))
{
this.options.empty_label = this.options.label ? this.options.label : egw.lang("All");
}
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.
*
* @param {et2_nextmatch} _nextmatch
*/
setNextmatch: function(_nextmatch) {
this.nextmatch = _nextmatch;
// Set current filter value from nextmatch settings
if(this.nextmatch.activeFilters.col_filter && typeof this.nextmatch.activeFilters.col_filter[this.id] != "undefined")
{
this.set_value(this.nextmatch.activeFilters.col_filter[this.id]);
// Make sure it's set in the nextmatch
_nextmatch.activeFilters.col_filter[this.id] = this.getValue();
}
},
// Make sure selectbox is not longer than the column
resize: function() {
this.div.css("height",'');
this.div.css("max-width",jQuery(this.parentNode).innerWidth() + "px");
this._super.apply(this, arguments);
}
});}).call(this);
et2_register_widget(et2_nextmatch_taglistheader, ['nextmatch-taglistheader']);
/**
* @augments et2_link_entry
*/