|
|
@ -1,11 +1,10 @@ |
|
|
|
/*global $, selectAllOptions, moveOptions */ |
|
|
|
/*global $, selectAllOptions, moveOptions */ |
|
|
|
|
|
|
|
|
|
|
|
function toggle_filter(field) { |
|
|
|
function toggle_filter(field) { |
|
|
|
var check_box, to_toggle; |
|
|
|
var remove, to_toggle; |
|
|
|
check_box = $('cb_' + field); |
|
|
|
remove = $('rm_' + field); |
|
|
|
to_toggle = check_box.up().siblings(); |
|
|
|
to_toggle = remove.up().siblings(); |
|
|
|
|
|
|
|
if (remove.visible()) { |
|
|
|
if (check_box.checked) { |
|
|
|
|
|
|
|
to_toggle.invoke('show'); |
|
|
|
to_toggle.invoke('show'); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
@ -62,23 +61,21 @@ function display_category(tr_field) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function show_filter(field) { |
|
|
|
function show_filter(field) { |
|
|
|
var field_el = $('tr_' + field), check_box = null; |
|
|
|
var field_el = $('tr_' + field); |
|
|
|
if (field_el !== null) { |
|
|
|
if (field_el !== null) { |
|
|
|
field_el.show(); |
|
|
|
field_el.show(); |
|
|
|
check_box = $('cb_' + field); |
|
|
|
|
|
|
|
check_box.checked = true; |
|
|
|
|
|
|
|
toggle_filter(field); |
|
|
|
toggle_filter(field); |
|
|
|
|
|
|
|
$('rm_' + field).value = field; |
|
|
|
operator_changed(field, $("operators_" + field)); |
|
|
|
operator_changed(field, $("operators_" + field)); |
|
|
|
display_category(field_el); |
|
|
|
display_category(field_el); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function hide_filter(field) { |
|
|
|
function hide_filter(field) { |
|
|
|
var field_el = $('tr_' + field), check_box = null; |
|
|
|
var field_el = $('tr_' + field); |
|
|
|
if (field_el !== null) { |
|
|
|
if (field_el !== null) { |
|
|
|
|
|
|
|
$('rm_' + field).value = ""; |
|
|
|
field_el.hide(); |
|
|
|
field_el.hide(); |
|
|
|
check_box = $('cb_' + field); |
|
|
|
|
|
|
|
check_box.checked = false; |
|
|
|
|
|
|
|
toggle_filter(field); |
|
|
|
toggle_filter(field); |
|
|
|
operator_changed(field, $("operators_" + field)); |
|
|
|
operator_changed(field, $("operators_" + field)); |
|
|
|
} |
|
|
|
} |
|
|
@ -110,6 +107,11 @@ function add_filter(select) { |
|
|
|
disable_select_option(select, field); |
|
|
|
disable_select_option(select, field); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function remove_filter(field) { |
|
|
|
|
|
|
|
hide_filter(field); |
|
|
|
|
|
|
|
enable_select_option($("add_filter_select"), field); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function show_group_by(group_by, target) { |
|
|
|
function show_group_by(group_by, target) { |
|
|
|
var source, group_option, i; |
|
|
|
var source, group_option, i; |
|
|
|
source = $("group_by_container"); |
|
|
|
source = $("group_by_container"); |
|
|
|