|  | @@ -5,19 +5,18 @@
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |        // Add a close button for each pane except for the te_base
 |  |        // Add a close button for each pane except for the te_base
 | 
											
												
													
														|  |        $('div.tripal_pane').each(function (i) {
 |  |        $('div.tripal_pane').each(function (i) {
 | 
											
												
													
														|  | -        $(this).prepend('<div class="tripal_pane-fieldset-close_button">'+
 |  | 
 | 
											
												
													
														|  | -              '<div id="tripal-pane-close-button" class="tripal-pane-button">'+
 |  | 
 | 
											
												
													
														|  | -                '<i class="fa fa-window-close-o fa-lg"></i>'+
 |  | 
 | 
											
												
													
														|  | -              '</div>'+
 |  | 
 | 
											
												
													
														|  | -            '</div>'
 |  | 
 | 
											
												
													
														|  | -           );
 |  | 
 | 
											
												
													
														|  | 
 |  | +        $(this).prepend(
 | 
											
												
													
														|  | 
 |  | +          '<div class="tripal_pane-fieldset-buttons">' +
 | 
											
												
													
														|  | 
 |  | +            '<div id="tripal-pane-close-button" class="tripal-pane-button">' +
 | 
											
												
													
														|  | 
 |  | +              '<i class="fa fa-window-close-o fa-lg"></i>' +
 | 
											
												
													
														|  | 
 |  | +            '</div>' +
 | 
											
												
													
														|  | 
 |  | +          '</div>'
 | 
											
												
													
														|  | 
 |  | +        );
 | 
											
												
													
														|  |          var id = '.tripal_pane-fieldset-' + $(this).attr('id');
 |  |          var id = '.tripal_pane-fieldset-' + $(this).attr('id');
 | 
											
												
													
														|  |        });
 |  |        });
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |        // Hide the pane when the close button is clicked
 |  |        // Hide the pane when the close button is clicked
 | 
											
												
													
														|  | -      $('.tripal_pane-fieldset-close_button').each(function (i) {
 |  | 
 | 
											
												
													
														|  | -        $(this).css('float', 'right');
 |  | 
 | 
											
												
													
														|  | -        $(this).css('cursor', 'pointer');
 |  | 
 | 
											
												
													
														|  | -        $(this).css('margin', '0px 5px');
 |  | 
 | 
											
												
													
														|  | 
 |  | +      $('#tripal-pane-close-button').each(function (i) {
 | 
											
												
													
														|  |          $(this).click(function () {
 |  |          $(this).click(function () {
 | 
											
												
													
														|  |            var fs = $(this).parents('div.tripal_pane');
 |  |            var fs = $(this).parents('div.tripal_pane');
 | 
											
												
													
														|  |            if($(fs).hasClass('showTripalPane'))  {
 |  |            if($(fs).hasClass('showTripalPane'))  {
 | 
											
										
											
												
													
														|  | @@ -37,8 +36,7 @@
 | 
											
												
													
														|  |              // If the user clicks on other TOC item, move its fieldset to the top 
 |  |              // If the user clicks on other TOC item, move its fieldset to the top 
 | 
											
												
													
														|  |              $(id + ' fieldset').removeClass('collapsed');
 |  |              $(id + ' fieldset').removeClass('collapsed');
 | 
											
												
													
														|  |              $(id + ' fieldset .fieldset-wrapper').show();
 |  |              $(id + ' fieldset .fieldset-wrapper').show();
 | 
											
												
													
														|  | -            console.log(prevObj);
 |  | 
 | 
											
												
													
														|  | -            console.log(id);
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |              // Highlight the fieldset instead of moving if it's already at the top
 |  |              // Highlight the fieldset instead of moving if it's already at the top
 | 
											
												
													
														|  |              if (prevObj.indexOf('group-tripal-pane-content-top') == 0) {
 |  |              if (prevObj.indexOf('group-tripal-pane-content-top') == 0) {
 | 
											
												
													
														|  |                $(id + ' fieldset').fadeTo(10, 0.3, function() {});
 |  |                $(id + ' fieldset').fadeTo(10, 0.3, function() {});
 |