Dashboard sipadu mbip
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.

common-pages.js 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. "use strict";
  2. $(document).ready(function() {
  3. // wave effect js
  4. Waves.init();
  5. Waves.attach('.flat-buttons', ['waves-button']);
  6. Waves.attach('.float-buttons', ['waves-button', 'waves-float']);
  7. Waves.attach('.float-button-light', ['waves-button', 'waves-float', 'waves-light']);
  8. Waves.attach('.flat-buttons', ['waves-button', 'waves-float', 'waves-light', 'flat-buttons']);
  9. $(document).ready(function(){
  10. $(".header-notification").click(function(){
  11. $(this).find(".show-notification").slideToggle(500);
  12. $(this).toggleClass('active');
  13. });
  14. });
  15. $(document).on("click", function(event){
  16. var $trigger = $(".header-notification");
  17. if($trigger !== event.target && !$trigger.has(event.target).length){
  18. $(".show-notification").slideUp(300);
  19. $(".header-notification").removeClass('active');
  20. }
  21. });
  22. $('.theme-loader').animate({
  23. 'opacity': '0',
  24. }, 1200);
  25. setTimeout(function() {
  26. $('.theme-loader').remove();
  27. }, 2000);
  28. // $('.pcoded').addClass('loaded');
  29. });
  30. function toggleFullScreen() {
  31. var a = $(window).height() - 10;
  32. if (!document.fullscreenElement && // alternative standard method
  33. !document.mozFullScreenElement && !document.webkitFullscreenElement) { // current working methods
  34. if (document.documentElement.requestFullscreen) {
  35. document.documentElement.requestFullscreen();
  36. } else if (document.documentElement.mozRequestFullScreen) {
  37. document.documentElement.mozRequestFullScreen();
  38. } else if (document.documentElement.webkitRequestFullscreen) {
  39. document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
  40. }
  41. } else {
  42. if (document.cancelFullScreen) {
  43. document.cancelFullScreen();
  44. } else if (document.mozCancelFullScreen) {
  45. document.mozCancelFullScreen();
  46. } else if (document.webkitCancelFullScreen) {
  47. document.webkitCancelFullScreen();
  48. }
  49. }
  50. }