matrix.interface.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. $(document).ready(function(){
  2. // === jQuery Peity === //
  3. $.fn.peity.defaults.line = {
  4. strokeWidth: 1,
  5. delimeter: ",",
  6. height: 24,
  7. max: null,
  8. min: 0,
  9. width: 50
  10. };
  11. $.fn.peity.defaults.bar = {
  12. delimeter: ",",
  13. height: 24,
  14. max: null,
  15. min: 0,
  16. width: 50
  17. };
  18. $(".peity_line_good span").peity("line", {
  19. colour: "#B1FFA9",
  20. strokeColour: "#459D1C"
  21. });
  22. $(".peity_line_bad span").peity("line", {
  23. colour: "#FFC4C7",
  24. strokeColour: "#BA1E20"
  25. });
  26. $(".peity_line_neutral span").peity("line", {
  27. colour: "#CCCCCC",
  28. strokeColour: "#757575"
  29. });
  30. $(".peity_bar_good span").peity("bar", {
  31. colour: "#459D1C"
  32. });
  33. $(".peity_bar_bad span").peity("bar", {
  34. colour: "#BA1E20"
  35. });
  36. $(".peity_bar_neutral span").peity("bar", {
  37. colour: "#757575"
  38. });
  39. // === jQeury Gritter, a growl-like notifications === //
  40. $.gritter.add({
  41. title: 'Important Unread messages',
  42. text: 'You have 12 unread messages.',
  43. image: 'img/demo/envelope.png',
  44. sticky: false
  45. });
  46. $('#gritter-notify .normal').click(function(){
  47. $.gritter.add({
  48. title: 'Normal notification',
  49. text: 'This is a normal notification',
  50. sticky: false
  51. });
  52. });
  53. $('#gritter-notify .sticky').click(function(){
  54. $.gritter.add({
  55. title: 'Sticky notification',
  56. text: 'This is a sticky notification',
  57. sticky: true
  58. });
  59. });
  60. $('#gritter-notify .image').click(function(){
  61. var imgsrc = $(this).attr('data-image');
  62. $.gritter.add({
  63. title: 'Important Unread messages',
  64. text: 'You have 12 unread messages.',
  65. image: imgsrc,
  66. sticky: false
  67. });
  68. });
  69. });