adminlte_theme 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.rspec +3 -0
  4. data/.travis.yml +5 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +6 -0
  7. data/Gemfile.lock +35 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +70 -0
  10. data/Rakefile +6 -0
  11. data/adminlte_theme.gemspec +36 -0
  12. data/bin/console +14 -0
  13. data/bin/setup +8 -0
  14. data/lib/adminlte_theme/engine.rb +6 -0
  15. data/lib/adminlte_theme/version.rb +3 -0
  16. data/lib/adminlte_theme.rb +5 -0
  17. data/vendor/assets/images/AdminLTE/avatar.png +0 -0
  18. data/vendor/assets/images/AdminLTE/avatar04.png +0 -0
  19. data/vendor/assets/images/AdminLTE/avatar2.png +0 -0
  20. data/vendor/assets/images/AdminLTE/avatar3.png +0 -0
  21. data/vendor/assets/images/AdminLTE/avatar5.png +0 -0
  22. data/vendor/assets/images/AdminLTE/boxed-bg.jpg +0 -0
  23. data/vendor/assets/images/AdminLTE/boxed-bg.png +0 -0
  24. data/vendor/assets/images/AdminLTE/credit/american-express.png +0 -0
  25. data/vendor/assets/images/AdminLTE/credit/cirrus.png +0 -0
  26. data/vendor/assets/images/AdminLTE/credit/mastercard.png +0 -0
  27. data/vendor/assets/images/AdminLTE/credit/mestro.png +0 -0
  28. data/vendor/assets/images/AdminLTE/credit/paypal.png +0 -0
  29. data/vendor/assets/images/AdminLTE/credit/paypal2.png +0 -0
  30. data/vendor/assets/images/AdminLTE/credit/visa.png +0 -0
  31. data/vendor/assets/images/AdminLTE/default-50x50.gif +0 -0
  32. data/vendor/assets/images/AdminLTE/icons.png +0 -0
  33. data/vendor/assets/images/AdminLTE/photo1.png +0 -0
  34. data/vendor/assets/images/AdminLTE/photo2.png +0 -0
  35. data/vendor/assets/images/AdminLTE/photo3.jpg +0 -0
  36. data/vendor/assets/images/AdminLTE/photo4.jpg +0 -0
  37. data/vendor/assets/images/AdminLTE/user1-128x128.jpg +0 -0
  38. data/vendor/assets/images/AdminLTE/user2-160x160.jpg +0 -0
  39. data/vendor/assets/images/AdminLTE/user3-128x128.jpg +0 -0
  40. data/vendor/assets/images/AdminLTE/user4-128x128.jpg +0 -0
  41. data/vendor/assets/images/AdminLTE/user5-128x128.jpg +0 -0
  42. data/vendor/assets/images/AdminLTE/user6-128x128.jpg +0 -0
  43. data/vendor/assets/images/AdminLTE/user7-128x128.jpg +0 -0
  44. data/vendor/assets/images/AdminLTE/user8-128x128.jpg +0 -0
  45. data/vendor/assets/javascript/adminlte.js +1135 -0
  46. data/vendor/assets/javascript/adminlte.min.js +14 -0
  47. data/vendor/assets/javascript/demo.js +349 -0
  48. data/vendor/assets/javascript/pages/dashboard.js +210 -0
  49. data/vendor/assets/javascript/pages/dashboard2.js +274 -0
  50. data/vendor/assets/stylesheets/AdminLTE/alt/AdminLTE-bootstrap-social.css +760 -0
  51. data/vendor/assets/stylesheets/AdminLTE/alt/AdminLTE-bootstrap-social.min.css +1 -0
  52. data/vendor/assets/stylesheets/AdminLTE/alt/AdminLTE-fullcalendar.css +93 -0
  53. data/vendor/assets/stylesheets/AdminLTE/alt/AdminLTE-fullcalendar.min.css +1 -0
  54. data/vendor/assets/stylesheets/AdminLTE/alt/AdminLTE-select2.css +100 -0
  55. data/vendor/assets/stylesheets/AdminLTE/alt/AdminLTE-select2.min.css +1 -0
  56. data/vendor/assets/stylesheets/AdminLTE/alt/AdminLTE-without-plugins.css +4002 -0
  57. data/vendor/assets/stylesheets/AdminLTE/alt/AdminLTE-without-plugins.min.css +7 -0
  58. data/vendor/assets/stylesheets/AdminLTE/skins/_all-skins.css +1781 -0
  59. data/vendor/assets/stylesheets/AdminLTE/skins/_all-skins.min.css +1 -0
  60. data/vendor/assets/stylesheets/AdminLTE/skins/skin-black-light.css +171 -0
  61. data/vendor/assets/stylesheets/AdminLTE/skins/skin-black-light.min.css +1 -0
  62. data/vendor/assets/stylesheets/AdminLTE/skins/skin-black.css +161 -0
  63. data/vendor/assets/stylesheets/AdminLTE/skins/skin-black.min.css +1 -0
  64. data/vendor/assets/stylesheets/AdminLTE/skins/skin-blue-light.css +163 -0
  65. data/vendor/assets/stylesheets/AdminLTE/skins/skin-blue-light.min.css +1 -0
  66. data/vendor/assets/stylesheets/AdminLTE/skins/skin-blue.css +142 -0
  67. data/vendor/assets/stylesheets/AdminLTE/skins/skin-blue.min.css +1 -0
  68. data/vendor/assets/stylesheets/AdminLTE/skins/skin-green-light.css +152 -0
  69. data/vendor/assets/stylesheets/AdminLTE/skins/skin-green-light.min.css +1 -0
  70. data/vendor/assets/stylesheets/AdminLTE/skins/skin-green.css +134 -0
  71. data/vendor/assets/stylesheets/AdminLTE/skins/skin-green.min.css +1 -0
  72. data/vendor/assets/stylesheets/AdminLTE/skins/skin-purple-light.css +152 -0
  73. data/vendor/assets/stylesheets/AdminLTE/skins/skin-purple-light.min.css +1 -0
  74. data/vendor/assets/stylesheets/AdminLTE/skins/skin-purple.css +134 -0
  75. data/vendor/assets/stylesheets/AdminLTE/skins/skin-purple.min.css +1 -0
  76. data/vendor/assets/stylesheets/AdminLTE/skins/skin-red-light.css +152 -0
  77. data/vendor/assets/stylesheets/AdminLTE/skins/skin-red-light.min.css +1 -0
  78. data/vendor/assets/stylesheets/AdminLTE/skins/skin-red.css +134 -0
  79. data/vendor/assets/stylesheets/AdminLTE/skins/skin-red.min.css +1 -0
  80. data/vendor/assets/stylesheets/AdminLTE/skins/skin-yellow-light.css +152 -0
  81. data/vendor/assets/stylesheets/AdminLTE/skins/skin-yellow-light.min.css +1 -0
  82. data/vendor/assets/stylesheets/AdminLTE/skins/skin-yellow.css +134 -0
  83. data/vendor/assets/stylesheets/AdminLTE/skins/skin-yellow.min.css +1 -0
  84. data/vendor/assets/stylesheets/AdminLTE.css +4977 -0
  85. data/vendor/assets/stylesheets/AdminLTE.min.css +7 -0
  86. data/vendor/assets/stylesheets/adminlte.css.map +140 -0
  87. data/vendor/assets/stylesheets/adminlte.min.css.map +140 -0
  88. metadata +173 -0
@@ -0,0 +1,14 @@
1
+ /*! AdminLTE app.js
2
+ * ================
3
+ * Main JS application file for AdminLTE v2. This file
4
+ * should be included in all pages. It controls some layout
5
+ * options and implements exclusive AdminLTE plugins.
6
+ *
7
+ * @Author Almsaeed Studio
8
+ * @Support <https://www.almsaeedstudio.com>
9
+ * @Email <abdullah@almsaeedstudio.com>
10
+ * @version 2.4.2
11
+ * @repository git://github.com/almasaeed2010/AdminLTE.git
12
+ * @license MIT <http://opensource.org/licenses/MIT>
13
+ */
14
+ if("undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");+function(a){"use strict";function b(b){return this.each(function(){var e=a(this),g=e.data(c);if(!g){var h=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,g=new f(e,h))}if("string"==typeof g){if(void 0===g[b])throw new Error("No method named "+b);g[b]()}})}var c="lte.boxrefresh",d={source:"",params:{},trigger:".refresh-btn",content:".box-body",loadInContent:!0,responseType:"",overlayTemplate:'<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>',onLoadStart:function(){},onLoadDone:function(a){return a}},e={data:'[data-widget="box-refresh"]'},f=function(b,c){if(this.element=b,this.options=c,this.$overlay=a(c.overlay),""===c.source)throw new Error("Source url was not defined. Please specify a url in your BoxRefresh source option.");this._setUpListeners(),this.load()};f.prototype.load=function(){this._addOverlay(),this.options.onLoadStart.call(a(this)),a.get(this.options.source,this.options.params,function(b){this.options.loadInContent&&a(this.options.content).html(b),this.options.onLoadDone.call(a(this),b),this._removeOverlay()}.bind(this),""!==this.options.responseType&&this.options.responseType)},f.prototype._setUpListeners=function(){a(this.element).on("click",e.trigger,function(a){a&&a.preventDefault(),this.load()}.bind(this))},f.prototype._addOverlay=function(){a(this.element).append(this.$overlay)},f.prototype._removeOverlay=function(){a(this.element).remove(this.$overlay)};var g=a.fn.boxRefresh;a.fn.boxRefresh=b,a.fn.boxRefresh.Constructor=f,a.fn.boxRefresh.noConflict=function(){return a.fn.boxRefresh=g,this},a(window).on("load",function(){a(e.data).each(function(){b.call(a(this))})})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var e=a(this),f=e.data(c);if(!f){var g=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,f=new h(e,g))}if("string"==typeof b){if(void 0===f[b])throw new Error("No method named "+b);f[b]()}})}var c="lte.boxwidget",d={animationSpeed:500,collapseTrigger:'[data-widget="collapse"]',removeTrigger:'[data-widget="remove"]',collapseIcon:"fa-minus",expandIcon:"fa-plus",removeIcon:"fa-times"},e={data:".box",collapsed:".collapsed-box",header:".box-header",body:".box-body",footer:".box-footer",tools:".box-tools"},f={collapsed:"collapsed-box"},g={collapsed:"collapsed.boxwidget",expanded:"expanded.boxwidget",removed:"removed.boxwidget"},h=function(a,b){this.element=a,this.options=b,this._setUpListeners()};h.prototype.toggle=function(){a(this.element).is(e.collapsed)?this.expand():this.collapse()},h.prototype.expand=function(){var b=a.Event(g.expanded),c=this.options.collapseIcon,d=this.options.expandIcon;a(this.element).removeClass(f.collapsed),a(this.element).children(e.header+", "+e.body+", "+e.footer).children(e.tools).find("."+d).removeClass(d).addClass(c),a(this.element).children(e.body+", "+e.footer).slideDown(this.options.animationSpeed,function(){a(this.element).trigger(b)}.bind(this))},h.prototype.collapse=function(){var b=a.Event(g.collapsed),c=this.options.collapseIcon,d=this.options.expandIcon;a(this.element).children(e.header+", "+e.body+", "+e.footer).children(e.tools).find("."+c).removeClass(c).addClass(d),a(this.element).children(e.body+", "+e.footer).slideUp(this.options.animationSpeed,function(){a(this.element).addClass(f.collapsed),a(this.element).trigger(b)}.bind(this))},h.prototype.remove=function(){var b=a.Event(g.removed);a(this.element).slideUp(this.options.animationSpeed,function(){a(this.element).trigger(b),a(this.element).remove()}.bind(this))},h.prototype._setUpListeners=function(){var b=this;a(this.element).on("click",this.options.collapseTrigger,function(c){return c&&c.preventDefault(),b.toggle(a(this)),!1}),a(this.element).on("click",this.options.removeTrigger,function(c){return c&&c.preventDefault(),b.remove(a(this)),!1})};var i=a.fn.boxWidget;a.fn.boxWidget=b,a.fn.boxWidget.Constructor=h,a.fn.boxWidget.noConflict=function(){return a.fn.boxWidget=i,this},a(window).on("load",function(){a(e.data).each(function(){b.call(a(this))})})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var e=a(this),f=e.data(c);if(!f){var g=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,f=new h(e,g))}"string"==typeof b&&f.toggle()})}var c="lte.controlsidebar",d={slide:!0},e={sidebar:".control-sidebar",data:'[data-toggle="control-sidebar"]',open:".control-sidebar-open",bg:".control-sidebar-bg",wrapper:".wrapper",content:".content-wrapper",boxed:".layout-boxed"},f={open:"control-sidebar-open",fixed:"fixed"},g={collapsed:"collapsed.controlsidebar",expanded:"expanded.controlsidebar"},h=function(a,b){this.element=a,this.options=b,this.hasBindedResize=!1,this.init()};h.prototype.init=function(){a(this.element).is(e.data)||a(this).on("click",this.toggle),this.fix(),a(window).resize(function(){this.fix()}.bind(this))},h.prototype.toggle=function(b){b&&b.preventDefault(),this.fix(),a(e.sidebar).is(e.open)||a("body").is(e.open)?this.collapse():this.expand()},h.prototype.expand=function(){this.options.slide?a(e.sidebar).addClass(f.open):a("body").addClass(f.open),a(this.element).trigger(a.Event(g.expanded))},h.prototype.collapse=function(){a("body, "+e.sidebar).removeClass(f.open),a(this.element).trigger(a.Event(g.collapsed))},h.prototype.fix=function(){a("body").is(e.boxed)&&this._fixForBoxed(a(e.bg))},h.prototype._fixForBoxed=function(b){b.css({position:"absolute",height:a(e.wrapper).height()})};var i=a.fn.controlSidebar;a.fn.controlSidebar=b,a.fn.controlSidebar.Constructor=h,a.fn.controlSidebar.noConflict=function(){return a.fn.controlSidebar=i,this},a(document).on("click",e.data,function(c){c&&c.preventDefault(),b.call(a(this),"toggle")})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data(c);e||d.data(c,e=new f(d)),"string"==typeof b&&e.toggle(d)})}var c="lte.directchat",d={data:'[data-widget="chat-pane-toggle"]',box:".direct-chat"},e={open:"direct-chat-contacts-open"},f=function(a){this.element=a};f.prototype.toggle=function(a){a.parents(d.box).first().toggleClass(e.open)};var g=a.fn.directChat;a.fn.directChat=b,a.fn.directChat.Constructor=f,a.fn.directChat.noConflict=function(){return a.fn.directChat=g,this},a(document).on("click",d.data,function(c){c&&c.preventDefault(),b.call(a(this),"toggle")})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var e=a(this),f=e.data(c);if(!f){var h=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,f=new g(h))}if("string"==typeof b){if(void 0===f[b])throw new Error("No method named "+b);f[b]()}})}var c="lte.layout",d={slimscroll:!0,resetHeight:!0},e={wrapper:".wrapper",contentWrapper:".content-wrapper",layoutBoxed:".layout-boxed",mainFooter:".main-footer",mainHeader:".main-header",sidebar:".sidebar",controlSidebar:".control-sidebar",fixed:".fixed",sidebarMenu:".sidebar-menu",logo:".main-header .logo"},f={fixed:"fixed",holdTransition:"hold-transition"},g=function(a){this.options=a,this.bindedResize=!1,this.activate()};g.prototype.activate=function(){this.fix(),this.fixSidebar(),a("body").removeClass(f.holdTransition),this.options.resetHeight&&a("body, html, "+e.wrapper).css({height:"auto","min-height":"100%"}),this.bindedResize||(a(window).resize(function(){this.fix(),this.fixSidebar(),a(e.logo+", "+e.sidebar).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){this.fix(),this.fixSidebar()}.bind(this))}.bind(this)),this.bindedResize=!0),a(e.sidebarMenu).on("expanded.tree",function(){this.fix(),this.fixSidebar()}.bind(this)),a(e.sidebarMenu).on("collapsed.tree",function(){this.fix(),this.fixSidebar()}.bind(this))},g.prototype.fix=function(){a(e.layoutBoxed+" > "+e.wrapper).css("overflow","hidden");var b=a(e.mainFooter).outerHeight()||0,c=a(e.mainHeader).outerHeight()+b,d=a(window).height(),g=a(e.sidebar).height()||0;if(a("body").hasClass(f.fixed))a(e.contentWrapper).css("min-height",d-b);else{var h;d>=g?(a(e.contentWrapper).css("min-height",d-c),h=d-c):(a(e.contentWrapper).css("min-height",g),h=g);var i=a(e.controlSidebar);void 0!==i&&i.height()>h&&a(e.contentWrapper).css("min-height",i.height())}},g.prototype.fixSidebar=function(){if(!a("body").hasClass(f.fixed))return void(void 0!==a.fn.slimScroll&&a(e.sidebar).slimScroll({destroy:!0}).height("auto"));this.options.slimscroll&&void 0!==a.fn.slimScroll&&a(e.sidebar).slimScroll({height:a(window).height()-a(e.mainHeader).height()+"px"})};var h=a.fn.layout;a.fn.layout=b,a.fn.layout.Constuctor=g,a.fn.layout.noConflict=function(){return a.fn.layout=h,this},a(window).on("load",function(){b.call(a("body"))})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var e=a(this),f=e.data(c);if(!f){var g=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,f=new h(g))}"toggle"===b&&f.toggle()})}var c="lte.pushmenu",d={collapseScreenSize:767,expandOnHover:!1,expandTransitionDelay:200},e={collapsed:".sidebar-collapse",open:".sidebar-open",mainSidebar:".main-sidebar",contentWrapper:".content-wrapper",searchInput:".sidebar-form .form-control",button:'[data-toggle="push-menu"]',mini:".sidebar-mini",expanded:".sidebar-expanded-on-hover",layoutFixed:".fixed"},f={collapsed:"sidebar-collapse",open:"sidebar-open",mini:"sidebar-mini",expanded:"sidebar-expanded-on-hover",expandFeature:"sidebar-mini-expand-feature",layoutFixed:"fixed"},g={expanded:"expanded.pushMenu",collapsed:"collapsed.pushMenu"},h=function(a){this.options=a,this.init()};h.prototype.init=function(){(this.options.expandOnHover||a("body").is(e.mini+e.layoutFixed))&&(this.expandOnHover(),a("body").addClass(f.expandFeature)),a(e.contentWrapper).click(function(){a(window).width()<=this.options.collapseScreenSize&&a("body").hasClass(f.open)&&this.close()}.bind(this)),a(e.searchInput).click(function(a){a.stopPropagation()})},h.prototype.toggle=function(){var b=a(window).width(),c=!a("body").hasClass(f.collapsed);b<=this.options.collapseScreenSize&&(c=a("body").hasClass(f.open)),c?this.close():this.open()},h.prototype.open=function(){a(window).width()>this.options.collapseScreenSize?a("body").removeClass(f.collapsed).trigger(a.Event(g.expanded)):a("body").addClass(f.open).trigger(a.Event(g.expanded))},h.prototype.close=function(){a(window).width()>this.options.collapseScreenSize?a("body").addClass(f.collapsed).trigger(a.Event(g.collapsed)):a("body").removeClass(f.open+" "+f.collapsed).trigger(a.Event(g.collapsed))},h.prototype.expandOnHover=function(){a(e.mainSidebar).hover(function(){a("body").is(e.mini+e.collapsed)&&a(window).width()>this.options.collapseScreenSize&&this.expand()}.bind(this),function(){a("body").is(e.expanded)&&this.collapse()}.bind(this))},h.prototype.expand=function(){setTimeout(function(){a("body").removeClass(f.collapsed).addClass(f.expanded)},this.options.expandTransitionDelay)},h.prototype.collapse=function(){setTimeout(function(){a("body").removeClass(f.expanded).addClass(f.collapsed)},this.options.expandTransitionDelay)};var i=a.fn.pushMenu;a.fn.pushMenu=b,a.fn.pushMenu.Constructor=h,a.fn.pushMenu.noConflict=function(){return a.fn.pushMenu=i,this},a(document).on("click",e.button,function(c){c.preventDefault(),b.call(a(this),"toggle")}),a(window).on("load",function(){b.call(a(e.button))})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var e=a(this),f=e.data(c);if(!f){var h=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,f=new g(e,h))}if("string"==typeof f){if(void 0===f[b])throw new Error("No method named "+b);f[b]()}})}var c="lte.todolist",d={onCheck:function(a){return a},onUnCheck:function(a){return a}},e={data:'[data-widget="todo-list"]'},f={done:"done"},g=function(a,b){this.element=a,this.options=b,this._setUpListeners()};g.prototype.toggle=function(a){if(a.parents(e.li).first().toggleClass(f.done),!a.prop("checked"))return void this.unCheck(a);this.check(a)},g.prototype.check=function(a){this.options.onCheck.call(a)},g.prototype.unCheck=function(a){this.options.onUnCheck.call(a)},g.prototype._setUpListeners=function(){var b=this;a(this.element).on("change ifChanged","input:checkbox",function(){b.toggle(a(this))})};var h=a.fn.todoList;a.fn.todoList=b,a.fn.todoList.Constructor=g,a.fn.todoList.noConflict=function(){return a.fn.todoList=h,this},a(window).on("load",function(){a(e.data).each(function(){b.call(a(this))})})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var e=a(this);if(!e.data(c)){var f=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,new h(e,f))}})}var c="lte.tree",d={animationSpeed:500,accordion:!0,followLink:!1,trigger:".treeview a"},e={tree:".tree",treeview:".treeview",treeviewMenu:".treeview-menu",open:".menu-open, .active",li:"li",data:'[data-widget="tree"]',active:".active"},f={open:"menu-open",tree:"tree"},g={collapsed:"collapsed.tree",expanded:"expanded.tree"},h=function(b,c){this.element=b,this.options=c,a(this.element).addClass(f.tree),a(e.treeview+e.active,this.element).addClass(f.open),this._setUpListeners()};h.prototype.toggle=function(a,b){var c=a.next(e.treeviewMenu),d=a.parent(),g=d.hasClass(f.open);d.is(e.treeview)&&(this.options.followLink&&"#"!==a.attr("href")||b.preventDefault(),g?this.collapse(c,d):this.expand(c,d))},h.prototype.expand=function(b,c){var d=a.Event(g.expanded);if(this.options.accordion){var h=c.siblings(e.open),i=h.children(e.treeviewMenu);this.collapse(i,h)}c.addClass(f.open),b.slideDown(this.options.animationSpeed,function(){a(this.element).trigger(d)}.bind(this))},h.prototype.collapse=function(b,c){var d=a.Event(g.collapsed);b.find(e.open).removeClass(f.open),c.removeClass(f.open),b.slideUp(this.options.animationSpeed,function(){b.find(e.open+" > "+e.treeview).slideUp(),a(this.element).trigger(d)}.bind(this))},h.prototype._setUpListeners=function(){var b=this;a(this.element).on("click",this.options.trigger,function(c){b.toggle(a(this),c)})};var i=a.fn.tree;a.fn.tree=b,a.fn.tree.Constructor=h,a.fn.tree.noConflict=function(){return a.fn.tree=i,this},a(window).on("load",function(){a(e.data).each(function(){b.call(a(this))})})}(jQuery);
@@ -0,0 +1,349 @@
1
+ /**
2
+ * AdminLTE Demo Menu
3
+ * ------------------
4
+ * You should not use this file in production.
5
+ * This file is for demo purposes only.
6
+ */
7
+ $(function () {
8
+ 'use strict'
9
+
10
+ /**
11
+ * Get access to plugins
12
+ */
13
+
14
+ $('[data-toggle="control-sidebar"]').controlSidebar()
15
+ $('[data-toggle="push-menu"]').pushMenu()
16
+
17
+ var $pushMenu = $('[data-toggle="push-menu"]').data('lte.pushmenu')
18
+ var $controlSidebar = $('[data-toggle="control-sidebar"]').data('lte.controlsidebar')
19
+ var $layout = $('body').data('lte.layout')
20
+
21
+ /**
22
+ * List of all the available skins
23
+ *
24
+ * @type Array
25
+ */
26
+ var mySkins = [
27
+ 'skin-blue',
28
+ 'skin-black',
29
+ 'skin-red',
30
+ 'skin-yellow',
31
+ 'skin-purple',
32
+ 'skin-green',
33
+ 'skin-blue-light',
34
+ 'skin-black-light',
35
+ 'skin-red-light',
36
+ 'skin-yellow-light',
37
+ 'skin-purple-light',
38
+ 'skin-green-light'
39
+ ]
40
+
41
+ /**
42
+ * Get a prestored setting
43
+ *
44
+ * @param String name Name of of the setting
45
+ * @returns String The value of the setting | null
46
+ */
47
+ function get(name) {
48
+ if (typeof (Storage) !== 'undefined') {
49
+ return localStorage.getItem(name)
50
+ } else {
51
+ window.alert('Please use a modern browser to properly view this template!')
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Store a new settings in the browser
57
+ *
58
+ * @param String name Name of the setting
59
+ * @param String val Value of the setting
60
+ * @returns void
61
+ */
62
+ function store(name, val) {
63
+ if (typeof (Storage) !== 'undefined') {
64
+ localStorage.setItem(name, val)
65
+ } else {
66
+ window.alert('Please use a modern browser to properly view this template!')
67
+ }
68
+ }
69
+
70
+ /**
71
+ * Toggles layout classes
72
+ *
73
+ * @param String cls the layout class to toggle
74
+ * @returns void
75
+ */
76
+ function changeLayout(cls) {
77
+ $('body').toggleClass(cls)
78
+ $layout.fixSidebar()
79
+ if ($('body').hasClass('fixed') && cls == 'fixed') {
80
+ $pushMenu.expandOnHover()
81
+ $layout.activate()
82
+ }
83
+ $controlSidebar.fix()
84
+ }
85
+
86
+ /**
87
+ * Replaces the old skin with the new skin
88
+ * @param String cls the new skin class
89
+ * @returns Boolean false to prevent link's default action
90
+ */
91
+ function changeSkin(cls) {
92
+ $.each(mySkins, function (i) {
93
+ $('body').removeClass(mySkins[i])
94
+ })
95
+
96
+ $('body').addClass(cls)
97
+ store('skin', cls)
98
+ return false
99
+ }
100
+
101
+ /**
102
+ * Retrieve default settings and apply them to the template
103
+ *
104
+ * @returns void
105
+ */
106
+ function setup() {
107
+ var tmp = get('skin')
108
+ if (tmp && $.inArray(tmp, mySkins))
109
+ changeSkin(tmp)
110
+
111
+ // Add the change skin listener
112
+ $('[data-skin]').on('click', function (e) {
113
+ if ($(this).hasClass('knob'))
114
+ return
115
+ e.preventDefault()
116
+ changeSkin($(this).data('skin'))
117
+ })
118
+
119
+ // Add the layout manager
120
+ $('[data-layout]').on('click', function () {
121
+ changeLayout($(this).data('layout'))
122
+ })
123
+
124
+ $('[data-controlsidebar]').on('click', function () {
125
+ changeLayout($(this).data('controlsidebar'))
126
+ var slide = !$controlSidebar.options.slide
127
+
128
+ $controlSidebar.options.slide = slide
129
+ if (!slide)
130
+ $('.control-sidebar').removeClass('control-sidebar-open')
131
+ })
132
+
133
+ $('[data-sidebarskin="toggle"]').on('click', function () {
134
+ var $sidebar = $('.control-sidebar')
135
+ if ($sidebar.hasClass('control-sidebar-dark')) {
136
+ $sidebar.removeClass('control-sidebar-dark')
137
+ $sidebar.addClass('control-sidebar-light')
138
+ } else {
139
+ $sidebar.removeClass('control-sidebar-light')
140
+ $sidebar.addClass('control-sidebar-dark')
141
+ }
142
+ })
143
+
144
+ $('[data-enable="expandOnHover"]').on('click', function () {
145
+ $(this).attr('disabled', true)
146
+ $pushMenu.expandOnHover()
147
+ if (!$('body').hasClass('sidebar-collapse'))
148
+ $('[data-layout="sidebar-collapse"]').click()
149
+ })
150
+
151
+ // Reset options
152
+ if ($('body').hasClass('fixed')) {
153
+ $('[data-layout="fixed"]').attr('checked', 'checked')
154
+ }
155
+ if ($('body').hasClass('layout-boxed')) {
156
+ $('[data-layout="layout-boxed"]').attr('checked', 'checked')
157
+ }
158
+ if ($('body').hasClass('sidebar-collapse')) {
159
+ $('[data-layout="sidebar-collapse"]').attr('checked', 'checked')
160
+ }
161
+
162
+ }
163
+
164
+ // Create the new tab
165
+ var $tabPane = $('<div />', {
166
+ 'id' : 'control-sidebar-theme-demo-options-tab',
167
+ 'class': 'tab-pane active'
168
+ })
169
+
170
+ // Create the tab button
171
+ var $tabButton = $('<li />', { 'class': 'active' })
172
+ .html('<a href=\'#control-sidebar-theme-demo-options-tab\' data-toggle=\'tab\'>'
173
+ + '<i class="fa fa-wrench"></i>'
174
+ + '</a>')
175
+
176
+ // Add the tab button to the right sidebar tabs
177
+ $('[href="#control-sidebar-home-tab"]')
178
+ .parent()
179
+ .before($tabButton)
180
+
181
+ // Create the menu
182
+ var $demoSettings = $('<div />')
183
+
184
+ // Layout options
185
+ $demoSettings.append(
186
+ '<h4 class="control-sidebar-heading">'
187
+ + 'Layout Options'
188
+ + '</h4>'
189
+ // Fixed layout
190
+ + '<div class="form-group">'
191
+ + '<label class="control-sidebar-subheading">'
192
+ + '<input type="checkbox"data-layout="fixed"class="pull-right"/> '
193
+ + 'Fixed layout'
194
+ + '</label>'
195
+ + '<p>Activate the fixed layout. You can\'t use fixed and boxed layouts together</p>'
196
+ + '</div>'
197
+ // Boxed layout
198
+ + '<div class="form-group">'
199
+ + '<label class="control-sidebar-subheading">'
200
+ + '<input type="checkbox"data-layout="layout-boxed" class="pull-right"/> '
201
+ + 'Boxed Layout'
202
+ + '</label>'
203
+ + '<p>Activate the boxed layout</p>'
204
+ + '</div>'
205
+ // Sidebar Toggle
206
+ + '<div class="form-group">'
207
+ + '<label class="control-sidebar-subheading">'
208
+ + '<input type="checkbox"data-layout="sidebar-collapse"class="pull-right"/> '
209
+ + 'Toggle Sidebar'
210
+ + '</label>'
211
+ + '<p>Toggle the left sidebar\'s state (open or collapse)</p>'
212
+ + '</div>'
213
+ // Sidebar mini expand on hover toggle
214
+ + '<div class="form-group">'
215
+ + '<label class="control-sidebar-subheading">'
216
+ + '<input type="checkbox"data-enable="expandOnHover"class="pull-right"/> '
217
+ + 'Sidebar Expand on Hover'
218
+ + '</label>'
219
+ + '<p>Let the sidebar mini expand on hover</p>'
220
+ + '</div>'
221
+ // Control Sidebar Toggle
222
+ + '<div class="form-group">'
223
+ + '<label class="control-sidebar-subheading">'
224
+ + '<input type="checkbox"data-controlsidebar="control-sidebar-open"class="pull-right"/> '
225
+ + 'Toggle Right Sidebar Slide'
226
+ + '</label>'
227
+ + '<p>Toggle between slide over content and push content effects</p>'
228
+ + '</div>'
229
+ // Control Sidebar Skin Toggle
230
+ + '<div class="form-group">'
231
+ + '<label class="control-sidebar-subheading">'
232
+ + '<input type="checkbox"data-sidebarskin="toggle"class="pull-right"/> '
233
+ + 'Toggle Right Sidebar Skin'
234
+ + '</label>'
235
+ + '<p>Toggle between dark and light skins for the right sidebar</p>'
236
+ + '</div>'
237
+ )
238
+ var $skinsList = $('<ul />', { 'class': 'list-unstyled clearfix' })
239
+
240
+ // Dark sidebar skins
241
+ var $skinBlue =
242
+ $('<li />', { style: 'float:left; width: 33.33333%; padding: 5px;' })
243
+ .append('<a href="javascript:void(0)" data-skin="skin-blue" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
244
+ + '<div><span style="display:block; width: 20%; float: left; height: 7px; background: #367fa9"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
245
+ + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
246
+ + '</a>'
247
+ + '<p class="text-center no-margin">Blue</p>')
248
+ $skinsList.append($skinBlue)
249
+ var $skinBlack =
250
+ $('<li />', { style: 'float:left; width: 33.33333%; padding: 5px;' })
251
+ .append('<a href="javascript:void(0)" data-skin="skin-black" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
252
+ + '<div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix"><span style="display:block; width: 20%; float: left; height: 7px; background: #fefefe"></span><span style="display:block; width: 80%; float: left; height: 7px; background: #fefefe"></span></div>'
253
+ + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
254
+ + '</a>'
255
+ + '<p class="text-center no-margin">Black</p>')
256
+ $skinsList.append($skinBlack)
257
+ var $skinPurple =
258
+ $('<li />', { style: 'float:left; width: 33.33333%; padding: 5px;' })
259
+ .append('<a href="javascript:void(0)" data-skin="skin-purple" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
260
+ + '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
261
+ + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
262
+ + '</a>'
263
+ + '<p class="text-center no-margin">Purple</p>')
264
+ $skinsList.append($skinPurple)
265
+ var $skinGreen =
266
+ $('<li />', { style: 'float:left; width: 33.33333%; padding: 5px;' })
267
+ .append('<a href="javascript:void(0)" data-skin="skin-green" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
268
+ + '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
269
+ + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
270
+ + '</a>'
271
+ + '<p class="text-center no-margin">Green</p>')
272
+ $skinsList.append($skinGreen)
273
+ var $skinRed =
274
+ $('<li />', { style: 'float:left; width: 33.33333%; padding: 5px;' })
275
+ .append('<a href="javascript:void(0)" data-skin="skin-red" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
276
+ + '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
277
+ + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
278
+ + '</a>'
279
+ + '<p class="text-center no-margin">Red</p>')
280
+ $skinsList.append($skinRed)
281
+ var $skinYellow =
282
+ $('<li />', { style: 'float:left; width: 33.33333%; padding: 5px;' })
283
+ .append('<a href="javascript:void(0)" data-skin="skin-yellow" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
284
+ + '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
285
+ + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
286
+ + '</a>'
287
+ + '<p class="text-center no-margin">Yellow</p>')
288
+ $skinsList.append($skinYellow)
289
+
290
+ // Light sidebar skins
291
+ var $skinBlueLight =
292
+ $('<li />', { style: 'float:left; width: 33.33333%; padding: 5px;' })
293
+ .append('<a href="javascript:void(0)" data-skin="skin-blue-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
294
+ + '<div><span style="display:block; width: 20%; float: left; height: 7px; background: #367fa9"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
295
+ + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
296
+ + '</a>'
297
+ + '<p class="text-center no-margin" style="font-size: 12px">Blue Light</p>')
298
+ $skinsList.append($skinBlueLight)
299
+ var $skinBlackLight =
300
+ $('<li />', { style: 'float:left; width: 33.33333%; padding: 5px;' })
301
+ .append('<a href="javascript:void(0)" data-skin="skin-black-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
302
+ + '<div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix"><span style="display:block; width: 20%; float: left; height: 7px; background: #fefefe"></span><span style="display:block; width: 80%; float: left; height: 7px; background: #fefefe"></span></div>'
303
+ + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
304
+ + '</a>'
305
+ + '<p class="text-center no-margin" style="font-size: 12px">Black Light</p>')
306
+ $skinsList.append($skinBlackLight)
307
+ var $skinPurpleLight =
308
+ $('<li />', { style: 'float:left; width: 33.33333%; padding: 5px;' })
309
+ .append('<a href="javascript:void(0)" data-skin="skin-purple-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
310
+ + '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
311
+ + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
312
+ + '</a>'
313
+ + '<p class="text-center no-margin" style="font-size: 12px">Purple Light</p>')
314
+ $skinsList.append($skinPurpleLight)
315
+ var $skinGreenLight =
316
+ $('<li />', { style: 'float:left; width: 33.33333%; padding: 5px;' })
317
+ .append('<a href="javascript:void(0)" data-skin="skin-green-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
318
+ + '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
319
+ + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
320
+ + '</a>'
321
+ + '<p class="text-center no-margin" style="font-size: 12px">Green Light</p>')
322
+ $skinsList.append($skinGreenLight)
323
+ var $skinRedLight =
324
+ $('<li />', { style: 'float:left; width: 33.33333%; padding: 5px;' })
325
+ .append('<a href="javascript:void(0)" data-skin="skin-red-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
326
+ + '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
327
+ + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
328
+ + '</a>'
329
+ + '<p class="text-center no-margin" style="font-size: 12px">Red Light</p>')
330
+ $skinsList.append($skinRedLight)
331
+ var $skinYellowLight =
332
+ $('<li />', { style: 'float:left; width: 33.33333%; padding: 5px;' })
333
+ .append('<a href="javascript:void(0)" data-skin="skin-yellow-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">'
334
+ + '<div><span style="display:block; width: 20%; float: left; height: 7px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 7px;"></span></div>'
335
+ + '<div><span style="display:block; width: 20%; float: left; height: 20px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 20px; background: #f4f5f7"></span></div>'
336
+ + '</a>'
337
+ + '<p class="text-center no-margin" style="font-size: 12px">Yellow Light</p>')
338
+ $skinsList.append($skinYellowLight)
339
+
340
+ $demoSettings.append('<h4 class="control-sidebar-heading">Skins</h4>')
341
+ $demoSettings.append($skinsList)
342
+
343
+ $tabPane.append($demoSettings)
344
+ $('#control-sidebar-home-tab').after($tabPane)
345
+
346
+ setup()
347
+
348
+ $('[data-toggle="tooltip"]').tooltip()
349
+ })
@@ -0,0 +1,210 @@
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
+
8
+ $(function () {
9
+
10
+ 'use strict';
11
+
12
+ // Make the dashboard widgets sortable Using jquery UI
13
+ $('.connectedSortable').sortable({
14
+ placeholder : 'sort-highlight',
15
+ connectWith : '.connectedSortable',
16
+ handle : '.box-header, .nav-tabs',
17
+ forcePlaceholderSize: true,
18
+ zIndex : 999999
19
+ });
20
+ $('.connectedSortable .box-header, .connectedSortable .nav-tabs-custom').css('cursor', 'move');
21
+
22
+ // jQuery UI sortable for the todo list
23
+ $('.todo-list').sortable({
24
+ placeholder : 'sort-highlight',
25
+ handle : '.handle',
26
+ forcePlaceholderSize: true,
27
+ zIndex : 999999
28
+ });
29
+
30
+ // bootstrap WYSIHTML5 - text editor
31
+ $('.textarea').wysihtml5();
32
+
33
+ $('.daterange').daterangepicker({
34
+ ranges : {
35
+ 'Today' : [moment(), moment()],
36
+ 'Yesterday' : [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
37
+ 'Last 7 Days' : [moment().subtract(6, 'days'), moment()],
38
+ 'Last 30 Days': [moment().subtract(29, 'days'), moment()],
39
+ 'This Month' : [moment().startOf('month'), moment().endOf('month')],
40
+ 'Last Month' : [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
41
+ },
42
+ startDate: moment().subtract(29, 'days'),
43
+ endDate : moment()
44
+ }, function (start, end) {
45
+ window.alert('You chose: ' + start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
46
+ });
47
+
48
+ /* jQueryKnob */
49
+ $('.knob').knob();
50
+
51
+ // jvectormap data
52
+ var visitorsData = {
53
+ US: 398, // USA
54
+ SA: 400, // Saudi Arabia
55
+ CA: 1000, // Canada
56
+ DE: 500, // Germany
57
+ FR: 760, // France
58
+ CN: 300, // China
59
+ AU: 700, // Australia
60
+ BR: 600, // Brazil
61
+ IN: 800, // India
62
+ GB: 320, // Great Britain
63
+ RU: 3000 // Russia
64
+ };
65
+ // World map by jvectormap
66
+ $('#world-map').vectorMap({
67
+ map : 'world_mill_en',
68
+ backgroundColor : 'transparent',
69
+ regionStyle : {
70
+ initial: {
71
+ fill : '#e4e4e4',
72
+ 'fill-opacity' : 1,
73
+ stroke : 'none',
74
+ 'stroke-width' : 0,
75
+ 'stroke-opacity': 1
76
+ }
77
+ },
78
+ series : {
79
+ regions: [
80
+ {
81
+ values : visitorsData,
82
+ scale : ['#92c1dc', '#ebf4f9'],
83
+ normalizeFunction: 'polynomial'
84
+ }
85
+ ]
86
+ },
87
+ onRegionLabelShow: function (e, el, code) {
88
+ if (typeof visitorsData[code] != 'undefined')
89
+ el.html(el.html() + ': ' + visitorsData[code] + ' new visitors');
90
+ }
91
+ });
92
+
93
+ // Sparkline charts
94
+ var myvalues = [1000, 1200, 920, 927, 931, 1027, 819, 930, 1021];
95
+ $('#sparkline-1').sparkline(myvalues, {
96
+ type : 'line',
97
+ lineColor: '#92c1dc',
98
+ fillColor: '#ebf4f9',
99
+ height : '50',
100
+ width : '80'
101
+ });
102
+ myvalues = [515, 519, 520, 522, 652, 810, 370, 627, 319, 630, 921];
103
+ $('#sparkline-2').sparkline(myvalues, {
104
+ type : 'line',
105
+ lineColor: '#92c1dc',
106
+ fillColor: '#ebf4f9',
107
+ height : '50',
108
+ width : '80'
109
+ });
110
+ myvalues = [15, 19, 20, 22, 33, 27, 31, 27, 19, 30, 21];
111
+ $('#sparkline-3').sparkline(myvalues, {
112
+ type : 'line',
113
+ lineColor: '#92c1dc',
114
+ fillColor: '#ebf4f9',
115
+ height : '50',
116
+ width : '80'
117
+ });
118
+
119
+ // The Calender
120
+ $('#calendar').datepicker();
121
+
122
+ // SLIMSCROLL FOR CHAT WIDGET
123
+ $('#chat-box').slimScroll({
124
+ height: '250px'
125
+ });
126
+
127
+ /* Morris.js Charts */
128
+ // Sales chart
129
+ var area = new Morris.Area({
130
+ element : 'revenue-chart',
131
+ resize : true,
132
+ data : [
133
+ { y: '2011 Q1', item1: 2666, item2: 2666 },
134
+ { y: '2011 Q2', item1: 2778, item2: 2294 },
135
+ { y: '2011 Q3', item1: 4912, item2: 1969 },
136
+ { y: '2011 Q4', item1: 3767, item2: 3597 },
137
+ { y: '2012 Q1', item1: 6810, item2: 1914 },
138
+ { y: '2012 Q2', item1: 5670, item2: 4293 },
139
+ { y: '2012 Q3', item1: 4820, item2: 3795 },
140
+ { y: '2012 Q4', item1: 15073, item2: 5967 },
141
+ { y: '2013 Q1', item1: 10687, item2: 4460 },
142
+ { y: '2013 Q2', item1: 8432, item2: 5713 }
143
+ ],
144
+ xkey : 'y',
145
+ ykeys : ['item1', 'item2'],
146
+ labels : ['Item 1', 'Item 2'],
147
+ lineColors: ['#a0d0e0', '#3c8dbc'],
148
+ hideHover : 'auto'
149
+ });
150
+ var line = new Morris.Line({
151
+ element : 'line-chart',
152
+ resize : true,
153
+ data : [
154
+ { y: '2011 Q1', item1: 2666 },
155
+ { y: '2011 Q2', item1: 2778 },
156
+ { y: '2011 Q3', item1: 4912 },
157
+ { y: '2011 Q4', item1: 3767 },
158
+ { y: '2012 Q1', item1: 6810 },
159
+ { y: '2012 Q2', item1: 5670 },
160
+ { y: '2012 Q3', item1: 4820 },
161
+ { y: '2012 Q4', item1: 15073 },
162
+ { y: '2013 Q1', item1: 10687 },
163
+ { y: '2013 Q2', item1: 8432 }
164
+ ],
165
+ xkey : 'y',
166
+ ykeys : ['item1'],
167
+ labels : ['Item 1'],
168
+ lineColors : ['#efefef'],
169
+ lineWidth : 2,
170
+ hideHover : 'auto',
171
+ gridTextColor : '#fff',
172
+ gridStrokeWidth : 0.4,
173
+ pointSize : 4,
174
+ pointStrokeColors: ['#efefef'],
175
+ gridLineColor : '#efefef',
176
+ gridTextFamily : 'Open Sans',
177
+ gridTextSize : 10
178
+ });
179
+
180
+ // Donut Chart
181
+ var donut = new Morris.Donut({
182
+ element : 'sales-chart',
183
+ resize : true,
184
+ colors : ['#3c8dbc', '#f56954', '#00a65a'],
185
+ data : [
186
+ { label: 'Download Sales', value: 12 },
187
+ { label: 'In-Store Sales', value: 30 },
188
+ { label: 'Mail-Order Sales', value: 20 }
189
+ ],
190
+ hideHover: 'auto'
191
+ });
192
+
193
+ // Fix for charts under tabs
194
+ $('.box ul.nav a').on('shown.bs.tab', function () {
195
+ area.redraw();
196
+ donut.redraw();
197
+ line.redraw();
198
+ });
199
+
200
+ /* The todo list plugin */
201
+ $('.todo-list').todoList({
202
+ onCheck : function () {
203
+ window.console.log($(this), 'The element has been checked');
204
+ },
205
+ onUnCheck: function () {
206
+ window.console.log($(this), 'The element has been unchecked');
207
+ }
208
+ });
209
+
210
+ });