From 4bafc12326b11435574921544fd523d5e4c1a89c Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 13 Sep 2018 11:17:30 -0600 Subject: [PATCH] Remove doubled taglist header --- api/js/etemplate/et2_extension_nextmatch.js | 86 --------------------- 1 file changed, 86 deletions(-) diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index 7b6bb6dfa9..445e48632c 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -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 */