diff --git a/backend/web/js/custom.js b/backend/web/js/custom.js index 69f3952..1c6f825 100644 --- a/backend/web/js/custom.js +++ b/backend/web/js/custom.js @@ -1,8 +1,8 @@ /** * Resize function without multiple trigger - * + * * Usage: - * $(window).smartresize(function(){ + * $(window).smartresize(function(){ * // code here * }); */ @@ -16,8 +16,8 @@ var obj = this, args = arguments; function delayed () { if (!execAsap) - func.apply(obj, args); - timeout = null; + func.apply(obj, args); + timeout = null; } if (timeout) @@ -25,11 +25,11 @@ else if (execAsap) func.apply(obj, args); - timeout = setTimeout(delayed, threshold || 100); + timeout = setTimeout(delayed, threshold || 100); }; }; - // smartresize + // smartresize jQuery.fn[sr] = function(fn){ return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); }; })(jQuery,'smartresize'); @@ -49,8 +49,8 @@ var CURRENT_URL = window.location.href.split('#')[0].split('?')[0], $NAV_MENU = $('.nav_menu'), $FOOTER = $('footer'); - - + + // Sidebar function init_sidebar() { // TODO: This is some kind of easy fix, maybe we can improve this @@ -99,10 +99,10 @@ var setContentHeight = function () { } }); -// toggle small or large menu +// toggle small or large menu $MENU_TOGGLE.on('click', function() { console.log('clicked - menu toggle'); - + if ($BODY.hasClass('nav-md')) { $SIDEBAR_MENU.find('li.active ul').hide(); $SIDEBAR_MENU.find('li.active').addClass('active-sm').removeClass('active'); @@ -126,7 +126,7 @@ $MENU_TOGGLE.on('click', function() { }).parent().addClass('active'); // recompute content when resizing - $(window).smartresize(function(){ + $(window).smartresize(function(){ setContentHeight(); }); @@ -154,15 +154,15 @@ $(document).ready(function() { var $BOX_PANEL = $(this).closest('.x_panel'), $ICON = $(this).find('i'), $BOX_CONTENT = $BOX_PANEL.find('.x_content'); - + // fix for some div with hardcoded fix class if ($BOX_PANEL.attr('style')) { $BOX_CONTENT.slideToggle(200, function(){ $BOX_PANEL.removeAttr('style'); }); } else { - $BOX_CONTENT.slideToggle(200); - $BOX_PANEL.css('height', 'auto'); + $BOX_CONTENT.slideToggle(200); + $BOX_PANEL.css('height', 'auto'); } $ICON.toggleClass('fa-chevron-up fa-chevron-down'); @@ -297,7 +297,7 @@ if (typeof NProgress != 'undefined') { }); } - + //hover and retain popover when on popover content var originalLeave = $.fn.popover.Constructor.prototype.leave; $.fn.popover.Constructor.prototype.leave = function(obj) { @@ -334,16 +334,16 @@ if (typeof NProgress != 'undefined') { function gd(year, month, day) { return new Date(year, month - 1, day).getTime(); } - - + + function init_flot_chart(){ - + if( typeof ($.plot) === 'undefined'){ return; } - + console.log('init_flot_chart'); - - - + + + var arr_data1 = [ [gd(2012, 1, 1), 17], [gd(2012, 1, 2), 74], @@ -363,7 +363,7 @@ if (typeof NProgress != 'undefined') { [gd(2012, 1, 6), 6], [gd(2012, 1, 7), 9] ]; - + var arr_data3 = [ [0, 1], [1, 9], @@ -383,9 +383,9 @@ if (typeof NProgress != 'undefined') { [15, 4], [16, 9] ]; - + var chart_plot_02_data = []; - + var chart_plot_03_data = [ [0, 1], [1, 9], @@ -405,13 +405,13 @@ if (typeof NProgress != 'undefined') { [15, 4], [16, 9] ]; - - + + for (var i = 0; i < 30; i++) { chart_plot_02_data.push([new Date(Date.today().add(i).days()).getTime(), randNum() + i + i + 10]); } - - + + var chart_plot_01_settings = { series: { lines: { @@ -456,7 +456,7 @@ if (typeof NProgress != 'undefined') { }, tooltip: false } - + var chart_plot_02_settings = { grid: { show: true, @@ -519,8 +519,8 @@ if (typeof NProgress != 'undefined') { min: chart_plot_02_data[0][0], max: chart_plot_02_data[20][0] } - }; - + }; + var chart_plot_03_settings = { series: { curvedLines: { @@ -543,58 +543,58 @@ if (typeof NProgress != 'undefined') { } } }; - - + + if ($("#chart_plot_01").length){ console.log('Plot1'); - + $.plot( $("#chart_plot_01"), [ arr_data1, arr_data2 ], chart_plot_01_settings ); } - - + + if ($("#chart_plot_02").length){ console.log('Plot2'); - - $.plot( $("#chart_plot_02"), - [{ - label: "Email Sent", - data: chart_plot_02_data, - lines: { - fillColor: "rgba(150, 202, 89, 0.12)" - }, - points: { - fillColor: "#fff" } + + $.plot( $("#chart_plot_02"), + [{ + label: "Email Sent", + data: chart_plot_02_data, + lines: { + fillColor: "rgba(150, 202, 89, 0.12)" + }, + points: { + fillColor: "#fff" } }], chart_plot_02_settings); - + } - + if ($("#chart_plot_03").length){ console.log('Plot3'); - - + + $.plot($("#chart_plot_03"), [{ label: "Registrations", data: chart_plot_03_data, lines: { fillColor: "rgba(150, 202, 89, 0.12)" - }, + }, points: { fillColor: "#fff" } }], chart_plot_03_settings); - + }; - - } - - + + } + + /* STARRR */ - + function init_starrr() { - + if( typeof (starrr) === 'undefined'){ return; } console.log('init_starrr'); - + $(".stars").starrr(); $('.stars-existing').starrr({ @@ -608,20 +608,20 @@ if (typeof NProgress != 'undefined') { $('.stars-existing').on('starrr:change', function (e, value) { $('.stars-count-existing').html(value); }); - + }; - - + + function init_JQVmap(){ - //console.log('check init_JQVmap [' + typeof (VectorCanvas) + '][' + typeof (jQuery.fn.vectorMap) + ']' ); - + //console.log('check init_JQVmap [' + typeof (VectorCanvas) + '][' + typeof (jQuery.fn.vectorMap) + ']' ); + if(typeof (jQuery.fn.vectorMap) === 'undefined'){ return; } - + console.log('init_JQVmap'); - + if ($('#world-map-gdp').length ){ - + $('#world-map-gdp').vectorMap({ map: 'world_en', backgroundColor: null, @@ -634,11 +634,11 @@ if (typeof NProgress != 'undefined') { scaleColors: ['#E6F2F0', '#149B7E'], normalizeFunction: 'polynomial' }); - + } - + if ($('#usa_map').length ){ - + $('#usa_map').vectorMap({ map: 'usa_en', backgroundColor: null, @@ -651,17 +651,17 @@ if (typeof NProgress != 'undefined') { scaleColors: ['#E6F2F0', '#149B7E'], normalizeFunction: 'polynomial' }); - + } - + }; - - + + function init_skycons(){ - + if( typeof (Skycons) === 'undefined'){ return; } console.log('init_skycons'); - + var icons = new Skycons({ "color": "#73879C" }), @@ -676,18 +676,18 @@ if (typeof NProgress != 'undefined') { icons.set(list[i], list[i]); icons.play(); - - } - - + + } + + function init_chart_doughnut(){ - + if( typeof (Chart) === 'undefined'){ return; } - + console.log('init_chart_doughnut'); - + if ($('.canvasDoughnut').length){ - + var chart_doughnut_settings = { type: 'doughnut', tooltipFillColor: "rgba(51, 51, 51, 0.55)", @@ -717,31 +717,31 @@ if (typeof NProgress != 'undefined') { ] }] }, - options: { - legend: false, - responsive: false + options: { + legend: false, + responsive: false } } - + $('.canvasDoughnut').each(function(){ - + var chart_element = $(this); var chart_doughnut = new Chart( chart_element, chart_doughnut_settings); - - }); - - } - + + }); + + } + } - + function init_gauge() { - + if( typeof (Gauge) === 'undefined'){ return; } - + console.log('init_gauge [' + $('.gauge-chart').length + ']'); - + console.log('init_gauge'); - + var chart_gauge_settings = { lines: 12, @@ -758,53 +758,53 @@ if (typeof NProgress != 'undefined') { strokeColor: '#F0F3F3', generateGradient: true }; - - - if ($('#chart_gauge_01').length){ - + + + if ($('#chart_gauge_01').length){ + var chart_gauge_01_elem = document.getElementById('chart_gauge_01'); var chart_gauge_01 = new Gauge(chart_gauge_01_elem).setOptions(chart_gauge_settings); - - } - - - if ($('#gauge-text').length){ - + + } + + + if ($('#gauge-text').length){ + chart_gauge_01.maxValue = 6000; chart_gauge_01.animationSpeed = 32; chart_gauge_01.set(3200); chart_gauge_01.setTextField(document.getElementById("gauge-text")); - + } - + if ($('#chart_gauge_02').length){ - + var chart_gauge_02_elem = document.getElementById('chart_gauge_02'); var chart_gauge_02 = new Gauge(chart_gauge_02_elem).setOptions(chart_gauge_settings); - + } - - + + if ($('#gauge-text2').length){ - + chart_gauge_02.maxValue = 9000; chart_gauge_02.animationSpeed = 32; chart_gauge_02.set(2400); chart_gauge_02.setTextField(document.getElementById("gauge-text2")); - + } - - - } - + + + } + /* SPARKLINES */ - + function init_sparklines() { - + if(typeof (jQuery.fn.sparkline) === 'undefined'){ return; } - console.log('init_sparklines'); - - + console.log('init_sparklines'); + + $(".sparkline_one").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 6, 4, 5, 6, 3, 5, 4, 5, 4, 5, 4, 3, 4, 5, 6, 7, 5, 4, 3, 5, 6], { type: 'bar', height: '125', @@ -815,20 +815,20 @@ if (typeof NProgress != 'undefined') { barSpacing: 2, barColor: '#26B99A' }); - - + + $(".sparkline_two").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 6, 7, 5, 4, 3, 5, 6], { type: 'bar', height: '40', barWidth: 9, colorMap: { - '7': '#a1a1a1' + '7': '#a1a1a1' }, barSpacing: 2, barColor: '#26B99A' }); - - + + $(".sparkline_three").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 6, 7, 5, 4, 3, 5, 6], { type: 'line', width: '200', @@ -839,8 +839,8 @@ if (typeof NProgress != 'undefined') { spotColor: '#26B99A', minSpotColor: '#26B99A' }); - - + + $(".sparkline11").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 6, 2, 4, 3, 4, 5, 4, 5, 4, 3], { type: 'bar', height: '40', @@ -851,8 +851,8 @@ if (typeof NProgress != 'undefined') { barSpacing: 2, barColor: '#26B99A' }); - - + + $(".sparkline22").sparkline([2, 4, 3, 4, 7, 5, 4, 3, 5, 6, 2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 6], { type: 'line', height: '40', @@ -863,8 +863,8 @@ if (typeof NProgress != 'undefined') { spotColor: '#34495E', minSpotColor: '#34495E' }); - - + + $(".sparkline_bar").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 6, 4, 5, 6, 3, 5], { type: 'bar', colorMap: { @@ -872,8 +872,8 @@ if (typeof NProgress != 'undefined') { }, barColor: '#26B99A' }); - - + + $(".sparkline_area").sparkline([5, 6, 7, 9, 9, 5, 3, 2, 2, 4, 6, 7], { type: 'line', lineColor: '#26B99A', @@ -886,8 +886,8 @@ if (typeof NProgress != 'undefined') { spotRadius: 2.5, width: 85 }); - - + + $(".sparkline_line").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 6, 4, 5, 6, 3, 5], { type: 'line', lineColor: '#26B99A', @@ -896,14 +896,14 @@ if (typeof NProgress != 'undefined') { spotColor: '#34495E', minSpotColor: '#34495E' }); - - + + $(".sparkline_pie").sparkline([1, 1, 2, 1], { type: 'pie', sliceColors: ['#26B99A', '#ccc', '#75BCDD', '#D66DE2'] }); - - + + $(".sparkline_discreet").sparkline([4, 6, 7, 7, 4, 3, 2, 1, 4, 4, 2, 4, 3, 7, 8, 9, 7, 6, 4, 3], { type: 'discrete', barWidth: 3, @@ -911,17 +911,17 @@ if (typeof NProgress != 'undefined') { width: '85', }); - - }; - - + + }; + + /* AUTOCOMPLETE */ - + function init_autocomplete() { - + if( typeof (autocomplete) === 'undefined'){ return; } console.log('init_autocomplete'); - + var countries = { AD:"Andorra",A2:"Andorra Test",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AN:"Netherlands Antilles",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BQ:"British Antarctic Territory",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos [Keeling] Islands",CD:"Congo - Kinshasa",CF:"Central African Republic",CG:"Congo - Brazzaville",CH:"Switzerland",CI:"Côte d’Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CS:"Serbia and Montenegro",CT:"Canton and Enderbury Islands",CU:"Cuba",CV:"Cape Verde",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DD:"East Germany",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Micronesia",FO:"Faroe Islands",FQ:"French Southern and Antarctic Territories",FR:"France",FX:"Metropolitan France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong SAR China",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",JT:"Johnston Island",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin",MG:"Madagascar",MH:"Marshall Islands",MI:"Midway Islands",MK:"Macedonia",ML:"Mali",MM:"Myanmar [Burma]",MN:"Mongolia",MO:"Macau SAR China",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NQ:"Dronning Maud Land",NR:"Nauru",NT:"Neutral Zone",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PC:"Pacific Islands Trust Territory",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn Islands",PR:"Puerto Rico",PS:"Palestinian Territories",PT:"Portugal",PU:"U.S. Miscellaneous Pacific Islands",PW:"Palau",PY:"Paraguay",PZ:"Panama Canal Zone",QA:"Qatar",RE:"Réunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",ST:"São Tomé and Príncipe",SU:"Union of Soviet Socialist Republics",SV:"El Salvador",SY:"Syria",SZ:"Swaziland",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"U.S. Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Vatican City",VC:"Saint Vincent and the Grenadines",VD:"North Vietnam",VE:"Venezuela",VG:"British Virgin Islands",VI:"U.S. Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WK:"Wake Island",WS:"Samoa",YD:"People's Democratic Republic of Yemen",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"Unknown or Invalid Region" }; var countriesArray = $.map(countries, function(value, key) { @@ -935,28 +935,28 @@ if (typeof NProgress != 'undefined') { $('#autocomplete-custom-append').autocomplete({ lookup: countriesArray }); - + }; - + /* AUTOSIZE */ - + function init_autosize() { - + if(typeof $.fn.autosize !== 'undefined'){ - + autosize($('.resizable_textarea')); - + } - - }; - + + }; + /* PARSLEY */ - + function init_parsley() { - + if( typeof (parsley) === 'undefined'){ return; } console.log('init_parsley'); - + $/*.listen*/('parsley:field:validate', function() { validateFront(); }); @@ -973,7 +973,7 @@ if (typeof NProgress != 'undefined') { $('.bs-callout-warning').removeClass('hidden'); } }; - + $/*.listen*/('parsley:field:validate', function() { validateFront(); }); @@ -990,16 +990,16 @@ if (typeof NProgress != 'undefined') { $('.bs-callout-warning').removeClass('hidden'); } }; - + try { hljs.initHighlightingOnLoad(); } catch (err) {} - + }; - - + + /* INPUTS */ - + function onAddTag(tag) { alert("Added a tag: " + tag); } @@ -1014,24 +1014,24 @@ if (typeof NProgress != 'undefined') { //tags input function init_TagsInput() { - - if(typeof $.fn.tagsInput !== 'undefined'){ - + + if(typeof $.fn.tagsInput !== 'undefined'){ + $('#tags_1').tagsInput({ width: 'auto' }); - + } - + }; - + /* SELECT2 */ - + function init_select2() { - + if( typeof (select2) === 'undefined'){ return; } console.log('init_toolbox'); - + $(".select2_single").select2({ placeholder: "Select a state", allowClear: true @@ -1042,16 +1042,16 @@ if (typeof NProgress != 'undefined') { placeholder: "With Max Selection limit 4", allowClear: true }); - + }; - + /* WYSIWYG EDITOR */ function init_wysiwyg() { - + if( typeof ($.fn.wysiwyg) === 'undefined'){ return; } - console.log('init_wysiwyg'); - + console.log('init_wysiwyg'); + function init_ToolbarBootstrapBindings() { var fonts = ['Serif', 'Sans', 'Arial', 'Arial Black', 'Courier', 'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande', 'Lucida Sans', 'Tahoma', 'Times', @@ -1106,27 +1106,27 @@ if (typeof NProgress != 'undefined') { $('.editor-wrapper').each(function(){ var id = $(this).attr('id'); //editor-one - + $(this).wysiwyg({ toolbarSelector: '[data-target="#' + id + '"]', fileUploadError: showErrorAlert - }); + }); }); - - + + window.prettyPrint; prettyPrint(); - + }; - + /* CROPPER */ - + function init_cropper() { - - + + if( typeof ($.fn.cropper) === 'undefined'){ return; } console.log('init_cropper'); - + var $image = $('#image'); var $download = $('#download'); var $dataX = $('#dataX'); @@ -1348,19 +1348,19 @@ if (typeof NProgress != 'undefined') { } else { $inputImage.prop('disabled', true).parent().addClass('disabled'); } - - + + }; - - /* CROPPER --- end */ - + + /* CROPPER --- end */ + /* KNOB */ - + function init_knob() { - + if( typeof ($.fn.knob) === 'undefined'){ return; } console.log('init_knob'); - + $(".knob").knob({ change: function(value) { //console.log("change : " + value); @@ -1411,7 +1411,7 @@ if (typeof NProgress != 'undefined') { return false; } } - + }); // Example of infinite knob, iPod click wheel @@ -1457,27 +1457,27 @@ if (typeof NProgress != 'undefined') { v = this.cv; } }); - + }; - + /* INPUT MASK */ - + function init_InputMask() { - + if( typeof ($.fn.inputmask) === 'undefined'){ return; } console.log('init_InputMask'); - + $(":input").inputmask(); - + }; - + /* COLOR PICKER */ - + function init_ColorPicker() { - + if( typeof ($.fn.colorpicker) === 'undefined'){ return; } console.log('init_ColorPicker'); - + $('.demo1').colorpicker(); $('.demo2').colorpicker(); @@ -1491,17 +1491,17 @@ if (typeof NProgress != 'undefined') { }); $('.demo-auto').colorpicker(); - - }; - - + + }; + + /* ION RANGE SLIDER */ - + function init_IonRangeSlider() { - + if( typeof ($.fn.ionRangeSlider) === 'undefined'){ return; } console.log('init_IonRangeSlider'); - + $("#range_27").ionRangeSlider({ type: "double", min: 1000000, @@ -1562,17 +1562,17 @@ if (typeof NProgress != 'undefined') { return m.format("Do MMMM, HH:mm"); } }); - + }; - - + + /* DATERANGEPICKER */ - + function init_daterangepicker() { if( typeof ($.fn.daterangepicker) === 'undefined'){ return; } console.log('init_daterangepicker'); - + var cb = function(start, end, label) { console.log(start.toISOString(), end.toISOString(), label); $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY')); @@ -1616,7 +1616,7 @@ if (typeof NProgress != 'undefined') { firstDay: 1 } }; - + $('#reportrange span').html(moment().subtract(29, 'days').format('MMMM D, YYYY') + ' - ' + moment().format('MMMM D, YYYY')); $('#reportrange').daterangepicker(optionSet1, cb); $('#reportrange').on('show.daterangepicker', function() { @@ -1640,14 +1640,14 @@ if (typeof NProgress != 'undefined') { $('#destroy').click(function() { $('#reportrange').data('daterangepicker').remove(); }); - + } - + function init_daterangepicker_right() { - + if( typeof ($.fn.daterangepicker) === 'undefined'){ return; } console.log('init_daterangepicker_right'); - + var cb = function(start, end, label) { console.log(start.toISOString(), end.toISOString(), label); $('#reportrange_right span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY')); @@ -1722,12 +1722,12 @@ if (typeof NProgress != 'undefined') { }); } - + function init_daterangepicker_single_call() { - + if( typeof ($.fn.daterangepicker) === 'undefined'){ return; } console.log('init_daterangepicker_single_call'); - + $('#single_cal1').daterangepicker({ singleDatePicker: true, singleClasses: "picker_1" @@ -1752,16 +1752,16 @@ if (typeof NProgress != 'undefined') { }, function(start, end, label) { console.log(start.toISOString(), end.toISOString(), label); }); - - + + } - - + + function init_daterangepicker_reservation() { - + if( typeof ($.fn.daterangepicker) === 'undefined'){ return; } console.log('init_daterangepicker_reservation'); - + $('#reservation').daterangepicker(null, function(start, end, label) { console.log(start.toISOString(), end.toISOString(), label); }); @@ -1773,16 +1773,16 @@ if (typeof NProgress != 'undefined') { format: 'MM/DD/YYYY h:mm A' } }); - + } - + /* SMART WIZARD */ - + function init_SmartWizard() { - + if( typeof ($.fn.smartWizard) === 'undefined'){ return; } console.log('init_SmartWizard'); - + $('#wizard').smartWizard(); $('#wizard_verticle').smartWizard({ @@ -1792,17 +1792,17 @@ if (typeof NProgress != 'undefined') { $('.buttonNext').addClass('btn btn-success'); $('.buttonPrevious').addClass('btn btn-primary'); $('.buttonFinish').addClass('btn btn-default'); - + }; - - + + /* VALIDATOR */ function init_validator () { - + if( typeof (validator) === 'undefined'){ return; } - console.log('init_validator'); - + console.log('init_validator'); + // initialize the validator function validator.message.date = 'not a real date'; @@ -1830,16 +1830,16 @@ if (typeof NProgress != 'undefined') { return false; }); - + }; - + /* PNotify */ - + function init_PNotify() { - + if( typeof (PNotify) === 'undefined'){ return; } console.log('init_PNotify'); - + new PNotify({ title: "PNotify", type: "info", @@ -1862,18 +1862,18 @@ if (typeof NProgress != 'undefined') { } }); - }; - - + }; + + /* CUSTOM NOTIFICATION */ - + function init_CustomNotification() { - + console.log('run_customtabs'); - + if( typeof (CustomTabs) === 'undefined'){ return; } console.log('init_CustomTabs'); - + var cnt = 10; TabbedNotification = function(options) { @@ -1919,16 +1919,16 @@ if (typeof NProgress != 'undefined') { $('.notifications a').first().addClass('active'); $('#notif-group div').first().css('display', 'block'); }); - + }; - + /* EASYPIECHART */ - + function init_EasyPieChart() { - + if( typeof ($.fn.easyPieChart) === 'undefined'){ return; } console.log('init_EasyPieChart'); - + $('.chart').easyPieChart({ easing: 'easeOutElastic', delay: 3000, @@ -1978,27 +1978,27 @@ if (typeof NProgress != 'undefined') { hide: 400 } }); - + }; - - + + function init_charts() { - + console.log('run_charts typeof [' + typeof (Chart) + ']'); - + if( typeof (Chart) === 'undefined'){ return; } - + console.log('init_charts'); - - + + Chart.defaults.global.legend = { enabled: false }; - - + + if ($('#canvas_line').length ){ - + var canvas_line_00 = new Chart(document.getElementById("canvas_line"), { type: 'line', data: { @@ -2026,12 +2026,12 @@ if (typeof NProgress != 'undefined') { }] }, }); - + } - + if ($('#canvas_line1').length ){ - + var canvas_line_01 = new Chart(document.getElementById("canvas_line1"), { type: 'line', data: { @@ -2059,12 +2059,12 @@ if (typeof NProgress != 'undefined') { }] }, }); - + } - - - if ($('#canvas_line2').length ){ - + + + if ($('#canvas_line2').length ){ + var canvas_line_02 = new Chart(document.getElementById("canvas_line2"), { type: 'line', data: { @@ -2093,11 +2093,11 @@ if (typeof NProgress != 'undefined') { }, }); - } - - + } + + if ($('#canvas_line3').length ){ - + var canvas_line_03 = new Chart(document.getElementById("canvas_line3"), { type: 'line', data: { @@ -2126,11 +2126,11 @@ if (typeof NProgress != 'undefined') { }, }); - } - - + } + + if ($('#canvas_line4').length ){ - + var canvas_line_04 = new Chart(document.getElementById("canvas_line4"), { type: 'line', data: { @@ -2157,15 +2157,15 @@ if (typeof NProgress != 'undefined') { data: [82, 23, 66, 9, 99, 4, 2] }] }, - }); - + }); + } - - + + // Line chart - - if ($('#lineChart').length ){ - + + if ($('#lineChart').length ){ + var ctx = document.getElementById("lineChart"); var lineChart = new Chart(ctx, { type: 'line', @@ -2194,13 +2194,13 @@ if (typeof NProgress != 'undefined') { }] }, }); - + } - + // Bar chart - - if ($('#mybarChart').length ){ - + + if ($('#mybarChart').length ){ + var ctx = document.getElementById("mybarChart"); var mybarChart = new Chart(ctx, { type: 'bar', @@ -2227,14 +2227,14 @@ if (typeof NProgress != 'undefined') { } } }); - - } - + + } + // Doughnut chart - - if ($('#canvasDoughnut').length ){ - + + if ($('#canvasDoughnut').length ){ + var ctx = document.getElementById("canvasDoughnut"); var data = { labels: [ @@ -2269,13 +2269,13 @@ if (typeof NProgress != 'undefined') { tooltipFillColor: "rgba(51, 51, 51, 0.55)", data: data }); - - } + + } // Radar chart - - if ($('#canvasRadar').length ){ - + + if ($('#canvasRadar').length ){ + var ctx = document.getElementById("canvasRadar"); var data = { labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"], @@ -2304,13 +2304,13 @@ if (typeof NProgress != 'undefined') { type: 'radar', data: data, }); - + } - - + + // Pie chart if ($('#pieChart').length ){ - + var ctx = document.getElementById("pieChart"); var data = { datasets: [{ @@ -2340,10 +2340,10 @@ if (typeof NProgress != 'undefined') { legend: false } }); - + } - - + + // PolarArea chart if ($('#polarArea').length ){ @@ -2381,30 +2381,30 @@ if (typeof NProgress != 'undefined') { } } }); - + } } /* COMPOSE */ - + function init_compose() { - + if( typeof ($.fn.slideToggle) === 'undefined'){ return; } console.log('init_compose'); - + $('#compose, .compose-close').click(function(){ $('.compose').slideToggle(); }); - + }; - + /* CALENDAR */ - + function init_calendar() { - + if( typeof ($.fn.fullCalendar) === 'undefined'){ return; } console.log('init_calendar'); - + var date = new Date(), d = date.getDate(), m = date.getMonth(), @@ -2498,18 +2498,18 @@ if (typeof NProgress != 'undefined') { url: 'http://google.com/' }] }); - + }; - + /* DATA TABLES */ - + function init_DataTables() { - + console.log('run_datatables'); - + if( typeof ($.fn.DataTable) === 'undefined'){ return; } console.log('init_DataTables'); - + var handleDataTableButtons = function() { if ($("#datatable-buttons").length) { $("#datatable-buttons").DataTable({ @@ -2585,18 +2585,18 @@ if (typeof NProgress != 'undefined') { }); TableManageButtons.init(); - + }; - + /* CHART - MORRIS */ - + function init_morris_charts() { - + if( typeof (Morris) === 'undefined'){ return; } console.log('init_morris_charts'); - - if ($('#graph_bar').length){ - + + if ($('#graph_bar').length){ + Morris.Bar({ element: 'graph_bar', data: [ @@ -2621,10 +2621,10 @@ if (typeof NProgress != 'undefined') { resize: true }); - } - + } + if ($('#graph_bar_group').length ){ - + Morris.Bar({ element: 'graph_bar_group', data: [ @@ -2649,9 +2649,9 @@ if (typeof NProgress != 'undefined') { }); } - + if ($('#graphx').length ){ - + Morris.Bar({ element: 'graphx', data: [ @@ -2671,9 +2671,9 @@ if (typeof NProgress != 'undefined') { }); } - + if ($('#graph_area').length ){ - + Morris.Area({ element: 'graph_area', data: [ @@ -2698,9 +2698,9 @@ if (typeof NProgress != 'undefined') { }); } - + if ($('#graph_donut').length ){ - + Morris.Donut({ element: 'graph_donut', data: [ @@ -2717,9 +2717,9 @@ if (typeof NProgress != 'undefined') { }); } - + if ($('#graph_line').length ){ - + Morris.Line({ element: 'graph_line', xkey: 'year', @@ -2740,22 +2740,22 @@ if (typeof NProgress != 'undefined') { $MENU_TOGGLE.on('click', function() { $(window).resize(); }); - + } - + }; - - - + + + /* ECHRTS */ - - + + function init_echarts() { - + if( typeof (echarts) === 'undefined'){ return; } console.log('init_echarts'); - - + + var theme = { color: [ '#26B99A', '#34495E', '#BDC3C7', '#3498DB', @@ -2968,11 +2968,11 @@ if (typeof NProgress != 'undefined') { } }; - + //echart Bar - + if ($('#mainb').length ){ - + var echartBar = echarts.init(document.getElementById('mainb'), theme); echartBar.setOption({ @@ -3043,14 +3043,14 @@ if (typeof NProgress != 'undefined') { }); } - - - - + + + + //echart Radar - - if ($('#echart_sonar').length ){ - + + if ($('#echart_sonar').length ){ + var echartRadar = echarts.init(document.getElementById('echart_sonar'), theme); echartRadar.setOption({ @@ -3115,12 +3115,12 @@ if (typeof NProgress != 'undefined') { }] }); - } - + } + //echart Funnel - - if ($('#echart_pyramid').length ){ - + + if ($('#echart_pyramid').length ){ + var echartFunnel = echarts.init(document.getElementById('echart_pyramid'), theme); echartFunnel.setOption({ @@ -3175,12 +3175,12 @@ if (typeof NProgress != 'undefined') { }] }); - } - + } + //echart Gauge - - if ($('#echart_gauge').length ){ - + + if ($('#echart_gauge').length ){ + var echartGauge = echarts.init(document.getElementById('echart_gauge'), theme); echartGauge.setOption({ @@ -3295,12 +3295,12 @@ if (typeof NProgress != 'undefined') { }] }); - } - + } + //echart Line - - if ($('#echart_line').length ){ - + + if ($('#echart_line').length ){ + var echartLine = echarts.init(document.getElementById('echart_line'), theme); echartLine.setOption({ @@ -3387,12 +3387,12 @@ if (typeof NProgress != 'undefined') { }] }); - } - + } + //echart Scatter - - if ($('#echart_scatter').length ){ - + + if ($('#echart_scatter').length ){ + var echartScatter = echarts.init(document.getElementById('echart_scatter'), theme); echartScatter.setOption({ @@ -4007,12 +4007,12 @@ if (typeof NProgress != 'undefined') { }] }); - } - + } + //echart Bar Horizontal - - if ($('#echart_bar_horizontal').length ){ - + + if ($('#echart_bar_horizontal').length ){ + var echartBar = echarts.init(document.getElementById('echart_bar_horizontal'), theme); echartBar.setOption({ @@ -4056,14 +4056,14 @@ if (typeof NProgress != 'undefined') { }] }); - } - + } + //echart Pie Collapse - - if ($('#echart_pie2').length ){ - + + if ($('#echart_pie2').length ){ + var echartPieCollapse = echarts.init(document.getElementById('echart_pie2'), theme); - + echartPieCollapse.setOption({ tooltip: { trigger: 'item', @@ -4123,14 +4123,14 @@ if (typeof NProgress != 'undefined') { }] }); - } - + } + //echart Donut - - if ($('#echart_donut').length ){ - + + if ($('#echart_donut').length ){ + var echartDonut = echarts.init(document.getElementById('echart_donut'), theme); - + echartDonut.setOption({ tooltip: { trigger: 'item', @@ -4210,12 +4210,12 @@ if (typeof NProgress != 'undefined') { }] }); - } - + } + //echart Pie - - if ($('#echart_pie').length ){ - + + if ($('#echart_pie').length ){ + var echartPie = echarts.init(document.getElementById('echart_pie'), theme); echartPie.setOption({ @@ -4304,12 +4304,12 @@ if (typeof NProgress != 'undefined') { } }; - } - + } + //echart Mini Pie - - if ($('#echart_mini_pie').length ){ - + + if ($('#echart_mini_pie').length ){ + var echartMiniPie = echarts.init(document.getElementById('echart_mini_pie'), theme); echartMiniPie .setOption({ @@ -4409,15 +4409,15 @@ if (typeof NProgress != 'undefined') { }] }); - } - + } + //echart Map - - if ($('#echart_world_map').length ){ - + + if ($('#echart_world_map').length ){ + var echartMap = echarts.init(document.getElementById('echart_world_map'), theme); - - + + echartMap.setOption({ title: { text: 'World Population (2010)', @@ -5019,14 +5019,14 @@ if (typeof NProgress != 'undefined') { }] }] }); - + } - - } - - + + } + + $(document).ready(function() { - + init_sparklines(); init_flot_chart(); init_sidebar(); @@ -5061,7 +5061,7 @@ if (typeof NProgress != 'undefined') { init_CustomNotification(); init_autosize(); init_autocomplete(); - - }); + + }); diff --git a/frontend/web/css/main.css b/frontend/web/css/main.css index e0f31f0..1dc9d79 100644 --- a/frontend/web/css/main.css +++ b/frontend/web/css/main.css @@ -18,6 +18,25 @@ justify-content: center; align-items: center; text-decoration: none; + position: relative; + overflow: hidden; +} +.navbar ul.nav > li > a:after { + content: ''; + width: calc(100% - 24px); + position: absolute; + bottom: -5px; + background: #ffd800; + height: 3px; + left: 12px; + transition:0.1s; +} +.navbar ul.nav > li > a:hover::after{ + bottom: 15px; +} +.navbar ul.nav > li > a:hover { + border-color:#fff; + background:initial; } .navbar-brand{display: flex;justify-content: center;align-items: center;} .button1 { -- libgit2 0.21.4