devel.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. (function ($) {
  2. // Explain link in query log
  3. Drupal.behaviors.devel_explain = {
  4. attach: function(context, settings) {
  5. $('a.dev-explain').click(function () {
  6. qid = $(this).attr("qid");
  7. cell = $('#devel-query-' + qid);
  8. $('.dev-explain', cell).load(settings.basePath + '?q=devel/explain/' + settings.devel.request_id + '/' + qid).show();
  9. $('.dev-placeholders', cell).hide();
  10. $('.dev-arguments', cell).hide();
  11. return false;
  12. });
  13. }
  14. }
  15. // Arguments link in query log
  16. Drupal.behaviors.devel_arguments = {
  17. attach: function(context, settings) {
  18. $('a.dev-arguments').click(function () {
  19. qid = $(this).attr("qid");
  20. cell = $('#devel-query-' + qid);
  21. $('.dev-arguments', cell).load(settings.basePath + '?q=devel/arguments/' + settings.devel.request_id + '/' + qid).show();
  22. $('.dev-placeholders', cell).hide();
  23. $('.dev-explain', cell).hide();
  24. return false;
  25. });
  26. }
  27. }
  28. // Placeholders link in query log
  29. Drupal.behaviors.devel_placeholders = {
  30. attach: function(context, settings) {
  31. $('a.dev-placeholders').click(function () {
  32. qid = $(this).attr("qid");
  33. cell = $('#devel-query-' + qid);
  34. $('.dev-explain', cell).hide();
  35. $('.dev-arguments', cell).hide();
  36. $('.dev-placeholders', cell).show();
  37. return false;
  38. });
  39. }
  40. }
  41. })(jQuery);