UNPKG

your-dashboard

Version:
59 lines (50 loc) 1.98 kB
/* * Author: Harris * Date: 2017.03.17 * Description: * This is a demo file used only for the main dashboard (index.html) **/ $(function() { "use strict"; //Make the dashboard widgets sortable Using jquery UI $(".connectedSortable").sortable({ placeholder: "sort-highlight", connectWith: ".connectedSortable", handle: ".box-header, .nav-tabs", forcePlaceholderSize: true, zIndex: 999999 }).disableSelection(); $(".connectedSortable .box-header, .connectedSortable .nav-tabs-custom").css("cursor", "move"); //jQuery UI sortable for the todo list $(".task-list").sortable({ placeholder: "sort-highlight", handle: ".handle", forcePlaceholderSize: true, zIndex: 999999 }).disableSelection(); ; //bootstrap WYSIHTML5 - text editor // $(".textarea").wysihtml5(); $('.daterange').daterangepicker( { ranges: { 'Today': [moment(), moment()], 'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)], 'Last 7 Days': [moment().subtract('days', 6), moment()], 'Last 30 Days': [moment().subtract('days', 29), moment()], 'This Month': [moment().startOf('month'), moment().endOf('month')], 'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')] }, startDate: moment().subtract('days', 29), endDate: moment() }, function(start, end) { alert("You chose: " + start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY')); }); //Fix for charts under tabs $('.box ul.nav a').on('shown.bs.tab', function(e) { area.redraw(); donut.redraw(); }); $('.wysihtml5').wysihtml5(); });