From c7f0b83c0da6f807f5859d5d666c1dfd009019b9 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 06 Nov 2012 10:11:11 -0500
Subject: [PATCH] Implemented: FS#2437 - iterate_query in dovecot-sql.conf is missing The query is added for reference and is commented out by default as it is not compatible with dovecot 1.2 and not required by ispconfig.

---
 interface/web/js/jquery.tipsy.js |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/interface/web/js/jquery.tipsy.js b/interface/web/js/jquery.tipsy.js
index efe9612..9550eea 100644
--- a/interface/web/js/jquery.tipsy.js
+++ b/interface/web/js/jquery.tipsy.js
@@ -250,12 +250,13 @@
             var input,
                 self = this,
                 select = this.element,
+                internal = false,
                 selected = select.children( ":selected" ),
                 value = selected.val() ? selected.text() : "",
                 wrapper = this.wrapper = $( "<span>" )
                     .addClass( "ui-combobox" )
                     .insertAfter( select );
-
+            
             input = $( "<input>" ).css( { "width": (select.is(':visible') ? (elwidth > 15 ? elwidth - 15 : 1) : 350), "height": (elheight > 0 ? elheight : 16) });
             select.hide();
             input.appendTo( wrapper )
@@ -277,8 +278,8 @@
                                             $.ui.autocomplete.escapeRegex(request.term) +
                                             ")(?![^<>]*>)(?![^&;]+;)", "gi"
                                         ), "<strong>$1</strong>" )),
-                                    value: text,
-                                    class: (select.hasClass('flags') ? 'country-' + $(this).val().toUpperCase() : $(this).attr('class')),
+                                    'value': (text ? text : ''),
+                                    'class': (select.hasClass('flags') ? 'country-' + ($(this).val() ? $(this).val().toUpperCase() : '') : $(this).attr('class')),
                                     option: this
                                 };
                         }) );
@@ -293,7 +294,10 @@
                         } else if($(select).attr('onchange')) {
                             eval($(select).attr('onchange'));
                         } else {
-                            if(!ui.item.internal) $(select).change();
+                            if(!ui.item.internal) {
+                                internal = true;
+                                $(select).change();
+                            }
                         }
                         if (jQuery(".panel #Filter").length > 0) {
                             jQuery(".panel #Filter").trigger('click');
@@ -348,10 +352,14 @@
                     .data( "item.autocomplete", item )
                     .append( "<a>" + item.label + "</a>" )
                     .appendTo( ul );
-                if(item.class) el.addClass(item.class);
+                if(item && item['class'] && el) el.addClass(item['class']);
                 return el;
             };
             select.change(function(e) {
+                if(internal == true) {
+                    internal = false;
+                    return;
+                }
                 var matcher = new RegExp( "" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "", "i" ),
                     matchtext = $(this).val();
                     valid = false,

--
Gitblit v1.9.1