Skip to content
Browse files

Fix filter by resource and broken 'views'

  • Loading branch information...
1 parent 355c569 commit 3ad12a9075fe7d8596b92f50591fd52a0046860d @den-plugins committed Jan 3, 2012
Showing with 16 additions and 16 deletions.
  1. +16 −16 app/views/task_boards/show.html.erb
View
32 app/views/task_boards/show.html.erb
@@ -172,6 +172,7 @@
//setting css() seems to be faster than hide() and show()
function condensedView(){
+ jQuery(".task_board_data:visible").css("display", "inline-block");
jQuery(".bulk_details").css('display', 'none');
jQuery(".taskboard_issues_list").addClass("condensed");
jQuery(".to_parent").css('display', 'none');
@@ -180,9 +181,10 @@
}
function normalView(){
+ jQuery(".task_board_data:visible").css("display", "list-item");
jQuery(".bulk_details").css('display', 'block');
jQuery(".taskboard_issues_list").removeClass("condensed");
- jQuery(".to_parent").css('display', 'inline');
+ jQuery(".to_parent").css("display", "inline");
if(showbugs)
jQuery(".isBug").removeClass("condensed").css("display", "list-item");
}
@@ -304,22 +306,20 @@
<script type="text/javascript">
function filterByResource(){
var res_id = jQuery("#selected_resource option:selected").val();
- if(jQuery("#filter_button").is(':hidden')){
- if(jQuery.inArray(res_id, ["", "All", "Select a resource..."]) != -1){
- jQuery('#selected_resource_blank').val('Select a resource...');
- jQuery('#selected_resource_blank').text('Select a resource...');
- jQuery('.task_board_data').show();
- }
- else{
- jQuery('#selected_resource_blank').val('All');
- jQuery('#selected_resource_blank').text('All');
- jQuery('.task_board_data').hide();
- jQuery('.assigned_to_' + res_id).show();
- }
- filterBugs();
- }else{
- return "";
+ var display = (jQuery("#condensed").hasClass("activated")) ? "inline-block" : "list-item";
+ var opts = { display: display, listStyle: "none" };
+ if(jQuery.inArray(res_id, ["", "All", "Select a resource..."]) != -1) {
+ jQuery('#selected_resource_blank').val('Select a resource...');
+ jQuery('#selected_resource_blank').text('Select a resource...');
+ jQuery('.task_board_data').css(opts);
+ }
+ else {
+ jQuery('#selected_resource_blank').val('All');
+ jQuery('#selected_resource_blank').text('All');
+ jQuery('.task_board_data').hide();
+ jQuery('.assigned_to_' + res_id).css(opts);
}
+ filterBugs();
}
function filterBugs(){

0 comments on commit 3ad12a9

Please sign in to comment.
Something went wrong with that request. Please try again.