mcramer
2012-10-17 c281e23e2ae5d9ba6021f74ed7327cfd1ab4fce8
Fixed: Autoresponder select boxes

2 files modified
17 ■■■■■ changed files
interface/web/js/jquery.tipsy.js 16 ●●●●● patch | view | raw | blame | history
interface/web/js/uni-form/uni-form.jquery.js 1 ●●●● patch | view | raw | blame | history
interface/web/js/jquery.tipsy.js
@@ -345,6 +345,22 @@
                    .append( "<a>" + item.label + "</a>" )
                    .appendTo( ul );
            };
            select.change(function(e) {
                var matcher = new RegExp( "" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "", "i" ),
                    matchtext = $(this).val();
                    valid = false,
                    selected = false;
                select.children( "option" ).each(function() {
                    if( ($(this).val() == "" && matchtext == "") || $( this ).text().match( matcher ) ) {
                        valid = true;
                        selected = $(this);
                        return false;
                    }
                });
                if(!valid) return false;
                input.val($(this).val()).autocomplete('option','select').call(input, (e ? e : {target: select}), { item: { option: selected.get(0) } });
            });
            $( "<a>" )
                .attr( "tabIndex", -1 )
interface/web/js/uni-form/uni-form.jquery.js
@@ -101,6 +101,7 @@
        unit_obj = $("#"+ datetime_id + "_" + unit_name);
        if (unit_obj.val() !== null) {
            unit_obj.val(unit_value);
            unit_obj.change();
        }
    });
}