From dc9a52c9e0e63758fcf224fbe1171e24c17e8f44 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Thu, 18 Nov 2010 16:41:09 +0000 Subject: [PATCH] Improved implementation of the 'autocomplete' input and fix of quite a few related issue with aysnchronous inputs. Autocompletes are now restricted to external keys only. Some details: - Autocomplete now matches on 'contains' instead of 'begins with' - The minimum size of this match is configurable in the config file and per attribute ('min_autocomplete_chars'). - The maximum size that turns a drop-down list into an autocomplete is configurable in the config-file and per attribute ('max_combo_length'). - Better feedback when expanding/collapsing search results lists. - 'Pointer' cursor on the link to Expand/Collapse results lists. - The 'mandatory' state of an attribute is no longer lost when some part of a form is reloaded asynchronously SVN:trunk[947] --- application/ajaxwebpage.class.inc.php | 12 ++ application/cmdbabstract.class.inc.php | 144 ++++++++------ application/displayblock.class.inc.php | 33 ++-- .../ui.autocompletewidget.class.inc.php | 185 ++++++++++++++++++ application/webpage.class.inc.php | 13 +- core/attributedef.class.inc.php | 24 ++- core/config.class.inc.php | 16 ++ core/filterdef.class.inc.php | 4 +- core/metamodel.class.php | 8 +- core/valuesetdef.class.inc.php | 8 +- css/light-grey.css | 3 + images/mini_search.gif | Bin 0 -> 148 bytes js/autocompletewidget.js | 177 +++++++++++++++++ js/utils.js | 80 +++++--- pages/UI.php | 5 + pages/ajax.render.php | 33 +++- 16 files changed, 621 insertions(+), 124 deletions(-) create mode 100644 application/ui.autocompletewidget.class.inc.php create mode 100644 images/mini_search.gif create mode 100644 js/autocompletewidget.js diff --git a/application/ajaxwebpage.class.inc.php b/application/ajaxwebpage.class.inc.php index 02543379a..92a2dd901 100644 --- a/application/ajaxwebpage.class.inc.php +++ b/application/ajaxwebpage.class.inc.php @@ -60,6 +60,7 @@ class ajax_page extends WebPage $s_captured_output = ob_get_contents(); ob_end_clean(); echo $this->s_content; + echo $this->s_deferred_content; if (!empty($this->m_sReadyScript)) { echo "