From 521c0f04e812c6f4330b4f59493c71d44541a1a0 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 16 Feb 2016 16:39:53 +0000 Subject: [PATCH] Avoid child indexes not lining up with DOM node indexes, causing wrong widget order in nextmatch header bar by using an extra wrapper around the filters --- etemplate/js/et2_extension_nextmatch.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index f65afe587f..2a328fb00d 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -2280,6 +2280,8 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, this.header_div = this.row_div = jQuery(document.createElement("div")) .addClass("nextmatch_header_row") .appendTo(this.div); + this.filter_div = jQuery(document.createElement("div")) + .appendTo(this.row_div); // Search this.search_box = jQuery(document.createElement("div")) @@ -2722,8 +2724,8 @@ var et2_nextmatch_header_bar = et2_DOMWidget.extend(et2_INextmatchHeader, { if(_sender == filters[i]) { - // Give them the row div - return this.row_div[0]; + // Give them the filter div + return this.filter_div[0]; } } if(_sender == this.et2_searchbox) return this.search_box[0];