dashboard.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Author: Abdullah A Almsaeed
  3. * Date: 4 Jan 2014
  4. * Description:
  5. * This is a demo file used only for the main dashboard (index.html)
  6. **/
  7. $(function () {
  8. "use strict";
  9. //Make the dashboard widgets sortable Using jquery UI
  10. $(".connectedSortable").sortable({
  11. placeholder: "sort-highlight",
  12. connectWith: ".connectedSortable",
  13. handle: ".box-header, .nav-tabs",
  14. forcePlaceholderSize: true,
  15. zIndex: 999999
  16. });
  17. $(".connectedSortable .box-header, .connectedSortable .nav-tabs-custom").css("cursor", "move");
  18. //jQuery UI sortable for the todo list
  19. $(".todo-list").sortable({
  20. placeholder: "sort-highlight",
  21. handle: ".handle",
  22. forcePlaceholderSize: true,
  23. zIndex: 999999
  24. });
  25. //bootstrap WYSIHTML5 - text editor
  26. //$(".textarea").wysihtml5();
  27. //jvectormap data
  28. var visitorsData = {
  29. "US": 398, //USA
  30. "SA": 400, //Saudi Arabia
  31. "CA": 1000, //Canada
  32. "DE": 500, //Germany
  33. "FR": 760, //France
  34. "CN": 300, //China
  35. "AU": 700, //Australia
  36. "BR": 600, //Brazil
  37. "IN": 800, //India
  38. "GB": 320, //Great Britain
  39. "RU": 3000 //Russia
  40. };
  41. //The Calender
  42. //$("#calendar").datepicker();
  43. //SLIMSCROLL FOR CHAT WIDGET
  44. $('#chat-box').slimScroll({
  45. height: '250px'
  46. });
  47. //Fix for charts under tabs
  48. $('.box ul.nav a').on('shown.bs.tab', function () {
  49. area.redraw();
  50. donut.redraw();
  51. line.redraw();
  52. });
  53. /* The todo list plugin */
  54. $(".todo-list").todolist({
  55. onCheck: function (ele) {
  56. window.console.log("The element has been checked");
  57. return ele;
  58. },
  59. onUncheck: function (ele) {
  60. window.console.log("The element has been unchecked");
  61. return ele;
  62. }
  63. });
  64. });