KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.8KB

  1. <?php
  2. define('JAVASCRIPT', true);
  3. require_once "../../../includes/common.php";
  4. error_reporting(0);
  5. header("Content-Type: application/x-javascript");
  6. ?>
  7. <!-- --><script>
  8. $(function(){
  9. $(".notice, .warning, .message").
  10. append("<span class=\"sub\"><?php echo __("(click to hide)", "theme"); ?></span>").
  11. click(function(){
  12. $(this).fadeOut("fast");
  13. })
  14. .css("cursor", "pointer");
  15. $.support.placeholder = (function(){
  16. var i = document.createElement('input');
  17. return 'placeholder' in i;
  18. })();
  19. if ($.support.placeholder)
  20. $("input#search").attr({
  21. placeholder: "<?php echo __("Search...", "theme"); ?>"
  22. });
  23. if ($("#debug").size())
  24. $("#wrapper").css("padding-bottom", $("#debug").height());
  25. $("#debug .toggle").click(function(){
  26. if (Cookie.get("hide_debug") == "true") {
  27. Cookie.destroy("hide_debug");
  28. $("#debug h5:first span").remove();
  29. $("#debug").animate({ height: "33%" });
  30. } else {
  31. Cookie.set("hide_debug", "true", 30);
  32. $("#debug").animate({ height: 15 });
  33. $("#debug ul li").each(function(){
  34. $("<span class=\"sub\"> | "+ $(this).html() +"</span>").appendTo("#debug h5").first();
  35. })
  36. }
  37. })
  38. $("input#slug").live("keyup", function(e){
  39. if (/^([a-zA-Z0-9\-\._:]*)$/.test($(this).val()))
  40. $(this).css("background", "")
  41. else
  42. $(this).css("background", "#ff2222")
  43. })
  44. if (Cookie.get("hide_debug") == "true") {
  45. $("#debug").height(15);
  46. $("#debug ul li").each(function(){
  47. $("<span class=\"sub\"> | "+ $(this).html() +"</span>").appendTo("#debug h5").first();
  48. })
  49. }
  50. })
  51. <!-- --></script>