Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <!-- ############################++++++++++++++++SCRIPT AJAX DELETING ================############################ -->
  2. <!-- ############################++++++++++++++++SCRIPT AJAX DELETING ================############################ -->
  3. <script type="text/javascript">
  4. $(document).ready(function(){
  5. $(".deleterow").click(function(){
  6. var id = $(this).attr("id");
  7. $(".erow"+id).hide('slow');
  8. $(".drow"+id).hide('slow');
  9. $(".crow"+id).show('slow');
  10. });
  11. $("#tidak").click(function(){
  12. $(".alert").hide('slow');
  13. $(".deleterow").show('slow');
  14. });
  15. $(".hapus").click(function(){
  16. var id = $(this).attr("id");
  17. var triger = "del";
  18. $.ajax({
  19. type: "POST",
  20. url: "pros.php",
  21. data: 'id=' + id + '&triger=' + triger,
  22. success: function(html){
  23. $('#successpop').show('slow');
  24. $('.hilang').hide('slow');
  25. $('.timbul').load('timbul2.php');
  26. },
  27. error: function(){
  28. $('#gagalpop').show('slow');
  29. }
  30. });
  31. var detik = 3;
  32. function hitung(){
  33. var to = setTimeout(hitung,1000);
  34. detik --;
  35. if(detik < 0){
  36. clearTimeout(to);
  37. $("#errorpop , #gagalpop, #successpop").hide('slow');
  38. }
  39. }
  40. hitung();
  41. });
  42. $(document).mouseup(function(){
  43. $(".formnya, .updaterow, .alert").hide('slow');
  44. $(".textnya, .editrow, .deleterow").show('slow');
  45. });
  46. });
  47. </script>
  48. <!-- ############################++++++++++++++++SCRIPT AJAX EDITING ================############################ -->
  49. <!-- ############################++++++++++++++++SCRIPT AJAX EDITING ================############################ -->
  50. <script type="text/javascript">
  51. $(document).ready(function(){
  52. $(".editrow").click(function(){
  53. var id = $(this).attr("id");
  54. $(".erow"+id).hide('slow');
  55. $(".urow"+id).show('slow');
  56. $("#editmail"+id).hide('slow');
  57. $("#editpass"+id).hide('slow');
  58. $("#boxmail"+id).show('slow');
  59. $("#boxpass"+id).show('slow');
  60. });
  61. $(".updaterow").click(function(){
  62. var id = $(this).attr("id");
  63. var email = $("input#boxmail"+id).val();
  64. var pass = $("input#boxpass"+id).val();
  65. var triger = "edit";
  66. if( email == "" ){
  67. $('#errorpop').show('slow');
  68. }else{
  69. $.ajax({
  70. type: "POST",
  71. url: "pros.php",
  72. dataType: 'json',
  73. data: 'id=' + id + '&email=' + email + '&pass=' + pass + '&triger=' + triger,
  74. success: function(html){
  75. $('#successpop').show('slow');
  76. $('.hilang').hide('slow');
  77. $('.timbul').load('timbul2.php');
  78. },
  79. error: function(){
  80. $('#gagalpop').show('slow');
  81. }
  82. });
  83. }
  84. var detik = 3;
  85. function hitung(){
  86. var to = setTimeout(hitung,1000);
  87. detik --;
  88. if(detik < 0){
  89. clearTimeout(to);
  90. $("#errorpop , #gagalpop, #successpop").hide('slow');
  91. }
  92. }
  93. hitung();
  94. });
  95. $(".formnya").mouseup(function(){
  96. return false;
  97. });
  98. });
  99. </script>
  100. <!-- ############################++++++++++++++++SCRIPT AJAX ADDING ================############################ -->
  101. <!-- ############################++++++++++++++++SCRIPT AJAX ADDING ================############################ -->
  102. <script type="text/javascript">
  103. $(".simpan").click(function(){
  104. var triger = "tambah";
  105. $.ajax({
  106. type: "POST",
  107. url: "pros.php",
  108. dataType: 'json',
  109. data: 'triger=' + triger,
  110. success: function(){
  111. $('#successpop').show('slow');
  112. $('.hilang').hide('slow');
  113. $('.timbul').load('timbul2.php');
  114. },
  115. error: function(){
  116. $('#gagalpop').show('slow');
  117. }
  118. });
  119. var detik = 3;
  120. function hitung(){
  121. var to = setTimeout(hitung,1000);
  122. detik --;
  123. if(detik < 0){
  124. clearTimeout(to);
  125. $("#errorpop , #gagalpop, #successpop").hide('slow');
  126. }
  127. }
  128. hitung();
  129. });
  130. </script>
  131. <script>
  132. !function ($) {
  133. $(document).on("click","ul.nav li.parent > a > span.icon", function(){
  134. $(this).find('em:first').toggleClass("glyphicon-minus");
  135. });
  136. $(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");
  137. }(window.jQuery);
  138.  
  139. $(window).on('resize', function () {
  140. if ($(window).width() > 768) $('#sidebar-collapse').collapse('show')
  141. })
  142. $(window).on('resize', function () {
  143. if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')
  144. })
  145. </script>