From f2943791da28d6700b459b92ab4c657402013af8 Mon Sep 17 00:00:00 2001 From: mcramer <m.cramer@pixcept.de> Date: Fri, 19 Oct 2012 11:08:28 -0400 Subject: [PATCH] Fixed: Flags are missing on some country selectors --- interface/web/js/jquery.tipsy.js | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/interface/web/js/jquery.tipsy.js b/interface/web/js/jquery.tipsy.js index 77836f8..bd52335 100644 --- a/interface/web/js/jquery.tipsy.js +++ b/interface/web/js/jquery.tipsy.js @@ -278,7 +278,7 @@ ")(?![^<>]*>)(?![^&;]+;)", "gi" ), "<strong>$1</strong>" )), value: text, - class: (select.hasClass('flags') ? 'country-' + $(this).val() : $(this).attr('class')), + class: (select.hasClass('flags') ? 'country-' + $(this).val().toUpperCase() : $(this).attr('class')), option: this }; }) ); @@ -292,6 +292,8 @@ select.onchange( { target: select } ); } else if($(select).attr('onchange')) { eval($(select).attr('onchange')); + } else { + if(!ui.item.internal) $(select).change(); } if (jQuery(".panel #Filter").length > 0) { jQuery(".panel #Filter").trigger('click'); @@ -335,7 +337,7 @@ }); if(!valid) return false; - $(this).autocomplete('option','select').call($(this), event, { item: { option: selected.get(0) } }); + $(this).autocomplete('option','select').call($(this), event, { item: { option: selected.get(0), internal: true } }); } }) .addClass( "ui-widget ui-widget-content ui-corner-left" ); @@ -363,7 +365,7 @@ }); if(!valid) return false; - input.val($(this).val()).autocomplete('option','select').call(input, (e ? e : {target: select}), { item: { option: selected.get(0) } }); + input.val($(this).val()).autocomplete('option','select').call(input, (e ? e : {target: select}), { item: { option: selected.get(0), internal: true } }); }); $( "<a>" ) -- Gitblit v1.9.1