").addClass(this.shaderClass)
34 | .hide()
35 | .css({
36 | position: "absolute",
37 | top: 0,
38 | right: 0,
39 | bottom: 0,
40 | left: 0,
41 | zIndex: this.zIndex
42 | })
43 | .appendTo(this._container);
44 | },
45 |
46 | _initLoadPanel: function() {
47 | this._loadPanel = $("
").addClass(this.loadPanelClass)
48 | .text(this.message)
49 | .hide()
50 | .css({
51 | position: "absolute",
52 | top: "50%",
53 | left: "50%",
54 | zIndex: this.zIndex
55 | })
56 | .appendTo(this._container);
57 | },
58 |
59 | show: function() {
60 | var $loadPanel = this._loadPanel.show();
61 |
62 | var actualWidth = $loadPanel.outerWidth();
63 | var actualHeight = $loadPanel.outerHeight();
64 |
65 | $loadPanel.css({
66 | marginTop: -actualHeight / 2,
67 | marginLeft: -actualWidth / 2
68 | });
69 |
70 | this._shader.show();
71 | },
72 |
73 | hide: function() {
74 | this._loadPanel.hide();
75 | this._shader.hide();
76 | }
77 |
78 | };
79 |
80 | jsGrid.LoadIndicator = LoadIndicator;
81 |
82 | }(jsGrid, jQuery));
83 |
--------------------------------------------------------------------------------
/assets/js/lib/datamap/datamap-init.js:
--------------------------------------------------------------------------------
1 | (function ($) {
2 | "use strict";
3 |
4 | var map = new Datamap({
5 | scope: 'world',
6 | element: document.getElementById('world-datamap'),
7 | responsive: true,
8 | geographyConfig: {
9 | popupOnHover: false,
10 | highlightOnHover: false,
11 | borderColor: '#8EC8FB',
12 | borderWidth: 2,
13 | highlightBorderWidth: 5,
14 | highlightFillColor: '#fff',
15 | highlightBorderColor: 'rgba(255,255,255,0.1)',
16 | borderWidth: 1,
17 | },
18 | bubblesConfig: {
19 | popupTemplate: function (geography, data) {
20 | return '
' + data.country +''+ data.sold + '
'
21 | },
22 | borderWidth: 2,
23 | highlightBorderWidth: 5,
24 | highlightFillColor: '#fff',
25 | highlightBorderColor: 'rgba(255,255,255,0.1)',
26 | fillOpacity: 0.5
27 | },
28 | fills: {
29 | 'Visited': '#f5f5f5',
30 | 'neato': '#fff',
31 | 'white': '#fff',
32 | defaultFill: '#8EC8FB'
33 | }
34 | });
35 |
36 |
37 | map.bubbles([
38 | {
39 | centered: 'USA',
40 | fillKey: 'white',
41 | radius: 5,
42 | sold:'$500',
43 | country:'United States'
44 | },
45 | {
46 | centered: 'SAU',
47 | fillKey: 'white',
48 | radius: 5,
49 | sold:'$900',
50 | country:'Saudia Arabia'
51 | },
52 | {
53 | centered: 'RUS',
54 | fillKey: 'white',
55 | radius: 5,
56 | sold:'$250',
57 | country:'Russia'
58 | },
59 | {
60 | centered: 'CAN',
61 | fillKey: 'white',
62 | radius: 5,
63 | sold:'$1000',
64 | country:'Canada'
65 | },
66 | {
67 | centered: 'IND',
68 | fillKey: 'white',
69 | radius: 5,
70 | sold:'$50',
71 | country:'India'
72 | },
73 | {
74 | centered: 'AUS',
75 | fillKey: 'white',
76 | radius: 5,
77 | sold:'$700',
78 | country:'Australia'
79 | },
80 | {
81 | centered: 'BGD',
82 | fillKey: 'white',
83 | radius: 5,
84 | sold:'$1500',
85 | country:'Bangladesh'
86 | }
87 | ])
88 |
89 |
90 | window.addEventListener('resize', function (event) {
91 | map.resize();
92 | });
93 |
94 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/lib/data-table/buttons.colVis.min.js:
--------------------------------------------------------------------------------
1 | (function(g){"function"===typeof define&&define.amd?define(["jquery","datatables.net","datatables.net-buttons"],function(d){return g(d,window,document)}):"object"===typeof exports?module.exports=function(d,e){d||(d=window);if(!e||!e.fn.dataTable)e=require("datatables.net")(d,e).$;e.fn.dataTable.Buttons||require("datatables.net-buttons")(d,e);return g(e,d,d.document)}:g(jQuery,window,document)})(function(g,d,e,h){d=g.fn.dataTable;g.extend(d.ext.buttons,{colvis:function(a,b){return{extend:"collection",
2 | text:function(a){return a.i18n("buttons.colvis","Column visibility")},className:"buttons-colvis",buttons:[{extend:"columnsToggle",columns:b.columns}]}},columnsToggle:function(a,b){return a.columns(b.columns).indexes().map(function(a){return{extend:"columnToggle",columns:a}}).toArray()},columnToggle:function(a,b){return{extend:"columnVisibility",columns:b.columns}},columnsVisibility:function(a,b){return a.columns(b.columns).indexes().map(function(a){return{extend:"columnVisibility",columns:a,visibility:b.visibility}}).toArray()},
3 | columnVisibility:{columns:h,text:function(a,b,c){return c._columnText(a,c.columns)},className:"buttons-columnVisibility",action:function(a,b,c,f){a=b.columns(f.columns);b=a.visible();a.visible(f.visibility!==h?f.visibility:!(b.length&&b[0]))},init:function(a,b,c){var f=this;a.on("column-visibility.dt"+c.namespace,function(b,d){d.bDestroying||f.active(a.column(c.columns).visible())}).on("column-reorder.dt"+c.namespace,function(b,d,e){1===a.columns(c.columns).count()&&("number"===typeof c.columns&&
4 | (c.columns=e.mapping[c.columns]),b=a.column(c.columns),f.text(c._columnText(a,c.columns)),f.active(b.visible()))});this.active(a.column(c.columns).visible())},destroy:function(a,b,c){a.off("column-visibility.dt"+c.namespace).off("column-reorder.dt"+c.namespace)},_columnText:function(a,b){var c=a.column(b).index();return a.settings()[0].aoColumns[c].sTitle.replace(/\n/g," ").replace(/<.*?>/g,"").replace(/^\s+|\s+$/g,"")}},colvisRestore:{className:"buttons-colvisRestore",text:function(a){return a.i18n("buttons.colvisRestore",
5 | "Restore visibility")},init:function(a,b,c){c._visOriginal=a.columns().indexes().map(function(b){return a.column(b).visible()}).toArray()},action:function(a,b,c,d){b.columns().every(function(a){a=b.colReorder&&b.colReorder.transpose?b.colReorder.transpose(a,"toOriginal"):a;this.visible(d._visOriginal[a])})}},colvisGroup:{className:"buttons-colvisGroup",action:function(a,b,c,d){b.columns(d.show).visible(!0,!1);b.columns(d.hide).visible(!1,!1);b.columns.adjust()},show:[],hide:[]}});return d.Buttons});
6 |
--------------------------------------------------------------------------------
/assets/js/lib/chat-widget/chat-widget-init.js:
--------------------------------------------------------------------------------
1 | ////(function($) {
2 | //// "use strict";
3 | ////
4 | ////
5 | ////
6 | ////
7 | ////
8 | ////})(jQuery);
9 | //
10 | //
11 | //(function () {
12 | // "use strict";
13 | // var Message;
14 | // Message = function (arg) {
15 | // this.text = arg.text, this.message_side = arg.message_side;
16 | // this.draw = function (_this) {
17 | // return function () {
18 | // var $message;
19 | // $message = $($('.message_template').clone().html());
20 | // $message.addClass(_this.message_side).find('.text').html(_this.text);
21 | // $('.messages').append($message);
22 | // return setTimeout(function () {
23 | // return $message.addClass('appeared');
24 | // }, 0);
25 | // };
26 | // }(this);
27 | // return this;
28 | // };
29 | // $(function () {
30 | // var getMessageText, message_side, sendMessage;
31 | // message_side = 'right';
32 | // getMessageText = function () {
33 | // var $message_input;
34 | // $message_input = $('.message_input');
35 | // return $message_input.val();
36 | // };
37 | // sendMessage = function (text) {
38 | // var $messages, message;
39 | // if (text.trim() === '') {
40 | // return;
41 | // }
42 | // $('.message_input').val('');
43 | // $messages = $('.messages');
44 | // message_side = message_side === 'left' ? 'right' : 'left';
45 | // message = new Message({
46 | // text: text,
47 | // message_side: message_side
48 | // });
49 | // message.draw();
50 | // return $messages.animate({
51 | // scrollTop: $messages.prop('scrollHeight')
52 | // }, 300);
53 | // };
54 | // $('.send_message').click(function (e) {
55 | // return sendMessage(getMessageText());
56 | // });
57 | // $('.message_input').keyup(function (e) {
58 | // if (e.which === 13) {
59 | // return sendMessage(getMessageText());
60 | // }
61 | // });
62 | // sendMessage('Hello Philip! :)');
63 | // setTimeout(function () {
64 | // return sendMessage('Hi Sandy! How are you?');
65 | // }, 1000);
66 | // return setTimeout(function () {
67 | // return sendMessage('I\'m fine, thank you!');
68 | // }, 2000);
69 | // });
70 | //}.call(this));
--------------------------------------------------------------------------------
/assets/fonts/fontawesome-webfont_files/viewsource.css:
--------------------------------------------------------------------------------
1 | @charset "utf-8";
2 | /* This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 |
6 | @namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */
7 |
8 | *|*:Webstrot {
9 | background-color: white;
10 | color: black;
11 | direction: ltr;
12 | -moz-control-character-visibility: visible;
13 | height: 100%;
14 | }
15 | #viewsource {
16 | font-family: -moz-fixed;
17 | font-weight: normal;
18 | white-space: pre;
19 | counter-reset: line;
20 | height: 100%;
21 | box-sizing: border-box;
22 | margin: 0;
23 | padding: 8px;
24 | }
25 | #viewsource.wrap {
26 | white-space: pre-wrap;
27 | word-wrap: break-word;
28 | }
29 | pre {
30 | font: inherit;
31 | color: inherit;
32 | white-space: inherit;
33 | margin: 0 0 0 5ch;
34 | }
35 | pre[id]:before,
36 | span[id]:before {
37 | content: counter(line) " ";
38 | counter-increment: line;
39 | -moz-user-select: none;
40 | display: inline-block;
41 | width: 5ch;
42 | margin: 0 0 0 -5ch;
43 | text-align: right;
44 | color: #ccc;
45 | font-weight: normal;
46 | font-style: normal;
47 | }
48 | .highlight .start-tag {
49 | color: purple;
50 | font-weight: bold;
51 | }
52 | .highlight .end-tag {
53 | color: purple;
54 | font-weight: bold;
55 | }
56 | .highlight .comment {
57 | color: green;
58 | font-style: italic;
59 | }
60 | .highlight .cdata {
61 | color: #CC0066;
62 | }
63 | .highlight .doctype {
64 | color: steelblue;
65 | font-style: italic;
66 | }
67 | .highlight .pi {
68 | color: orchid;
69 | font-style: italic;
70 | }
71 | .highlight .entity {
72 | color: #FF4500;
73 | font-weight: normal;
74 | }
75 | .highlight .text {
76 | font-weight: normal;
77 | }
78 | .highlight .attribute-name {
79 | color: black;
80 | font-weight: bold;
81 | }
82 | .highlight .attribute-value {
83 | color: blue;
84 | font-weight: normal;
85 | }
86 | .highlight .markupdeclaration {
87 | color: steelblue;
88 | font-style: italic;
89 | }
90 | span:not(.error), a:not(.error) {
91 | unicode-bidi: embed;
92 | }
93 | span[id] {
94 | unicode-bidi: -moz-isolate;
95 | }
96 | .highlight .error,
97 | .highlight .error > :-moz-any(.start-tag, .end-tag, .comment, .cdata, .doctype,
98 | .pi, .entity, .attribute-name, .attribute-value) {
99 | color: red;
100 | font-weight: bold;
101 | }
102 |
--------------------------------------------------------------------------------
/assets/js/lib/peitychart/peitychart.init.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | "use strict";
3 | // Just the defaults.
4 | $("span.pie").peity("pie",{
5 | width: '50',
6 | height: '50'
7 | })
8 |
9 | $('span.donut').peity('donut',{
10 | width: '50',
11 | height: '50'
12 | })
13 |
14 |
15 | $(".peity-line").peity("line",{
16 | width: '300',
17 | height: '100'
18 | })
19 |
20 | $(".bar").peity("bar",{
21 | width: '300',
22 | height: '100'
23 | })
24 | $(".bar-line").peity("bar",{
25 | width: '100',
26 | height: '100'
27 | })
28 | $(".bar-colours-1").peity("bar", {
29 | fill: ["red", "green", "blue"],
30 | width: '100',
31 | height: '100'
32 | })
33 |
34 | $(".bar-colours-2").peity("bar", {
35 | fill: function(value) {
36 | return value > 0 ? "green" : "red"
37 | },
38 | width: '100',
39 | height: '100'
40 | })
41 |
42 | $(".bar-colours-3").peity("bar", {
43 | fill: function(_, i, all) {
44 | var g = parseInt((i / all.length) * 255)
45 | return "rgb(255, " + g + ", 0)"
46 | },
47 | width: '100',
48 | height: '100'
49 | })
50 |
51 | $(".pie-colours-1").peity("pie", {
52 | fill: ["cyan", "magenta", "yellow", "black"],
53 | width: '100',
54 | height: '100'
55 | })
56 |
57 | $(".pie-colours-2").peity("pie", {
58 | fill: function(_, i, all) {
59 | var g = parseInt((i / all.length) * 255)
60 | return "rgb(255, " + g + ", 0)"
61 | },
62 | width: '100',
63 | height: '100'
64 | })
65 |
66 | // Using data attributes
67 | $(".data-attributes span").peity("donut")
68 |
69 | // Evented example.
70 | $("select").change(function() {
71 | var text = $(this).val() + "/" + 5
72 |
73 | $(this)
74 | .siblings("span.graph")
75 | .text(text)
76 | .change()
77 |
78 | $("#notice").text("Chart updated: " + text)
79 | }).change()
80 |
81 | $("span.graph").peity("pie")
82 |
83 | // Updating charts.
84 | var updatingChart = $(".updating-chart").peity("line", { width: "100%",height:100 })
85 |
86 | setInterval(function() {
87 | var random = Math.round(Math.random() * 10)
88 | var values = updatingChart.text().split(",")
89 | values.shift()
90 | values.push(random)
91 |
92 | updatingChart
93 | .text(values.join(","))
94 | .change()
95 | }, 1000)
96 | })
97 |
98 |
99 |
--------------------------------------------------------------------------------
/assets/css/lib/rangSlider/ion.rangeSlider.skinNice.css:
--------------------------------------------------------------------------------
1 | /* Ion.RangeSlider, Nice Skin
2 | // css version 2.0.3
3 | // © Denis Ineshin, 2014 https://github.com/IonDen
4 | // ===================================================================================================================*/
5 |
6 | /* =====================================================================================================================
7 | // Skin details */
8 |
9 | .irs-line-mid,
10 | .irs-line-left,
11 | .irs-line-right,
12 | .irs-bar,
13 | .irs-bar-edge,
14 | .irs-slider {
15 | background: url(../img/sprite-skin-nice.png) repeat-x;
16 | }
17 |
18 | .irs {
19 | height: 40px;
20 | }
21 | .irs-with-grid {
22 | height: 60px;
23 | }
24 | .irs-line {
25 | height: 8px; top: 25px;
26 | }
27 | .irs-line-left {
28 | height: 8px;
29 | background-position: 0 -30px;
30 | }
31 | .irs-line-mid {
32 | height: 8px;
33 | background-position: 0 0;
34 | }
35 | .irs-line-right {
36 | height: 8px;
37 | background-position: 100% -30px;
38 | }
39 |
40 | .irs-bar {
41 | height: 8px; top: 25px;
42 | background-position: 0 -60px;
43 | }
44 | .irs-bar-edge {
45 | top: 25px;
46 | height: 8px; width: 11px;
47 | background-position: 0 -90px;
48 | }
49 |
50 | .irs-shadow {
51 | height: 1px; top: 34px;
52 | background: #000;
53 | opacity: 0.15;
54 | }
55 | .lt-ie9 .irs-shadow {
56 | filter: alpha(opacity=15);
57 | }
58 |
59 | .irs-slider {
60 | width: 22px; height: 22px;
61 | top: 17px;
62 | background-position: 0 -120px;
63 | }
64 | .irs-slider.state_hover, .irs-slider:hover {
65 | background-position: 0 -150px;
66 | }
67 |
68 | .irs-min, .irs-max {
69 | color: #999;
70 | font-size: 10px; line-height: 1.333;
71 | text-shadow: none;
72 | top: 0; padding: 1px 3px;
73 | background: rgba(0,0,0,0.1);
74 | -moz-border-radius: 3px;
75 | border-radius: 3px;
76 | }
77 | .lt-ie9 .irs-min, .lt-ie9 .irs-max {
78 | background: #ccc;
79 | }
80 |
81 | .irs-from, .irs-to, .irs-single {
82 | color: #fff;
83 | font-size: 10px; line-height: 1.333;
84 | text-shadow: none;
85 | padding: 1px 5px;
86 | background: rgba(0,0,0,0.3);
87 | -moz-border-radius: 3px;
88 | border-radius: 3px;
89 | }
90 | .lt-ie9 .irs-from, .lt-ie9 .irs-to, .lt-ie9 .irs-single {
91 | background: #999;
92 | }
93 |
94 | .irs-grid-pol {
95 | background: #99a4ac;
96 | }
97 | .irs-grid-text {
98 | color: #99a4ac;
99 | }
100 |
101 | .irs-disabled {
102 | }
103 |
--------------------------------------------------------------------------------
/assets/css/lib/rangSlider/ion.rangeSlider.skinSimple.css:
--------------------------------------------------------------------------------
1 | /* Ion.RangeSlider, Simple Skin
2 | // css version 2.0.3
3 | // © Denis Ineshin, 2014 https://github.com/IonDen
4 | // ===================================================================================================================*/
5 |
6 | /* =====================================================================================================================
7 | // Skin details */
8 |
9 | .irs-line-mid,
10 | .irs-line-left,
11 | .irs-line-right,
12 | .irs-bar,
13 | .irs-bar-edge,
14 | .irs-slider {
15 | background: url(../img/sprite-skin-simple.png) repeat-x;
16 | }
17 |
18 | .irs {
19 | height: 40px;
20 | }
21 | .irs-with-grid {
22 | height: 60px;
23 | }
24 | .irs-line {
25 | height: 6px; top: 25px;
26 | }
27 | .irs-line-left {
28 | height: 6px;
29 | background-position: 0 -30px;
30 | }
31 | .irs-line-mid {
32 | height: 6px;
33 | background-position: 0 0;
34 | }
35 | .irs-line-right {
36 | height: 6px;
37 | background-position: 100% -30px;
38 | }
39 |
40 | .irs-bar {
41 | height: 6px; top: 25px;
42 | background-position: 0 -60px;
43 | }
44 | .irs-bar-edge {
45 | top: 25px;
46 | height: 6px; width: 7px;
47 | background-position: 0 -90px;
48 | }
49 |
50 | .irs-shadow {
51 | height: 1px; top: 34px;
52 | background: #000;
53 | opacity: 0.75;
54 | }
55 | .lt-ie9 .irs-shadow {
56 | filter: alpha(opacity=75);
57 | }
58 |
59 | .irs-slider {
60 | width: 8px; height: 15px;
61 | top: 21px;
62 | background-position: 0 -120px;
63 | }
64 | .irs-slider.state_hover, .irs-slider:hover {
65 | background-position: 0 -150px;
66 | }
67 |
68 | .irs-min, .irs-max {
69 | color: #c0c0c0;
70 | font-size: 10px; line-height: 1.333;
71 | text-shadow: none;
72 | top: 0; padding: 1px 3px;
73 | background: rgba(0,0,0,0.1);
74 | -moz-border-radius: 3px;
75 | border-radius: 3px;
76 | }
77 | .lt-ie9 .irs-min, .lt-ie9 .irs-max {
78 | background: #3654b0;
79 | }
80 |
81 | .irs-from, .irs-to, .irs-single {
82 | color: #000;
83 | font-size: 10px; line-height: 1.333;
84 | text-shadow: none;
85 | padding: 1px 5px;
86 | background: rgba(255,255,255,0.8);
87 | -moz-border-radius: 3px;
88 | border-radius: 3px;
89 | }
90 | .lt-ie9 .irs-from, .lt-ie9 .irs-to, .lt-ie9 .irs-single {
91 | background: #d8dff3;
92 | }
93 |
94 | .irs-grid-pol {
95 | background: #777;
96 | }
97 | .irs-grid-text {
98 | color: #e0e0e0;
99 | }
100 |
101 | .irs-disabled {
102 | }
103 |
--------------------------------------------------------------------------------
/assets/js/lib/easing/stepup-form-init.js:
--------------------------------------------------------------------------------
1 |
2 | //jQuery time
3 | var current_fs, next_fs, previous_fs; //fieldsets
4 | var left, opacity, scale; //fieldset properties which we will animate
5 | var animating; //flag to prevent quick multi-click glitches
6 |
7 | $(".next").click(function(){
8 | if(animating) return false;
9 | animating = true;
10 |
11 | current_fs = $(this).parent();
12 | next_fs = $(this).parent().next();
13 |
14 | //activate next step on progressbar using the index of next_fs
15 | $("#progressbar-inner li").eq($("fieldset").index(next_fs)).addClass("active");
16 |
17 | //show the next fieldset
18 | next_fs.show();
19 | //hide the current fieldset with style
20 | current_fs.animate({opacity: 0}, {
21 | step: function(now, mx) {
22 | //as the opacity of current_fs reduces to 0 - stored in "now"
23 | //1. scale current_fs down to 80%
24 | scale = 1 - (1 - now) * 0.2;
25 | //2. bring next_fs from the right(50%)
26 | left = (now * 50)+"%";
27 | //3. increase opacity of next_fs to 1 as it moves in
28 | opacity = 1 - now;
29 | current_fs.css({
30 | 'transform': 'scale('+scale+')',
31 | 'position': 'absolute'
32 | });
33 | next_fs.css({'left': left, 'opacity': opacity});
34 | },
35 | duration: 800,
36 | complete: function(){
37 | current_fs.hide();
38 | animating = false;
39 | },
40 | //this comes from the custom easing plugin
41 | easing: 'easeInOutBack'
42 | });
43 | });
44 |
45 | $(".previous").click(function(){
46 | if(animating) return false;
47 | animating = true;
48 |
49 | current_fs = $(this).parent();
50 | previous_fs = $(this).parent().prev();
51 |
52 | //de-activate current step on progressbar
53 | $("#progressbar-inner li").eq($("fieldset").index(current_fs)).removeClass("active");
54 |
55 | //show the previous fieldset
56 | previous_fs.show();
57 | //hide the current fieldset with style
58 | current_fs.animate({opacity: 0}, {
59 | step: function(now, mx) {
60 | //as the opacity of current_fs reduces to 0 - stored in "now"
61 | //1. scale previous_fs from 80% to 100%
62 | scale = 0.8 + (1 - now) * 0.2;
63 | //2. take current_fs to the right(50%) - from 0%
64 | left = ((1-now) * 50)+"%";
65 | //3. increase opacity of previous_fs to 1 as it moves in
66 | opacity = 1 - now;
67 | current_fs.css({'left': left});
68 | previous_fs.css({'transform': 'scale('+scale+')', 'opacity': opacity});
69 | },
70 | duration: 800,
71 | complete: function(){
72 | current_fs.hide();
73 | animating = false;
74 | },
75 | //this comes from the custom easing plugin
76 | easing: 'easeInOutBack'
77 | });
78 | });
79 |
80 | $(".submit").click(function(){
81 | return false;
82 | })
83 |
--------------------------------------------------------------------------------
/assets/css/lib/rangSlider/ion.rangeSlider.skinFlat.css:
--------------------------------------------------------------------------------
1 | /* Ion.RangeSlider, Flat UI Skin
2 | // css version 2.0.3
3 | // © Denis Ineshin, 2014 https://github.com/IonDen
4 | // ===================================================================================================================*/
5 |
6 | /* =====================================================================================================================
7 | // Skin details */
8 |
9 | .irs-line-mid,
10 | .irs-line-left,
11 | .irs-line-right,
12 | .irs-bar,
13 | .irs-bar-edge,
14 | .irs-slider {
15 | background: url(../../../images/rangeSliderimg/sprite-skin-flat.png) repeat-x;
16 | }
17 |
18 | .irs {
19 | height: 40px;
20 | }
21 | .irs-with-grid {
22 | height: 60px;
23 | }
24 | .irs-line {
25 | height: 12px; top: 25px;
26 | }
27 | .irs-line-left {
28 | height: 12px;
29 | background-position: 0 -30px;
30 | }
31 | .irs-line-mid {
32 | height: 12px;
33 | background-position: 0 0;
34 | }
35 | .irs-line-right {
36 | height: 12px;
37 | background-position: 100% -30px;
38 | }
39 |
40 | .irs-bar {
41 | height: 12px; top: 25px;
42 | background-position: 0 -60px;
43 | }
44 | .irs-bar-edge {
45 | top: 25px;
46 | height: 12px; width: 9px;
47 | background-position: 0 -90px;
48 | }
49 |
50 | .irs-shadow {
51 | height: 3px; top: 34px;
52 | background: #000;
53 | opacity: 0.25;
54 | }
55 | .lt-ie9 .irs-shadow {
56 | filter: alpha(opacity=25);
57 | }
58 |
59 | .irs-slider {
60 | width: 16px; height: 18px;
61 | top: 22px;
62 | background-position: 0 -120px;
63 | }
64 | .irs-slider.state_hover, .irs-slider:hover {
65 | background-position: 0 -150px;
66 | }
67 |
68 | .irs-min, .irs-max {
69 | color: #999;
70 | font-size: 10px; line-height: 1.333;
71 | text-shadow: none;
72 | top: 0; padding: 1px 3px;
73 | background: #e1e4e9;
74 | -moz-border-radius: 4px;
75 | border-radius: 4px;
76 | }
77 |
78 | .irs-from, .irs-to, .irs-single {
79 | color: #fff;
80 | font-size: 10px; line-height: 1.333;
81 | text-shadow: none;
82 | padding: 1px 5px;
83 | background: #ed5565;
84 | -moz-border-radius: 4px;
85 | border-radius: 4px;
86 | }
87 | .irs-from:after, .irs-to:after, .irs-single:after {
88 | position: absolute; display: block; content: "";
89 | bottom: -6px; left: 50%;
90 | width: 0; height: 0;
91 | margin-left: -3px;
92 | overflow: hidden;
93 | border: 3px solid transparent;
94 | border-top-color: #ed5565;
95 | }
96 |
97 |
98 | .irs-grid-pol {
99 | background: #e1e4e9;
100 | }
101 | .irs-grid-text {
102 | color: #999;
103 | }
104 |
105 | .irs-disabled {
106 | }
107 |
--------------------------------------------------------------------------------
/assets/js/lib/jsgrid/fields/jsgrid.field.checkbox.js:
--------------------------------------------------------------------------------
1 | (function(jsGrid, $, undefined) {
2 |
3 | var Field = jsGrid.Field;
4 |
5 | function CheckboxField(config) {
6 | Field.call(this, config);
7 | }
8 |
9 | CheckboxField.prototype = new Field({
10 |
11 | sorter: "number",
12 | align: "center",
13 | autosearch: true,
14 |
15 | itemTemplate: function(value) {
16 | return this._createCheckbox().prop({
17 | checked: value,
18 | disabled: true
19 | });
20 | },
21 |
22 | filterTemplate: function() {
23 | if(!this.filtering)
24 | return "";
25 |
26 | var grid = this._grid,
27 | $result = this.filterControl = this._createCheckbox();
28 |
29 | $result.prop({
30 | readOnly: true,
31 | indeterminate: true
32 | });
33 |
34 | $result.on("click", function() {
35 | var $cb = $(this);
36 |
37 | if($cb.prop("readOnly")) {
38 | $cb.prop({
39 | checked: false,
40 | readOnly: false
41 | });
42 | }
43 | else if(!$cb.prop("checked")) {
44 | $cb.prop({
45 | readOnly: true,
46 | indeterminate: true
47 | });
48 | }
49 | });
50 |
51 | if(this.autosearch) {
52 | $result.on("click", function() {
53 | grid.search();
54 | });
55 | }
56 |
57 | return $result;
58 | },
59 |
60 | insertTemplate: function() {
61 | if(!this.inserting)
62 | return "";
63 |
64 | return this.insertControl = this._createCheckbox();
65 | },
66 |
67 | editTemplate: function(value) {
68 | if(!this.editing)
69 | return this.itemTemplate.apply(this, arguments);
70 |
71 | var $result = this.editControl = this._createCheckbox();
72 | $result.prop("checked", value);
73 | return $result;
74 | },
75 |
76 | filterValue: function() {
77 | return this.filterControl.get(0).indeterminate
78 | ? undefined
79 | : this.filterControl.is(":checked");
80 | },
81 |
82 | insertValue: function() {
83 | return this.insertControl.is(":checked");
84 | },
85 |
86 | editValue: function() {
87 | return this.editControl.is(":checked");
88 | },
89 |
90 | _createCheckbox: function() {
91 | return $("
").attr("type", "checkbox");
92 | }
93 | });
94 |
95 | jsGrid.fields.checkbox = jsGrid.CheckboxField = CheckboxField;
96 |
97 | }(jsGrid, jQuery));
98 |
--------------------------------------------------------------------------------
/assets/css/lib/owl.carousel.min.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Owl Carousel v2.2.0
3 | * Copyright 2013-2016 David Deutsch
4 | * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE)
5 | */
6 | .owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%;-webkit-transform-style:preserve-3d}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOut{0%{opacity:1}100%{opacity:0}}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item img.owl-lazy{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:-webkit-transform .1s ease;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-webkit-transform:scale(1.3,1.3);-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}
--------------------------------------------------------------------------------
/assets/css/lib/rangSlider/ion.rangeSlider.skinModern.css:
--------------------------------------------------------------------------------
1 | /* Ion.RangeSlider, Modern Skin
2 | // css version 2.0.3
3 | // © Denis Ineshin, 2014 https://github.com/IonDen
4 | // ===================================================================================================================*/
5 |
6 | /* =====================================================================================================================
7 | // Skin details */
8 |
9 | .irs-line-mid,
10 | .irs-line-left,
11 | .irs-line-right,
12 | .irs-bar,
13 | .irs-bar-edge,
14 | .irs-slider {
15 | background: url(../rangSlider/sprite-skin-modern.png) repeat-x;
16 | }
17 |
18 | .irs {
19 | height: 50px;
20 | }
21 | .irs-with-grid {
22 | height: 70px;
23 | }
24 | .irs-line {
25 | height: 6px; top: 25px;
26 | }
27 | .irs-line-left {
28 | height: 6px;
29 | background-position: 0 -30px;
30 | }
31 | .irs-line-mid {
32 | height: 6px;
33 | background-position: 0 0;
34 | }
35 | .irs-line-right {
36 | height: 6px;
37 | background-position: 100% -30px;
38 | }
39 |
40 | .irs-bar {
41 | height: 6px; top: 25px;
42 | background-position: 0 -60px;
43 | }
44 | .irs-bar-edge {
45 | top: 25px;
46 | height: 6px; width: 6px;
47 | background-position: 0 -90px;
48 | }
49 |
50 | .irs-shadow {
51 | height: 5px; top: 25px;
52 | background: #000;
53 | opacity: 0.25;
54 | }
55 | .lt-ie9 .irs-shadow {
56 | filter: alpha(opacity=25);
57 | }
58 |
59 | .irs-slider {
60 | width: 11px; height: 18px;
61 | top: 31px;
62 | background-position: 0 -120px;
63 | }
64 | .irs-slider.state_hover, .irs-slider:hover {
65 | background-position: 0 -150px;
66 | }
67 |
68 | .irs-min, .irs-max {
69 | color: #999;
70 | font-size: 10px; line-height: 1.333;
71 | text-shadow: none;
72 | top: 0; padding: 1px 3px;
73 | background: #e1e4e9;
74 | -moz-border-radius: 4px;
75 | border-radius: 4px;
76 | }
77 |
78 | .irs-from, .irs-to, .irs-single {
79 | color: #fff;
80 | font-size: 10px; line-height: 1.333;
81 | text-shadow: none;
82 | padding: 1px 5px;
83 | background: #20b426;
84 | -moz-border-radius: 4px;
85 | border-radius: 4px;
86 | }
87 | .irs-from:after, .irs-to:after, .irs-single:after {
88 | position: absolute; display: block; content: "";
89 | bottom: -6px; left: 50%;
90 | width: 0; height: 0;
91 | margin-left: -3px;
92 | overflow: hidden;
93 | border: 3px solid transparent;
94 | border-top-color: #20b426;
95 | }
96 |
97 | .irs-grid {
98 | height: 34px;
99 | }
100 | .irs-grid-pol {
101 | background: #c0c0c0;
102 | }
103 | .irs-grid-text {
104 | bottom: 12px;
105 | color: #c0c0c0;
106 | }
107 |
108 | .irs-disable-mask {
109 |
110 | }
111 | .irs-disabled {
112 |
113 | }
114 | .lt-ie9 .irs-disabled {
115 |
116 | }
117 |
--------------------------------------------------------------------------------
/layouts/sidebar.php:
--------------------------------------------------------------------------------
1 |
66 |
--------------------------------------------------------------------------------
/assets/js/lib/invoice-edit.js:
--------------------------------------------------------------------------------
1 | var TAX_RATE = parseFloat($('#config_tax_rate').val());
2 | var TAX_SETTING = false;
3 | $('body').addClass('hidetax hidenote hidedate');
4 |
5 |
6 | function init_date() {
7 | var now = new Date();
8 | var month = (now.getMonth() + 1);
9 | var day = now.getDate();
10 | if (month < 10) {
11 | month = "0" + month;
12 | }
13 | if (day < 10) {
14 | day = "0" + day;
15 | }
16 | var today = day + '.' + month + '.' + now.getFullYear().toString().substr(2, 2);
17 |
18 | var intwoweeks = new Date(now.getTime() + 14 * 24 * 60 * 60 * 1000);
19 | var month = (intwoweeks.getMonth() + 1);
20 | var day = intwoweeks.getDate();
21 | if (month < 10) {
22 | month = "0" + month;
23 | }
24 | if (day < 10) {
25 | day = "0" + day;
26 | }
27 |
28 | var twoweeks = day + '.' + month + '.' + intwoweeks.getFullYear().toString().substr(2, 2);
29 |
30 |
31 |
32 | $('.datePicker').val(today);
33 | $('.twoweeks').val(twoweeks);
34 | }
35 |
36 | function calculate() {
37 |
38 | var total_price = 0,
39 | total_tax = 0;
40 |
41 | console.log('CALCULATING - Tax Rate:' + TAX_RATE);
42 |
43 | $('.invoicelist-body tbody tr').each(function () {
44 | var row = $(this),
45 | rate = row.find('.rate input').val(),
46 | amount = row.find('.amount input').val();
47 |
48 | var sum = rate * amount;
49 | var tax = ((sum / (TAX_RATE + 100)) * TAX_RATE);
50 |
51 |
52 | total_price = total_price + sum;
53 | total_tax = total_tax + tax;
54 |
55 | row.find('.sum').text(sum.toFixed(2));
56 | row.find('.tax').text(tax.toFixed(2));
57 | });
58 |
59 | $('#total_price').text(total_price.toFixed(2));
60 | $('#total_tax').text(total_tax.toFixed(2));
61 | }
62 |
63 |
64 | var newRow = '
| xJeans | Blue and black | Datum | | | | |
';
65 |
66 | $('.invoicelist-body').on('keyup', 'input', function () {
67 | calculate();
68 | });
69 |
70 | $('.newRow').on('click', function (e) {
71 | $('.invoicelist-body tbody').append(newRow);
72 | e.preventDefault();
73 | calculate();
74 | });
75 |
76 | $('body').on('click', '.removeRow', function (e) {
77 | $(this).closest('tr').remove();
78 | e.preventDefault();
79 | calculate();
80 | });
81 |
82 | $('#config_note').on('change', function () {
83 | $('body').toggleClass('shownote hidenote');
84 | });
85 | $('#config_tax').on('change', function () {
86 | TAX_SETTING = !TAX_SETTING;
87 | $('body').toggleClass('showtax hidetax');
88 | });
89 |
90 | $('#config_tax_rate').on('keyup', function () {
91 | TAX_RATE = parseFloat($(this).val());
92 | if (TAX_RATE < 0 || TAX_RATE > 100) {
93 | TAX_RATE = 0;
94 | }
95 | console.log('Changed tax rate to: ' + TAX_RATE);
96 | calculate();
97 | });
98 |
99 | $('#config_date').on('change', function () {
100 | $('body').toggleClass('hidedate showdate');
101 | });
102 |
103 |
104 | init_date();
105 | calculate();
--------------------------------------------------------------------------------
/assets/js/lib/weather/jquery.simpleWeather.min.js:
--------------------------------------------------------------------------------
1 | /*! simpleWeather v3.1.0 - http://simpleweatherjs.com */
2 | !function(t){"use strict";function e(t,e){return"f"===t?Math.round(5/9*(e-32)):Math.round(1.8*e+32)}t.extend({simpleWeather:function(i){i=t.extend({location:"",woeid:"",unit:"f",success:function(t){},error:function(t){}},i);var o=new Date,n="https://query.yahooapis.com/v1/public/yql?format=json&rnd="+o.getFullYear()+o.getMonth()+o.getDay()+o.getHours()+"&diagnostics=true&callback=?&q=";if(""!==i.location){var r="";r=/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/.test(i.location)?"("+i.location+")":i.location,n+='select * from weather.forecast where woeid in (select woeid from geo.places(1) where text="'+r+'") and u="'+i.unit+'"'}else{if(""===i.woeid)return i.error("Could not retrieve weather due to an invalid location."),!1;n+="select * from weather.forecast where woeid="+i.woeid+' and u="'+i.unit+'"'}return t.getJSON(encodeURI(n),function(t){if(null!==t&&null!==t.query&&null!==t.query.results&&"Yahoo! Weather Error"!==t.query.results.channel.description){var o,n=t.query.results.channel,r={},s=["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW","N"],a="https://s.yimg.com/os/mit/media/m/weather/images/icons/l/44d-100567.png";r.title=n.item.title,r.temp=n.item.condition.temp,r.code=n.item.condition.code,r.todayCode=n.item.forecast[0].code,r.currently=n.item.condition.text,r.high=n.item.forecast[0].high,r.low=n.item.forecast[0].low,r.text=n.item.forecast[0].text,r.humidity=n.atmosphere.humidity,r.pressure=n.atmosphere.pressure,r.rising=n.atmosphere.rising,r.visibility=n.atmosphere.visibility,r.sunrise=n.astronomy.sunrise,r.sunset=n.astronomy.sunset,r.description=n.item.description,r.city=n.location.city,r.country=n.location.country,r.region=n.location.region,r.updated=n.item.pubDate,r.link=n.item.link,r.units={temp:n.units.temperature,distance:n.units.distance,pressure:n.units.pressure,speed:n.units.speed},r.wind={chill:n.wind.chill,direction:s[Math.round(n.wind.direction/22.5)],speed:n.wind.speed},n.item.condition.temp<80&&n.atmosphere.humidity<40?r.heatindex=-42.379+2.04901523*n.item.condition.temp+10.14333127*n.atmosphere.humidity-.22475541*n.item.condition.temp*n.atmosphere.humidity-6.83783*Math.pow(10,-3)*Math.pow(n.item.condition.temp,2)-5.481717*Math.pow(10,-2)*Math.pow(n.atmosphere.humidity,2)+1.22874*Math.pow(10,-3)*Math.pow(n.item.condition.temp,2)*n.atmosphere.humidity+8.5282*Math.pow(10,-4)*n.item.condition.temp*Math.pow(n.atmosphere.humidity,2)-1.99*Math.pow(10,-6)*Math.pow(n.item.condition.temp,2)*Math.pow(n.atmosphere.humidity,2):r.heatindex=n.item.condition.temp,"3200"==n.item.condition.code?(r.thumbnail=a,r.image=a):(r.thumbnail="https://s.yimg.com/zz/combo?a/i/us/nws/weather/gr/"+n.item.condition.code+"ds.png",r.image="https://s.yimg.com/zz/combo?a/i/us/nws/weather/gr/"+n.item.condition.code+"d.png"),r.alt={temp:e(i.unit,n.item.condition.temp),high:e(i.unit,n.item.forecast[0].high),low:e(i.unit,n.item.forecast[0].low)},"f"===i.unit?r.alt.unit="c":r.alt.unit="f",r.forecast=[];for(var m=0;m
this.cv){
68 | if(up){
69 | decr();
70 | up=0;
71 | }else{up=1;down=0;}
72 | } else {
73 | if(v < this.cv){
74 | if(down){
75 | incr();
76 | down=0;
77 | }else{down=1;up=0;}
78 | }
79 | }
80 | v = this.cv;
81 | }
82 | });
83 | });
84 |
85 |
86 |
87 |
88 |
89 | //Superpose (clock) function
90 |
91 | function clock() {
92 | var $s = $(".second"),
93 | $m = $(".minute"),
94 | $h = $(".hour");
95 | d = new Date(),
96 | s = d.getSeconds(),
97 | m = d.getMinutes(),
98 | h = d.getHours();
99 | $s.val(s).trigger("change");
100 | $m.val(m).trigger("change");
101 | $h.val(h).trigger("change");
102 | setTimeout("clock()", 1000);
103 | }
104 | clock();
--------------------------------------------------------------------------------
/assets/js/lib/flot-chart/jquery.flot.resize.js:
--------------------------------------------------------------------------------
1 | /* Flot plugin for automatically redrawing plots as the placeholder resizes.
2 |
3 | Copyright (c) 2007-2014 IOLA and Ole Laursen.
4 | Licensed under the MIT license.
5 |
6 | It works by listening for changes on the placeholder div (through the jQuery
7 | resize event plugin) - if the size changes, it will redraw the plot.
8 |
9 | There are no options. If you need to disable the plugin for some plots, you
10 | can just fix the size of their placeholders.
11 |
12 | */
13 |
14 | /* Inline dependency:
15 | * jQuery resize event - v1.1 - 3/14/2010
16 | * http://benalman.com/projects/jquery-resize-plugin/
17 | *
18 | * Copyright (c) 2010 "Cowboy" Ben Alman
19 | * Dual licensed under the MIT and GPL licenses.
20 | * http://benalman.com/about/license/
21 | */
22 | (function($,e,t){"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay",f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:function(){if(!n[f]&&this[s]){return false}var e=$(this);i.push(this);e.data(m,{w:e.width(),h:e.height()});if(i.length===1){a=t;h()}},teardown:function(){if(!n[f]&&this[s]){return false}var e=$(this);for(var t=i.length-1;t>=0;t--){if(i[t]==this){i.splice(t,1);break}}e.removeData(m);if(!i.length){if(r){cancelAnimationFrame(a)}else{clearTimeout(a)}a=null}},add:function(e){if(!n[f]&&this[s]){return false}var i;function a(e,n,a){var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a!==t?a:r.height();i.apply(this,arguments)}if($.isFunction(e)){i=e;return a}else{i=e.handler;e.handler=a}}};function h(t){if(r===true){r=t||1}for(var s=i.length-1;s>=0;s--){var l=$(i[s]);if(l[0]==e||l.is(":visible")){var f=l.width(),c=l.height(),d=l.data(m);if(d&&(f!==d.w||c!==d.h)){l.trigger(u,[d.w=f,d.h=c]);r=t||true}}else{d=l.data(m);d.w=0;d.h=0}}if(a!==null){if(r&&(t==null||t-r<1e3)){a=e.requestAnimationFrame(h)}else{a=setTimeout(h,n[o]);r=false}}}if(!e.requestAnimationFrame){e.requestAnimationFrame=function(){return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t,i){return e.setTimeout(function(){t((new Date).getTime())},n[l])}}()}if(!e.cancelAnimationFrame){e.cancelAnimationFrame=function(){return e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,this);
23 |
24 | (function ($) {
25 | var options = { }; // no options
26 |
27 | function init(plot) {
28 | function onResize() {
29 | var placeholder = plot.getPlaceholder();
30 |
31 | // somebody might have hidden us and we can't plot
32 | // when we don't have the dimensions
33 | if (placeholder.width() == 0 || placeholder.height() == 0)
34 | return;
35 |
36 | plot.resize();
37 | plot.setupGrid();
38 | plot.draw();
39 | }
40 |
41 | function bindEvents(plot, eventHolder) {
42 | plot.getPlaceholder().resize(onResize);
43 | }
44 |
45 | function shutdown(plot, eventHolder) {
46 | plot.getPlaceholder().unbind("resize", onResize);
47 | }
48 |
49 | plot.hooks.bindEvents.push(bindEvents);
50 | plot.hooks.shutdown.push(shutdown);
51 | }
52 |
53 | $.plot.plugins.push({
54 | init: init,
55 | options: options,
56 | name: 'resize',
57 | version: '1.0'
58 | });
59 | })(jQuery);
60 |
--------------------------------------------------------------------------------
/assets/css/lib/rangSlider/ion.rangeSlider.skinHTML5.css:
--------------------------------------------------------------------------------
1 | /* Ion.RangeSlider, Simple Skin
2 | // css version 2.0.3
3 | // © Denis Ineshin, 2014 https://github.com/IonDen
4 | // © guybowden, 2014 https://github.com/guybowden
5 | // ===================================================================================================================*/
6 |
7 | /* =====================================================================================================================
8 | // Skin details */
9 |
10 | .irs {
11 | height: 55px;
12 | }
13 | .irs-with-grid {
14 | height: 75px;
15 | }
16 | .irs-line {
17 | height: 10px; top: 33px;
18 | background: #EEE;
19 | background: linear-gradient(to bottom, #DDD -50%, #FFF 150%); /* W3C */
20 | border: 1px solid #CCC;
21 | border-radius: 16px;
22 | -moz-border-radius: 16px;
23 | }
24 | .irs-line-left {
25 | height: 8px;
26 | }
27 | .irs-line-mid {
28 | height: 8px;
29 | }
30 | .irs-line-right {
31 | height: 8px;
32 | }
33 |
34 | .irs-bar {
35 | height: 10px; top: 33px;
36 | border-top: 1px solid #428bca;
37 | border-bottom: 1px solid #428bca;
38 | background: #428bca;
39 | background: linear-gradient(to top, rgba(66,139,202,1) 0%,rgba(127,195,232,1) 100%); /* W3C */
40 | }
41 | .irs-bar-edge {
42 | height: 10px; top: 33px;
43 | width: 14px;
44 | border: 1px solid #428bca;
45 | border-right: 0;
46 | background: #428bca;
47 | background: linear-gradient(to top, rgba(66,139,202,1) 0%,rgba(127,195,232,1) 100%); /* W3C */
48 | border-radius: 16px 0 0 16px;
49 | -moz-border-radius: 16px 0 0 16px;
50 | }
51 |
52 | .irs-shadow {
53 | height: 2px; top: 38px;
54 | background: #000;
55 | opacity: 0.3;
56 | border-radius: 5px;
57 | -moz-border-radius: 5px;
58 | }
59 | .lt-ie9 .irs-shadow {
60 | filter: alpha(opacity=30);
61 | }
62 |
63 | .irs-slider {
64 | top: 25px;
65 | width: 27px; height: 27px;
66 | border: 1px solid #AAA;
67 | background: #DDD;
68 | background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(220,220,220,1) 20%,rgba(255,255,255,1) 100%); /* W3C */
69 | border-radius: 27px;
70 | -moz-border-radius: 27px;
71 | box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
72 | cursor: pointer;
73 | }
74 |
75 | .irs-slider.state_hover, .irs-slider:hover {
76 | background: #FFF;
77 | }
78 |
79 | .irs-min, .irs-max {
80 | color: #333;
81 | font-size: 12px; line-height: 1.333;
82 | text-shadow: none;
83 | top: 0;
84 | padding: 1px 5px;
85 | background: rgba(0,0,0,0.1);
86 | border-radius: 3px;
87 | -moz-border-radius: 3px;
88 | }
89 |
90 | .lt-ie9 .irs-min, .lt-ie9 .irs-max {
91 | background: #ccc;
92 | }
93 |
94 | .irs-from, .irs-to, .irs-single {
95 | color: #fff;
96 | font-size: 14px; line-height: 1.333;
97 | text-shadow: none;
98 | padding: 1px 5px;
99 | background: #428bca;
100 | border-radius: 3px;
101 | -moz-border-radius: 3px;
102 | }
103 | .lt-ie9 .irs-from, .lt-ie9 .irs-to, .lt-ie9 .irs-single {
104 | background: #999;
105 | }
106 |
107 | .irs-grid {
108 | height: 27px;
109 | }
110 | .irs-grid-pol {
111 | opacity: 0.5;
112 | background: #428bca;
113 | }
114 | .irs-grid-pol.small {
115 | background: #999;
116 | }
117 |
118 | .irs-grid-text {
119 | bottom: 5px;
120 | color: #99a4ac;
121 | }
122 |
123 | .irs-disabled {
124 | }
125 |
--------------------------------------------------------------------------------
/assets/js/lib/peitychart/jquery.peity.min.js:
--------------------------------------------------------------------------------
1 | // Peity jQuery plugin version 3.2.1
2 | // (c) 2016 Ben Pickles
3 | //
4 | // http://benpickles.github.io/peity
5 | //
6 | // Released under MIT license.
7 | (function(k,w,h,v){var d=k.fn.peity=function(a,b){y&&this.each(function(){var e=k(this),c=e.data("_peity");c?(a&&(c.type=a),k.extend(c.opts,b)):(c=new x(e,a,k.extend({},d.defaults[a],e.data("peity"),b)),e.change(function(){c.draw()}).data("_peity",c));c.draw()});return this},x=function(a,b,e){this.$el=a;this.type=b;this.opts=e},o=x.prototype,q=o.svgElement=function(a,b){return k(w.createElementNS("http://www.w3.org/2000/svg",a)).attr(b)},y="createElementNS"in w&&q("svg",{})[0].createSVGRect;o.draw=
8 | function(){var a=this.opts;d.graphers[this.type].call(this,a);a.after&&a.after.call(this,a)};o.fill=function(){var a=this.opts.fill;return k.isFunction(a)?a:function(b,e){return a[e%a.length]}};o.prepare=function(a,b){this.$svg||this.$el.hide().after(this.$svg=q("svg",{"class":"peity"}));return this.$svg.empty().data("peity",this).attr({height:b,width:a})};o.values=function(){return k.map(this.$el.text().split(this.opts.delimiter),function(a){return parseFloat(a)})};d.defaults={};d.graphers={};d.register=
9 | function(a,b,e){this.defaults[a]=b;this.graphers[a]=e};d.register("pie",{fill:["#ff9900","#fff4dd","#ffc66e"],radius:8},function(a){if(!a.delimiter){var b=this.$el.text().match(/[^0-9\.]/);a.delimiter=b?b[0]:","}b=k.map(this.values(),function(a){return 0i?n=s(h.min(e,0)):p=s(h.max(c,0)):o=1;o=p-n;0==o&&(o=1,0Hey, you are using HTML !!",
59 | html: true
60 | });
61 | };
62 | document.querySelector('.sweet-auto').onclick = function(){
63 | swal({
64 | title: "Sweet auto close alert !!",
65 | text: "Hey, i will close in 2 seconds !!",
66 | timer: 2000,
67 | showConfirmButton: false
68 | });
69 | };
70 | document.querySelector('.sweet-prompt').onclick = function(){
71 | swal({
72 | title: "Enter an input !!",
73 | text: "Write something interesting !!",
74 | type: "input",
75 | showCancelButton: true,
76 | closeOnConfirm: false,
77 | animation: "slide-from-top",
78 | inputPlaceholder: "Write something"
79 | },
80 | function(inputValue){
81 | if (inputValue === false) return false;
82 | if (inputValue === "") {
83 | swal.showInputError("You need to write something!");
84 | return false
85 | }
86 | swal("Hey !!", "You wrote: " + inputValue, "success");
87 | });
88 | };
89 | document.querySelector('.sweet-ajax').onclick = function(){
90 | swal({
91 | title: "Sweet ajax request !!",
92 | text: "Submit to run ajax request !!",
93 | type: "info",
94 | showCancelButton: true,
95 | closeOnConfirm: false,
96 | showLoaderOnConfirm: true,
97 | },
98 | function(){
99 | setTimeout(function(){
100 | swal("Hey, your ajax request finished !!");
101 | }, 2000);
102 | });
103 | };
104 |
105 |
--------------------------------------------------------------------------------
/assets/css/lib/rangSlider/ion.rangeSlider.css:
--------------------------------------------------------------------------------
1 | /* Ion.RangeSlider
2 | // css version 2.0.3
3 | // © 2013-2014 Denis Ineshin | IonDen.com
4 | // ===================================================================================================================*/
5 |
6 | /* =====================================================================================================================
7 | // RangeSlider */
8 |
9 | .irs {
10 | position: relative; display: block;
11 | -webkit-touch-callout: none;
12 | -webkit-user-select: none;
13 | -khtml-user-select: none;
14 | -moz-user-select: none;
15 | -ms-user-select: none;
16 | user-select: none;
17 | }
18 | .irs-line {
19 | position: relative; display: block;
20 | overflow: hidden;
21 | outline: none !important;
22 | }
23 | .irs-line-left, .irs-line-mid, .irs-line-right {
24 | position: absolute; display: block;
25 | top: 0;
26 | }
27 | .irs-line-left {
28 | left: 0; width: 11%;
29 | }
30 | .irs-line-mid {
31 | left: 9%; width: 82%;
32 | }
33 | .irs-line-right {
34 | right: 0; width: 11%;
35 | }
36 |
37 | .irs-bar {
38 | position: absolute; display: block;
39 | left: 0; width: 0;
40 | }
41 | .irs-bar-edge {
42 | position: absolute; display: block;
43 | top: 0; left: 0;
44 | }
45 |
46 | .irs-shadow {
47 | position: absolute; display: none;
48 | left: 0; width: 0;
49 | }
50 |
51 | .irs-slider {
52 | position: absolute; display: block;
53 | cursor: default;
54 | z-index: 1;
55 | }
56 | .irs-slider.single {
57 |
58 | }
59 | .irs-slider.from {
60 |
61 | }
62 | .irs-slider.to {
63 |
64 | }
65 | .irs-slider.type_last {
66 | z-index: 2;
67 | }
68 |
69 | .irs-min {
70 | position: absolute; display: block;
71 | left: 0;
72 | cursor: default;
73 | }
74 | .irs-max {
75 | position: absolute; display: block;
76 | right: 0;
77 | cursor: default;
78 | }
79 |
80 | .irs-from, .irs-to, .irs-single {
81 | position: absolute; display: block;
82 | top: 0; left: 0;
83 | cursor: default;
84 | white-space: nowrap;
85 | }
86 |
87 | .irs-grid {
88 | position: absolute; display: none;
89 | bottom: 0; left: 0;
90 | width: 100%; height: 20px;
91 | }
92 | .irs-with-grid .irs-grid {
93 | display: block;
94 | }
95 | .irs-grid-pol {
96 | position: absolute;
97 | top: 0; left: 0;
98 | width: 1px; height: 8px;
99 | background: #000;
100 | }
101 | .irs-grid-pol.small {
102 | height: 4px;
103 | }
104 | .irs-grid-text {
105 | position: absolute;
106 | bottom: 0; left: 0;
107 | white-space: nowrap;
108 | text-align: center;
109 | font-size: 9px; line-height: 9px;
110 | padding: 0 3px;
111 | color: #000;
112 | }
113 |
114 | .irs-disable-mask {
115 | position: absolute; display: block;
116 | top: 0; left: -1%;
117 | width: 102%; height: 100%;
118 | cursor: default;
119 | background: rgba(0,0,0,0.0);
120 | z-index: 2;
121 | }
122 | .irs-disabled {
123 | opacity: 0.4;
124 | }
125 | .lt-ie9 .irs-disabled {
126 | filter: alpha(opacity=40);
127 | }
128 |
129 |
130 | .irs-hidden-input {
131 | position: absolute !important;
132 | display: block !important;
133 | top: 0 !important;
134 | left: 0 !important;
135 | width: 0 !important;
136 | height: 0 !important;
137 | font-size: 0 !important;
138 | line-height: 0 !important;
139 | padding: 0 !important;
140 | margin: 0 !important;
141 | outline: none !important;
142 | z-index: -9999 !important;
143 | background: none !important;
144 | border-style: solid !important;
145 | border-color: transparent !important;
146 | }
147 |
--------------------------------------------------------------------------------
/assets/js/lib/barRating/barRating.init.js:
--------------------------------------------------------------------------------
1 | $(function() {
2 | "use strict";
3 | function ratingEnable() {
4 | $('#example-1to10').barrating('show', {
5 | theme: 'bars-1to10'
6 | });
7 |
8 | $('#example-movie').barrating('show', {
9 | theme: 'bars-movie'
10 | });
11 |
12 | // $('#example-movie').barrating('set', 'Mediocre');
13 |
14 | $('#example-square').barrating('show', {
15 | theme: 'bars-square',
16 | showValues: true,
17 | showSelectedRating: false
18 | });
19 |
20 | $('#example-pill').barrating('show', {
21 | theme: 'bars-pill',
22 | initialRating: 'A',
23 | showValues: true,
24 | showSelectedRating: false,
25 | allowEmpty: true,
26 | emptyValue: '-- no rating selected --',
27 | onSelect: function(value, text) {
28 | alert('Selected rating: ' + value);
29 | }
30 | });
31 |
32 | $('#example-reversed').barrating('show', {
33 | theme: 'bars-reversed',
34 | showSelectedRating: true,
35 | reverse: true
36 | });
37 |
38 | $('#example-horizontal').barrating('show', {
39 | theme: 'bars-horizontal',
40 | reverse: true,
41 | hoverState: false
42 | });
43 |
44 | $('#example-fontawesome').barrating({
45 | theme: 'fontawesome-stars',
46 | showSelectedRating: false
47 | });
48 |
49 | $('#example-css').barrating({
50 | theme: 'css-stars',
51 | showSelectedRating: false
52 | });
53 |
54 | $('#example-bootstrap').barrating({
55 | theme: 'bootstrap-stars',
56 | showSelectedRating: false
57 | });
58 |
59 | var currentRating = $('#example-fontawesome-o').data('current-rating');
60 |
61 | $('.stars-example-fontawesome-o .current-rating')
62 | .find('span')
63 | .html(currentRating);
64 |
65 | $('.stars-example-fontawesome-o .clear-rating').on('click', function(event) {
66 | event.preventDefault();
67 |
68 | $('#example-fontawesome-o')
69 | .barrating('clear');
70 | });
71 |
72 | $('#example-fontawesome-o').barrating({
73 | theme: 'fontawesome-stars-o',
74 | showSelectedRating: false,
75 | initialRating: currentRating,
76 | onSelect: function(value, text) {
77 | if (!value) {
78 | $('#example-fontawesome-o')
79 | .barrating('clear');
80 | } else {
81 | $('.stars-example-fontawesome-o .current-rating')
82 | .addClass('hidden');
83 |
84 | $('.stars-example-fontawesome-o .your-rating')
85 | .removeClass('hidden')
86 | .find('span')
87 | .html(value);
88 | }
89 | },
90 | onClear: function(value, text) {
91 | $('.stars-example-fontawesome-o')
92 | .find('.current-rating')
93 | .removeClass('hidden')
94 | .end()
95 | .find('.your-rating')
96 | .addClass('hidden');
97 | }
98 | });
99 | }
100 |
101 | function ratingDisable() {
102 | $('select').barrating('destroy');
103 | }
104 |
105 | $('.rating-enable').on("click", function(event) {
106 | event.preventDefault();
107 |
108 | ratingEnable();
109 |
110 | $(this).addClass('deactivated');
111 | $('.rating-disable').removeClass('deactivated');
112 | });
113 |
114 | $('.rating-disable').on("click", function(event) {
115 | event.preventDefault();
116 |
117 | ratingDisable();
118 |
119 | $(this).addClass('deactivated');
120 | $('.rating-enable').removeClass('deactivated');
121 | });
122 |
123 | ratingEnable();
124 | });
125 |
--------------------------------------------------------------------------------
/assets/css/lib/scrollable/scrollable.min.css:
--------------------------------------------------------------------------------
1 | /**
2 | * jQuery asScrollable v0.4.7
3 | * https://github.com/amazingSurge/jquery-asScrollable
4 | *
5 | * Copyright (c) amazingSurge
6 | * Released under the LGPL-3.0 license
7 | */
8 |
9 | .asScrollable.is-enabled {
10 | overflow: hidden!important
11 | }
12 | .is-enabled .asScrollable-container {
13 | -webkit-box-sizing: content-box!important;
14 | box-sizing: content-box!important;
15 | overflow: hidden!important
16 | }
17 | .is-enabled .asScrollable-container::-webkit-scrollbar {
18 | width: 0;
19 | height: 0;
20 | -webkit-appearance: none
21 | }
22 | .asScrollable-vertical.is-enabled .asScrollable-container {
23 | overflow-y: scroll!important
24 | }
25 | .asScrollable-horizontal.is-enabled .asScrollable-container {
26 | overflow-x: scroll!important
27 | }
28 | .is-enabled .asScrollable-content {
29 | position: relative!important;
30 | overflow: visible!important
31 | }
32 | .is-enabled .asScrollable-content:after,
33 | .is-enabled .asScrollable-content:before {
34 | display: table;
35 | content: "\20"
36 | }
37 | .is-enabled .asScrollable-content:after {
38 | clear: both
39 | }
40 | .asScrollable-bar {
41 | position: absolute;
42 | right: 0;
43 | bottom: 0;
44 | -webkit-box-sizing: border-box;
45 | box-sizing: border-box;
46 | overflow: hidden;
47 | line-height: 0;
48 | -webkit-user-select: none;
49 | -moz-user-select: none;
50 | -ms-user-select: none;
51 | user-select: none;
52 | border-radius: 2px;
53 | -webkit-transition: opacity .5s;
54 | transition: opacity .5s;
55 | -webkit-touch-callout: none;
56 | user-input: disabled;
57 | user-focus: ignore
58 | }
59 | .is-disabled .asScrollable-bar {
60 | display: none
61 | }
62 | .asScrollable-bar-hide {
63 | opacity: 0;
64 | -webkit-transition-delay: .4s;
65 | transition-delay: .4s
66 | }
67 | .asScrollable-bar.is-hovering {
68 | background: hsla(0, 0%, 93%, .4)
69 | }
70 | .asScrollable-bar.is-dragging {
71 | background: hsla(0, 0%, 93%, .6)!important;
72 | opacity: 1
73 | }
74 | .asScrollable-bar.is-disabled {
75 | display: none
76 | }
77 | .asScrollable-bar-handle {
78 | position: absolute;
79 | top: 0;
80 | left: 0;
81 | line-height: 0;
82 | cursor: pointer;
83 | background: hsla(0, 0%, 88%, .6);
84 | border-radius: 2;
85 | -webkit-transition: width, height .5s;
86 | transition: width, height .5s
87 | }
88 | .asScrollable-bar.is-dragging .asScrollable-bar-handle {
89 | background: hsla(0, 0%, 59%, .8)!important
90 | }
91 | .asScrollable-bar.is-dragging,
92 | .asScrollable-bar.is-hovering {
93 | border-radius: 5px
94 | }
95 | .asScrollable-bar.is-dragging .asScrollable-bar-handle,
96 | .asScrollable-bar.is-hovering .asScrollable-bar-handle {
97 | border-radius: 5
98 | }
99 | .asScrollable-bar-vertical {
100 | width: 4px;
101 | height: 100%;
102 | height: calc(100% - 10px);
103 | margin: 5px 3px
104 | }
105 | .asScrollable-bar-vertical.is-dragging,
106 | .asScrollable-bar-vertical.is-hovering {
107 | width: 10px;
108 | margin: 5px 1px
109 | }
110 | .asScrollable-bar-vertical .asScrollable-bar-handle {
111 | width: 100%
112 | }
113 | .asScrollable-bar-horizontal {
114 | width: 100%;
115 | width: calc(100% - 10px);
116 | height: 4px;
117 | margin: 3px 5px
118 | }
119 | .asScrollable-bar-horizontal.is-dragging,
120 | .asScrollable-bar-horizontal.is-hovering {
121 | height: 10px;
122 | margin: 1px 5px
123 | }
124 | .asScrollable-bar-horizontal .asScrollable-bar-handle {
125 | height: 100%
126 | }
127 | .asScrollable.is-scrolling .asScrollable-bar {
128 | opacity: 1;
129 | -webkit-transition: opacity 0;
130 | transition: opacity 0
131 | }
132 | .asScrollable.is-hovering .asScrollable-bar-handle {
133 | background: hsla(0, 0%, 59%, .6)
134 | }
135 | .asScrollable.is-dragging {
136 | -webkit-user-select: none;
137 | -moz-user-select: none;
138 | -ms-user-select: none;
139 | user-select: none;
140 | -webkit-touch-callout: none;
141 | user-input: disabled;
142 | user-focus: ignore
143 | }
--------------------------------------------------------------------------------
/assets/js/lib/jsgrid/fields/jsgrid.field.select.js:
--------------------------------------------------------------------------------
1 | (function(jsGrid, $, undefined) {
2 |
3 | var NumberField = jsGrid.NumberField;
4 | var numberValueType = "number";
5 | var stringValueType = "string";
6 |
7 | function SelectField(config) {
8 | this.items = [];
9 | this.selectedIndex = -1;
10 | this.valueField = "";
11 | this.textField = "";
12 |
13 | if(config.valueField && config.items.length) {
14 | var firstItemValue = config.items[0][config.valueField];
15 | this.valueType = (typeof firstItemValue) === numberValueType ? numberValueType : stringValueType;
16 | }
17 |
18 | this.sorter = this.valueType;
19 |
20 | NumberField.call(this, config);
21 | }
22 |
23 | SelectField.prototype = new NumberField({
24 |
25 | align: "center",
26 | valueType: numberValueType,
27 |
28 | itemTemplate: function(value) {
29 | var items = this.items,
30 | valueField = this.valueField,
31 | textField = this.textField,
32 | resultItem;
33 |
34 | if(valueField) {
35 | resultItem = $.grep(items, function(item, index) {
36 | return item[valueField] === value;
37 | })[0] || {};
38 | }
39 | else {
40 | resultItem = items[value];
41 | }
42 |
43 | var result = (textField ? resultItem[textField] : resultItem);
44 |
45 | return (result === undefined || result === null) ? "" : result;
46 | },
47 |
48 | filterTemplate: function() {
49 | if(!this.filtering)
50 | return "";
51 |
52 | var grid = this._grid,
53 | $result = this.filterControl = this._createSelect();
54 |
55 | if(this.autosearch) {
56 | $result.on("change", function(e) {
57 | grid.search();
58 | });
59 | }
60 |
61 | return $result;
62 | },
63 |
64 | insertTemplate: function() {
65 | if(!this.inserting)
66 | return "";
67 |
68 | return this.insertControl = this._createSelect();
69 | },
70 |
71 | editTemplate: function(value) {
72 | if(!this.editing)
73 | return this.itemTemplate.apply(this, arguments);
74 |
75 | var $result = this.editControl = this._createSelect();
76 | (value !== undefined) && $result.val(value);
77 | return $result;
78 | },
79 |
80 | filterValue: function() {
81 | var val = this.filterControl.val();
82 | return this.valueType === numberValueType ? parseInt(val || 0, 10) : val;
83 | },
84 |
85 | insertValue: function() {
86 | var val = this.insertControl.val();
87 | return this.valueType === numberValueType ? parseInt(val || 0, 10) : val;
88 | },
89 |
90 | editValue: function() {
91 | var val = this.editControl.val();
92 | return this.valueType === numberValueType ? parseInt(val || 0, 10) : val;
93 | },
94 |
95 | _createSelect: function() {
96 | var $result = $("
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/assets/js/lib/flot-chart/jquery.flot.threshold.js:
--------------------------------------------------------------------------------
1 | /* Flot plugin for thresholding data.
2 |
3 | Copyright (c) 2007-2013 IOLA and Ole Laursen.
4 | Licensed under the MIT license.
5 |
6 | The plugin supports these options:
7 |
8 | series: {
9 | threshold: {
10 | below: number
11 | color: colorspec
12 | }
13 | }
14 |
15 | It can also be applied to a single series, like this:
16 |
17 | $.plot( $("#placeholder"), [{
18 | data: [ ... ],
19 | threshold: { ... }
20 | }])
21 |
22 | An array can be passed for multiple thresholding, like this:
23 |
24 | threshold: [{
25 | below: number1
26 | color: color1
27 | },{
28 | below: number2
29 | color: color2
30 | }]
31 |
32 | These multiple threshold objects can be passed in any order since they are
33 | sorted by the processing function.
34 |
35 | The data points below "below" are drawn with the specified color. This makes
36 | it easy to mark points below 0, e.g. for budget data.
37 |
38 | Internally, the plugin works by splitting the data into two series, above and
39 | below the threshold. The extra series below the threshold will have its label
40 | cleared and the special "originSeries" attribute set to the original series.
41 | You may need to check for this in hover events.
42 |
43 | */
44 |
45 | (function ($) {
46 | var options = {
47 | series: { threshold: null } // or { below: number, color: color spec}
48 | };
49 |
50 | function init(plot) {
51 | function thresholdData(plot, s, datapoints, below, color) {
52 | var ps = datapoints.pointsize, i, x, y, p, prevp,
53 | thresholded = $.extend({}, s); // note: shallow copy
54 |
55 | thresholded.datapoints = { points: [], pointsize: ps, format: datapoints.format };
56 | thresholded.label = null;
57 | thresholded.color = color;
58 | thresholded.threshold = null;
59 | thresholded.originSeries = s;
60 | thresholded.data = [];
61 |
62 | var origpoints = datapoints.points,
63 | addCrossingPoints = s.lines.show;
64 |
65 | var threspoints = [];
66 | var newpoints = [];
67 | var m;
68 |
69 | for (i = 0; i < origpoints.length; i += ps) {
70 | x = origpoints[i];
71 | y = origpoints[i + 1];
72 |
73 | prevp = p;
74 | if (y < below)
75 | p = threspoints;
76 | else
77 | p = newpoints;
78 |
79 | if (addCrossingPoints && prevp != p && x != null
80 | && i > 0 && origpoints[i - ps] != null) {
81 | var interx = x + (below - y) * (x - origpoints[i - ps]) / (y - origpoints[i - ps + 1]);
82 | prevp.push(interx);
83 | prevp.push(below);
84 | for (m = 2; m < ps; ++m)
85 | prevp.push(origpoints[i + m]);
86 |
87 | p.push(null); // start new segment
88 | p.push(null);
89 | for (m = 2; m < ps; ++m)
90 | p.push(origpoints[i + m]);
91 | p.push(interx);
92 | p.push(below);
93 | for (m = 2; m < ps; ++m)
94 | p.push(origpoints[i + m]);
95 | }
96 |
97 | p.push(x);
98 | p.push(y);
99 | for (m = 2; m < ps; ++m)
100 | p.push(origpoints[i + m]);
101 | }
102 |
103 | datapoints.points = newpoints;
104 | thresholded.datapoints.points = threspoints;
105 |
106 | if (thresholded.datapoints.points.length > 0) {
107 | var origIndex = $.inArray(s, plot.getData());
108 | // Insert newly-generated series right after original one (to prevent it from becoming top-most)
109 | plot.getData().splice(origIndex + 1, 0, thresholded);
110 | }
111 |
112 | // FIXME: there are probably some edge cases left in bars
113 | }
114 |
115 | function processThresholds(plot, s, datapoints) {
116 | if (!s.threshold)
117 | return;
118 |
119 | if (s.threshold instanceof Array) {
120 | s.threshold.sort(function(a, b) {
121 | return a.below - b.below;
122 | });
123 |
124 | $(s.threshold).each(function(i, th) {
125 | thresholdData(plot, s, datapoints, th.below, th.color);
126 | });
127 | }
128 | else {
129 | thresholdData(plot, s, datapoints, s.threshold.below, s.threshold.color);
130 | }
131 | }
132 |
133 | plot.hooks.processDatapoints.push(processThresholds);
134 | }
135 |
136 | $.plot.plugins.push({
137 | init: init,
138 | options: options,
139 | name: 'threshold',
140 | version: '1.2'
141 | });
142 | })(jQuery);
143 |
--------------------------------------------------------------------------------
/assets/css/lib/nestable/nestable.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Nestable
3 | */
4 |
5 | .dd {
6 | position: relative;
7 | display: block;
8 | margin: 0;
9 | padding: 0;
10 | width: 100% !important;
11 | max-width: 100%;
12 | list-style: none;
13 | font-size: 13px;
14 | line-height: 20px;
15 | }
16 |
17 | .dd-list {
18 | display: block;
19 | position: relative;
20 | margin: 0;
21 | padding: 0;
22 | list-style: none; }
23 | .dd-list .dd-list {
24 | padding-left: 30px;
25 | }
26 | .dd-collapsed .dd-list {
27 | display: none;
28 | }
29 |
30 | .dd-item,
31 | .dd-empty,
32 | .dd-placeholder { display: block; position: relative; margin: 0; padding: 0; min-height: 20px; font-size: 13px; line-height: 20px; }
33 |
34 | .dd-handle {
35 | display: block;
36 | height: 40px;
37 | margin: 5px 0;
38 | padding: 8px 10px;
39 | color: #979898;
40 | text-decoration: none;
41 | font-weight: bold;
42 | border: 1px solid #e5e5e5;
43 | background: #ffffff;
44 | box-sizing: border-box; -moz-box-sizing: border-box;
45 | }
46 | .dd-handle:hover {
47 | color: #2ea8e5;
48 | background: #fff;
49 | }
50 |
51 | .dd-item > button {
52 | display: block;
53 | position: relative;
54 | cursor: pointer;
55 | float: left;
56 | width: 25px;
57 | height: 17px;
58 | margin: 5px 0;
59 | padding: 0;
60 | text-indent: 100%;
61 | white-space: nowrap;
62 | overflow: hidden;
63 | border: 0;
64 | background: transparent;
65 | font-size: 18px;
66 | line-height: 1.5;
67 | text-align: center;
68 | font-weight: bold;
69 | }
70 | .dd-item > button:before {
71 | content: '+';
72 | display: block;
73 | position: absolute;
74 | width: 100%;
75 | text-align: center;
76 | text-indent: 0;
77 | }
78 | .dd-item > button[data-action="collapse"]:before { content: '-'; }
79 |
80 | .dd-placeholder,
81 | .dd-empty {
82 | margin: 5px 0;
83 | padding: 0;
84 | min-height: 30px;
85 | background: #f2fbff;
86 | border: 1px dashed #b6bcbf;
87 | box-sizing: border-box; -moz-box-sizing: border-box; }
88 | .dd-empty {
89 | border: 1px dashed #bbb;
90 | min-height: 100px;
91 | background-color: #e5e5e5;
92 | background: 60px 60px;
93 | background-position: 0 0, 30px 30px;
94 | }
95 |
96 | .dd-dragel { position: absolute; pointer-events: none; z-index: 9999; }
97 | .dd-dragel > .dd-item .dd-handle { margin-top: 0; }
98 | .dd-dragel .dd-handle {
99 | -webkit-box-shadow: 2px 4px 6px 0 rgba(0,0,0,.1);
100 | box-shadow: 2px 4px 6px 0 rgba(0,0,0,.1);
101 | }
102 |
103 | /**
104 | * Nestable Extras
105 | */
106 |
107 | .nestable-lists {
108 | display: block;
109 | clear: both;
110 | padding: 30px 0;
111 | width: 100%;
112 | border: 0;
113 | border-top: 2px solid #ddd;
114 | border-bottom: 2px solid #ddd;
115 | }
116 |
117 | #nestable-menu { padding: 0; margin: 20px 0; }
118 |
119 | #nestable-output,
120 | #nestable2-output {
121 | width: 100%;
122 | height: 7em;
123 | font-size: 0.75em;
124 | line-height: 1.333333em;
125 | font-family: Consolas, monospace;
126 | padding: 5px;
127 | box-sizing: border-box;
128 | -moz-box-sizing: border-box;
129 | }
130 |
131 | #nestable2 .dd-handle {
132 | color: #979898;
133 | border: 1px solid #e5e5e5;
134 | background: #ffffff;
135 | }
136 | #nestable2 .dd-handle:hover { background: #ffffff; }
137 | #nestable2 .dd-item > button:before { color: #979898; }
138 |
139 | @media only screen and (min-width: 700px) {
140 |
141 | .dd { float: left; width: 48%; }
142 | .dd + .dd { margin-left: 2%; }
143 |
144 | }
145 |
146 | .dd-hover > .dd-handle {
147 | background: #2ea8e5 !important;
148 | }
149 |
150 | /**
151 | * Nestable Draggable Handles
152 | */
153 |
154 | .dd3-content {
155 | display: block;
156 | height: 40px;
157 | margin: 5px 0;
158 | padding: 8px 15px 9px 52px;
159 | color: #979898;
160 | text-decoration: none;
161 | font-weight: bold;
162 | border: 1px solid #e5e5e5;
163 | background: #ffffff;
164 | -webkit-border-radius: 0;
165 | border-radius: 0;
166 | box-sizing: border-box; -moz-box-sizing: border-box;
167 | }
168 | .dd3-content:hover {
169 | color: #2ea8e5;
170 | background: #fff;
171 | }
172 |
173 | .dd-dragel > .dd3-item > .dd3-content {
174 | margin: 0;
175 | }
176 |
177 | .dd3-item > button {
178 | margin-left: 40px;
179 | margin-top: 7px;
180 | }
181 |
182 | .dd3-handle {
183 | position: absolute;
184 | margin: 0;
185 | left: 0;
186 | top: 0;
187 | cursor: pointer;
188 | width: 40px;
189 | height: 40px;
190 | text-indent: 100%;
191 | white-space: nowrap;
192 | overflow: hidden;
193 | border: 1px solid #e5e5e5;
194 | background: #ffffff;
195 | border-top-right-radius: 0;
196 | border-bottom-right-radius: 0;
197 | }
198 | .dd3-handle:before {
199 | content: '≡';
200 | display: block;
201 | position: absolute;
202 | left: 0;
203 | top: 7px;
204 | width: 100%;
205 | text-align: center;
206 | text-indent: 0;
207 | font-size: 20px;
208 | font-weight: bold;
209 | color: #979898;
210 | }
211 | .dd3-handle:hover {
212 | background: #ffffff;
213 | }
--------------------------------------------------------------------------------
/assets/js/lib/toastr/toastr.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Note that this is toastr v2.1.3, the "latest" version in url has no more maintenance,
3 | * please go to https://cdnjs.com/libraries/toastr.js and pick a certain version you want to use,
4 | * make sure you copy the url from the website since the url may change between versions.
5 | * */
6 | !function(e){e(["jquery"],function(e){return function(){function t(e,t,n){return g({type:O.error,iconClass:m().iconClasses.error,message:e,optionsOverride:n,title:t})}function n(t,n){return t||(t=m()),v=e("#"+t.containerId),v.length?v:(n&&(v=d(t)),v)}function o(e,t,n){return g({type:O.info,iconClass:m().iconClasses.info,message:e,optionsOverride:n,title:t})}function s(e){C=e}function i(e,t,n){return g({type:O.success,iconClass:m().iconClasses.success,message:e,optionsOverride:n,title:t})}function a(e,t,n){return g({type:O.warning,iconClass:m().iconClasses.warning,message:e,optionsOverride:n,title:t})}function r(e,t){var o=m();v||n(o),u(e,o,t)||l(o)}function c(t){var o=m();return v||n(o),t&&0===e(":focus",t).length?void h(t):void(v.children().length&&v.remove())}function l(t){for(var n=v.children(),o=n.length-1;o>=0;o--)u(e(n[o]),t)}function u(t,n,o){var s=!(!o||!o.force)&&o.force;return!(!t||!s&&0!==e(":focus",t).length)&&(t[n.hideMethod]({duration:n.hideDuration,easing:n.hideEasing,complete:function(){h(t)}}),!0)}function d(t){return v=e("
").attr("id",t.containerId).addClass(t.positionClass),v.appendTo(e(t.target)),v}function p(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'
',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function f(e){C&&C(e)}function g(t){function o(e){return null==e&&(e=""),e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function s(){c(),u(),d(),p(),g(),C(),l(),i()}function i(){var e="";switch(t.iconClass){case"toast-success":case"toast-info":e="polite";break;default:e="assertive"}I.attr("aria-live",e)}function a(){E.closeOnHover&&I.hover(H,D),!E.onclick&&E.tapToDismiss&&I.click(b),E.closeButton&&j&&j.click(function(e){e.stopPropagation?e.stopPropagation():void 0!==e.cancelBubble&&e.cancelBubble!==!0&&(e.cancelBubble=!0),E.onCloseClick&&E.onCloseClick(e),b(!0)}),E.onclick&&I.click(function(e){E.onclick(e),b()})}function r(){I.hide(),I[E.showMethod]({duration:E.showDuration,easing:E.showEasing,complete:E.onShown}),E.timeOut>0&&(k=setTimeout(b,E.timeOut),F.maxHideTime=parseFloat(E.timeOut),F.hideEta=(new Date).getTime()+F.maxHideTime,E.progressBar&&(F.intervalId=setInterval(x,10)))}function c(){t.iconClass&&I.addClass(E.toastClass).addClass(y)}function l(){E.newestOnTop?v.prepend(I):v.append(I)}function u(){if(t.title){var e=t.title;E.escapeHtml&&(e=o(t.title)),M.append(e).addClass(E.titleClass),I.append(M)}}function d(){if(t.message){var e=t.message;E.escapeHtml&&(e=o(t.message)),B.append(e).addClass(E.messageClass),I.append(B)}}function p(){E.closeButton&&(j.addClass(E.closeClass).attr("role","button"),I.prepend(j))}function g(){E.progressBar&&(q.addClass(E.progressClass),I.prepend(q))}function C(){E.rtl&&I.addClass("rtl")}function O(e,t){if(e.preventDuplicates){if(t.message===w)return!0;w=t.message}return!1}function b(t){var n=t&&E.closeMethod!==!1?E.closeMethod:E.hideMethod,o=t&&E.closeDuration!==!1?E.closeDuration:E.hideDuration,s=t&&E.closeEasing!==!1?E.closeEasing:E.hideEasing;if(!e(":focus",I).length||t)return clearTimeout(F.intervalId),I[n]({duration:o,easing:s,complete:function(){h(I),clearTimeout(k),E.onHidden&&"hidden"!==P.state&&E.onHidden(),P.state="hidden",P.endTime=new Date,f(P)}})}function D(){(E.timeOut>0||E.extendedTimeOut>0)&&(k=setTimeout(b,E.extendedTimeOut),F.maxHideTime=parseFloat(E.extendedTimeOut),F.hideEta=(new Date).getTime()+F.maxHideTime)}function H(){clearTimeout(k),F.hideEta=0,I.stop(!0,!0)[E.showMethod]({duration:E.showDuration,easing:E.showEasing})}function x(){var e=(F.hideEta-(new Date).getTime())/F.maxHideTime*100;q.width(e+"%")}var E=m(),y=t.iconClass||E.iconClass;if("undefined"!=typeof t.optionsOverride&&(E=e.extend(E,t.optionsOverride),y=t.optionsOverride.iconClass||y),!O(E,t)){T++,v=n(E,!0);var k=null,I=e("
"),M=e("
"),B=e("
"),q=e("
"),j=e(E.closeHtml),F={intervalId:null,hideEta:null,maxHideTime:null},P={toastId:T,state:"visible",startTime:new Date,options:E,map:t};return s(),r(),a(),f(P),E.debug&&console&&console.log(P),I}}function m(){return e.extend({},p(),b.options)}function h(e){v||(v=n()),e.is(":visible")||(e.remove(),e=null,0===v.children().length&&(v.remove(),w=void 0))}var v,C,w,T=0,O={error:"error",info:"info",success:"success",warning:"warning"},b={clear:r,remove:c,error:t,getContainer:n,info:o,options:{},subscribe:s,success:i,version:"2.1.3",warning:a};return b}()})}("function"==typeof define&&define.amd?define:function(e,t){"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):window.toastr=t(window.jQuery)});
7 | //# sourceMappingURL=toastr.js.map
8 |
--------------------------------------------------------------------------------
/assets/js/scripts.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | "use strict";
3 |
4 | /*
5 | ------------------------------------------------
6 | Sidebar open close animated humberger icon
7 | ------------------------------------------------*/
8 |
9 | $(".hamburger").on('click', function() {
10 | $(this).toggleClass("is-active");
11 | });
12 |
13 |
14 | /*
15 | -------------------
16 | List item active
17 | -------------------*/
18 | $('.header li, .sidebar li').on('click', function() {
19 | $(".header li.active, .sidebar li.active").removeClass("active");
20 | $(this).addClass('active');
21 | });
22 |
23 | $(".header li").on("click", function(event) {
24 | event.stopPropagation();
25 | });
26 |
27 | $(document).on("click", function() {
28 | $(".header li").removeClass("active");
29 |
30 | });
31 |
32 |
33 |
34 | /*
35 | -----------------
36 | Chat Sidebar
37 | ---------------------*/
38 |
39 |
40 | var open = false;
41 |
42 | var openSidebar = function() {
43 | $('.chat-sidebar').addClass('is-active');
44 | $('.chat-sidebar-icon').addClass('is-active');
45 | open = true;
46 | }
47 | var closeSidebar = function() {
48 | $('.chat-sidebar').removeClass('is-active');
49 | $('.chat-sidebar-icon').removeClass('is-active');
50 | open = false;
51 | }
52 |
53 | $('.chat-sidebar-icon').on('click', function(event) {
54 | event.stopPropagation();
55 | var toggle = open ? closeSidebar : openSidebar;
56 | toggle();
57 | });
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 | /* Auto date in footer and refresh
67 | --------------------------------------*/
68 |
69 | document.getElementById("date-time").innerHTML = Date();
70 |
71 | $('.page-refresh').on("click", function() {
72 | location.reload();
73 | });
74 |
75 |
76 | /* TO DO LIST
77 | --------------------*/
78 | $(".tdl-new").on('keypress', function(e) {
79 | var code = (e.keyCode ? e.keyCode : e.which);
80 | if (code == 13) {
81 | var v = $(this).val();
82 | var s = v.replace(/ +?/g, '');
83 | if (s == "") {
84 | return false;
85 | } else {
86 | $(".tdl-content ul").append("
");
87 | $(this).val("");
88 | }
89 | }
90 | });
91 |
92 |
93 | $(".tdl-content a").on("click", function() {
94 | var _li = $(this).parent().parent("li");
95 | _li.addClass("remove").stop().delay(100).slideUp("fast", function() {
96 | _li.remove();
97 | });
98 | return false;
99 | });
100 |
101 | // for dynamically created a tags
102 | $(".tdl-content").on('click', "a", function() {
103 | var _li = $(this).parent().parent("li");
104 | _li.addClass("remove").stop().delay(100).slideUp("fast", function() {
105 | _li.remove();
106 | });
107 | return false;
108 | });
109 |
110 |
111 |
112 | /* Chat Sidebar User custom Search
113 | ---------------------------------------*/
114 |
115 | $('[data-search]').on('keyup', function() {
116 | var searchVal = $(this).val();
117 | var filterItems = $('[data-filter-item]');
118 |
119 | if (searchVal != '') {
120 | filterItems.addClass('hidden');
121 | $('[data-filter-item][data-filter-name*="' + searchVal.toLowerCase() + '"]').removeClass('hidden');
122 | } else {
123 | filterItems.removeClass('hidden');
124 | }
125 | });
126 |
127 |
128 | /* Chackbox all
129 | ---------------------------------------*/
130 |
131 | $("#checkAll").change(function() {
132 | $("input:checkbox").prop('checked', $(this).prop("checked"));
133 | });
134 |
135 |
136 | /* Vertical Carousel
137 | ---------------------------*/
138 |
139 | $('#verticalCarousel').carousel({
140 | interval: 2000
141 | })
142 |
143 | $(window).bind("resize", function() {
144 | console.log($(this).width())
145 | if ($(this).width() < 680) {
146 | $('.logo').addClass('hidden')
147 | $('.sidebar').removeClass('sidebar-shrink')
148 | $('.sidebar').removeClass('sidebar-shrink, sidebar-gestures')
149 | }
150 | }).trigger('resize');
151 |
152 |
153 |
154 | /* Search
155 | ------------*/
156 | $('a[href="#search"]').on('click', function(event) {
157 | event.preventDefault();
158 | $('#search').addClass('open');
159 | $('#search > form > input[type="search"]').focus();
160 | });
161 |
162 | $('#search, #search button.close').on('click keyup', function(event) {
163 | if (event.target == this || event.target.className == 'close' || event.keyCode == 27) {
164 | $(this).removeClass('open');
165 | }
166 | });
167 |
168 |
169 | //Do not include! This prevents the form from submitting for DEMO purposes only!
170 | $('form').submit(function(event) {
171 | event.preventDefault();
172 | return false;
173 | })
174 |
175 |
176 |
177 | /* pace Loader
178 | -------------*/
179 |
180 | paceOptions = {
181 | elements: true
182 | };
183 |
184 |
185 |
186 |
187 | })(jQuery);
--------------------------------------------------------------------------------
/assets/js/lib/flot-chart/jquery.flot.crosshair.js:
--------------------------------------------------------------------------------
1 | /* Flot plugin for showing crosshairs when the mouse hovers over the plot.
2 |
3 | Copyright (c) 2007-2014 IOLA and Ole Laursen.
4 | Licensed under the MIT license.
5 |
6 | The plugin supports these options:
7 |
8 | crosshair: {
9 | mode: null or "x" or "y" or "xy"
10 | color: color
11 | lineWidth: number
12 | }
13 |
14 | Set the mode to one of "x", "y" or "xy". The "x" mode enables a vertical
15 | crosshair that lets you trace the values on the x axis, "y" enables a
16 | horizontal crosshair and "xy" enables them both. "color" is the color of the
17 | crosshair (default is "rgba(170, 0, 0, 0.80)"), "lineWidth" is the width of
18 | the drawn lines (default is 1).
19 |
20 | The plugin also adds four public methods:
21 |
22 | - setCrosshair( pos )
23 |
24 | Set the position of the crosshair. Note that this is cleared if the user
25 | moves the mouse. "pos" is in coordinates of the plot and should be on the
26 | form { x: xpos, y: ypos } (you can use x2/x3/... if you're using multiple
27 | axes), which is coincidentally the same format as what you get from a
28 | "plothover" event. If "pos" is null, the crosshair is cleared.
29 |
30 | - clearCrosshair()
31 |
32 | Clear the crosshair.
33 |
34 | - lockCrosshair(pos)
35 |
36 | Cause the crosshair to lock to the current location, no longer updating if
37 | the user moves the mouse. Optionally supply a position (passed on to
38 | setCrosshair()) to move it to.
39 |
40 | Example usage:
41 |
42 | var myFlot = $.plot( $("#graph"), ..., { crosshair: { mode: "x" } } };
43 | $("#graph").bind( "plothover", function ( evt, position, item ) {
44 | if ( item ) {
45 | // Lock the crosshair to the data point being hovered
46 | myFlot.lockCrosshair({
47 | x: item.datapoint[ 0 ],
48 | y: item.datapoint[ 1 ]
49 | });
50 | } else {
51 | // Return normal crosshair operation
52 | myFlot.unlockCrosshair();
53 | }
54 | });
55 |
56 | - unlockCrosshair()
57 |
58 | Free the crosshair to move again after locking it.
59 | */
60 |
61 | (function ($) {
62 | var options = {
63 | crosshair: {
64 | mode: null, // one of null, "x", "y" or "xy",
65 | color: "rgba(170, 0, 0, 0.80)",
66 | lineWidth: 1
67 | }
68 | };
69 |
70 | function init(plot) {
71 | // position of crosshair in pixels
72 | var crosshair = { x: -1, y: -1, locked: false };
73 |
74 | plot.setCrosshair = function setCrosshair(pos) {
75 | if (!pos)
76 | crosshair.x = -1;
77 | else {
78 | var o = plot.p2c(pos);
79 | crosshair.x = Math.max(0, Math.min(o.left, plot.width()));
80 | crosshair.y = Math.max(0, Math.min(o.top, plot.height()));
81 | }
82 |
83 | plot.triggerRedrawOverlay();
84 | };
85 |
86 | plot.clearCrosshair = plot.setCrosshair; // passes null for pos
87 |
88 | plot.lockCrosshair = function lockCrosshair(pos) {
89 | if (pos)
90 | plot.setCrosshair(pos);
91 | crosshair.locked = true;
92 | };
93 |
94 | plot.unlockCrosshair = function unlockCrosshair() {
95 | crosshair.locked = false;
96 | };
97 |
98 | function onMouseOut(e) {
99 | if (crosshair.locked)
100 | return;
101 |
102 | if (crosshair.x != -1) {
103 | crosshair.x = -1;
104 | plot.triggerRedrawOverlay();
105 | }
106 | }
107 |
108 | function onMouseMove(e) {
109 | if (crosshair.locked)
110 | return;
111 |
112 | if (plot.getSelection && plot.getSelection()) {
113 | crosshair.x = -1; // hide the crosshair while selecting
114 | return;
115 | }
116 |
117 | var offset = plot.offset();
118 | crosshair.x = Math.max(0, Math.min(e.pageX - offset.left, plot.width()));
119 | crosshair.y = Math.max(0, Math.min(e.pageY - offset.top, plot.height()));
120 | plot.triggerRedrawOverlay();
121 | }
122 |
123 | plot.hooks.bindEvents.push(function (plot, eventHolder) {
124 | if (!plot.getOptions().crosshair.mode)
125 | return;
126 |
127 | eventHolder.mouseout(onMouseOut);
128 | eventHolder.mousemove(onMouseMove);
129 | });
130 |
131 | plot.hooks.drawOverlay.push(function (plot, ctx) {
132 | var c = plot.getOptions().crosshair;
133 | if (!c.mode)
134 | return;
135 |
136 | var plotOffset = plot.getPlotOffset();
137 |
138 | ctx.save();
139 | ctx.translate(plotOffset.left, plotOffset.top);
140 |
141 | if (crosshair.x != -1) {
142 | var adj = plot.getOptions().crosshair.lineWidth % 2 ? 0.5 : 0;
143 |
144 | ctx.strokeStyle = c.color;
145 | ctx.lineWidth = c.lineWidth;
146 | ctx.lineJoin = "round";
147 |
148 | ctx.beginPath();
149 | if (c.mode.indexOf("x") != -1) {
150 | var drawX = Math.floor(crosshair.x) + adj;
151 | ctx.moveTo(drawX, 0);
152 | ctx.lineTo(drawX, plot.height());
153 | }
154 | if (c.mode.indexOf("y") != -1) {
155 | var drawY = Math.floor(crosshair.y) + adj;
156 | ctx.moveTo(0, drawY);
157 | ctx.lineTo(plot.width(), drawY);
158 | }
159 | ctx.stroke();
160 | }
161 | ctx.restore();
162 | });
163 |
164 | plot.hooks.shutdown.push(function (plot, eventHolder) {
165 | eventHolder.unbind("mouseout", onMouseOut);
166 | eventHolder.unbind("mousemove", onMouseMove);
167 | });
168 | }
169 |
170 | $.plot.plugins.push({
171 | init: init,
172 | options: options,
173 | name: 'crosshair',
174 | version: '1.0'
175 | });
176 | })(jQuery);
177 |
--------------------------------------------------------------------------------
/assets/js/lib/gmap/gmap.init.js:
--------------------------------------------------------------------------------
1 | var map;
2 | $(document).ready(function(){
3 | map = new GMaps({
4 | el: '#basic-map',
5 | lat: -12.043333,
6 | lng: -77.028333,
7 | zoomControl : true,
8 | zoomControlOpt: {
9 | style : 'SMALL',
10 | position: 'TOP_LEFT'
11 | },
12 | panControl : false,
13 | streetViewControl : false,
14 | mapTypeControl: false,
15 | overviewMapControl: false
16 | });
17 | });
18 |
19 |
20 |
21 |
22 | var map, infoWindow;
23 | $(document).ready(function(){
24 | infoWindow = new google.maps.InfoWindow({});
25 | map = new GMaps({
26 | el: '#map-2',
27 | zoom: 11,
28 | lat: 41.850033,
29 | lng: -87.6500523
30 | });
31 | map.loadFromFusionTables({
32 | query: {
33 | select: '\'Geocodable address\'',
34 | from: '1mZ53Z70NsChnBMm-qEYmSDOvLXgrreLTkQUvvg'
35 | },
36 | suppressInfoWindows: true,
37 | events: {
38 | click: function(point){
39 | infoWindow.setContent('You clicked here!');
40 | infoWindow.setPosition(point.latLng);
41 | infoWindow.open(map.map);
42 | }
43 | }
44 | });
45 | });
46 |
47 |
48 |
49 |
50 | var map, rectangle, polygon, circle;
51 | $(document).ready(function(){
52 | map = new GMaps({
53 | el: '#map-3',
54 | lat: -12.043333,
55 | lng: -77.028333
56 | });
57 | var bounds = [[-12.030397656836609,-77.02373871559225],[-12.034804866577001,-77.01154422636042]];
58 | rectangle = map.drawRectangle({
59 | bounds: bounds,
60 | strokeColor: '#BBD8E9',
61 | strokeOpacity: 1,
62 | strokeWeight: 3,
63 | fillColor: '#BBD8E9',
64 | fillOpacity: 0.6
65 | });
66 |
67 | var paths = [[-12.040397656836609,-77.03373871559225],[-12.040248585302038,-77.03993927003302],[-12.050047116528843,-77.02448169303511],[-12.044804866577001,-77.02154422636042]];
68 | polygon = map.drawPolygon({
69 | paths: paths,
70 | strokeColor: '#25D359',
71 | strokeOpacity: 1,
72 | strokeWeight: 3,
73 | fillColor: '#25D359',
74 | fillOpacity: 0.6
75 | });
76 | var lat = -12.040504866577001;
77 | var lng = -77.02024422636042;
78 | circle = map.drawCircle({
79 | lat: lat,
80 | lng: lng,
81 | radius: 350,
82 | strokeColor: '#432070',
83 | strokeOpacity: 1,
84 | strokeWeight: 3,
85 | fillColor: '#432070',
86 | fillOpacity: 0.6
87 | });
88 | for(var i in paths){
89 | bounds.push(paths[i]);
90 | }
91 | var b = [];
92 | for(var i in bounds){
93 | latlng = new google.maps.LatLng(bounds[i][0], bounds[i][1]);
94 | b.push(latlng);
95 | }
96 | for(var i in paths){
97 | latlng = new google.maps.LatLng(paths[i][0], paths[i][1]);
98 | b.push(latlng);
99 | }
100 | map.fitLatLngBounds(b);
101 | });
102 |
103 |
104 |
105 |
106 |
107 |
108 | var map;
109 | $(document).ready(function(){
110 | map = new GMaps({
111 | el: '#map-4',
112 | lat: -12.043333,
113 | lng: -77.028333
114 | });
115 | //locations request
116 | map.getElevations({
117 | locations : [[-12.040397656836609,-77.03373871559225], [-12.050047116528843,-77.02448169303511], [-12.044804866577001,-77.02154422636042]],
118 | callback : function (result, status){
119 | if (status == google.maps.ElevationStatus.OK) {
120 | for (var i in result){
121 | map.addMarker({
122 | lat: result[i].location.lat(),
123 | lng: result[i].location.lng(),
124 | title: 'Marker with InfoWindow',
125 | infoWindow: {
126 | content: '
The elevation is '+result[i].elevation+' in meters
'
127 | }
128 | });
129 | }
130 | }
131 | }
132 | });
133 | });
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 | var map;
151 | $(document).ready(function(){
152 | var map = new GMaps({
153 | el: '#map-5',
154 | lat: -12.043333,
155 | lng: -77.028333
156 | });
157 |
158 | GMaps.geolocate({
159 | success: function(position){
160 | map.setCenter(position.coords.latitude, position.coords.longitude);
161 | },
162 | error: function(error){
163 | alert('Geolocation failed: '+error.message);
164 | },
165 | not_supported: function(){
166 | alert("Your browser does not support geolocation");
167 | },
168 | always: function(){
169 | alert("Done!");
170 | }
171 | });
172 | });
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 | var map, infoWindow;
185 | $(document).ready(function(){
186 | infoWindow = new google.maps.InfoWindow({});
187 | map = new GMaps({
188 | el: '#map-6',
189 | zoom: 12,
190 | lat: 40.65,
191 | lng: -73.95
192 | });
193 | map.loadFromKML({
194 | url: 'http://api.flickr.com/services/feeds/geo/?g=322338@N20&lang=en-us&format=feed-georss',
195 | suppressInfoWindows: true,
196 | events: {
197 | click: function(point){
198 | infoWindow.setContent(point.featureData.infoWindowHtml);
199 | infoWindow.setPosition(point.latLng);
200 | infoWindow.open(map.map);
201 | }
202 | }
203 | });
204 | });
205 |
206 |
207 |
208 |
209 |
210 | var map;
211 | $(function () {
212 | map = new GMaps({
213 | el: "#map-7",
214 | lat: -12.043333,
215 | lng: -77.028333,
216 | zoom: 3
217 | });
218 |
219 | map.addLayer('weather', {
220 | clickable: false
221 | });
222 | map.addLayer('clouds');
223 | });
224 |
225 |
226 |
227 |
228 |
229 |
230 | map = new GMaps({
231 | el: '#map-8',
232 | zoom: 16,
233 | lat: -12.043333,
234 | lng: -77.028333,
235 | click: function(e){
236 | alert('click');
237 | },
238 | dragend: function(e){
239 | alert('dragend');
240 | }
241 | });
242 |
--------------------------------------------------------------------------------
/assets/css/lib/toastr/toastr.min.css:
--------------------------------------------------------------------------------
1 | /*
* Note that this is toastr v2.1.3, the "latest" version in url has no more maintenance,
* please go to https://cdnjs.com/libraries/toastr.js and pick a certain version you want to use,
* make sure you copy the url from the website since the url may change between versions.
* */
.toast-title{font-weight:700}.toast-message{-ms-word-wrap:break-word;word-wrap:break-word}.toast-message a,.toast-message label{color:#FFF}.toast-message a:hover{color:#CCC;text-decoration:none}.toast-close-button{position:relative;right:-.3em;top:-.3em;float:right;font-size:20px;font-weight:700;color:#FFF;-webkit-text-shadow:0 1px 0 #fff;text-shadow:0 1px 0 #fff;opacity:.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80);line-height:1}.toast-close-button:focus,.toast-close-button:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}.rtl .toast-close-button{left:-.3em;float:left;right:.3em}button.toast-close-button{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none}.toast-top-center{top:0;right:0;width:100%}.toast-bottom-center{bottom:0;right:0;width:100%}.toast-top-full-width{top:0;right:0;width:100%}.toast-bottom-full-width{bottom:0;right:0;width:100%}.toast-top-left{top:12px;left:12px}.toast-top-right{top:12px;right:12px}.toast-bottom-right{right:12px;bottom:12px}.toast-bottom-left{bottom:12px;left:12px}#toast-container{position:fixed;z-index:999999;pointer-events:none}#toast-container *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#toast-container>div{position:relative;pointer-events:auto;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-position:15px center;background-repeat:no-repeat;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;color:#FFF;opacity:.8;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);filter:alpha(opacity=80)}#toast-container>div.rtl{direction:rtl;padding:15px 50px 15px 15px;background-position:right 15px center}#toast-container>div:hover{-moz-box-shadow:0 0 12px #000;-webkit-box-shadow:0 0 12px #000;box-shadow:0 0 12px #000;opacity:1;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);filter:alpha(opacity=100);cursor:pointer}#toast-container>.toast-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=)!important}#toast-container>.toast-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=)!important}#toast-container>.toast-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==)!important}#toast-container>.toast-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=)!important}#toast-container.toast-bottom-center>div,#toast-container.toast-top-center>div{width:300px;margin-left:auto;margin-right:auto}#toast-container.toast-bottom-full-width>div,#toast-container.toast-top-full-width>div{width:96%;margin-left:auto;margin-right:auto}.toast{background-color:#030303}.toast-success{background-color:#51A351}.toast-error{background-color:#BD362F}.toast-info{background-color:#2F96B4}.toast-warning{background-color:#F89406}.toast-progress{position:absolute;left:0;bottom:0;height:4px;background-color:#000;opacity:.4;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);filter:alpha(opacity=40)}@media all and (max-width:240px){#toast-container>div{padding:8px 8px 8px 50px;width:11em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-.2em;top:-.2em}#toast-container .rtl .toast-close-button{left:-.2em;right:.2em}}@media all and (min-width:241px) and (max-width:480px){#toast-container>div{padding:8px 8px 8px 50px;width:18em}#toast-container>div.rtl{padding:8px 50px 8px 8px}#toast-container .toast-close-button{right:-.2em;top:-.2em}#toast-container .rtl .toast-close-button{left:-.2em;right:.2em}}@media all and (min-width:481px) and (max-width:768px){#toast-container>div{padding:15px 15px 15px 50px;width:25em}#toast-container>div.rtl{padding:15px 50px 15px 15px}}
--------------------------------------------------------------------------------
/assets/js/lib/flot-chart/jquery.flot.categories.js:
--------------------------------------------------------------------------------
1 | /* Flot plugin for plotting textual data or categories.
2 |
3 | Copyright (c) 2007-2014 IOLA and Ole Laursen.
4 | Licensed under the MIT license.
5 |
6 | Consider a dataset like [["February", 34], ["March", 20], ...]. This plugin
7 | allows you to plot such a dataset directly.
8 |
9 | To enable it, you must specify mode: "categories" on the axis with the textual
10 | labels, e.g.
11 |
12 | $.plot("#placeholder", data, { xaxis: { mode: "categories" } });
13 |
14 | By default, the labels are ordered as they are met in the data series. If you
15 | need a different ordering, you can specify "categories" on the axis options
16 | and list the categories there:
17 |
18 | xaxis: {
19 | mode: "categories",
20 | categories: ["February", "March", "April"]
21 | }
22 |
23 | If you need to customize the distances between the categories, you can specify
24 | "categories" as an object mapping labels to values
25 |
26 | xaxis: {
27 | mode: "categories",
28 | categories: { "February": 1, "March": 3, "April": 4 }
29 | }
30 |
31 | If you don't specify all categories, the remaining categories will be numbered
32 | from the max value plus 1 (with a spacing of 1 between each).
33 |
34 | Internally, the plugin works by transforming the input data through an auto-
35 | generated mapping where the first category becomes 0, the second 1, etc.
36 | Hence, a point like ["February", 34] becomes [0, 34] internally in Flot (this
37 | is visible in hover and click events that return numbers rather than the
38 | category labels). The plugin also overrides the tick generator to spit out the
39 | categories as ticks instead of the values.
40 |
41 | If you need to map a value back to its label, the mapping is always accessible
42 | as "categories" on the axis object, e.g. plot.getAxes().xaxis.categories.
43 |
44 | */
45 |
46 | (function ($) {
47 | var options = {
48 | xaxis: {
49 | categories: null
50 | },
51 | yaxis: {
52 | categories: null
53 | }
54 | };
55 |
56 | function processRawData(plot, series, data, datapoints) {
57 | // if categories are enabled, we need to disable
58 | // auto-transformation to numbers so the strings are intact
59 | // for later processing
60 |
61 | var xCategories = series.xaxis.options.mode == "categories",
62 | yCategories = series.yaxis.options.mode == "categories";
63 |
64 | if (!(xCategories || yCategories))
65 | return;
66 |
67 | var format = datapoints.format;
68 |
69 | if (!format) {
70 | // FIXME: auto-detection should really not be defined here
71 | var s = series;
72 | format = [];
73 | format.push({ x: true, number: true, required: true });
74 | format.push({ y: true, number: true, required: true });
75 |
76 | if (s.bars.show || (s.lines.show && s.lines.fill)) {
77 | var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero));
78 | format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale });
79 | if (s.bars.horizontal) {
80 | delete format[format.length - 1].y;
81 | format[format.length - 1].x = true;
82 | }
83 | }
84 |
85 | datapoints.format = format;
86 | }
87 |
88 | for (var m = 0; m < format.length; ++m) {
89 | if (format[m].x && xCategories)
90 | format[m].number = false;
91 |
92 | if (format[m].y && yCategories)
93 | format[m].number = false;
94 | }
95 | }
96 |
97 | function getNextIndex(categories) {
98 | var index = -1;
99 |
100 | for (var v in categories)
101 | if (categories[v] > index)
102 | index = categories[v];
103 |
104 | return index + 1;
105 | }
106 |
107 | function categoriesTickGenerator(axis) {
108 | var res = [];
109 | for (var label in axis.categories) {
110 | var v = axis.categories[label];
111 | if (v >= axis.min && v <= axis.max)
112 | res.push([v, label]);
113 | }
114 |
115 | res.sort(function (a, b) { return a[0] - b[0]; });
116 |
117 | return res;
118 | }
119 |
120 | function setupCategoriesForAxis(series, axis, datapoints) {
121 | if (series[axis].options.mode != "categories")
122 | return;
123 |
124 | if (!series[axis].categories) {
125 | // parse options
126 | var c = {}, o = series[axis].options.categories || {};
127 | if ($.isArray(o)) {
128 | for (var i = 0; i < o.length; ++i)
129 | c[o[i]] = i;
130 | }
131 | else {
132 | for (var v in o)
133 | c[v] = o[v];
134 | }
135 |
136 | series[axis].categories = c;
137 | }
138 |
139 | // fix ticks
140 | if (!series[axis].options.ticks)
141 | series[axis].options.ticks = categoriesTickGenerator;
142 |
143 | transformPointsOnAxis(datapoints, axis, series[axis].categories);
144 | }
145 |
146 | function transformPointsOnAxis(datapoints, axis, categories) {
147 | // go through the points, transforming them
148 | var points = datapoints.points,
149 | ps = datapoints.pointsize,
150 | format = datapoints.format,
151 | formatColumn = axis.charAt(0),
152 | index = getNextIndex(categories);
153 |
154 | for (var i = 0; i < points.length; i += ps) {
155 | if (points[i] == null)
156 | continue;
157 |
158 | for (var m = 0; m < ps; ++m) {
159 | var val = points[i + m];
160 |
161 | if (val == null || !format[m][formatColumn])
162 | continue;
163 |
164 | if (!(val in categories)) {
165 | categories[val] = index;
166 | ++index;
167 | }
168 |
169 | points[i + m] = categories[val];
170 | }
171 | }
172 | }
173 |
174 | function processDatapoints(plot, series, datapoints) {
175 | setupCategoriesForAxis(series, "xaxis", datapoints);
176 | setupCategoriesForAxis(series, "yaxis", datapoints);
177 | }
178 |
179 | function init(plot) {
180 | plot.hooks.processRawData.push(processRawData);
181 | plot.hooks.processDatapoints.push(processDatapoints);
182 | }
183 |
184 | $.plot.plugins.push({
185 | init: init,
186 | options: options,
187 | name: 'categories',
188 | version: '1.0'
189 | });
190 | })(jQuery);
191 |
--------------------------------------------------------------------------------