PageSourceSearch

https://sedna360.com/themes/Dashboard/assets/js/demo.js

js sedna360.com collected 2026-09-24 11:05:47 UTC 39,945 bytes, 1,175 lines download raw bytes

1demo = {
2    initPickColor: function() {
3        $('.pick-class-label').click(function() {
4            var new_class = $(this).attr('new-class');
5            var old_class = $('#display-buttons').attr('data-class');
6            var display_div = $('#display-buttons');
7            if (display_div.length) {
8                var display_buttons = display_div.find('.btn');
9                display_buttons.removeClass(old_class);
10                display_buttons.addClass(new_class);
11                display_div.attr('data-class', new_class);
12            }
13        });
14    },
15
16    checkFullPageBackgroundImage: function() {
17        $page = $('.full-page');
18        image_src = $page.data('image');
19
20        if (image_src !== undefined) {
21            image_container = '<div class="full-page-background" style="background-image: url(' + image_src + ') "/>'
22            $page.append(image_container);
23        }
24    },
25
26    initFormExtendedDatetimepickers: function() {
27        $('.datetimepicker').datetimepicker({
28            icons: {
29                time: "fa fa-clock-o",
30                date: "fa fa-calendar",
31                up: "fa fa-chevron-up",
32                down: "fa fa-chevron-down",
33                previous: 'fa fa-chevron-left',
34                next: 'fa fa-chevron-right',
35                today: 'fa fa-screenshot',
36                clear: 'fa fa-trash',
37                close: 'fa fa-remove'
38            }
39
40        });
41
42        $('.datepicker').datetimepicker({
43            format: 'MM/DD/YYYY',
44            icons: {
45                time: "fa fa-clock-o",
46                date: "fa fa-calendar",
47                up: "fa fa-chevron-up",
48                down: "fa fa-chevron-down",
49                previous: 'fa fa-chevron-left',
50                next: 'fa fa-chevron-right',
51                today: 'fa fa-screenshot',
52                clear: 'fa fa-trash',
53                close: 'fa fa-remove'
54            }
55        });
56
57        $('.timepicker').datetimepicker({
58            //          format: 'H:mm',    // use this format if you want the 24hours timepicker
59            format: 'h:mm A', //use this format if you want the 12hours timpiecker with AM/PM toggle
60            icons: {
61                time: "fa fa-clock-o",
62                date: "fa fa-calendar",
63                up: "fa fa-chevron-up",
64                down: "fa fa-chevron-down",
65                previous: 'fa fa-chevron-left',
66                next: 'fa fa-chevron-right',
67                today: 'fa fa-screenshot',
68                clear: 'fa fa-trash',
69                close: 'fa fa-remove'
70            }
71        });
72    },
73
74    initMaterialWizard: function() {
75        // Code for the Validator
76        var $validator = $('.wizard-card form').validate({
77            rules: {
78                firstname: {
79                    required: true,
80                    minlength: 3
81                },
82                lastname: {
83                    required: true,
84                    minlength: 3
85                },
86                email: {
87                    required: true,
88                    minlength: 3,
89                }
90            },
91
92            errorPlacement: function(error, element) {
93                $(element).parent('div').addClass('has-error');
94            }
95        });
96
97        // Wizard Initialization
98        $('.wizard-card').bootstrapWizard({
99            'tabClass': 'nav nav-pills',
100            'nextSelector': '.btn-next',
101            'previousSelector': '.btn-previous',
102
103            onNext: function(tab, navigation, index) {
104                var $valid = $('.wizard-card form').valid();
105                if (!$valid) {
106                    $validator.focusInvalid();
107                    return false;
108                }
109            },
110
111            onInit: function(tab, navigation, index) {
112                //check number of tabs and fill the entire row
113                var $total = navigation.find('li').length;
114                var $wizard = navigation.closest('.wizard-card');
115
116                $first_li = navigation.find('li:first-child a').html();
117                $moving_div = $('<div class="moving-tab">' + $first_li + '</div>');
118                $('.wizard-card .wizard-navigation').append($moving_div);
119
120                refreshAnimation($wizard, index);
121
122                $('.moving-tab').css('transition', 'transform 0s');
123            },
124
125            onTabClick: function(tab, navigation, index) {
126                var $valid = $('.wizard-card form').valid();
127
128                if (!$valid) {
129                    return false;
130                } else {
131                    return true;
132                }
133            },
134
135            onTabShow: function(tab, navigation, index) {
136                var $total = navigation.find('li').length;
137                var $current = index + 1;
138
139                var $wizard = navigation.closest('.wizard-card');
140
141                // If it's the last tab then hide the last button and show the finish instead
142                if ($current >= $total) {
143                    $($wizard).find('.btn-next').hide();
144                    $($wizard).find('.btn-finish').show();
145                } else {
146                    $($wizard).find('.btn-next').show();
147                    $($wizard).find('.btn-finish').hide();
148                }
149
150                button_text = navigation.find('li:nth-child(' + $current + ') a').html();
151
152                setTimeout(function() {
153                    $('.moving-tab').text(button_text);
154                }, 150);
155
156                var checkbox = $('.footer-checkbox');
157
158                if (!index == 0) {
159                    $(checkbox).css({
160                        'opacity': '0',
161                        'visibility': 'hidden',
162                        'position': 'absolute'
163                    });
164                } else {
165                    $(checkbox).css({
166                        'opacity': '1',
167                        'visibility': 'visible'
168                    });
169                }
170
171                refreshAnimation($wizard, index);
172            }
173        });
174
175
176        // Prepare the preview for profile picture
177        $("#wizard-picture").change(function() {
178            readURL(this);
179        });
180
181        $('[data-toggle="wizard-radio"]').click(function() {
182            wizard = $(this).closest('.wizard-card');
183            wizard.find('[data-toggle="wizard-radio"]').removeClass('active');
184            $(this).addClass('active');
185            $(wizard).find('[type="radio"]').removeAttr('checked');
186            $(this).find('[type="radio"]').attr('checked', 'true');
187        });
188
189        $('[data-toggle="wizard-checkbox"]').click(function() {
190            if ($(this).hasClass('active')) {
191                $(this).removeClass('active');
192                $(this).find('[type="checkbox"]').removeAttr('checked');
193            } else {
194                $(this).addClass('active');
195                $(this).find('[type="checkbox"]').attr('checked', 'true');
196            }
197        });
198
199        $('.set-full-height').css('height', 'auto');
200
201        //Function to show image before upload
202
203        function readURL(input) {
204            if (input.files && input.files[0]) {
205                var reader = new FileReader();
206
207                reader.onload = function(e) {
208                    $('#wizardPicturePreview').attr('src', e.target.result).fadeIn('slow');
209                }
210                reader.readAsDataURL(input.files[0]);
211            }
212        }
213
214        $(window).resize(function() {
215            $('.wizard-card').each(function() {
216                $wizard = $(this);
217
218                index = $wizard.bootstrapWizard('currentIndex');
219                refreshAnimation($wizard, index);
220
221                $('.moving-tab').css({
222                    'transition': 'transform 0s'
223                });
224            });
225        });
226
227        function refreshAnimation($wizard, index) {
228            $total = $wizard.find('.nav li').length;
229            $li_width = 100 / $total;
230
231            total_steps = $wizard.find('.nav li').length;
232            move_distance = $wizard.width() / total_steps;
233            index_temp = index;
234            vertical_level = 0;
235
236            mobile_device = $(document).width() < 600 && $total > 3;
237
238            if (mobile_device) {
239                move_distance = $wizard.width() / 2;
240                index_temp = index % 2;
241                $li_width = 50;
242            }
243
244            $wizard.find('.nav li').css('width', $li_width + '%');
245
246            step_width = move_distance;
247            move_distance = move_distance * index_temp;
248
249            $current = index + 1;
250
251            if ($current == 1 || (mobile_device == true && (index % 2 == 0))) {
252                move_distance -= 8;
253            } else if ($current == total_steps || (mobile_device == true && (index % 2 == 1))) {
254                move_distance += 8;
255            }
256
257            if (mobile_device) {
258                vertical_level = parseInt(index / 2);
259                vertical_level = vertical_level * 38;
260            }
261
262            $wizard.find('.moving-tab').css('width', step_width);
263            $('.moving-tab').css({
264                'transform': 'translate3d(' + move_distance + 'px, ' + vertical_level + 'px, 0)',
265                'transition': 'all 0.5s cubic-bezier(0.29, 1.42, 0.79, 1)'
266
267            });
268        }
269    },
270
271
272    initDocumentationCharts: function() {
273        /* ----------==========     Daily Sales Chart initialization For Documentation    ==========---------- */
274
275        dataDailySalesChart = {
276            labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'],
277            series: [
278                [12, 17, 7, 17, 23, 18, 38]
279            ]
280        };
281
282        optionsDailySalesChart = {
283            lineSmooth: Chartist.Interpolation.cardinal({
284                tension: 0
285            }),
286            low: 0,
287            high: 50, // creative tim: we recommend you to set the high sa the biggest value + something for a better look
288            chartPadding: {
289                top: 0,
290                right: 0,
291                bottom: 0,
292                left: 0
293            },
294        }
295
296        var dailySalesChart = new Chartist.Line('#dailySalesChart', dataDailySalesChart, optionsDailySalesChart);
297
298        var animationHeaderChart = new Chartist.Line('#websiteViewsChart', dataDailySalesChart, optionsDailySalesChart);
299    },
300
301    initCharts: function() {
302
303        /* ----------==========    Rounded Line Chart initialization    ==========---------- */
304
305        dataRoundedLineChart = {
306            labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'],
307            series: [
308                [12, 17, 7, 17, 23, 18, 38]
309            ]
310        };
311
312        optionsRoundedLineChart = {
313            lineSmooth: Chartist.Interpolation.cardinal({
314                tension: 10
315            }),
316            axisX: {
317                showGrid: false,
318            },
319            low: 0,
320            high: 50, // creative tim: we recommend you to set the high sa the biggest value + something for a better look
321            chartPadding: {
322                top: 0,
323                right: 0,
324                bottom: 0,
325                left: 0
326            },
327            showPoint: false
328        }
329
330        var RoundedLineChart = new Chartist.Line('#roundedLineChart', dataRoundedLineChart, optionsRoundedLineChart);
331
332        md.startAnimationForLineChart(RoundedLineChart);
333
334
335        /*  **************** Straight Lines Chart - single line with points ******************** */
336
337        dataStraightLinesChart = {
338            labels: ['\'07', '\'08', '\'09', '\'10', '\'11', '\'12', '\'13', '\'14', '\'15'],
339            series: [
340                [10, 16, 8, 13, 20, 15, 20, 34, 30]
341            ]
342        };
343
344        optionsStraightLinesChart = {
345            lineSmooth: Chartist.Interpolation.cardinal({
346                tension: 0
347            }),
348            low: 0,
349            high: 50, // creative tim: we recommend you to set the high sa the biggest value + something for a better look
350            chartPadding: {
351                top: 0,
352                right: 0,
353                bottom: 0,
354                left: 0
355            },
356            classNames: {
357                point: 'ct-point ct-white',
358                line: 'ct-line ct-white'
359            }
360        }
361
362        var straightLinesChart = new Chartist.Line('#straightLinesChart', dataStraightLinesChart, optionsStraightLinesChart);
363
364        md.startAnimationForLineChart(straightLinesChart);
365
366
367        /*  **************** Coloured Rounded Line Chart - Line Chart ******************** */
368
369
370        dataColouredRoundedLineChart = {
371            labels: ['\'06', '\'07', '\'08', '\'09', '\'10', '\'11', '\'12', '\'13', '\'14', '\'15'],
372            series: [
373                [287, 480, 290, 554, 690, 690, 500, 752, 650, 900, 944]
374            ]
375        };
376
377        optionsColouredRoundedLineChart = {
378            lineSmooth: Chartist.Interpolation.cardinal({
379                tension: 10
380            }),
381            axisY: {
382                showGrid: true,
383                offset: 40
384            },
385            axisX: {
386                showGrid: false,
387            },
388            low: 0,
389            high: 1000,
390            showPoint: true,
391            height: '300px'
392        };
393
394
395        var colouredRoundedLineChart = new Chartist.Line('#colouredRoundedLineChart', dataColouredRoundedLineChart, optionsColouredRoundedLineChart);
396
397        md.startAnimationForLineChart(colouredRoundedLineChart);
398
399
400        /*  **************** Coloured Rounded Line Chart - Line Chart ******************** */
401
402
403        dataColouredBarsChart = {
404            labels: ['\'06', '\'07', '\'08', '\'09', '\'10', '\'11', '\'12', '\'13', '\'14', '\'15'],
405            series: [
406                [287, 385, 490, 554, 586, 698, 695, 752, 788, 846, 944],
407                [67, 152, 143, 287, 335, 435, 437, 539, 542, 544, 647],
408                [23, 113, 67, 190, 239, 307, 308, 439, 410, 410, 509]
409            ]
410        };
411
412        optionsColouredBarsChart = {
413            lineSmooth: Chartist.Interpolation.cardinal({
414                tension: 10
415            }),
416            axisY: {
417                showGrid: true,
418                offset: 40
419            },
420            axisX: {
421                showGrid: false,
422            },
423            low: 0,
424            high: 1000,
425            showPoint: true,
426            height: '300px'
427        };
428
429
430        var colouredBarsChart = new Chartist.Line('#colouredBarsChart', dataColouredBarsChart, optionsColouredBarsChart);
431
432        md.startAnimationForLineChart(colouredBarsChart);
433
434
435
436        /*  **************** Public Preferences - Pie Chart ******************** */
437
438        var dataPreferences = {
439            labels: ['62%', '32%', '6%'],
440            series: [62, 32, 6]
441        };
442
443        var optionsPreferences = {
444            height: '230px'
445        };
446
447        Chartist.Pie('#chartPreferences', dataPreferences, optionsPreferences);
448
449        /*  **************** Simple Bar Chart - barchart ******************** */
450
451        var dataSimpleBarChart = {
452            labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
453            series: [
454                [542, 443, 320, 780, 553, 453, 326, 434, 568, 610, 756, 895]
455            ]
456        };
457
458        var optionsSimpleBarChart = {
459            seriesBarDistance: 10,
460            axisX: {
461                showGrid: false
462            }
463        };
464
465        var responsiveOptionsSimpleBarChart = [
466            ['screen and (max-width: 640px)', {
467                seriesBarDistance: 5,
468                axisX: {
469                    labelInterpolationFnc: function(value) {
470                        return value[0];
471                    }
472                }
473            }]
474        ];
475
476        var simpleBarChart = Chartist.Bar('#simpleBarChart', dataSimpleBarChart, optionsSimpleBarChart, responsiveOptionsSimpleBarChart);
477
478        //start animation for the Emails Subscription Chart
479        md.startAnimationForBarChart(simpleBarChart);
480
481
482        var dataMultipleBarsChart = {
483            labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
484            series: [
485                [542, 443, 320, 780, 553, 453, 326, 434, 568, 610, 756, 895],
486                [412, 243, 280, 580, 453, 353, 300, 364, 368, 410, 636, 695]
487            ]
488        };
489
490        var optionsMultipleBarsChart = {
491            seriesBarDistance: 10,
492            axisX: {
493                showGrid: false
494            },
495            height: '300px'
496        };
497
498        var responsiveOptionsMultipleBarsChart = [
499            ['screen and (max-width: 640px)', {
500                seriesBarDistance: 5,
501                axisX: {
502                    labelInterpolationFnc: function(value) {
503                        return value[0];
504                    }
505                }
506            }]
507        ];
508
509        var multipleBarsChart = Chartist.Bar('#multipleBarsChart', dataMultipleBarsChart, optionsMultipleBarsChart, responsiveOptionsMultipleBarsChart);
510
511        //start animation for the Emails Subscription Chart
512        md.startAnimationForBarChart(multipleBarsChart);
513    },
514
515    initDashboardPageCharts: function() {
516
517        /* ----------==========     Daily Sales Chart initialization    ==========---------- */
518
519        dataDailySalesChart = {
520            labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'],
521            series: [
522                [12, 17, 7, 17, 23, 18, 38]
523            ]
524        };
525
526        optionsDailySalesChart = {
527            lineSmooth: Chartist.Interpolation.cardinal({
528                tension: 0
529            }),
530            low: 0,
531            high: 50, // creative tim: we recommend you to set the high sa the biggest value + something for a better look
532            chartPadding: {
533                top: 0,
534                right: 0,
535                bottom: 0,
536                left: 0
537            },
538        }
539
540        var dailySalesChart = new Chartist.Line('#dailySalesChart', dataDailySalesChart, optionsDailySalesChart);
541
542        md.startAnimationForLineChart(dailySalesChart);
543
544
545
546        /* ----------==========     Completed Tasks Chart initialization    ==========---------- */
547
548        dataCompletedTasksChart = {
549            labels: ['12p', '3p', '6p', '9p', '12p', '3a', '6a', '9a'],
550            series: [
551                [230, 750, 450, 300, 280, 240, 200, 190]
552            ]
553        };
554
555        optionsCompletedTasksChart = {
556            lineSmooth: Chartist.Interpolation.cardinal({
557                tension: 0
558            }),
559            low: 0,
560            high: 1000, // creative tim: we recommend you to set the high sa the biggest value + something for a better look
561            chartPadding: {
562                top: 0,
563                right: 0,
564                bottom: 0,
565                left: 0
566            }
567        }
568
569        var completedTasksChart = new Chartist.Line('#completedTasksChart', dataCompletedTasksChart, optionsCompletedTasksChart);
570
571        // start animation for the Completed Tasks Chart - Line Chart
572        md.startAnimationForLineChart(completedTasksChart);
573
574
575        /* ----------==========     Emails Subscription Chart initialization    ==========---------- */
576
577        var dataWebsiteViewsChart = {
578            labels: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'],
579            series: [
580                [542, 443, 320, 780, 553, 453, 326, 434, 568, 610, 756, 895]
581
582            ]
583        };
584        var optionsWebsiteViewsChart = {
585            axisX: {
586                showGrid: false
587            },
588            low: 0,
589            high: 1000,
590            chartPadding: {
591                top: 0,
592                right: 5,
593                bottom: 0,
594                left: 0
595            }
596        };
597        var responsiveOptions = [
598            ['screen and (max-width: 640px)', {
599                seriesBarDistance: 5,
600                axisX: {
601                    labelInterpolationFnc: function(value) {
602                        return value[0];
603                    }
604                }
605            }]
606        ];
607        var websiteViewsChart = Chartist.Bar('#websiteViewsChart', dataWebsiteViewsChart, optionsWebsiteViewsChart, responsiveOptions);
608
609        //start animation for the Emails Subscription Chart
610        md.startAnimationForBarChart(websiteViewsChart);
611
612    },
613
614    showSwal: function(type) {
615        if (type == 'basic') {
616            swal({
617                title: "Here's a message!",
618                buttonsStyling: false,
619                confirmButtonClass: "btn btn-success"
620            });
621
622        } else if (type == 'title-and-text') {
623            swal({
624                title: "Here's a message!",
625                text: "It's pretty, isn't it?",
626                buttonsStyling: false,
627                confirmButtonClass: "btn btn-info"
628            });
629
630        } else if (type == 'success-message') {
631            swal({
632                title: "Good job!",
633                text: "You clicked the button!",
634                buttonsStyling: false,
635                confirmButtonClass: "btn btn-success",
636                type: "success"
637            });
638
639        } else if (type == 'warning-message-and-confirmation') {
640            swal({
641                title: 'Are you sure?',
642                text: "You won't be able to revert this!",
643                type: 'warning',
644                showCancelButton: true,
645                confirmButtonClass: 'btn btn-success',
646                cancelButtonClass: 'btn btn-danger',
647                confirmButtonText: 'Yes, delete it!',
648                buttonsStyling: false
649            }).then(function() {
650                swal({
651                    title: 'Deleted!',
652                    text: 'Your file has been deleted.',
653                    type: 'success',
654                    confirmButtonClass: "btn btn-success",
655                    buttonsStyling: false
656                })
657            });
658        } else if (type == 'warning-message-and-cancel') {
659            swal({
660                title: 'Are you sure?',
661                text: 'You will not be able to recover this imaginary file!',
662                type: 'warning',
663                showCancelButton: true,
664                confirmButtonText: 'Yes, delete it!',
665                cancelButtonText: 'No, keep it',
666                confirmButtonClass: "btn btn-success",
667                cancelButtonClass: "btn btn-danger",
668                buttonsStyling: false
669            }).then(function() {
670                swal({
671                    title: 'Deleted!',
672                    text: 'Your imaginary file has been deleted.',
673                    type: 'success',
674                    confirmButtonClass: "btn btn-success",
675                    buttonsStyling: false
676                })
677            }, function(dismiss) {
678                // dismiss can be 'overlay', 'cancel', 'close', 'esc', 'timer'
679                if (dismiss === 'cancel') {
680                    swal({
681                        title: 'Cancelled',
682                        text: 'Your imaginary file is safe :)',
683                        type: 'error',
684                        confirmButtonClass: "btn btn-info",
685                        buttonsStyling: false
686                    })
687                }
688            })
689
690        } else if (type == 'custom-html') {
691            swal({
692                title: 'HTML example',
693                buttonsStyling: false,
694                confirmButtonClass: "btn btn-success",
695                html: 'You can use <b>bold text</b>, ' +
696                    '<a href="http://github.com">links</a> ' +
697                    'and other HTML tags'
698            });
699
700        } else if (type == 'auto-close') {
701            swal({
702                title: "Auto close alert!",
703                text: "I will close in 2 seconds.",
704                timer: 2000,
705                showConfirmButton: false
706            });
707        } else if (type == 'input-field') {
708            swal({
709                title: 'Input something',
710                html: '<div class="form-group">' +
711                    '<input id="input-field" type="text" class="form-control" />' +
712                    '</div>',
713                showCancelButton: true,
714                confirmButtonClass: 'btn btn-success',
715                cancelButtonClass: 'btn btn-danger',
716                buttonsStyling: false
717            }).then(function(result) {
718                swal({
719                    type: 'success',
720                    html: 'You entered: <strong>' +
721                        $('#input-field').val() +
722                        '</strong>',
723                    confirmButtonClass: 'btn btn-success',
724                    buttonsStyling: false
725
726                })
727            }).catch(swal.noop)
728        }
729    },
730
731    initVectorMap: function() {
732        var mapData = {
733            "AU": 760,
734            "BR": 550,
735            "CA": 120,
736            "DE": 1300,
737            "FR": 540,
738            "GB": 690,
739            "GE": 200,
740            "IN": 200,
741            "RO": 600,
742            "RU": 300,
743            "US": 2920,
744        };
745
746        $('#worldMap').vectorMap({
747            map: 'world_mill_en',
748            backgroundColor: "transparent",
749            zoomOnScroll: false,
750            regionStyle: {
751                initial: {
752                    fill: '#e4e4e4',
753                    "fill-opacity": 0.9,
754                    stroke: 'none',
755                    "stroke-width": 0,
756                    "stroke-opacity": 0
757                }
758            },
759
760            series: {
761                regions: [{
762                    values: mapData,
763                    scale: ["#AAAAAA", "#444444"],
764                    normalizeFunction: 'polynomial'
765                }]
766            },
767        });
768    },
769
770    initGoogleMaps: function() {
771        var myLatlng = new google.maps.LatLng(40.748817, -73.985428);
772        var mapOptions = {
773            zoom: 13,
774            center: myLatlng,
775            scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
776            styles: [{
777                "featureType": "water",
778                "stylers": [{
779                    "saturation": 43
780                }, {
781                    "lightness": -11
782                }, {
783                    "hue": "#0088ff"
784                }]
785            }, {
786                "featureType": "road",
787                "elementType": "geometry.fill",
788                "stylers": [{
789                    "hue": "#ff0000"
790                }, {
791                    "saturation": -100
792                }, {
793                    "lightness": 99
794                }]
795            }, {
796                "featureType": "road",
797                "elementType": "geometry.stroke",
798                "stylers": [{
799                    "color": "#808080"
800                }, {
801                    "lightness": 54
802                }]
803            }, {
804                "featureType": "landscape.man_made",
805                "elementType": "geometry.fill",
806                "stylers": [{
807                    "color": "#ece2d9"
808                }]
809            }, {
810                "featureType": "poi.park",
811                "elementType": "geometry.fill",
812                "stylers": [{
813                    "color": "#ccdca1"
814                }]
815            }, {
816                "featureType": "road",
817                "elementType": "labels.text.fill",
818                "stylers": [{
819                    "color": "#767676"
820                }]
821            }, {
822                "featureType": "road",
823                "elementType": "labels.text.stroke",
824                "stylers": [{
825                    "color": "#ffffff"
826                }]
827            }, {
828                "featureType": "poi",
829                "stylers": [{
830                    "visibility": "off"
831                }]
832            }, {
833                "featureType": "landscape.natural",
834                "elementType": "geometry.fill",
835                "stylers": [{
836                    "visibility": "on"
837                }, {
838                    "color": "#b8cb93"
839                }]
840            }, {
841                "featureType": "poi.park",
842                "stylers": [{
843                    "visibility": "on"
844                }]
845            }, {
846                "featureType": "poi.sports_complex",
847                "stylers": [{
848                    "visibility": "on"
849                }]
850            }, {
851                "featureType": "poi.medical",
852                "stylers": [{
853                    "visibility": "on"
854                }]
855            }, {
856                "featureType": "poi.business",
857                "stylers": [{
858                    "visibility": "simplified"
859                }]
860            }]
861
862        }
863        var map = new google.maps.Map(document.getElementById("map"), mapOptions);
864
865        var marker = new google.maps.Marker({
866            position: myLatlng,
867            title: "Hello World!"
868        });
869
870        // To add the marker to the map, call setMap();
871        marker.setMap(map);
872    },
873
874    initSmallGoogleMaps: function() {
875
876        // Regular Map
877        var myLatlng = new google.maps.LatLng(40.748817, -73.985428);
878        var mapOptions = {
879            zoom: 8,
880            center: myLatlng,
881            scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
882        }
883
884        var map = new google.maps.Map(document.getElementById("regularMap"), mapOptions);
885
886        var marker = new google.maps.Marker({
887            position: myLatlng,
888            title: "Regular Map!"
889        });
890
891        marker.setMap(map);
892
893
894        // Custom Skin & Settings Map
895        var myLatlng = new google.maps.LatLng(40.748817, -73.985428);
896        var mapOptions = {
897            zoom: 13,
898            center: myLatlng,
899            scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
900            disableDefaultUI: true, // a way to quickly hide all controls
901            zoomControl: true,
902            styles: [{
903                "featureType": "water",
904                "stylers": [{
905                    "saturation": 43
906                }, {
907                    "lightness": -11
908                }, {
909                    "hue": "#0088ff"
910                }]
911            }, {
912                "featureType": "road",
913                "elementType": "geometry.fill",
914                "stylers": [{
915                    "hue": "#ff0000"
916                }, {
917                    "saturation": -100
918                }, {
919                    "lightness": 99
920                }]
921            }, {
922                "featureType": "road",
923                "elementType": "geometry.stroke",
924                "stylers": [{
925                    "color": "#808080"
926                }, {
927                    "lightness": 54
928                }]
929            }, {
930                "featureType": "landscape.man_made",
931                "elementType": "geometry.fill",
932                "stylers": [{
933                    "color": "#ece2d9"
934                }]
935            }, {
936                "featureType": "poi.park",
937                "elementType": "geometry.fill",
938                "stylers": [{
939                    "color": "#ccdca1"
940                }]
941            }, {
942                "featureType": "road",
943                "elementType": "labels.text.fill",
944                "stylers": [{
945                    "color": "#767676"
946                }]
947            }, {
948                "featureType": "road",
949                "elementType": "labels.text.stroke",
950                "stylers": [{
951                    "color": "#ffffff"
952                }]
953            }, {
954                "featureType": "poi",
955                "stylers": [{
956                    "visibility": "off"
957                }]
958            }, {
959                "featureType": "landscape.natural",
960                "elementType": "geometry.fill",
961                "stylers": [{
962                    "visibility": "on"
963                }, {
964                    "color": "#b8cb93"
965                }]
966            }, {
967                "featureType": "poi.park",
968                "stylers": [{
969                    "visibility": "on"
970                }]
971            }, {
972                "featureType": "poi.sports_complex",
973                "stylers": [{
974                    "visibility": "on"
975                }]
976            }, {
977                "featureType": "poi.medical",
978                "stylers": [{
979                    "visibility": "on"
980                }]
981            }, {
982                "featureType": "poi.business",
983                "stylers": [{
984                    "visibility": "simplified"
985                }]
986            }]
987
988        }
989
990        var map = new google.maps.Map(document.getElementById("customSkinMap"), mapOptions);
991
992        var marker = new google.maps.Marker({
993            position: myLatlng,
994            title: "Custom Skin & Settings Map!"
995        });
996
997        marker.setMap(map);
998
999
1000
1001        // Satellite Map
1002        var myLatlng = new google.maps.LatLng(40.748817, -73.985428);
1003        var mapOptions = {
1004            zoom: 3,
1005            scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page
1006            center: myLatlng,
1007            mapTypeId: google.maps.MapTypeId.SATELLITE
1008        }
1009
1010        var map = new google.maps.Map(document.getElementById("satelliteMap"), mapOptions);
1011
1012        var marker = new google.maps.Marker({
1013            position: myLatlng,
1014            title: "Satellite Map!"
1015        });
1016
1017        marker.setMap(map);
1018
1019
1020    },
1021
1022    initFullCalendar: function() {
1023        $calendar = $('#fullCalendar');
1024
1025        today = new Date();
1026        y = today.getFullYear();
1027        m = today.getMonth();
1028        d = today.getDate();
1029
1030        $calendar.fullCalendar({
1031            viewRender: function(view, element) {
1032                // We make sure that we activate the perfect scrollbar when the view isn't on Month
1033                if (view.name != 'month') {
1034                    $(element).find('.fc-scroller').perfectScrollbar();
1035                }
1036            },
1037            header: {
1038                left: 'title',
1039                center: 'month,agendaWeek,agendaDay',
1040                right: 'prev,next,today'
1041            },
1042            defaultDate: today,
1043            selectable: true,
1044            selectHelper: true,
1045            views: {
1046                month: { // name of view
1047                    titleFormat: 'MMMM YYYY'
1048                    // other view-specific options here
1049                },
1050                week: {
1051                    titleFormat: " MMMM D YYYY"
1052                },
1053                day: {
1054                    titleFormat: 'D MMM, YYYY'
1055                }
1056            },
1057
1058            select: function(start, end) {
1059
1060                // on select we show the Sweet Alert modal with an input
1061                swal({
1062                    title: 'Create an Event',
1063                    html: '<div class="form-group">' +
1064                        '<input class="form-control" placeholder="Event Title" id="input-field">' +
1065                        '</div>',
1066                    showCancelButton: true,
1067                    confirmButtonClass: 'btn btn-success',
1068                    cancelButtonClass: 'btn btn-danger',
1069                    buttonsStyling: false
1070                }).then(function(result) {
1071
1072                    var eventData;
1073                    event_title = $('#input-field').val();
1074
1075                    if (event_title) {
1076                        eventData = {
1077                            title: event_title,
1078                            start: start,
1079                            end: end
1080                        };
1081                        $calendar.fullCalendar('renderEvent', eventData, true); // stick? = true
1082                    }
1083
1084                    $calendar.fullCalendar('unselect');
1085
1086                });
1087            },
1088            editable: true,
1089            eventLimit: true, // allow "more" link when too many events
1090
1091
1092            // color classes: [ event-blue | event-azure | event-green | event-orange | event-red ]
1093            events: [{
1094                    title: 'All Day Event',
1095                    start: new Date(y, m, 1),
1096                    className: 'event-default'
1097                },
1098                {
1099                    id: 999,
1100                    title: 'Repeating Event',
1101                    start: new Date(y, m, d - 4, 6, 0),
1102                    allDay: false,
1103                    className: 'event-rose'
1104                },
1105                {
1106                    id: 999,
1107                    title: 'Repeating Event',
1108                    start: new Date(y, m, d + 3, 6, 0),
1109                    allDay: false,
1110                    className: 'event-rose'
1111                },
1112                {
1113                    title: 'Meeting',
1114                    start: new Date(y, m, d - 1, 10, 30),
1115                    allDay: false,
1116                    className: 'event-green'
1117                },
1118                {
1119                    title: 'Lunch',
1120                    start: new Date(y, m, d + 7, 12, 0),
1121                    end: new Date(y, m, d + 7, 14, 0),
1122                    allDay: false,
1123                    className: 'event-red'
1124                },
1125                {
1126                    title: 'Md-pro Launch',
1127                    start: new Date(y, m, d - 2, 12, 0),
1128                    allDay: true,
1129                    className: 'event-azure'
1130                },
1131                {
1132                    title: 'Birthday Party',
1133                    start: new Date(y, m, d + 1, 19, 0),
1134                    end: new Date(y, m, d + 1, 22, 30),
1135                    allDay: false,
1136                    className: 'event-azure'
1137                },
1138                {
1139                    title: 'Click for Creative Tim',
1140                    start: new Date(y, m, 21),
1141                    end: new Date(y, m, 22),
1142                    url: 'http://www.creative-tim.com/',
1143                    className: 'event-orange'
1144                },
1145                {
1146                    title: 'Click for Google',
1147                    start: new Date(y, m, 21),
1148                    end: new Date(y, m, 22),
1149                    url: 'http://www.creative-tim.com/',
1150                    className: 'event-orange'
1151                }
1152            ]
1153        });
1154    },
1155
1156    showNotification: function(from, align) {
1157        type = ['', 'info', 'success', 'warning', 'danger', 'rose', 'primary'];
1158
1159        color = Math.floor((Math.random() * 6) + 1);
1160
1161        $.notify({
1162            icon: "notifications",
1163            message: "Welcome to <b>Material Dashboard</b> - a beautiful freebie for every web developer."
1164
1165        }, {
1166            type: type[color],
1167            timer: 3000,
1168            placement: {
1169                from: from,
1170                align: align
1171            }
1172        });
1173    }
1174
1175}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.