|
|
@ -1,15 +1,15 @@ |
|
|
|
/*global $, selectAllOptions, moveOptions */ |
|
|
|
/*global $, selectAllOptions, moveOptions */ |
|
|
|
|
|
|
|
|
|
|
|
function toggle_filter(field) { |
|
|
|
function toggle_filter(field) { |
|
|
|
var remove, to_toggle; |
|
|
|
var check_box, to_toggle; |
|
|
|
remove = $('rm_' + field); |
|
|
|
check_box = $('cb_' + field); |
|
|
|
to_toggle = remove.up().siblings(); |
|
|
|
to_toggle = check_box.up().siblings(); |
|
|
|
|
|
|
|
|
|
|
|
if (remove.display) { |
|
|
|
if (check_box.checked) { |
|
|
|
to_toggle.invoke('hide'); |
|
|
|
to_toggle.invoke('show'); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
to_toggle.invoke('show'); |
|
|
|
to_toggle.invoke('hide'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -62,9 +62,11 @@ function display_category(tr_field) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function show_filter(field) { |
|
|
|
function show_filter(field) { |
|
|
|
var field_el = $('tr_' + field); |
|
|
|
var field_el = $('tr_' + field), check_box = null; |
|
|
|
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); |
|
|
|
operator_changed(field, $("operators_" + field)); |
|
|
|
operator_changed(field, $("operators_" + field)); |
|
|
|
display_category(field_el); |
|
|
|
display_category(field_el); |
|
|
@ -72,9 +74,11 @@ function show_filter(field) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function hide_filter(field) { |
|
|
|
function hide_filter(field) { |
|
|
|
var field_el = $('tr_' + field) |
|
|
|
var field_el = $('tr_' + field), check_box = null; |
|
|
|
if (field_el !== null) { |
|
|
|
if (field_el !== null) { |
|
|
|
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)); |
|
|
|
} |
|
|
|
} |
|
|
@ -106,13 +110,6 @@ function add_filter(select) { |
|
|
|
disable_select_option(select, field); |
|
|
|
disable_select_option(select, field); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function removed_filter(field) { |
|
|
|
|
|
|
|
var select, field; |
|
|
|
|
|
|
|
select = $("add_filter_select"); |
|
|
|
|
|
|
|
hide_filter(field); |
|
|
|
|
|
|
|
enable_select_option(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"); |
|
|
|