Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | var Widgets = function () { |
| 2 | |||
| 3 | var handleMapplic = function () { |
||
| 4 | $('#mapplic').mapplic({ |
||
| 5 | source: '../../assets/global/plugins/mapplic/world.json', |
||
| 6 | height: 265, |
||
| 7 | animate: false, |
||
| 8 | sidebar: false, |
||
| 9 | minimap: false, |
||
| 10 | locations: true, |
||
| 11 | deeplinking: true, |
||
| 12 | fullscreen: false, |
||
| 13 | hovertip: true, |
||
| 14 | zoombuttons: false, |
||
| 15 | clearbutton: false, |
||
| 16 | developer: false, |
||
| 17 | maxscale: 2, |
||
| 18 | skin: 'mapplic-dark', |
||
| 19 | zoom: true |
||
| 20 | }); |
||
| 21 | } |
||
| 22 | |||
| 23 | var handleSparklineChart = function () { |
||
| 24 | $("#widget_sparkline_bar").sparkline([8, 7, 9, 8.5, 8, 8.2, 8, 8.5, 9, 8, 9], { |
||
| 25 | type: 'bar', |
||
| 26 | width: '100', |
||
| 27 | barWidth: 5, |
||
| 28 | height: '30', |
||
| 29 | barColor: '#4db3a4', |
||
| 30 | negBarColor: '#e02222' |
||
| 31 | }); |
||
| 32 | $("#widget_sparkline_bar2").sparkline([8, 7, 9, 8.5, 8, 8.2, 8, 8.5, 9, 8, 9], { |
||
| 33 | type: 'bar', |
||
| 34 | width: '100', |
||
| 35 | barWidth: 5, |
||
| 36 | height: '30', |
||
| 37 | barColor: '#f36a5a', |
||
| 38 | negBarColor: '#e02222' |
||
| 39 | }); |
||
| 40 | $("#widget_sparkline_bar3").sparkline([8, 7, 9, 8.5, 8, 8.2, 8, 8.5, 9, 8, 9], { |
||
| 41 | type: 'bar', |
||
| 42 | width: '100', |
||
| 43 | barWidth: 5, |
||
| 44 | height: '30', |
||
| 45 | barColor: '#5b9bd1', |
||
| 46 | negBarColor: '#e02222' |
||
| 47 | }); |
||
| 48 | $("#widget_sparkline_bar4").sparkline([8, 7, 9, 8.5, 8, 8.2, 8, 8.5, 9, 8, 9], { |
||
| 49 | type: 'bar', |
||
| 50 | width: '100', |
||
| 51 | barWidth: 5, |
||
| 52 | height: '30', |
||
| 53 | barColor: '#9a7caf', |
||
| 54 | negBarColor: '#e02222' |
||
| 55 | }); |
||
| 56 | } |
||
| 57 | |||
| 58 | var handleCounter = function () { |
||
| 59 | $('.counter').counterUp({ |
||
| 60 | delay: 10, |
||
| 61 | time: 1000 |
||
| 62 | }); |
||
| 63 | } |
||
| 64 | |||
| 65 | return { |
||
| 66 | |||
| 67 | // main function |
||
| 68 | init: function () { |
||
| 69 | handleMapplic(); // handle mapplic map |
||
| 70 | handleSparklineChart(); // handle sparkline chart |
||
| 71 | handleCounter(); // handle counter |
||
| 72 | } |
||
| 73 | |||
| 74 | }; |
||
| 75 | }(); |
||
| 76 | |||
| 77 | jQuery(document).ready(function() { |
||
| 78 | Widgets.init(); |
||
| 79 | }); |