Bachir Soussi Chiadmi 1bc61b12ad first import
2015-04-08 11:40:19 +02:00

36 lines
1.2 KiB
JavaScript

(function($) {
Drupal.behaviors.adminDevel = {};
Drupal.behaviors.adminDevel.attach = function(context) {
$('#block-admin-devel:not(.admin-processed)').each(function() {
var devel = $(this);
devel.addClass('admin-processed');
// Pull logged values from footer output into the block.
$('li', devel).each(function() {
var key = $(this).attr('class').split(' ')[0];
if (key && $('body > .'+key).size() > 0) {
var value = $('body > .'+key).html();
$('div.dev-info', this).html(value);
}
});
// Query list show handler.
$('input.dev-querylog-show', devel).click(function() {
$(this).hide().siblings('input.dev-querylog-hide').show();
$('body > *:not(#admin-toolbar, .region-page-bottom, .devel-querylog)').addClass('devel-hide');
$('body > .devel-querylog').show();
return false;
});
// Query list hide handler.
$('input.dev-querylog-hide').click(function() {
$(this).hide().siblings('input.dev-querylog-show').show();
$('body > *:not(#admin-toolbar, .region-page-bottom, .devel-querylog)').removeClass('devel-hide');
$('body > .devel-querylog').hide();
return false;
});
});
};
})(jQuery);