+ $('#filter-name-box').keyup(function() {
+ if ($(this).val().trim().length > 0) {
+ $('#save-filter-button').removeAttr('disabled');
+ $('#save-filter-button').css('color', 'black');
+ } else {
+ $('#save-filter-button').css('color', '#AAA');
+ $('#save-filter-button').attr('disabled', 'disabled');
+ }
+ });
+
+ var resize_data = null;
+
+ $('.col-resizer').mousedown(function(e) {
+ var $to_resize = $(this).prev();
+
+ resize_data = {
+ resizer: $(this),
+ to_resize: $to_resize,
+ start_width: $to_resize.innerWidth(),
+ x_start: e.pageX,
+ }
+ });
+
+ $('body').mousemove(function(e) {
+ if (resize_data != null) {
+ var new_size = (resize_data.start_width - (resize_data.x_start - e.pageX)) + 'px';
+ resize_data.to_resize.css({'max-width': new_size, 'min-width': new_size})
+ resize_data.resizer.css('max-width', '3px');
+ }
+ });
+
+ $('body').mouseup(function() {
+ if (resize_data != null)
+ resize_data = null;
+ });
+
+ $('#filter-panel-header').click(function() {
+ $('#filter-panel').slideToggle();
+ });