Last active
August 29, 2015 14:06
-
-
Save nickpeirson/8f32b778b0e1083b23d0 to your computer and use it in GitHub Desktop.
Hide JIRA agile board columns on header click
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//hide column | |
var colWidths = {}; | |
var headDims = {}; | |
$('#ghx-column-headers li').toggle( | |
function() { | |
heading = $(this); | |
var columnId = heading.data('id'); | |
headDims[columnId] = { | |
'width': heading.width(), | |
'height': heading.height() | |
}; | |
heading.height('10px'); | |
heading.width('10px'); | |
heading.children('.ghx-qty').each(function () { | |
$(this).hide(); | |
}); | |
$('li[data-column-id="' + columnId + '"]').each(function() { | |
var column = $( this ); | |
colWidths[columnId] = column.width(); | |
column.width('10px'); | |
}); | |
}, | |
function() { | |
heading = $(this); | |
var columnId = heading.data('id'); | |
heading.width(headDims[columnId]['width']); | |
heading.height(headDims[columnId]['height']); | |
heading.children('.ghx-qty').each(function () { | |
$(this).show(); | |
}); | |
$('li[data-column-id="' + columnId + '"]').each(function() { | |
var column = $( this ); | |
column.width(colWidths[columnId]); | |
}); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment