From d5c810d5c4fcb4c6979de4732e3ab3849a1c1996 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 2 Apr 2014 15:16:12 +0000 Subject: [PATCH] If nextmatch starts hidden (or disabled) it won't size correctly. Added a resize if enabling a disabled nextmatch so it re-calculates its size. --- etemplate/js/et2_extension_nextmatch.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index f6741b6a03..86cbeec085 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -1514,6 +1514,22 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput], set_no_filter2: function(bool) { this.set_no_filter(bool,'filter2'); }, + + /** + * If nextmatch starts disabled, it will need a resize after being shown + * to get all the sizing correct. Override the parent to add the resize + * when enabling. + */ + set_disabled: function(_value) + { + var previous = this.disabled; + this._super.apply(this, arguments); + + if(previous && !_value) + { + this.resize(); + } + }, /** * Actions are handled by the controller, so ignore these during init.