From c0457a85f4986aaaa750f3a7c2e16812ce0881d7 Mon Sep 17 00:00:00 2001 From: christianesperar Date: Fri, 15 Apr 2016 20:44:39 +0800 Subject: [PATCH 1/3] Fix panel toolbox not return to original height with hardcoded class --- production/js/custom.js | 47 +++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/production/js/custom.js b/production/js/custom.js index 1803a50b..4acfdfee 100755 --- a/production/js/custom.js +++ b/production/js/custom.js @@ -65,6 +65,33 @@ $(function () { }).parent('li').addClass('current-page').parent('ul').slideDown().parent().addClass('active'); }); +// Panel toolbox +$(function () { + $('.collapse-link').on('click', function() { + var $BOX_PANEL = $(this).closest('.x_panel'), + $ICON = $(this).find('i'), + $BOX_CONTENT = $BOX_PANEL.find('.x_content'); + + // fix for some div with hardcoded fix class + if ($BOX_PANEL.attr('style')) { + $BOX_CONTENT.slideToggle(200, function(){ + $BOX_PANEL.removeAttr('style'); + }); + } else { + $BOX_CONTENT.slideToggle(200); + $BOX_PANEL.css('height', 'auto'); + } + + $ICON.toggleClass('fa-chevron-up fa-chevron-down'); + }); + + $('.close-link').click(function () { + var $BOX_PANEL = $(this).closest('.x_panel'); + + $BOX_PANEL.remove(); + }); +}); + // Right column height $(".right_col").css("min-height", $(window).height()); $(window).resize(function () { @@ -91,26 +118,6 @@ if ($(".js-switch")[0]) { }); } -// Close ibox function -$('.close-link').click(function () { - var content = $(this).closest('div.x_panel'); - content.remove(); -}); - -// Collapse ibox function -$('.collapse-link').click(function () { - var x_panel = $(this).closest('div.x_panel'); - var button = $(this).find('i'); - var content = x_panel.find('div.x_content'); - content.slideToggle(200); - (x_panel.hasClass('fixed_height_390') ? x_panel.toggleClass('').toggleClass('fixed_height_390') : ''); - (x_panel.hasClass('fixed_height_320') ? x_panel.toggleClass('').toggleClass('fixed_height_320') : ''); - button.toggleClass('fa-chevron-up').toggleClass('fa-chevron-down'); - setTimeout(function () { - x_panel.resize(); - }, 50); -}); - // iCheck if ($("input.flat")[0]) { $(document).ready(function () { From b0caff915a8e300af1151771b79dfe5f58d95799 Mon Sep 17 00:00:00 2001 From: christianesperar Date: Fri, 15 Apr 2016 20:59:55 +0800 Subject: [PATCH 2/3] Remove dropdown animation --- production/calendar.html | 4 ++-- production/chartjs.html | 4 ++-- production/chartjs2.html | 4 ++-- production/contacts.html | 4 ++-- production/css/custom.css | 1 + production/e_commerce.html | 4 ++-- production/echarts.html | 4 ++-- production/form.html | 4 ++-- production/form_advanced.html | 4 ++-- production/form_buttons.html | 4 ++-- production/form_upload.html | 4 ++-- production/form_validation.html | 4 ++-- production/form_wizards.html | 4 ++-- production/general_elements.html | 4 ++-- production/glyphicons.html | 4 ++-- production/icons.html | 4 ++-- production/inbox.html | 4 ++-- production/index.html | 4 ++-- production/index2.html | 4 ++-- production/index3.html | 4 ++-- production/invoice.html | 4 ++-- production/map.html | 4 ++-- production/media_gallery.html | 4 ++-- production/morisjs.html | 4 ++-- production/other_charts.html | 4 ++-- production/plain_page.html | 4 ++-- production/pricing_tables.html | 4 ++-- production/profile.html | 4 ++-- production/project_detail.html | 4 ++-- production/projects.html | 4 ++-- production/sign_up.html | 2 +- production/tables.html | 4 ++-- production/tables_dynamic.html | 4 ++-- production/typography.html | 4 ++-- production/widgets.html | 4 ++-- 35 files changed, 68 insertions(+), 67 deletions(-) diff --git a/production/calendar.html b/production/calendar.html index 407d13aa..0caf55eb 100755 --- a/production/calendar.html +++ b/production/calendar.html @@ -214,7 +214,7 @@ John Doe -