$(function() { // Since IE6 does not respect z-index and always puts selects on top of EVERYTHING, // track which dialogs are open and hide/show the selects on the layer below each // newly opened dialog so that they don't obscure the dialog itself // Don't track for auto opens since they may appear earlier than this script which could // cause the page layer to not be tracked and cause an error when the user attempts to // hide the dialog var ver = app.ie_ver(); if(ver == 6) { app.dialog_stack = []; $('body').delegate('.ui-dialog-content', 'dialogopen', function() { var modal = $(this).dialog('option', 'modal'); var autoOpen = $(this).dialog('option', 'autoOpen'); if(modal && !autoOpen) { var cnt = app.dialog_stack.length; var t = this; app.dialog_stack[cnt] = function() {return t}; if(cnt < 1) { var $el = $('table').eq(0); } else { var $el = $(app.dialog_stack[cnt - 1]()); } $('select', $el).addClass('ie6-hide-select'); } }); $('body').delegate('.ui-dialog-content', 'dialogclose', function() { var modal = $(this).dialog('option', 'modal'); var autoOpen = $(this).dialog('option', 'autoOpen'); if(modal && !autoOpen) { var cnt = app.dialog_stack.length - 1; var t = this; if(cnt <= 0) { var $el = $('table').eq(0); } else { var $el = $(app.dialog_stack[cnt - 1]()); } $('select', $el).removeClass('ie6-hide-select'); } }); } });