+
+function filter_popup()
+{
+ if (!$('#filter_popup form input').length) {
+ $.get('query.php',
+ window.location.search.substr(1),
+ function(data) {
+ var text = '<style type="text/css">';
+ text += '#fc { z-index: 10; }';
+ $(data).find('style').each(function(i,e){
+ text += $(this).html();
+ });
+ text += '</style>';
+ text += $(data).find('form').html();
+ $('#filter_popup form').html(text);
+ $('#filter_popup form input.button[type="submit"]').click(function(e){
+ $.post('list.php',
+ 'ajax=1&'+$('#filter_popup form').serialize(),
+ function(data){
+ $('table.border tbody').html(data);
+ });
+ console.log($('#filter_popup form').serialize());
+ return false;
+ });
+ });
+ }
+
+ if ($('#filter_popup:visible').length)
+ $('#filter_popup').hide();
+ else
+ $('#filter_popup').show();
+
+ return false;
+}
+