phcthemes_admin_panel_pack 4.0.7 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +20 -20
- data/README.md +2 -0
- data/Rakefile +8 -8
- data/app/assets/config/phcthemes_admin_panel_pack_manifest.js +9 -9
- data/app/assets/javascripts/common/backstretch/jquery.backstretch.js +1602 -1602
- data/app/assets/javascripts/common/bootstrap/bootstrap.bundle.js +7023 -7023
- data/app/assets/javascripts/common/bootstrap/bootstrap.three.js +2377 -2377
- data/app/assets/javascripts/common/bootstrap-datepicker/bootstrap-datepicker.js +2039 -2039
- data/app/assets/javascripts/common/bootstrap-markdown/bootstrap-markdown.js +1390 -1390
- data/app/assets/javascripts/common/bootstrap-select/bootstrap-select.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-am_ET.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-am_ET.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-am_ET.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ar_AR.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ar_AR.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ar_AR.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-bg_BG.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-bg_BG.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-bg_BG.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-cs_CZ.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-cs_CZ.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-cs_CZ.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-da_DK.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-da_DK.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-da_DK.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-de_DE.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-de_DE.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-de_DE.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-en_US.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-en_US.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-en_US.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_CL.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_CL.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_CL.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_ES.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_ES.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-es_ES.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-et_EE.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-et_EE.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-et_EE.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-eu.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-eu.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-eu.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fa_IR.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fa_IR.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fa_IR.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fi_FI.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fi_FI.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fi_FI.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fr_FR.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fr_FR.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-fr_FR.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hr_HR.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hr_HR.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hr_HR.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hu_HU.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hu_HU.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-hu_HU.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-id_ID.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-id_ID.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-id_ID.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-it_IT.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-it_IT.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-it_IT.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ja_JP.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ja_JP.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ja_JP.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-kh_KM.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-kh_KM.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-kh_KM.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ko_KR.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ko_KR.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ko_KR.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lt_LT.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lt_LT.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lt_LT.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lv_LV.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lv_LV.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-lv_LV.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nb_NO.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nb_NO.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nb_NO.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nl_NL.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nl_NL.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-nl_NL.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pl_PL.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pl_PL.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pl_PL.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_BR.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_BR.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_BR.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_PT.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_PT.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-pt_PT.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ro_RO.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ro_RO.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ro_RO.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ru_RU.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ru_RU.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ru_RU.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sk_SK.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sk_SK.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sk_SK.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sl_SI.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sl_SI.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sl_SI.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sv_SE.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sv_SE.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-sv_SE.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-tr_TR.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-tr_TR.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-tr_TR.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ua_UA.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ua_UA.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-ua_UA.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-vi_VN.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-vi_VN.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-vi_VN.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_CN.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_CN.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_CN.min.js +7 -7
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_TW.js +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_TW.js.map +0 -0
- data/app/assets/javascripts/common/bootstrap-select/i18n/defaults-zh_TW.min.js +7 -7
- data/app/assets/javascripts/common/chartjs/chart.js +0 -0
- data/app/assets/javascripts/common/ckeditor/ckeditor.js +6 -6
- data/app/assets/javascripts/common/ckeditor/ckeditor.js.map +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/af.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/ar.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/ast.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/az.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/bg.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/ca.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/cs.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/da.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/de-ch.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/de.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/el.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/en-au.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/en-gb.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/eo.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/es.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/et.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/eu.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/fa.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/fi.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/fr.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/gl.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/gu.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/he.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/hr.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/hu.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/id.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/it.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/ja.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/km.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/kn.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/ko.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/ku.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/lt.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/lv.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/nb.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/ne.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/nl.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/no.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/oc.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/pl.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/pt-br.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/pt.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/ro.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/ru.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/si.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/sk.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/sl.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/sq.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/sr-latn.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/sr.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/sv.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/th.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/tr.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/tt.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/ug.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/uk.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/vi.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/zh-cn.js +0 -0
- data/app/assets/javascripts/common/ckeditor/translations/zh.js +0 -0
- data/app/assets/javascripts/common/clipboardjs/clipboard.js +977 -977
- data/app/assets/javascripts/common/covervid/covervid.js +94 -94
- data/app/assets/javascripts/common/custom/custom.js +0 -0
- data/app/assets/javascripts/common/datatables/datatables.js +15310 -15310
- data/app/assets/javascripts/common/daterangepicker/daterangepicker.js +1565 -1565
- data/app/assets/javascripts/common/fastclick/fastclick.js +841 -841
- data/app/assets/javascripts/common/flexslider/jquery.flexslider.js +1252 -1252
- data/app/assets/javascripts/common/greenstock/greensock.js +35 -35
- data/app/assets/javascripts/common/html5sortable/jquery.sortable.js +98 -98
- data/app/assets/javascripts/common/icheck/icheck.js +509 -509
- data/app/assets/javascripts/common/imagesloaded/imagesloaded.pkgd.js +497 -497
- data/app/assets/javascripts/common/isotope/isotope.pkgd.js +3563 -3563
- data/app/assets/javascripts/common/jquery/jquery-3.4.1.js +10598 -10598
- data/app/assets/javascripts/common/jquery-countdown/jquery.countdown.js +245 -245
- data/app/assets/javascripts/common/jquery-filterizer/jquery.filterizr.min.js +0 -0
- data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.autogrow.js +37 -37
- data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.charcounter.js +53 -53
- data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.checkbox.js +54 -54
- data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.datepicker.js +59 -59
- data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.js +823 -823
- data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.masked.js +46 -46
- data/app/assets/javascripts/common/jquery-jeditable/jquery.jeditable.time.js +71 -71
- data/app/assets/javascripts/common/jquery-jvectormap/jquery-jvectormap.js +44 -44
- data/app/assets/javascripts/common/jquery-placeholder/jquery.placeholder.js +281 -281
- data/app/assets/javascripts/common/jquery-slimscroll/jquery.slimscroll.js +474 -474
- data/app/assets/javascripts/common/jquery-sparkline/jquery.sparkline.js +3054 -3054
- data/app/assets/javascripts/common/jquery-ui/jquery-ui.js +18705 -18705
- data/app/assets/javascripts/common/jquery-validation/jquery.validate.js +0 -0
- data/app/assets/javascripts/common/jqvmap/jquery.vmap.js +1281 -1281
- data/app/assets/javascripts/common/jqvmap/jquery.vmap.min.js +9 -9
- data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.africa.js +2 -2
- data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.asia.js +2 -2
- data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.australia.js +2 -2
- data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.europe.js +2 -2
- data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.north-america.js +2 -2
- data/app/assets/javascripts/common/jqvmap/maps/continents/jquery.vmap.south-america.js +2 -2
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.algeria.js +2 -2
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.argentina.js +1 -1
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.brazil.js +2 -2
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.canada.js +1 -1
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.europe.js +2 -2
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.france.js +1 -1
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.germany.js +2 -2
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.greece.js +1 -1
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.iran.js +6 -6
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.iraq.js +1 -1
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.russia.js +2 -2
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.tunisia.js +2 -2
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.turkey.js +11 -11
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.usa.js +2 -2
- data/app/assets/javascripts/common/jqvmap/maps/jquery.vmap.world.js +2 -2
- data/app/assets/javascripts/common/js-cookie/js.cookie.js +165 -165
- data/app/assets/javascripts/common/layerslider/layerslider.kreaturamedia.jquery.js +12 -12
- data/app/assets/javascripts/common/layerslider/layerslider.origami.js +12 -12
- data/app/assets/javascripts/common/layerslider/layerslider.timeline.js +12 -12
- data/app/assets/javascripts/common/layerslider/layerslider.transitions.js +12 -12
- data/app/assets/javascripts/common/lazysizes/lazysizes.js +754 -754
- data/app/assets/javascripts/common/leaflet/leaflet.js +4 -4
- data/app/assets/javascripts/common/magnific-popup/jquery.magnific-popup.js +1859 -1859
- data/app/assets/javascripts/common/mapbox/mapbox.js +51 -51
- data/app/assets/javascripts/common/metismenu/metisMenu.js +340 -340
- data/app/assets/javascripts/common/moderizer/modernizr.js +11 -11
- data/app/assets/javascripts/common/nouislider/nouislider.js +2637 -2637
- data/app/assets/javascripts/common/owl-carousel/owl.carousel.js +3448 -3448
- data/app/assets/javascripts/common/pace/pace.js +935 -935
- data/app/assets/javascripts/common/paroller/jquery.paroller.js +228 -228
- data/app/assets/javascripts/common/particlejs/particles.js +1540 -1540
- data/app/assets/javascripts/common/perfect-scrollbar/perfect-scrollbar.common.js +1318 -1318
- data/app/assets/javascripts/common/perfect-scrollbar/perfect-scrollbar.esm.js +1316 -1316
- data/app/assets/javascripts/common/perfect-scrollbar/perfect-scrollbar.js +1324 -1324
- data/app/assets/javascripts/common/plyr/plyr.js +9137 -9137
- data/app/assets/javascripts/common/rangeslider/rangeslider.js +498 -498
- data/app/assets/javascripts/common/retina/retina.js +100 -100
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.actions.js +0 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.carousel.js +0 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.kenburn.js +0 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.layeranimation.js +0 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.migration.js +0 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.navigation.js +0 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.parallax.js +0 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.slideanims.js +0 -0
- data/app/assets/javascripts/common/rev-slider/extensions/revolution.extension.video.js +0 -0
- data/app/assets/javascripts/common/rev-slider/jquery.themepunch.revolution.js +0 -0
- data/app/assets/javascripts/common/rev-slider/jquery.themepunch.tools.min.js +0 -0
- data/app/assets/javascripts/common/scrollme/jquery.scrollme.js +455 -455
- data/app/assets/javascripts/common/scrollup/jquery.scrollUp.js +168 -168
- data/app/assets/javascripts/common/select2/select2.full.js +6597 -6597
- data/app/assets/javascripts/common/selectbox/jquery.selectBox.js +1091 -1091
- data/app/assets/javascripts/common/slick/slick.js +3004 -3004
- data/app/assets/javascripts/common/smooth-scroll/SmoothScroll.js +788 -788
- data/app/assets/javascripts/common/spectrum/spectrum.js +2323 -2323
- data/app/assets/javascripts/common/stepper/jquery.fs.stepper.js +339 -339
- data/app/assets/javascripts/common/swiper/swiper.js +8124 -8124
- data/app/assets/javascripts/common/toaster/toastr.js +476 -476
- data/app/assets/javascripts/common/typed/typed.js +1044 -1044
- data/app/assets/javascripts/common/visable/jquery.visible.js +68 -68
- data/app/assets/javascripts/common/waypoints/jquery.waypoints.js +661 -661
- data/app/assets/javascripts/common/wow/wow.js +508 -508
- data/app/assets/javascripts/phcthemes_admin_panel_pack_adminlte.js +12 -12
- data/app/assets/javascripts/phcthemes_admin_panel_pack_boomerang.js +0 -0
- data/app/assets/javascripts/phcthemes_admin_panel_pack_coloradmin.js +5 -5
- data/app/assets/javascripts/phcthemes_admin_panel_pack_inspinia.js +10 -10
- data/app/assets/javascripts/phcthemes_admin_panel_pack_metronic.js +6 -6
- data/app/assets/javascripts/phcthemes_admin_panel_pack_quilpro.js +5 -5
- data/app/assets/javascripts/phcthemes_admin_panel_pack_starlight.js +5 -5
- data/app/assets/javascripts/themes/adminlte/theme/adminlte.js +1141 -1141
- data/app/assets/javascripts/themes/coloradmin/theme/color_admin_app.min.js +0 -0
- data/app/assets/javascripts/themes/coloradmin/theme/color_admin_default.js +0 -0
- data/app/assets/javascripts/themes/inspinia/theme/inspinia.js +279 -279
- data/app/assets/javascripts/themes/metronic/theme/plugins.bundle.js +0 -0
- data/app/assets/javascripts/themes/metronic/theme/prismjs.bundle.js +1922 -1922
- data/app/assets/javascripts/themes/metronic/theme/scripts.bundle.js +0 -0
- data/app/assets/javascripts/themes/metronic/theme/widgets.js +0 -0
- data/app/assets/stylesheets/common/hanna_hearts/hanna_hearts.scss +0 -0
- data/app/assets/stylesheets/phcthemes_admin_panel_pack_adminlte.scss +16 -16
- data/app/assets/stylesheets/phcthemes_admin_panel_pack_boomerang.scss +27 -27
- data/app/assets/stylesheets/phcthemes_admin_panel_pack_coloradmin.scss +11 -11
- data/app/assets/stylesheets/phcthemes_admin_panel_pack_inspinia.scss +18 -18
- data/app/assets/stylesheets/phcthemes_admin_panel_pack_metronic.scss +15 -15
- data/app/assets/stylesheets/phcthemes_admin_panel_pack_quilpro.scss +19 -19
- data/app/assets/stylesheets/phcthemes_admin_panel_pack_starlight.scss +15 -15
- data/lib/phcthemes_admin_panel_pack/engine.rb +20 -20
- data/lib/phcthemes_admin_panel_pack/version.rb +3 -3
- data/lib/phcthemes_admin_panel_pack.rb +6 -6
- data/lib/tasks/phcthemes_admin_panel_pack_tasks.rake +4 -4
- metadata +3 -3
@@ -1,1141 +1,1141 @@
|
|
1
|
-
/*! AdminLTE app.js
|
2
|
-
* ================
|
3
|
-
* Main JS application file for AdminLTE v2. This file
|
4
|
-
* should be included in all pages. It controls some layout
|
5
|
-
* options and implements exclusive AdminLTE plugins.
|
6
|
-
*
|
7
|
-
* @author Colorlib
|
8
|
-
* @support <https://github.com/ColorlibHQ/AdminLTE/issues>
|
9
|
-
* @version 2.4.12
|
10
|
-
* @repository git://github.com/ColorlibHQ/AdminLTE.git
|
11
|
-
* @license MIT <http://opensource.org/licenses/MIT>
|
12
|
-
*/
|
13
|
-
|
14
|
-
// Make sure jQuery has been loaded
|
15
|
-
if (typeof jQuery === 'undefined') {
|
16
|
-
throw new Error('AdminLTE requires jQuery')
|
17
|
-
}
|
18
|
-
|
19
|
-
/* BoxRefresh()
|
20
|
-
* =========
|
21
|
-
* Adds AJAX content control to a box.
|
22
|
-
*
|
23
|
-
* @Usage: $('#my-box').boxRefresh(options)
|
24
|
-
* or add [data-widget="box-refresh"] to the box element
|
25
|
-
* Pass any option as data-option="value"
|
26
|
-
*/
|
27
|
-
+function ($) {
|
28
|
-
'use strict';
|
29
|
-
|
30
|
-
var DataKey = 'lte.boxrefresh';
|
31
|
-
|
32
|
-
var Default = {
|
33
|
-
source : '',
|
34
|
-
params : {},
|
35
|
-
trigger : '.refresh-btn',
|
36
|
-
content : '.box-body',
|
37
|
-
loadInContent : true,
|
38
|
-
responseType : '',
|
39
|
-
overlayTemplate: '<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>',
|
40
|
-
onLoadStart : function () {
|
41
|
-
},
|
42
|
-
onLoadDone : function (response) {
|
43
|
-
return response;
|
44
|
-
}
|
45
|
-
};
|
46
|
-
|
47
|
-
var Selector = {
|
48
|
-
data: '[data-widget="box-refresh"]'
|
49
|
-
};
|
50
|
-
|
51
|
-
// BoxRefresh Class Definition
|
52
|
-
// =========================
|
53
|
-
var BoxRefresh = function (element, options) {
|
54
|
-
this.element = element;
|
55
|
-
this.options = options;
|
56
|
-
this.$overlay = $(options.overlayTemplate);
|
57
|
-
|
58
|
-
if (options.source === '') {
|
59
|
-
throw new Error('Source url was not defined. Please specify a url in your BoxRefresh source option.');
|
60
|
-
}
|
61
|
-
|
62
|
-
this._setUpListeners();
|
63
|
-
this.load();
|
64
|
-
};
|
65
|
-
|
66
|
-
BoxRefresh.prototype.load = function () {
|
67
|
-
this._addOverlay();
|
68
|
-
this.options.onLoadStart.call($(this));
|
69
|
-
|
70
|
-
$.get(this.options.source, this.options.params, function (response) {
|
71
|
-
if (this.options.loadInContent) {
|
72
|
-
$(this.element).find(this.options.content).html(response);
|
73
|
-
}
|
74
|
-
this.options.onLoadDone.call($(this), response);
|
75
|
-
this._removeOverlay();
|
76
|
-
}.bind(this), this.options.responseType !== '' && this.options.responseType);
|
77
|
-
};
|
78
|
-
|
79
|
-
// Private
|
80
|
-
|
81
|
-
BoxRefresh.prototype._setUpListeners = function () {
|
82
|
-
$(this.element).on('click', this.options.trigger, function (event) {
|
83
|
-
if (event) event.preventDefault();
|
84
|
-
this.load();
|
85
|
-
}.bind(this));
|
86
|
-
};
|
87
|
-
|
88
|
-
BoxRefresh.prototype._addOverlay = function () {
|
89
|
-
$(this.element).append(this.$overlay);
|
90
|
-
};
|
91
|
-
|
92
|
-
BoxRefresh.prototype._removeOverlay = function () {
|
93
|
-
$(this.$overlay).remove();
|
94
|
-
};
|
95
|
-
|
96
|
-
// Plugin Definition
|
97
|
-
// =================
|
98
|
-
function Plugin(option) {
|
99
|
-
return this.each(function () {
|
100
|
-
var $this = $(this);
|
101
|
-
var data = $this.data(DataKey);
|
102
|
-
|
103
|
-
if (!data) {
|
104
|
-
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
|
105
|
-
$this.data(DataKey, (data = new BoxRefresh($this, options)));
|
106
|
-
}
|
107
|
-
|
108
|
-
if (typeof data == 'string') {
|
109
|
-
if (typeof data[option] == 'undefined') {
|
110
|
-
throw new Error('No method named ' + option);
|
111
|
-
}
|
112
|
-
data[option]();
|
113
|
-
}
|
114
|
-
});
|
115
|
-
}
|
116
|
-
|
117
|
-
var old = $.fn.boxRefresh;
|
118
|
-
|
119
|
-
$.fn.boxRefresh = Plugin;
|
120
|
-
$.fn.boxRefresh.Constructor = BoxRefresh;
|
121
|
-
|
122
|
-
// No Conflict Mode
|
123
|
-
// ================
|
124
|
-
$.fn.boxRefresh.noConflict = function () {
|
125
|
-
$.fn.boxRefresh = old;
|
126
|
-
return this;
|
127
|
-
};
|
128
|
-
|
129
|
-
// BoxRefresh Data API
|
130
|
-
// =================
|
131
|
-
$(window).on('load', function () {
|
132
|
-
$(Selector.data).each(function () {
|
133
|
-
Plugin.call($(this));
|
134
|
-
});
|
135
|
-
});
|
136
|
-
|
137
|
-
}(jQuery);
|
138
|
-
|
139
|
-
|
140
|
-
/* BoxWidget()
|
141
|
-
* ======
|
142
|
-
* Adds box widget functions to boxes.
|
143
|
-
*
|
144
|
-
* @Usage: $('.my-box').boxWidget(options)
|
145
|
-
* This plugin auto activates on any element using the `.box` class
|
146
|
-
* Pass any option as data-option="value"
|
147
|
-
*/
|
148
|
-
+function ($) {
|
149
|
-
'use strict';
|
150
|
-
|
151
|
-
var DataKey = 'lte.boxwidget';
|
152
|
-
|
153
|
-
var Default = {
|
154
|
-
animationSpeed : 500,
|
155
|
-
collapseTrigger: '[data-widget="collapse"]',
|
156
|
-
removeTrigger : '[data-widget="remove"]',
|
157
|
-
collapseIcon : 'fa-minus',
|
158
|
-
expandIcon : 'fa-plus',
|
159
|
-
removeIcon : 'fa-times'
|
160
|
-
};
|
161
|
-
|
162
|
-
var Selector = {
|
163
|
-
data : '.box',
|
164
|
-
collapsed: '.collapsed-box',
|
165
|
-
header : '.box-header',
|
166
|
-
body : '.box-body',
|
167
|
-
footer : '.box-footer',
|
168
|
-
tools : '.box-tools'
|
169
|
-
};
|
170
|
-
|
171
|
-
var ClassName = {
|
172
|
-
collapsed: 'collapsed-box'
|
173
|
-
};
|
174
|
-
|
175
|
-
var Event = {
|
176
|
-
collapsing: 'collapsing.boxwidget',
|
177
|
-
collapsed: 'collapsed.boxwidget',
|
178
|
-
expanding: 'expanding.boxwidget',
|
179
|
-
expanded: 'expanded.boxwidget',
|
180
|
-
removing: 'removing.boxwidget',
|
181
|
-
removed: 'removed.boxwidget'
|
182
|
-
};
|
183
|
-
|
184
|
-
// BoxWidget Class Definition
|
185
|
-
// =====================
|
186
|
-
var BoxWidget = function (element, options) {
|
187
|
-
this.element = element;
|
188
|
-
this.options = options;
|
189
|
-
|
190
|
-
this._setUpListeners();
|
191
|
-
};
|
192
|
-
|
193
|
-
BoxWidget.prototype.toggle = function () {
|
194
|
-
var isOpen = !$(this.element).is(Selector.collapsed);
|
195
|
-
|
196
|
-
if (isOpen) {
|
197
|
-
this.collapse();
|
198
|
-
} else {
|
199
|
-
this.expand();
|
200
|
-
}
|
201
|
-
};
|
202
|
-
|
203
|
-
BoxWidget.prototype.expand = function () {
|
204
|
-
var expandedEvent = $.Event(Event.expanded);
|
205
|
-
var expandingEvent = $.Event(Event.expanding);
|
206
|
-
var collapseIcon = this.options.collapseIcon;
|
207
|
-
var expandIcon = this.options.expandIcon;
|
208
|
-
|
209
|
-
$(this.element).removeClass(ClassName.collapsed);
|
210
|
-
|
211
|
-
$(this.element)
|
212
|
-
.children(Selector.header + ', ' + Selector.body + ', ' + Selector.footer)
|
213
|
-
.children(Selector.tools)
|
214
|
-
.find('.' + expandIcon)
|
215
|
-
.removeClass(expandIcon)
|
216
|
-
.addClass(collapseIcon);
|
217
|
-
|
218
|
-
$(this.element).children(Selector.body + ', ' + Selector.footer)
|
219
|
-
.slideDown(this.options.animationSpeed, function () {
|
220
|
-
$(this.element).trigger(expandedEvent);
|
221
|
-
}.bind(this))
|
222
|
-
.trigger(expandingEvent);
|
223
|
-
};
|
224
|
-
|
225
|
-
BoxWidget.prototype.collapse = function () {
|
226
|
-
var collapsedEvent = $.Event(Event.collapsed);
|
227
|
-
var collapsingEvent = $.Event(Event.collapsing);
|
228
|
-
var collapseIcon = this.options.collapseIcon;
|
229
|
-
var expandIcon = this.options.expandIcon;
|
230
|
-
|
231
|
-
$(this.element)
|
232
|
-
.children(Selector.header + ', ' + Selector.body + ', ' + Selector.footer)
|
233
|
-
.children(Selector.tools)
|
234
|
-
.find('.' + collapseIcon)
|
235
|
-
.removeClass(collapseIcon)
|
236
|
-
.addClass(expandIcon);
|
237
|
-
|
238
|
-
$(this.element).children(Selector.body + ', ' + Selector.footer)
|
239
|
-
.slideUp(this.options.animationSpeed, function () {
|
240
|
-
$(this.element).addClass(ClassName.collapsed);
|
241
|
-
$(this.element).trigger(collapsedEvent);
|
242
|
-
}.bind(this))
|
243
|
-
.trigger(collapsingEvent);
|
244
|
-
};
|
245
|
-
|
246
|
-
BoxWidget.prototype.remove = function () {
|
247
|
-
var removedEvent = $.Event(Event.removed);
|
248
|
-
var removingEvent = $.Event(Event.removing);
|
249
|
-
|
250
|
-
$(this.element).slideUp(this.options.animationSpeed, function () {
|
251
|
-
$(this.element).trigger(removedEvent);
|
252
|
-
$(this.element).remove();
|
253
|
-
}.bind(this))
|
254
|
-
.trigger(removingEvent);
|
255
|
-
};
|
256
|
-
|
257
|
-
// Private
|
258
|
-
|
259
|
-
BoxWidget.prototype._setUpListeners = function () {
|
260
|
-
var that = this;
|
261
|
-
|
262
|
-
$(this.element).on('click', this.options.collapseTrigger, function (event) {
|
263
|
-
if (event) event.preventDefault();
|
264
|
-
that.toggle($(this));
|
265
|
-
return false;
|
266
|
-
});
|
267
|
-
|
268
|
-
$(this.element).on('click', this.options.removeTrigger, function (event) {
|
269
|
-
if (event) event.preventDefault();
|
270
|
-
that.remove($(this));
|
271
|
-
return false;
|
272
|
-
});
|
273
|
-
};
|
274
|
-
|
275
|
-
// Plugin Definition
|
276
|
-
// =================
|
277
|
-
function Plugin(option) {
|
278
|
-
return this.each(function () {
|
279
|
-
var $this = $(this);
|
280
|
-
var data = $this.data(DataKey);
|
281
|
-
|
282
|
-
if (!data) {
|
283
|
-
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
|
284
|
-
$this.data(DataKey, (data = new BoxWidget($this, options)));
|
285
|
-
}
|
286
|
-
|
287
|
-
if (typeof option == 'string') {
|
288
|
-
if (typeof data[option] == 'undefined') {
|
289
|
-
throw new Error('No method named ' + option);
|
290
|
-
}
|
291
|
-
data[option]();
|
292
|
-
}
|
293
|
-
});
|
294
|
-
}
|
295
|
-
|
296
|
-
var old = $.fn.boxWidget;
|
297
|
-
|
298
|
-
$.fn.boxWidget = Plugin;
|
299
|
-
$.fn.boxWidget.Constructor = BoxWidget;
|
300
|
-
|
301
|
-
// No Conflict Mode
|
302
|
-
// ================
|
303
|
-
$.fn.boxWidget.noConflict = function () {
|
304
|
-
$.fn.boxWidget = old;
|
305
|
-
return this;
|
306
|
-
};
|
307
|
-
|
308
|
-
// BoxWidget Data API
|
309
|
-
// ==================
|
310
|
-
$(window).on('load', function () {
|
311
|
-
$(Selector.data).each(function () {
|
312
|
-
Plugin.call($(this));
|
313
|
-
});
|
314
|
-
});
|
315
|
-
}(jQuery);
|
316
|
-
|
317
|
-
|
318
|
-
/* ControlSidebar()
|
319
|
-
* ===============
|
320
|
-
* Toggles the state of the control sidebar
|
321
|
-
*
|
322
|
-
* @Usage: $('#control-sidebar-trigger').controlSidebar(options)
|
323
|
-
* or add [data-toggle="control-sidebar"] to the trigger
|
324
|
-
* Pass any option as data-option="value"
|
325
|
-
*/
|
326
|
-
+function ($) {
|
327
|
-
'use strict';
|
328
|
-
|
329
|
-
var DataKey = 'lte.controlsidebar';
|
330
|
-
|
331
|
-
var Default = {
|
332
|
-
slide: true
|
333
|
-
};
|
334
|
-
|
335
|
-
var Selector = {
|
336
|
-
sidebar: '.control-sidebar',
|
337
|
-
data : '[data-toggle="control-sidebar"]',
|
338
|
-
open : '.control-sidebar-open',
|
339
|
-
bg : '.control-sidebar-bg',
|
340
|
-
wrapper: '.wrapper',
|
341
|
-
content: '.content-wrapper',
|
342
|
-
boxed : '.layout-boxed'
|
343
|
-
};
|
344
|
-
|
345
|
-
var ClassName = {
|
346
|
-
open : 'control-sidebar-open',
|
347
|
-
fixed: 'fixed'
|
348
|
-
};
|
349
|
-
|
350
|
-
var Event = {
|
351
|
-
collapsed: 'collapsed.controlsidebar',
|
352
|
-
expanded : 'expanded.controlsidebar'
|
353
|
-
};
|
354
|
-
|
355
|
-
// ControlSidebar Class Definition
|
356
|
-
// ===============================
|
357
|
-
var ControlSidebar = function (element, options) {
|
358
|
-
this.element = element;
|
359
|
-
this.options = options;
|
360
|
-
this.hasBindedResize = false;
|
361
|
-
|
362
|
-
this.init();
|
363
|
-
};
|
364
|
-
|
365
|
-
ControlSidebar.prototype.init = function () {
|
366
|
-
// Add click listener if the element hasn't been
|
367
|
-
// initialized using the data API
|
368
|
-
if (!$(this.element).is(Selector.data)) {
|
369
|
-
$(this).on('click', this.toggle);
|
370
|
-
}
|
371
|
-
|
372
|
-
this.fix();
|
373
|
-
$(window).resize(function () {
|
374
|
-
this.fix();
|
375
|
-
}.bind(this));
|
376
|
-
};
|
377
|
-
|
378
|
-
ControlSidebar.prototype.toggle = function (event) {
|
379
|
-
if (event) event.preventDefault();
|
380
|
-
|
381
|
-
this.fix();
|
382
|
-
|
383
|
-
if (!$(Selector.sidebar).is(Selector.open) && !$('body').is(Selector.open)) {
|
384
|
-
this.expand();
|
385
|
-
} else {
|
386
|
-
this.collapse();
|
387
|
-
}
|
388
|
-
};
|
389
|
-
|
390
|
-
ControlSidebar.prototype.expand = function () {
|
391
|
-
$(Selector.sidebar).show();
|
392
|
-
if (!this.options.slide) {
|
393
|
-
$('body').addClass(ClassName.open);
|
394
|
-
} else {
|
395
|
-
$(Selector.sidebar).addClass(ClassName.open);
|
396
|
-
}
|
397
|
-
|
398
|
-
|
399
|
-
$(this.element).trigger($.Event(Event.expanded));
|
400
|
-
};
|
401
|
-
|
402
|
-
ControlSidebar.prototype.collapse = function () {
|
403
|
-
$('body, ' + Selector.sidebar).removeClass(ClassName.open);
|
404
|
-
$(Selector.sidebar).fadeOut();
|
405
|
-
$(this.element).trigger($.Event(Event.collapsed));
|
406
|
-
};
|
407
|
-
|
408
|
-
ControlSidebar.prototype.fix = function () {
|
409
|
-
if ($('body').is(Selector.boxed)) {
|
410
|
-
this._fixForBoxed($(Selector.bg));
|
411
|
-
}
|
412
|
-
};
|
413
|
-
|
414
|
-
// Private
|
415
|
-
|
416
|
-
ControlSidebar.prototype._fixForBoxed = function (bg) {
|
417
|
-
bg.css({
|
418
|
-
position: 'absolute',
|
419
|
-
height : $(Selector.wrapper).height()
|
420
|
-
});
|
421
|
-
};
|
422
|
-
|
423
|
-
// Plugin Definition
|
424
|
-
// =================
|
425
|
-
function Plugin(option) {
|
426
|
-
return this.each(function () {
|
427
|
-
var $this = $(this);
|
428
|
-
var data = $this.data(DataKey);
|
429
|
-
|
430
|
-
if (!data) {
|
431
|
-
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
|
432
|
-
$this.data(DataKey, (data = new ControlSidebar($this, options)));
|
433
|
-
}
|
434
|
-
|
435
|
-
if (typeof option == 'string') data.toggle();
|
436
|
-
});
|
437
|
-
}
|
438
|
-
|
439
|
-
var old = $.fn.controlSidebar;
|
440
|
-
|
441
|
-
$.fn.controlSidebar = Plugin;
|
442
|
-
$.fn.controlSidebar.Constructor = ControlSidebar;
|
443
|
-
|
444
|
-
// No Conflict Mode
|
445
|
-
// ================
|
446
|
-
$.fn.controlSidebar.noConflict = function () {
|
447
|
-
$.fn.controlSidebar = old;
|
448
|
-
return this;
|
449
|
-
};
|
450
|
-
|
451
|
-
// ControlSidebar Data API
|
452
|
-
// =======================
|
453
|
-
$(document).on('click', Selector.data, function (event) {
|
454
|
-
if (event) event.preventDefault();
|
455
|
-
Plugin.call($(this), 'toggle');
|
456
|
-
});
|
457
|
-
|
458
|
-
}(jQuery);
|
459
|
-
|
460
|
-
|
461
|
-
/* DirectChat()
|
462
|
-
* ===============
|
463
|
-
* Toggles the state of the control sidebar
|
464
|
-
*
|
465
|
-
* @Usage: $('#my-chat-box').directChat()
|
466
|
-
* or add [data-widget="direct-chat"] to the trigger
|
467
|
-
*/
|
468
|
-
+function ($) {
|
469
|
-
'use strict';
|
470
|
-
|
471
|
-
var DataKey = 'lte.directchat';
|
472
|
-
|
473
|
-
var Selector = {
|
474
|
-
data: '[data-widget="chat-pane-toggle"]',
|
475
|
-
box : '.direct-chat'
|
476
|
-
};
|
477
|
-
|
478
|
-
var ClassName = {
|
479
|
-
open: 'direct-chat-contacts-open'
|
480
|
-
};
|
481
|
-
|
482
|
-
// DirectChat Class Definition
|
483
|
-
// ===========================
|
484
|
-
var DirectChat = function (element) {
|
485
|
-
this.element = element;
|
486
|
-
};
|
487
|
-
|
488
|
-
DirectChat.prototype.toggle = function ($trigger) {
|
489
|
-
$trigger.parents(Selector.box).first().toggleClass(ClassName.open);
|
490
|
-
};
|
491
|
-
|
492
|
-
// Plugin Definition
|
493
|
-
// =================
|
494
|
-
function Plugin(option) {
|
495
|
-
return this.each(function () {
|
496
|
-
var $this = $(this);
|
497
|
-
var data = $this.data(DataKey);
|
498
|
-
|
499
|
-
if (!data) {
|
500
|
-
$this.data(DataKey, (data = new DirectChat($this)));
|
501
|
-
}
|
502
|
-
|
503
|
-
if (typeof option == 'string') data.toggle($this);
|
504
|
-
});
|
505
|
-
}
|
506
|
-
|
507
|
-
var old = $.fn.directChat;
|
508
|
-
|
509
|
-
$.fn.directChat = Plugin;
|
510
|
-
$.fn.directChat.Constructor = DirectChat;
|
511
|
-
|
512
|
-
// No Conflict Mode
|
513
|
-
// ================
|
514
|
-
$.fn.directChat.noConflict = function () {
|
515
|
-
$.fn.directChat = old;
|
516
|
-
return this;
|
517
|
-
};
|
518
|
-
|
519
|
-
// DirectChat Data API
|
520
|
-
// ===================
|
521
|
-
$(document).on('click', Selector.data, function (event) {
|
522
|
-
if (event) event.preventDefault();
|
523
|
-
Plugin.call($(this), 'toggle');
|
524
|
-
});
|
525
|
-
|
526
|
-
}(jQuery);
|
527
|
-
|
528
|
-
|
529
|
-
/* PushMenu()
|
530
|
-
* ==========
|
531
|
-
* Adds the push menu functionality to the sidebar.
|
532
|
-
*
|
533
|
-
* @usage: $('.btn').pushMenu(options)
|
534
|
-
* or add [data-toggle="push-menu"] to any button
|
535
|
-
* Pass any option as data-option="value"
|
536
|
-
*/
|
537
|
-
+function ($) {
|
538
|
-
'use strict';
|
539
|
-
|
540
|
-
var DataKey = 'lte.pushmenu';
|
541
|
-
|
542
|
-
var Default = {
|
543
|
-
collapseScreenSize : 767,
|
544
|
-
expandOnHover : false,
|
545
|
-
expandTransitionDelay: 200
|
546
|
-
};
|
547
|
-
|
548
|
-
var Selector = {
|
549
|
-
collapsed : '.sidebar-collapse',
|
550
|
-
open : '.sidebar-open',
|
551
|
-
mainSidebar : '.main-sidebar',
|
552
|
-
contentWrapper: '.content-wrapper',
|
553
|
-
searchInput : '.sidebar-form .form-control',
|
554
|
-
button : '[data-toggle="push-menu"]',
|
555
|
-
mini : '.sidebar-mini',
|
556
|
-
expanded : '.sidebar-expanded-on-hover',
|
557
|
-
layoutFixed : '.fixed'
|
558
|
-
};
|
559
|
-
|
560
|
-
var ClassName = {
|
561
|
-
collapsed : 'sidebar-collapse',
|
562
|
-
open : 'sidebar-open',
|
563
|
-
mini : 'sidebar-mini',
|
564
|
-
expanded : 'sidebar-expanded-on-hover',
|
565
|
-
expandFeature: 'sidebar-mini-expand-feature',
|
566
|
-
layoutFixed : 'fixed'
|
567
|
-
};
|
568
|
-
|
569
|
-
var Event = {
|
570
|
-
expanded : 'expanded.pushMenu',
|
571
|
-
collapsed: 'collapsed.pushMenu'
|
572
|
-
};
|
573
|
-
|
574
|
-
// PushMenu Class Definition
|
575
|
-
// =========================
|
576
|
-
var PushMenu = function (options) {
|
577
|
-
this.options = options;
|
578
|
-
this.init();
|
579
|
-
};
|
580
|
-
|
581
|
-
PushMenu.prototype.init = function () {
|
582
|
-
if (this.options.expandOnHover
|
583
|
-
|| ($('body').is(Selector.mini + Selector.layoutFixed))) {
|
584
|
-
this.expandOnHover();
|
585
|
-
$('body').addClass(ClassName.expandFeature);
|
586
|
-
}
|
587
|
-
|
588
|
-
$(Selector.contentWrapper).click(function () {
|
589
|
-
// Enable hide menu when clicking on the content-wrapper on small screens
|
590
|
-
if ($(window).width() <= this.options.collapseScreenSize && $('body').hasClass(ClassName.open)) {
|
591
|
-
this.close();
|
592
|
-
}
|
593
|
-
}.bind(this));
|
594
|
-
|
595
|
-
// __Fix for android devices
|
596
|
-
$(Selector.searchInput).click(function (e) {
|
597
|
-
e.stopPropagation();
|
598
|
-
});
|
599
|
-
};
|
600
|
-
|
601
|
-
PushMenu.prototype.toggle = function () {
|
602
|
-
var windowWidth = $(window).width();
|
603
|
-
var isOpen = !$('body').hasClass(ClassName.collapsed);
|
604
|
-
|
605
|
-
if (windowWidth <= this.options.collapseScreenSize) {
|
606
|
-
isOpen = $('body').hasClass(ClassName.open);
|
607
|
-
}
|
608
|
-
|
609
|
-
if (!isOpen) {
|
610
|
-
this.open();
|
611
|
-
} else {
|
612
|
-
this.close();
|
613
|
-
}
|
614
|
-
};
|
615
|
-
|
616
|
-
PushMenu.prototype.open = function () {
|
617
|
-
var windowWidth = $(window).width();
|
618
|
-
|
619
|
-
if (windowWidth > this.options.collapseScreenSize) {
|
620
|
-
$('body').removeClass(ClassName.collapsed)
|
621
|
-
.trigger($.Event(Event.expanded));
|
622
|
-
}
|
623
|
-
else {
|
624
|
-
$('body').addClass(ClassName.open)
|
625
|
-
.trigger($.Event(Event.expanded));
|
626
|
-
}
|
627
|
-
};
|
628
|
-
|
629
|
-
PushMenu.prototype.close = function () {
|
630
|
-
var windowWidth = $(window).width();
|
631
|
-
if (windowWidth > this.options.collapseScreenSize) {
|
632
|
-
$('body').addClass(ClassName.collapsed)
|
633
|
-
.trigger($.Event(Event.collapsed));
|
634
|
-
} else {
|
635
|
-
$('body').removeClass(ClassName.open + ' ' + ClassName.collapsed)
|
636
|
-
.trigger($.Event(Event.collapsed));
|
637
|
-
}
|
638
|
-
};
|
639
|
-
|
640
|
-
PushMenu.prototype.expandOnHover = function () {
|
641
|
-
$(Selector.mainSidebar).hover(function () {
|
642
|
-
if ($('body').is(Selector.mini + Selector.collapsed)
|
643
|
-
&& $(window).width() > this.options.collapseScreenSize) {
|
644
|
-
this.expand();
|
645
|
-
}
|
646
|
-
}.bind(this), function () {
|
647
|
-
if ($('body').is(Selector.expanded)) {
|
648
|
-
this.collapse();
|
649
|
-
}
|
650
|
-
}.bind(this));
|
651
|
-
};
|
652
|
-
|
653
|
-
PushMenu.prototype.expand = function () {
|
654
|
-
setTimeout(function () {
|
655
|
-
$('body').removeClass(ClassName.collapsed)
|
656
|
-
.addClass(ClassName.expanded);
|
657
|
-
}, this.options.expandTransitionDelay);
|
658
|
-
};
|
659
|
-
|
660
|
-
PushMenu.prototype.collapse = function () {
|
661
|
-
setTimeout(function () {
|
662
|
-
$('body').removeClass(ClassName.expanded)
|
663
|
-
.addClass(ClassName.collapsed);
|
664
|
-
}, this.options.expandTransitionDelay);
|
665
|
-
};
|
666
|
-
|
667
|
-
// PushMenu Plugin Definition
|
668
|
-
// ==========================
|
669
|
-
function Plugin(option) {
|
670
|
-
return this.each(function () {
|
671
|
-
var $this = $(this);
|
672
|
-
var data = $this.data(DataKey);
|
673
|
-
|
674
|
-
if (!data) {
|
675
|
-
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
|
676
|
-
$this.data(DataKey, (data = new PushMenu(options)));
|
677
|
-
}
|
678
|
-
|
679
|
-
if (option === 'toggle') data.toggle();
|
680
|
-
});
|
681
|
-
}
|
682
|
-
|
683
|
-
var old = $.fn.pushMenu;
|
684
|
-
|
685
|
-
$.fn.pushMenu = Plugin;
|
686
|
-
$.fn.pushMenu.Constructor = PushMenu;
|
687
|
-
|
688
|
-
// No Conflict Mode
|
689
|
-
// ================
|
690
|
-
$.fn.pushMenu.noConflict = function () {
|
691
|
-
$.fn.pushMenu = old;
|
692
|
-
return this;
|
693
|
-
};
|
694
|
-
|
695
|
-
// Data API
|
696
|
-
// ========
|
697
|
-
$(document).on('click', Selector.button, function (e) {
|
698
|
-
e.preventDefault();
|
699
|
-
Plugin.call($(this), 'toggle');
|
700
|
-
});
|
701
|
-
$(window).on('load', function () {
|
702
|
-
Plugin.call($(Selector.button));
|
703
|
-
});
|
704
|
-
}(jQuery);
|
705
|
-
|
706
|
-
|
707
|
-
/* TodoList()
|
708
|
-
* =========
|
709
|
-
* Converts a list into a todoList.
|
710
|
-
*
|
711
|
-
* @Usage: $('.my-list').todoList(options)
|
712
|
-
* or add [data-widget="todo-list"] to the ul element
|
713
|
-
* Pass any option as data-option="value"
|
714
|
-
*/
|
715
|
-
+function ($) {
|
716
|
-
'use strict';
|
717
|
-
|
718
|
-
var DataKey = 'lte.todolist';
|
719
|
-
|
720
|
-
var Default = {
|
721
|
-
onCheck : function (item) {
|
722
|
-
return item;
|
723
|
-
},
|
724
|
-
onUnCheck: function (item) {
|
725
|
-
return item;
|
726
|
-
}
|
727
|
-
};
|
728
|
-
|
729
|
-
var Selector = {
|
730
|
-
data: '[data-widget="todo-list"]'
|
731
|
-
};
|
732
|
-
|
733
|
-
var ClassName = {
|
734
|
-
done: 'done'
|
735
|
-
};
|
736
|
-
|
737
|
-
// TodoList Class Definition
|
738
|
-
// =========================
|
739
|
-
var TodoList = function (element, options) {
|
740
|
-
this.element = element;
|
741
|
-
this.options = options;
|
742
|
-
|
743
|
-
this._setUpListeners();
|
744
|
-
};
|
745
|
-
|
746
|
-
TodoList.prototype.toggle = function (item) {
|
747
|
-
item.parents(Selector.li).first().toggleClass(ClassName.done);
|
748
|
-
if (!item.prop('checked')) {
|
749
|
-
this.unCheck(item);
|
750
|
-
return;
|
751
|
-
}
|
752
|
-
|
753
|
-
this.check(item);
|
754
|
-
};
|
755
|
-
|
756
|
-
TodoList.prototype.check = function (item) {
|
757
|
-
this.options.onCheck.call(item);
|
758
|
-
};
|
759
|
-
|
760
|
-
TodoList.prototype.unCheck = function (item) {
|
761
|
-
this.options.onUnCheck.call(item);
|
762
|
-
};
|
763
|
-
|
764
|
-
// Private
|
765
|
-
|
766
|
-
TodoList.prototype._setUpListeners = function () {
|
767
|
-
var that = this;
|
768
|
-
$(this.element).on('change ifChanged', 'input:checkbox', function () {
|
769
|
-
that.toggle($(this));
|
770
|
-
});
|
771
|
-
};
|
772
|
-
|
773
|
-
// Plugin Definition
|
774
|
-
// =================
|
775
|
-
function Plugin(option) {
|
776
|
-
return this.each(function () {
|
777
|
-
var $this = $(this);
|
778
|
-
var data = $this.data(DataKey);
|
779
|
-
|
780
|
-
if (!data) {
|
781
|
-
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
|
782
|
-
$this.data(DataKey, (data = new TodoList($this, options)));
|
783
|
-
}
|
784
|
-
|
785
|
-
if (typeof data == 'string') {
|
786
|
-
if (typeof data[option] == 'undefined') {
|
787
|
-
throw new Error('No method named ' + option);
|
788
|
-
}
|
789
|
-
data[option]();
|
790
|
-
}
|
791
|
-
});
|
792
|
-
}
|
793
|
-
|
794
|
-
var old = $.fn.todoList;
|
795
|
-
|
796
|
-
$.fn.todoList = Plugin;
|
797
|
-
$.fn.todoList.Constructor = TodoList;
|
798
|
-
|
799
|
-
// No Conflict Mode
|
800
|
-
// ================
|
801
|
-
$.fn.todoList.noConflict = function () {
|
802
|
-
$.fn.todoList = old;
|
803
|
-
return this;
|
804
|
-
};
|
805
|
-
|
806
|
-
// TodoList Data API
|
807
|
-
// =================
|
808
|
-
$(window).on('load', function () {
|
809
|
-
$(Selector.data).each(function () {
|
810
|
-
Plugin.call($(this));
|
811
|
-
});
|
812
|
-
});
|
813
|
-
|
814
|
-
}(jQuery);
|
815
|
-
|
816
|
-
|
817
|
-
/* Tree()
|
818
|
-
* ======
|
819
|
-
* Converts a nested list into a multilevel
|
820
|
-
* tree view menu.
|
821
|
-
*
|
822
|
-
* @Usage: $('.my-menu').tree(options)
|
823
|
-
* or add [data-widget="tree"] to the ul element
|
824
|
-
* Pass any option as data-option="value"
|
825
|
-
*/
|
826
|
-
+function ($) {
|
827
|
-
'use strict';
|
828
|
-
|
829
|
-
var DataKey = 'lte.tree';
|
830
|
-
|
831
|
-
var Default = {
|
832
|
-
animationSpeed: 500,
|
833
|
-
accordion : true,
|
834
|
-
followLink : false,
|
835
|
-
trigger : '.treeview a'
|
836
|
-
};
|
837
|
-
|
838
|
-
var Selector = {
|
839
|
-
tree : '.tree',
|
840
|
-
treeview : '.treeview',
|
841
|
-
treeviewMenu: '.treeview-menu',
|
842
|
-
open : '.menu-open, .active',
|
843
|
-
li : 'li',
|
844
|
-
data : '[data-widget="tree"]',
|
845
|
-
active : '.active'
|
846
|
-
};
|
847
|
-
|
848
|
-
var ClassName = {
|
849
|
-
open: 'menu-open',
|
850
|
-
tree: 'tree'
|
851
|
-
};
|
852
|
-
|
853
|
-
var Event = {
|
854
|
-
collapsed: 'collapsed.tree',
|
855
|
-
expanded : 'expanded.tree'
|
856
|
-
};
|
857
|
-
|
858
|
-
// Tree Class Definition
|
859
|
-
// =====================
|
860
|
-
var Tree = function (element, options) {
|
861
|
-
this.element = element;
|
862
|
-
this.options = options;
|
863
|
-
|
864
|
-
$(this.element).addClass(ClassName.tree);
|
865
|
-
|
866
|
-
$(Selector.treeview + Selector.active, this.element).addClass(ClassName.open);
|
867
|
-
|
868
|
-
this._setUpListeners();
|
869
|
-
};
|
870
|
-
|
871
|
-
Tree.prototype.toggle = function (link, event) {
|
872
|
-
var treeviewMenu = link.next(Selector.treeviewMenu);
|
873
|
-
var parentLi = link.parent();
|
874
|
-
var isOpen = parentLi.hasClass(ClassName.open);
|
875
|
-
|
876
|
-
if (!parentLi.is(Selector.treeview)) {
|
877
|
-
return;
|
878
|
-
}
|
879
|
-
|
880
|
-
if (!this.options.followLink || link.attr('href') === '#') {
|
881
|
-
event.preventDefault();
|
882
|
-
}
|
883
|
-
|
884
|
-
if (isOpen) {
|
885
|
-
this.collapse(treeviewMenu, parentLi);
|
886
|
-
} else {
|
887
|
-
this.expand(treeviewMenu, parentLi);
|
888
|
-
}
|
889
|
-
};
|
890
|
-
|
891
|
-
Tree.prototype.expand = function (tree, parent) {
|
892
|
-
var expandedEvent = $.Event(Event.expanded);
|
893
|
-
|
894
|
-
if (this.options.accordion) {
|
895
|
-
var openMenuLi = parent.siblings(Selector.open);
|
896
|
-
var openTree = openMenuLi.children(Selector.treeviewMenu);
|
897
|
-
this.collapse(openTree, openMenuLi);
|
898
|
-
}
|
899
|
-
|
900
|
-
parent.addClass(ClassName.open);
|
901
|
-
tree.slideDown(this.options.animationSpeed, function () {
|
902
|
-
$(this.element).trigger(expandedEvent);
|
903
|
-
}.bind(this));
|
904
|
-
};
|
905
|
-
|
906
|
-
Tree.prototype.collapse = function (tree, parentLi) {
|
907
|
-
var collapsedEvent = $.Event(Event.collapsed);
|
908
|
-
|
909
|
-
//tree.find(Selector.open).removeClass(ClassName.open);
|
910
|
-
parentLi.removeClass(ClassName.open);
|
911
|
-
tree.slideUp(this.options.animationSpeed, function () {
|
912
|
-
//tree.find(Selector.open + ' > ' + Selector.treeview).slideUp();
|
913
|
-
$(this.element).trigger(collapsedEvent);
|
914
|
-
}.bind(this));
|
915
|
-
};
|
916
|
-
|
917
|
-
// Private
|
918
|
-
|
919
|
-
Tree.prototype._setUpListeners = function () {
|
920
|
-
var that = this;
|
921
|
-
|
922
|
-
$(this.element).on('click', this.options.trigger, function (event) {
|
923
|
-
that.toggle($(this), event);
|
924
|
-
});
|
925
|
-
};
|
926
|
-
|
927
|
-
// Plugin Definition
|
928
|
-
// =================
|
929
|
-
function Plugin(option) {
|
930
|
-
return this.each(function () {
|
931
|
-
var $this = $(this);
|
932
|
-
var data = $this.data(DataKey);
|
933
|
-
|
934
|
-
if (!data) {
|
935
|
-
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
|
936
|
-
$this.data(DataKey, new Tree($this, options));
|
937
|
-
}
|
938
|
-
});
|
939
|
-
}
|
940
|
-
|
941
|
-
var old = $.fn.tree;
|
942
|
-
|
943
|
-
$.fn.tree = Plugin;
|
944
|
-
$.fn.tree.Constructor = Tree;
|
945
|
-
|
946
|
-
// No Conflict Mode
|
947
|
-
// ================
|
948
|
-
$.fn.tree.noConflict = function () {
|
949
|
-
$.fn.tree = old;
|
950
|
-
return this;
|
951
|
-
};
|
952
|
-
|
953
|
-
// Tree Data API
|
954
|
-
// =============
|
955
|
-
$(window).on('load', function () {
|
956
|
-
$(Selector.data).each(function () {
|
957
|
-
Plugin.call($(this));
|
958
|
-
});
|
959
|
-
});
|
960
|
-
|
961
|
-
}(jQuery);
|
962
|
-
|
963
|
-
|
964
|
-
/* Layout()
|
965
|
-
* ========
|
966
|
-
* Implements AdminLTE layout.
|
967
|
-
* Fixes the layout height in case min-height fails.
|
968
|
-
*
|
969
|
-
* @usage activated automatically upon window load.
|
970
|
-
* Configure any options by passing data-option="value"
|
971
|
-
* to the body tag.
|
972
|
-
*/
|
973
|
-
+function ($) {
|
974
|
-
'use strict';
|
975
|
-
|
976
|
-
var DataKey = 'lte.layout';
|
977
|
-
|
978
|
-
var Default = {
|
979
|
-
slimscroll : true,
|
980
|
-
resetHeight: true
|
981
|
-
};
|
982
|
-
|
983
|
-
var Selector = {
|
984
|
-
wrapper : '.wrapper',
|
985
|
-
contentWrapper: '.content-wrapper',
|
986
|
-
layoutBoxed : '.layout-boxed',
|
987
|
-
mainFooter : '.main-footer',
|
988
|
-
mainHeader : '.main-header',
|
989
|
-
sidebar : '.sidebar',
|
990
|
-
controlSidebar: '.control-sidebar',
|
991
|
-
fixed : '.fixed',
|
992
|
-
sidebarMenu : '.sidebar-menu',
|
993
|
-
logo : '.main-header .logo'
|
994
|
-
};
|
995
|
-
|
996
|
-
var ClassName = {
|
997
|
-
fixed : 'fixed',
|
998
|
-
holdTransition: 'hold-transition'
|
999
|
-
};
|
1000
|
-
|
1001
|
-
var Layout = function (options) {
|
1002
|
-
this.options = options;
|
1003
|
-
this.bindedResize = false;
|
1004
|
-
this.activate();
|
1005
|
-
};
|
1006
|
-
|
1007
|
-
Layout.prototype.activate = function () {
|
1008
|
-
this.fix();
|
1009
|
-
this.fixSidebar();
|
1010
|
-
|
1011
|
-
$('body').removeClass(ClassName.holdTransition);
|
1012
|
-
|
1013
|
-
if (this.options.resetHeight) {
|
1014
|
-
$('body, html, ' + Selector.wrapper).css({
|
1015
|
-
'height' : 'auto',
|
1016
|
-
'min-height': '100%'
|
1017
|
-
});
|
1018
|
-
}
|
1019
|
-
|
1020
|
-
if (!this.bindedResize) {
|
1021
|
-
$(window).resize(function () {
|
1022
|
-
this.fix();
|
1023
|
-
this.fixSidebar();
|
1024
|
-
|
1025
|
-
$(Selector.logo + ', ' + Selector.sidebar).one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function () {
|
1026
|
-
this.fix();
|
1027
|
-
this.fixSidebar();
|
1028
|
-
}.bind(this));
|
1029
|
-
}.bind(this));
|
1030
|
-
|
1031
|
-
this.bindedResize = true;
|
1032
|
-
}
|
1033
|
-
|
1034
|
-
$(Selector.sidebarMenu).on('expanded.tree', function () {
|
1035
|
-
this.fix();
|
1036
|
-
this.fixSidebar();
|
1037
|
-
}.bind(this));
|
1038
|
-
|
1039
|
-
$(Selector.sidebarMenu).on('collapsed.tree', function () {
|
1040
|
-
this.fix();
|
1041
|
-
this.fixSidebar();
|
1042
|
-
}.bind(this));
|
1043
|
-
};
|
1044
|
-
|
1045
|
-
Layout.prototype.fix = function () {
|
1046
|
-
// Remove overflow from .wrapper if layout-boxed exists
|
1047
|
-
$(Selector.layoutBoxed + ' > ' + Selector.wrapper).css('overflow', 'hidden');
|
1048
|
-
|
1049
|
-
// Get window height and the wrapper height
|
1050
|
-
var footerHeight = $(Selector.mainFooter).outerHeight() || 0;
|
1051
|
-
var headerHeight = $(Selector.mainHeader).outerHeight() || 0;
|
1052
|
-
var neg = headerHeight + footerHeight;
|
1053
|
-
var windowHeight = $(window).height();
|
1054
|
-
var sidebarHeight = $(Selector.sidebar).height() || 0;
|
1055
|
-
|
1056
|
-
// Set the min-height of the content and sidebar based on
|
1057
|
-
// the height of the document.
|
1058
|
-
if ($('body').hasClass(ClassName.fixed)) {
|
1059
|
-
$(Selector.contentWrapper).css('min-height', windowHeight - footerHeight);
|
1060
|
-
} else {
|
1061
|
-
var postSetHeight;
|
1062
|
-
|
1063
|
-
if (windowHeight >= sidebarHeight + headerHeight) {
|
1064
|
-
$(Selector.contentWrapper).css('min-height', windowHeight - neg);
|
1065
|
-
postSetHeight = windowHeight - neg;
|
1066
|
-
} else {
|
1067
|
-
$(Selector.contentWrapper).css('min-height', sidebarHeight);
|
1068
|
-
postSetHeight = sidebarHeight;
|
1069
|
-
}
|
1070
|
-
|
1071
|
-
// Fix for the control sidebar height
|
1072
|
-
var $controlSidebar = $(Selector.controlSidebar);
|
1073
|
-
if (typeof $controlSidebar !== 'undefined') {
|
1074
|
-
if ($controlSidebar.height() > postSetHeight)
|
1075
|
-
$(Selector.contentWrapper).css('min-height', $controlSidebar.height());
|
1076
|
-
}
|
1077
|
-
}
|
1078
|
-
};
|
1079
|
-
|
1080
|
-
Layout.prototype.fixSidebar = function () {
|
1081
|
-
// Make sure the body tag has the .fixed class
|
1082
|
-
if (!$('body').hasClass(ClassName.fixed)) {
|
1083
|
-
if (typeof $.fn.slimScroll !== 'undefined') {
|
1084
|
-
$(Selector.sidebar).slimScroll({ destroy: true }).height('auto');
|
1085
|
-
}
|
1086
|
-
return;
|
1087
|
-
}
|
1088
|
-
|
1089
|
-
// Enable slimscroll for fixed layout
|
1090
|
-
if (this.options.slimscroll) {
|
1091
|
-
if (typeof $.fn.slimScroll !== 'undefined') {
|
1092
|
-
// Destroy if it exists
|
1093
|
-
// $(Selector.sidebar).slimScroll({ destroy: true }).height('auto')
|
1094
|
-
|
1095
|
-
// Add slimscroll
|
1096
|
-
$(Selector.sidebar).slimScroll({
|
1097
|
-
height: ($(window).height() - $(Selector.mainHeader).height()) + 'px'
|
1098
|
-
});
|
1099
|
-
}
|
1100
|
-
}
|
1101
|
-
};
|
1102
|
-
|
1103
|
-
// Plugin Definition
|
1104
|
-
// =================
|
1105
|
-
function Plugin(option) {
|
1106
|
-
return this.each(function () {
|
1107
|
-
var $this = $(this);
|
1108
|
-
var data = $this.data(DataKey);
|
1109
|
-
|
1110
|
-
if (!data) {
|
1111
|
-
var options = $.extend({}, Default, $this.data(), typeof option === 'object' && option);
|
1112
|
-
$this.data(DataKey, (data = new Layout(options)));
|
1113
|
-
}
|
1114
|
-
|
1115
|
-
if (typeof option === 'string') {
|
1116
|
-
if (typeof data[option] === 'undefined') {
|
1117
|
-
throw new Error('No method named ' + option);
|
1118
|
-
}
|
1119
|
-
data[option]();
|
1120
|
-
}
|
1121
|
-
});
|
1122
|
-
}
|
1123
|
-
|
1124
|
-
var old = $.fn.layout;
|
1125
|
-
|
1126
|
-
$.fn.layout = Plugin;
|
1127
|
-
$.fn.layout.Constuctor = Layout;
|
1128
|
-
|
1129
|
-
// No conflict mode
|
1130
|
-
// ================
|
1131
|
-
$.fn.layout.noConflict = function () {
|
1132
|
-
$.fn.layout = old;
|
1133
|
-
return this;
|
1134
|
-
};
|
1135
|
-
|
1136
|
-
// Layout DATA-API
|
1137
|
-
// ===============
|
1138
|
-
$(window).on('load', function () {
|
1139
|
-
Plugin.call($('body'));
|
1140
|
-
});
|
1141
|
-
}(jQuery);
|
1
|
+
/*! AdminLTE app.js
|
2
|
+
* ================
|
3
|
+
* Main JS application file for AdminLTE v2. This file
|
4
|
+
* should be included in all pages. It controls some layout
|
5
|
+
* options and implements exclusive AdminLTE plugins.
|
6
|
+
*
|
7
|
+
* @author Colorlib
|
8
|
+
* @support <https://github.com/ColorlibHQ/AdminLTE/issues>
|
9
|
+
* @version 2.4.12
|
10
|
+
* @repository git://github.com/ColorlibHQ/AdminLTE.git
|
11
|
+
* @license MIT <http://opensource.org/licenses/MIT>
|
12
|
+
*/
|
13
|
+
|
14
|
+
// Make sure jQuery has been loaded
|
15
|
+
if (typeof jQuery === 'undefined') {
|
16
|
+
throw new Error('AdminLTE requires jQuery')
|
17
|
+
}
|
18
|
+
|
19
|
+
/* BoxRefresh()
|
20
|
+
* =========
|
21
|
+
* Adds AJAX content control to a box.
|
22
|
+
*
|
23
|
+
* @Usage: $('#my-box').boxRefresh(options)
|
24
|
+
* or add [data-widget="box-refresh"] to the box element
|
25
|
+
* Pass any option as data-option="value"
|
26
|
+
*/
|
27
|
+
+function ($) {
|
28
|
+
'use strict';
|
29
|
+
|
30
|
+
var DataKey = 'lte.boxrefresh';
|
31
|
+
|
32
|
+
var Default = {
|
33
|
+
source : '',
|
34
|
+
params : {},
|
35
|
+
trigger : '.refresh-btn',
|
36
|
+
content : '.box-body',
|
37
|
+
loadInContent : true,
|
38
|
+
responseType : '',
|
39
|
+
overlayTemplate: '<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>',
|
40
|
+
onLoadStart : function () {
|
41
|
+
},
|
42
|
+
onLoadDone : function (response) {
|
43
|
+
return response;
|
44
|
+
}
|
45
|
+
};
|
46
|
+
|
47
|
+
var Selector = {
|
48
|
+
data: '[data-widget="box-refresh"]'
|
49
|
+
};
|
50
|
+
|
51
|
+
// BoxRefresh Class Definition
|
52
|
+
// =========================
|
53
|
+
var BoxRefresh = function (element, options) {
|
54
|
+
this.element = element;
|
55
|
+
this.options = options;
|
56
|
+
this.$overlay = $(options.overlayTemplate);
|
57
|
+
|
58
|
+
if (options.source === '') {
|
59
|
+
throw new Error('Source url was not defined. Please specify a url in your BoxRefresh source option.');
|
60
|
+
}
|
61
|
+
|
62
|
+
this._setUpListeners();
|
63
|
+
this.load();
|
64
|
+
};
|
65
|
+
|
66
|
+
BoxRefresh.prototype.load = function () {
|
67
|
+
this._addOverlay();
|
68
|
+
this.options.onLoadStart.call($(this));
|
69
|
+
|
70
|
+
$.get(this.options.source, this.options.params, function (response) {
|
71
|
+
if (this.options.loadInContent) {
|
72
|
+
$(this.element).find(this.options.content).html(response);
|
73
|
+
}
|
74
|
+
this.options.onLoadDone.call($(this), response);
|
75
|
+
this._removeOverlay();
|
76
|
+
}.bind(this), this.options.responseType !== '' && this.options.responseType);
|
77
|
+
};
|
78
|
+
|
79
|
+
// Private
|
80
|
+
|
81
|
+
BoxRefresh.prototype._setUpListeners = function () {
|
82
|
+
$(this.element).on('click', this.options.trigger, function (event) {
|
83
|
+
if (event) event.preventDefault();
|
84
|
+
this.load();
|
85
|
+
}.bind(this));
|
86
|
+
};
|
87
|
+
|
88
|
+
BoxRefresh.prototype._addOverlay = function () {
|
89
|
+
$(this.element).append(this.$overlay);
|
90
|
+
};
|
91
|
+
|
92
|
+
BoxRefresh.prototype._removeOverlay = function () {
|
93
|
+
$(this.$overlay).remove();
|
94
|
+
};
|
95
|
+
|
96
|
+
// Plugin Definition
|
97
|
+
// =================
|
98
|
+
function Plugin(option) {
|
99
|
+
return this.each(function () {
|
100
|
+
var $this = $(this);
|
101
|
+
var data = $this.data(DataKey);
|
102
|
+
|
103
|
+
if (!data) {
|
104
|
+
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
|
105
|
+
$this.data(DataKey, (data = new BoxRefresh($this, options)));
|
106
|
+
}
|
107
|
+
|
108
|
+
if (typeof data == 'string') {
|
109
|
+
if (typeof data[option] == 'undefined') {
|
110
|
+
throw new Error('No method named ' + option);
|
111
|
+
}
|
112
|
+
data[option]();
|
113
|
+
}
|
114
|
+
});
|
115
|
+
}
|
116
|
+
|
117
|
+
var old = $.fn.boxRefresh;
|
118
|
+
|
119
|
+
$.fn.boxRefresh = Plugin;
|
120
|
+
$.fn.boxRefresh.Constructor = BoxRefresh;
|
121
|
+
|
122
|
+
// No Conflict Mode
|
123
|
+
// ================
|
124
|
+
$.fn.boxRefresh.noConflict = function () {
|
125
|
+
$.fn.boxRefresh = old;
|
126
|
+
return this;
|
127
|
+
};
|
128
|
+
|
129
|
+
// BoxRefresh Data API
|
130
|
+
// =================
|
131
|
+
$(window).on('load', function () {
|
132
|
+
$(Selector.data).each(function () {
|
133
|
+
Plugin.call($(this));
|
134
|
+
});
|
135
|
+
});
|
136
|
+
|
137
|
+
}(jQuery);
|
138
|
+
|
139
|
+
|
140
|
+
/* BoxWidget()
|
141
|
+
* ======
|
142
|
+
* Adds box widget functions to boxes.
|
143
|
+
*
|
144
|
+
* @Usage: $('.my-box').boxWidget(options)
|
145
|
+
* This plugin auto activates on any element using the `.box` class
|
146
|
+
* Pass any option as data-option="value"
|
147
|
+
*/
|
148
|
+
+function ($) {
|
149
|
+
'use strict';
|
150
|
+
|
151
|
+
var DataKey = 'lte.boxwidget';
|
152
|
+
|
153
|
+
var Default = {
|
154
|
+
animationSpeed : 500,
|
155
|
+
collapseTrigger: '[data-widget="collapse"]',
|
156
|
+
removeTrigger : '[data-widget="remove"]',
|
157
|
+
collapseIcon : 'fa-minus',
|
158
|
+
expandIcon : 'fa-plus',
|
159
|
+
removeIcon : 'fa-times'
|
160
|
+
};
|
161
|
+
|
162
|
+
var Selector = {
|
163
|
+
data : '.box',
|
164
|
+
collapsed: '.collapsed-box',
|
165
|
+
header : '.box-header',
|
166
|
+
body : '.box-body',
|
167
|
+
footer : '.box-footer',
|
168
|
+
tools : '.box-tools'
|
169
|
+
};
|
170
|
+
|
171
|
+
var ClassName = {
|
172
|
+
collapsed: 'collapsed-box'
|
173
|
+
};
|
174
|
+
|
175
|
+
var Event = {
|
176
|
+
collapsing: 'collapsing.boxwidget',
|
177
|
+
collapsed: 'collapsed.boxwidget',
|
178
|
+
expanding: 'expanding.boxwidget',
|
179
|
+
expanded: 'expanded.boxwidget',
|
180
|
+
removing: 'removing.boxwidget',
|
181
|
+
removed: 'removed.boxwidget'
|
182
|
+
};
|
183
|
+
|
184
|
+
// BoxWidget Class Definition
|
185
|
+
// =====================
|
186
|
+
var BoxWidget = function (element, options) {
|
187
|
+
this.element = element;
|
188
|
+
this.options = options;
|
189
|
+
|
190
|
+
this._setUpListeners();
|
191
|
+
};
|
192
|
+
|
193
|
+
BoxWidget.prototype.toggle = function () {
|
194
|
+
var isOpen = !$(this.element).is(Selector.collapsed);
|
195
|
+
|
196
|
+
if (isOpen) {
|
197
|
+
this.collapse();
|
198
|
+
} else {
|
199
|
+
this.expand();
|
200
|
+
}
|
201
|
+
};
|
202
|
+
|
203
|
+
BoxWidget.prototype.expand = function () {
|
204
|
+
var expandedEvent = $.Event(Event.expanded);
|
205
|
+
var expandingEvent = $.Event(Event.expanding);
|
206
|
+
var collapseIcon = this.options.collapseIcon;
|
207
|
+
var expandIcon = this.options.expandIcon;
|
208
|
+
|
209
|
+
$(this.element).removeClass(ClassName.collapsed);
|
210
|
+
|
211
|
+
$(this.element)
|
212
|
+
.children(Selector.header + ', ' + Selector.body + ', ' + Selector.footer)
|
213
|
+
.children(Selector.tools)
|
214
|
+
.find('.' + expandIcon)
|
215
|
+
.removeClass(expandIcon)
|
216
|
+
.addClass(collapseIcon);
|
217
|
+
|
218
|
+
$(this.element).children(Selector.body + ', ' + Selector.footer)
|
219
|
+
.slideDown(this.options.animationSpeed, function () {
|
220
|
+
$(this.element).trigger(expandedEvent);
|
221
|
+
}.bind(this))
|
222
|
+
.trigger(expandingEvent);
|
223
|
+
};
|
224
|
+
|
225
|
+
BoxWidget.prototype.collapse = function () {
|
226
|
+
var collapsedEvent = $.Event(Event.collapsed);
|
227
|
+
var collapsingEvent = $.Event(Event.collapsing);
|
228
|
+
var collapseIcon = this.options.collapseIcon;
|
229
|
+
var expandIcon = this.options.expandIcon;
|
230
|
+
|
231
|
+
$(this.element)
|
232
|
+
.children(Selector.header + ', ' + Selector.body + ', ' + Selector.footer)
|
233
|
+
.children(Selector.tools)
|
234
|
+
.find('.' + collapseIcon)
|
235
|
+
.removeClass(collapseIcon)
|
236
|
+
.addClass(expandIcon);
|
237
|
+
|
238
|
+
$(this.element).children(Selector.body + ', ' + Selector.footer)
|
239
|
+
.slideUp(this.options.animationSpeed, function () {
|
240
|
+
$(this.element).addClass(ClassName.collapsed);
|
241
|
+
$(this.element).trigger(collapsedEvent);
|
242
|
+
}.bind(this))
|
243
|
+
.trigger(collapsingEvent);
|
244
|
+
};
|
245
|
+
|
246
|
+
BoxWidget.prototype.remove = function () {
|
247
|
+
var removedEvent = $.Event(Event.removed);
|
248
|
+
var removingEvent = $.Event(Event.removing);
|
249
|
+
|
250
|
+
$(this.element).slideUp(this.options.animationSpeed, function () {
|
251
|
+
$(this.element).trigger(removedEvent);
|
252
|
+
$(this.element).remove();
|
253
|
+
}.bind(this))
|
254
|
+
.trigger(removingEvent);
|
255
|
+
};
|
256
|
+
|
257
|
+
// Private
|
258
|
+
|
259
|
+
BoxWidget.prototype._setUpListeners = function () {
|
260
|
+
var that = this;
|
261
|
+
|
262
|
+
$(this.element).on('click', this.options.collapseTrigger, function (event) {
|
263
|
+
if (event) event.preventDefault();
|
264
|
+
that.toggle($(this));
|
265
|
+
return false;
|
266
|
+
});
|
267
|
+
|
268
|
+
$(this.element).on('click', this.options.removeTrigger, function (event) {
|
269
|
+
if (event) event.preventDefault();
|
270
|
+
that.remove($(this));
|
271
|
+
return false;
|
272
|
+
});
|
273
|
+
};
|
274
|
+
|
275
|
+
// Plugin Definition
|
276
|
+
// =================
|
277
|
+
function Plugin(option) {
|
278
|
+
return this.each(function () {
|
279
|
+
var $this = $(this);
|
280
|
+
var data = $this.data(DataKey);
|
281
|
+
|
282
|
+
if (!data) {
|
283
|
+
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
|
284
|
+
$this.data(DataKey, (data = new BoxWidget($this, options)));
|
285
|
+
}
|
286
|
+
|
287
|
+
if (typeof option == 'string') {
|
288
|
+
if (typeof data[option] == 'undefined') {
|
289
|
+
throw new Error('No method named ' + option);
|
290
|
+
}
|
291
|
+
data[option]();
|
292
|
+
}
|
293
|
+
});
|
294
|
+
}
|
295
|
+
|
296
|
+
var old = $.fn.boxWidget;
|
297
|
+
|
298
|
+
$.fn.boxWidget = Plugin;
|
299
|
+
$.fn.boxWidget.Constructor = BoxWidget;
|
300
|
+
|
301
|
+
// No Conflict Mode
|
302
|
+
// ================
|
303
|
+
$.fn.boxWidget.noConflict = function () {
|
304
|
+
$.fn.boxWidget = old;
|
305
|
+
return this;
|
306
|
+
};
|
307
|
+
|
308
|
+
// BoxWidget Data API
|
309
|
+
// ==================
|
310
|
+
$(window).on('load', function () {
|
311
|
+
$(Selector.data).each(function () {
|
312
|
+
Plugin.call($(this));
|
313
|
+
});
|
314
|
+
});
|
315
|
+
}(jQuery);
|
316
|
+
|
317
|
+
|
318
|
+
/* ControlSidebar()
|
319
|
+
* ===============
|
320
|
+
* Toggles the state of the control sidebar
|
321
|
+
*
|
322
|
+
* @Usage: $('#control-sidebar-trigger').controlSidebar(options)
|
323
|
+
* or add [data-toggle="control-sidebar"] to the trigger
|
324
|
+
* Pass any option as data-option="value"
|
325
|
+
*/
|
326
|
+
+function ($) {
|
327
|
+
'use strict';
|
328
|
+
|
329
|
+
var DataKey = 'lte.controlsidebar';
|
330
|
+
|
331
|
+
var Default = {
|
332
|
+
slide: true
|
333
|
+
};
|
334
|
+
|
335
|
+
var Selector = {
|
336
|
+
sidebar: '.control-sidebar',
|
337
|
+
data : '[data-toggle="control-sidebar"]',
|
338
|
+
open : '.control-sidebar-open',
|
339
|
+
bg : '.control-sidebar-bg',
|
340
|
+
wrapper: '.wrapper',
|
341
|
+
content: '.content-wrapper',
|
342
|
+
boxed : '.layout-boxed'
|
343
|
+
};
|
344
|
+
|
345
|
+
var ClassName = {
|
346
|
+
open : 'control-sidebar-open',
|
347
|
+
fixed: 'fixed'
|
348
|
+
};
|
349
|
+
|
350
|
+
var Event = {
|
351
|
+
collapsed: 'collapsed.controlsidebar',
|
352
|
+
expanded : 'expanded.controlsidebar'
|
353
|
+
};
|
354
|
+
|
355
|
+
// ControlSidebar Class Definition
|
356
|
+
// ===============================
|
357
|
+
var ControlSidebar = function (element, options) {
|
358
|
+
this.element = element;
|
359
|
+
this.options = options;
|
360
|
+
this.hasBindedResize = false;
|
361
|
+
|
362
|
+
this.init();
|
363
|
+
};
|
364
|
+
|
365
|
+
ControlSidebar.prototype.init = function () {
|
366
|
+
// Add click listener if the element hasn't been
|
367
|
+
// initialized using the data API
|
368
|
+
if (!$(this.element).is(Selector.data)) {
|
369
|
+
$(this).on('click', this.toggle);
|
370
|
+
}
|
371
|
+
|
372
|
+
this.fix();
|
373
|
+
$(window).resize(function () {
|
374
|
+
this.fix();
|
375
|
+
}.bind(this));
|
376
|
+
};
|
377
|
+
|
378
|
+
ControlSidebar.prototype.toggle = function (event) {
|
379
|
+
if (event) event.preventDefault();
|
380
|
+
|
381
|
+
this.fix();
|
382
|
+
|
383
|
+
if (!$(Selector.sidebar).is(Selector.open) && !$('body').is(Selector.open)) {
|
384
|
+
this.expand();
|
385
|
+
} else {
|
386
|
+
this.collapse();
|
387
|
+
}
|
388
|
+
};
|
389
|
+
|
390
|
+
ControlSidebar.prototype.expand = function () {
|
391
|
+
$(Selector.sidebar).show();
|
392
|
+
if (!this.options.slide) {
|
393
|
+
$('body').addClass(ClassName.open);
|
394
|
+
} else {
|
395
|
+
$(Selector.sidebar).addClass(ClassName.open);
|
396
|
+
}
|
397
|
+
|
398
|
+
|
399
|
+
$(this.element).trigger($.Event(Event.expanded));
|
400
|
+
};
|
401
|
+
|
402
|
+
ControlSidebar.prototype.collapse = function () {
|
403
|
+
$('body, ' + Selector.sidebar).removeClass(ClassName.open);
|
404
|
+
$(Selector.sidebar).fadeOut();
|
405
|
+
$(this.element).trigger($.Event(Event.collapsed));
|
406
|
+
};
|
407
|
+
|
408
|
+
ControlSidebar.prototype.fix = function () {
|
409
|
+
if ($('body').is(Selector.boxed)) {
|
410
|
+
this._fixForBoxed($(Selector.bg));
|
411
|
+
}
|
412
|
+
};
|
413
|
+
|
414
|
+
// Private
|
415
|
+
|
416
|
+
ControlSidebar.prototype._fixForBoxed = function (bg) {
|
417
|
+
bg.css({
|
418
|
+
position: 'absolute',
|
419
|
+
height : $(Selector.wrapper).height()
|
420
|
+
});
|
421
|
+
};
|
422
|
+
|
423
|
+
// Plugin Definition
|
424
|
+
// =================
|
425
|
+
function Plugin(option) {
|
426
|
+
return this.each(function () {
|
427
|
+
var $this = $(this);
|
428
|
+
var data = $this.data(DataKey);
|
429
|
+
|
430
|
+
if (!data) {
|
431
|
+
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
|
432
|
+
$this.data(DataKey, (data = new ControlSidebar($this, options)));
|
433
|
+
}
|
434
|
+
|
435
|
+
if (typeof option == 'string') data.toggle();
|
436
|
+
});
|
437
|
+
}
|
438
|
+
|
439
|
+
var old = $.fn.controlSidebar;
|
440
|
+
|
441
|
+
$.fn.controlSidebar = Plugin;
|
442
|
+
$.fn.controlSidebar.Constructor = ControlSidebar;
|
443
|
+
|
444
|
+
// No Conflict Mode
|
445
|
+
// ================
|
446
|
+
$.fn.controlSidebar.noConflict = function () {
|
447
|
+
$.fn.controlSidebar = old;
|
448
|
+
return this;
|
449
|
+
};
|
450
|
+
|
451
|
+
// ControlSidebar Data API
|
452
|
+
// =======================
|
453
|
+
$(document).on('click', Selector.data, function (event) {
|
454
|
+
if (event) event.preventDefault();
|
455
|
+
Plugin.call($(this), 'toggle');
|
456
|
+
});
|
457
|
+
|
458
|
+
}(jQuery);
|
459
|
+
|
460
|
+
|
461
|
+
/* DirectChat()
|
462
|
+
* ===============
|
463
|
+
* Toggles the state of the control sidebar
|
464
|
+
*
|
465
|
+
* @Usage: $('#my-chat-box').directChat()
|
466
|
+
* or add [data-widget="direct-chat"] to the trigger
|
467
|
+
*/
|
468
|
+
+function ($) {
|
469
|
+
'use strict';
|
470
|
+
|
471
|
+
var DataKey = 'lte.directchat';
|
472
|
+
|
473
|
+
var Selector = {
|
474
|
+
data: '[data-widget="chat-pane-toggle"]',
|
475
|
+
box : '.direct-chat'
|
476
|
+
};
|
477
|
+
|
478
|
+
var ClassName = {
|
479
|
+
open: 'direct-chat-contacts-open'
|
480
|
+
};
|
481
|
+
|
482
|
+
// DirectChat Class Definition
|
483
|
+
// ===========================
|
484
|
+
var DirectChat = function (element) {
|
485
|
+
this.element = element;
|
486
|
+
};
|
487
|
+
|
488
|
+
DirectChat.prototype.toggle = function ($trigger) {
|
489
|
+
$trigger.parents(Selector.box).first().toggleClass(ClassName.open);
|
490
|
+
};
|
491
|
+
|
492
|
+
// Plugin Definition
|
493
|
+
// =================
|
494
|
+
function Plugin(option) {
|
495
|
+
return this.each(function () {
|
496
|
+
var $this = $(this);
|
497
|
+
var data = $this.data(DataKey);
|
498
|
+
|
499
|
+
if (!data) {
|
500
|
+
$this.data(DataKey, (data = new DirectChat($this)));
|
501
|
+
}
|
502
|
+
|
503
|
+
if (typeof option == 'string') data.toggle($this);
|
504
|
+
});
|
505
|
+
}
|
506
|
+
|
507
|
+
var old = $.fn.directChat;
|
508
|
+
|
509
|
+
$.fn.directChat = Plugin;
|
510
|
+
$.fn.directChat.Constructor = DirectChat;
|
511
|
+
|
512
|
+
// No Conflict Mode
|
513
|
+
// ================
|
514
|
+
$.fn.directChat.noConflict = function () {
|
515
|
+
$.fn.directChat = old;
|
516
|
+
return this;
|
517
|
+
};
|
518
|
+
|
519
|
+
// DirectChat Data API
|
520
|
+
// ===================
|
521
|
+
$(document).on('click', Selector.data, function (event) {
|
522
|
+
if (event) event.preventDefault();
|
523
|
+
Plugin.call($(this), 'toggle');
|
524
|
+
});
|
525
|
+
|
526
|
+
}(jQuery);
|
527
|
+
|
528
|
+
|
529
|
+
/* PushMenu()
|
530
|
+
* ==========
|
531
|
+
* Adds the push menu functionality to the sidebar.
|
532
|
+
*
|
533
|
+
* @usage: $('.btn').pushMenu(options)
|
534
|
+
* or add [data-toggle="push-menu"] to any button
|
535
|
+
* Pass any option as data-option="value"
|
536
|
+
*/
|
537
|
+
+function ($) {
|
538
|
+
'use strict';
|
539
|
+
|
540
|
+
var DataKey = 'lte.pushmenu';
|
541
|
+
|
542
|
+
var Default = {
|
543
|
+
collapseScreenSize : 767,
|
544
|
+
expandOnHover : false,
|
545
|
+
expandTransitionDelay: 200
|
546
|
+
};
|
547
|
+
|
548
|
+
var Selector = {
|
549
|
+
collapsed : '.sidebar-collapse',
|
550
|
+
open : '.sidebar-open',
|
551
|
+
mainSidebar : '.main-sidebar',
|
552
|
+
contentWrapper: '.content-wrapper',
|
553
|
+
searchInput : '.sidebar-form .form-control',
|
554
|
+
button : '[data-toggle="push-menu"]',
|
555
|
+
mini : '.sidebar-mini',
|
556
|
+
expanded : '.sidebar-expanded-on-hover',
|
557
|
+
layoutFixed : '.fixed'
|
558
|
+
};
|
559
|
+
|
560
|
+
var ClassName = {
|
561
|
+
collapsed : 'sidebar-collapse',
|
562
|
+
open : 'sidebar-open',
|
563
|
+
mini : 'sidebar-mini',
|
564
|
+
expanded : 'sidebar-expanded-on-hover',
|
565
|
+
expandFeature: 'sidebar-mini-expand-feature',
|
566
|
+
layoutFixed : 'fixed'
|
567
|
+
};
|
568
|
+
|
569
|
+
var Event = {
|
570
|
+
expanded : 'expanded.pushMenu',
|
571
|
+
collapsed: 'collapsed.pushMenu'
|
572
|
+
};
|
573
|
+
|
574
|
+
// PushMenu Class Definition
|
575
|
+
// =========================
|
576
|
+
var PushMenu = function (options) {
|
577
|
+
this.options = options;
|
578
|
+
this.init();
|
579
|
+
};
|
580
|
+
|
581
|
+
PushMenu.prototype.init = function () {
|
582
|
+
if (this.options.expandOnHover
|
583
|
+
|| ($('body').is(Selector.mini + Selector.layoutFixed))) {
|
584
|
+
this.expandOnHover();
|
585
|
+
$('body').addClass(ClassName.expandFeature);
|
586
|
+
}
|
587
|
+
|
588
|
+
$(Selector.contentWrapper).click(function () {
|
589
|
+
// Enable hide menu when clicking on the content-wrapper on small screens
|
590
|
+
if ($(window).width() <= this.options.collapseScreenSize && $('body').hasClass(ClassName.open)) {
|
591
|
+
this.close();
|
592
|
+
}
|
593
|
+
}.bind(this));
|
594
|
+
|
595
|
+
// __Fix for android devices
|
596
|
+
$(Selector.searchInput).click(function (e) {
|
597
|
+
e.stopPropagation();
|
598
|
+
});
|
599
|
+
};
|
600
|
+
|
601
|
+
PushMenu.prototype.toggle = function () {
|
602
|
+
var windowWidth = $(window).width();
|
603
|
+
var isOpen = !$('body').hasClass(ClassName.collapsed);
|
604
|
+
|
605
|
+
if (windowWidth <= this.options.collapseScreenSize) {
|
606
|
+
isOpen = $('body').hasClass(ClassName.open);
|
607
|
+
}
|
608
|
+
|
609
|
+
if (!isOpen) {
|
610
|
+
this.open();
|
611
|
+
} else {
|
612
|
+
this.close();
|
613
|
+
}
|
614
|
+
};
|
615
|
+
|
616
|
+
PushMenu.prototype.open = function () {
|
617
|
+
var windowWidth = $(window).width();
|
618
|
+
|
619
|
+
if (windowWidth > this.options.collapseScreenSize) {
|
620
|
+
$('body').removeClass(ClassName.collapsed)
|
621
|
+
.trigger($.Event(Event.expanded));
|
622
|
+
}
|
623
|
+
else {
|
624
|
+
$('body').addClass(ClassName.open)
|
625
|
+
.trigger($.Event(Event.expanded));
|
626
|
+
}
|
627
|
+
};
|
628
|
+
|
629
|
+
PushMenu.prototype.close = function () {
|
630
|
+
var windowWidth = $(window).width();
|
631
|
+
if (windowWidth > this.options.collapseScreenSize) {
|
632
|
+
$('body').addClass(ClassName.collapsed)
|
633
|
+
.trigger($.Event(Event.collapsed));
|
634
|
+
} else {
|
635
|
+
$('body').removeClass(ClassName.open + ' ' + ClassName.collapsed)
|
636
|
+
.trigger($.Event(Event.collapsed));
|
637
|
+
}
|
638
|
+
};
|
639
|
+
|
640
|
+
PushMenu.prototype.expandOnHover = function () {
|
641
|
+
$(Selector.mainSidebar).hover(function () {
|
642
|
+
if ($('body').is(Selector.mini + Selector.collapsed)
|
643
|
+
&& $(window).width() > this.options.collapseScreenSize) {
|
644
|
+
this.expand();
|
645
|
+
}
|
646
|
+
}.bind(this), function () {
|
647
|
+
if ($('body').is(Selector.expanded)) {
|
648
|
+
this.collapse();
|
649
|
+
}
|
650
|
+
}.bind(this));
|
651
|
+
};
|
652
|
+
|
653
|
+
PushMenu.prototype.expand = function () {
|
654
|
+
setTimeout(function () {
|
655
|
+
$('body').removeClass(ClassName.collapsed)
|
656
|
+
.addClass(ClassName.expanded);
|
657
|
+
}, this.options.expandTransitionDelay);
|
658
|
+
};
|
659
|
+
|
660
|
+
PushMenu.prototype.collapse = function () {
|
661
|
+
setTimeout(function () {
|
662
|
+
$('body').removeClass(ClassName.expanded)
|
663
|
+
.addClass(ClassName.collapsed);
|
664
|
+
}, this.options.expandTransitionDelay);
|
665
|
+
};
|
666
|
+
|
667
|
+
// PushMenu Plugin Definition
|
668
|
+
// ==========================
|
669
|
+
function Plugin(option) {
|
670
|
+
return this.each(function () {
|
671
|
+
var $this = $(this);
|
672
|
+
var data = $this.data(DataKey);
|
673
|
+
|
674
|
+
if (!data) {
|
675
|
+
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
|
676
|
+
$this.data(DataKey, (data = new PushMenu(options)));
|
677
|
+
}
|
678
|
+
|
679
|
+
if (option === 'toggle') data.toggle();
|
680
|
+
});
|
681
|
+
}
|
682
|
+
|
683
|
+
var old = $.fn.pushMenu;
|
684
|
+
|
685
|
+
$.fn.pushMenu = Plugin;
|
686
|
+
$.fn.pushMenu.Constructor = PushMenu;
|
687
|
+
|
688
|
+
// No Conflict Mode
|
689
|
+
// ================
|
690
|
+
$.fn.pushMenu.noConflict = function () {
|
691
|
+
$.fn.pushMenu = old;
|
692
|
+
return this;
|
693
|
+
};
|
694
|
+
|
695
|
+
// Data API
|
696
|
+
// ========
|
697
|
+
$(document).on('click', Selector.button, function (e) {
|
698
|
+
e.preventDefault();
|
699
|
+
Plugin.call($(this), 'toggle');
|
700
|
+
});
|
701
|
+
$(window).on('load', function () {
|
702
|
+
Plugin.call($(Selector.button));
|
703
|
+
});
|
704
|
+
}(jQuery);
|
705
|
+
|
706
|
+
|
707
|
+
/* TodoList()
|
708
|
+
* =========
|
709
|
+
* Converts a list into a todoList.
|
710
|
+
*
|
711
|
+
* @Usage: $('.my-list').todoList(options)
|
712
|
+
* or add [data-widget="todo-list"] to the ul element
|
713
|
+
* Pass any option as data-option="value"
|
714
|
+
*/
|
715
|
+
+function ($) {
|
716
|
+
'use strict';
|
717
|
+
|
718
|
+
var DataKey = 'lte.todolist';
|
719
|
+
|
720
|
+
var Default = {
|
721
|
+
onCheck : function (item) {
|
722
|
+
return item;
|
723
|
+
},
|
724
|
+
onUnCheck: function (item) {
|
725
|
+
return item;
|
726
|
+
}
|
727
|
+
};
|
728
|
+
|
729
|
+
var Selector = {
|
730
|
+
data: '[data-widget="todo-list"]'
|
731
|
+
};
|
732
|
+
|
733
|
+
var ClassName = {
|
734
|
+
done: 'done'
|
735
|
+
};
|
736
|
+
|
737
|
+
// TodoList Class Definition
|
738
|
+
// =========================
|
739
|
+
var TodoList = function (element, options) {
|
740
|
+
this.element = element;
|
741
|
+
this.options = options;
|
742
|
+
|
743
|
+
this._setUpListeners();
|
744
|
+
};
|
745
|
+
|
746
|
+
TodoList.prototype.toggle = function (item) {
|
747
|
+
item.parents(Selector.li).first().toggleClass(ClassName.done);
|
748
|
+
if (!item.prop('checked')) {
|
749
|
+
this.unCheck(item);
|
750
|
+
return;
|
751
|
+
}
|
752
|
+
|
753
|
+
this.check(item);
|
754
|
+
};
|
755
|
+
|
756
|
+
TodoList.prototype.check = function (item) {
|
757
|
+
this.options.onCheck.call(item);
|
758
|
+
};
|
759
|
+
|
760
|
+
TodoList.prototype.unCheck = function (item) {
|
761
|
+
this.options.onUnCheck.call(item);
|
762
|
+
};
|
763
|
+
|
764
|
+
// Private
|
765
|
+
|
766
|
+
TodoList.prototype._setUpListeners = function () {
|
767
|
+
var that = this;
|
768
|
+
$(this.element).on('change ifChanged', 'input:checkbox', function () {
|
769
|
+
that.toggle($(this));
|
770
|
+
});
|
771
|
+
};
|
772
|
+
|
773
|
+
// Plugin Definition
|
774
|
+
// =================
|
775
|
+
function Plugin(option) {
|
776
|
+
return this.each(function () {
|
777
|
+
var $this = $(this);
|
778
|
+
var data = $this.data(DataKey);
|
779
|
+
|
780
|
+
if (!data) {
|
781
|
+
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
|
782
|
+
$this.data(DataKey, (data = new TodoList($this, options)));
|
783
|
+
}
|
784
|
+
|
785
|
+
if (typeof data == 'string') {
|
786
|
+
if (typeof data[option] == 'undefined') {
|
787
|
+
throw new Error('No method named ' + option);
|
788
|
+
}
|
789
|
+
data[option]();
|
790
|
+
}
|
791
|
+
});
|
792
|
+
}
|
793
|
+
|
794
|
+
var old = $.fn.todoList;
|
795
|
+
|
796
|
+
$.fn.todoList = Plugin;
|
797
|
+
$.fn.todoList.Constructor = TodoList;
|
798
|
+
|
799
|
+
// No Conflict Mode
|
800
|
+
// ================
|
801
|
+
$.fn.todoList.noConflict = function () {
|
802
|
+
$.fn.todoList = old;
|
803
|
+
return this;
|
804
|
+
};
|
805
|
+
|
806
|
+
// TodoList Data API
|
807
|
+
// =================
|
808
|
+
$(window).on('load', function () {
|
809
|
+
$(Selector.data).each(function () {
|
810
|
+
Plugin.call($(this));
|
811
|
+
});
|
812
|
+
});
|
813
|
+
|
814
|
+
}(jQuery);
|
815
|
+
|
816
|
+
|
817
|
+
/* Tree()
|
818
|
+
* ======
|
819
|
+
* Converts a nested list into a multilevel
|
820
|
+
* tree view menu.
|
821
|
+
*
|
822
|
+
* @Usage: $('.my-menu').tree(options)
|
823
|
+
* or add [data-widget="tree"] to the ul element
|
824
|
+
* Pass any option as data-option="value"
|
825
|
+
*/
|
826
|
+
+function ($) {
|
827
|
+
'use strict';
|
828
|
+
|
829
|
+
var DataKey = 'lte.tree';
|
830
|
+
|
831
|
+
var Default = {
|
832
|
+
animationSpeed: 500,
|
833
|
+
accordion : true,
|
834
|
+
followLink : false,
|
835
|
+
trigger : '.treeview a'
|
836
|
+
};
|
837
|
+
|
838
|
+
var Selector = {
|
839
|
+
tree : '.tree',
|
840
|
+
treeview : '.treeview',
|
841
|
+
treeviewMenu: '.treeview-menu',
|
842
|
+
open : '.menu-open, .active',
|
843
|
+
li : 'li',
|
844
|
+
data : '[data-widget="tree"]',
|
845
|
+
active : '.active'
|
846
|
+
};
|
847
|
+
|
848
|
+
var ClassName = {
|
849
|
+
open: 'menu-open',
|
850
|
+
tree: 'tree'
|
851
|
+
};
|
852
|
+
|
853
|
+
var Event = {
|
854
|
+
collapsed: 'collapsed.tree',
|
855
|
+
expanded : 'expanded.tree'
|
856
|
+
};
|
857
|
+
|
858
|
+
// Tree Class Definition
|
859
|
+
// =====================
|
860
|
+
var Tree = function (element, options) {
|
861
|
+
this.element = element;
|
862
|
+
this.options = options;
|
863
|
+
|
864
|
+
$(this.element).addClass(ClassName.tree);
|
865
|
+
|
866
|
+
$(Selector.treeview + Selector.active, this.element).addClass(ClassName.open);
|
867
|
+
|
868
|
+
this._setUpListeners();
|
869
|
+
};
|
870
|
+
|
871
|
+
Tree.prototype.toggle = function (link, event) {
|
872
|
+
var treeviewMenu = link.next(Selector.treeviewMenu);
|
873
|
+
var parentLi = link.parent();
|
874
|
+
var isOpen = parentLi.hasClass(ClassName.open);
|
875
|
+
|
876
|
+
if (!parentLi.is(Selector.treeview)) {
|
877
|
+
return;
|
878
|
+
}
|
879
|
+
|
880
|
+
if (!this.options.followLink || link.attr('href') === '#') {
|
881
|
+
event.preventDefault();
|
882
|
+
}
|
883
|
+
|
884
|
+
if (isOpen) {
|
885
|
+
this.collapse(treeviewMenu, parentLi);
|
886
|
+
} else {
|
887
|
+
this.expand(treeviewMenu, parentLi);
|
888
|
+
}
|
889
|
+
};
|
890
|
+
|
891
|
+
Tree.prototype.expand = function (tree, parent) {
|
892
|
+
var expandedEvent = $.Event(Event.expanded);
|
893
|
+
|
894
|
+
if (this.options.accordion) {
|
895
|
+
var openMenuLi = parent.siblings(Selector.open);
|
896
|
+
var openTree = openMenuLi.children(Selector.treeviewMenu);
|
897
|
+
this.collapse(openTree, openMenuLi);
|
898
|
+
}
|
899
|
+
|
900
|
+
parent.addClass(ClassName.open);
|
901
|
+
tree.slideDown(this.options.animationSpeed, function () {
|
902
|
+
$(this.element).trigger(expandedEvent);
|
903
|
+
}.bind(this));
|
904
|
+
};
|
905
|
+
|
906
|
+
Tree.prototype.collapse = function (tree, parentLi) {
|
907
|
+
var collapsedEvent = $.Event(Event.collapsed);
|
908
|
+
|
909
|
+
//tree.find(Selector.open).removeClass(ClassName.open);
|
910
|
+
parentLi.removeClass(ClassName.open);
|
911
|
+
tree.slideUp(this.options.animationSpeed, function () {
|
912
|
+
//tree.find(Selector.open + ' > ' + Selector.treeview).slideUp();
|
913
|
+
$(this.element).trigger(collapsedEvent);
|
914
|
+
}.bind(this));
|
915
|
+
};
|
916
|
+
|
917
|
+
// Private
|
918
|
+
|
919
|
+
Tree.prototype._setUpListeners = function () {
|
920
|
+
var that = this;
|
921
|
+
|
922
|
+
$(this.element).on('click', this.options.trigger, function (event) {
|
923
|
+
that.toggle($(this), event);
|
924
|
+
});
|
925
|
+
};
|
926
|
+
|
927
|
+
// Plugin Definition
|
928
|
+
// =================
|
929
|
+
function Plugin(option) {
|
930
|
+
return this.each(function () {
|
931
|
+
var $this = $(this);
|
932
|
+
var data = $this.data(DataKey);
|
933
|
+
|
934
|
+
if (!data) {
|
935
|
+
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
|
936
|
+
$this.data(DataKey, new Tree($this, options));
|
937
|
+
}
|
938
|
+
});
|
939
|
+
}
|
940
|
+
|
941
|
+
var old = $.fn.tree;
|
942
|
+
|
943
|
+
$.fn.tree = Plugin;
|
944
|
+
$.fn.tree.Constructor = Tree;
|
945
|
+
|
946
|
+
// No Conflict Mode
|
947
|
+
// ================
|
948
|
+
$.fn.tree.noConflict = function () {
|
949
|
+
$.fn.tree = old;
|
950
|
+
return this;
|
951
|
+
};
|
952
|
+
|
953
|
+
// Tree Data API
|
954
|
+
// =============
|
955
|
+
$(window).on('load', function () {
|
956
|
+
$(Selector.data).each(function () {
|
957
|
+
Plugin.call($(this));
|
958
|
+
});
|
959
|
+
});
|
960
|
+
|
961
|
+
}(jQuery);
|
962
|
+
|
963
|
+
|
964
|
+
/* Layout()
|
965
|
+
* ========
|
966
|
+
* Implements AdminLTE layout.
|
967
|
+
* Fixes the layout height in case min-height fails.
|
968
|
+
*
|
969
|
+
* @usage activated automatically upon window load.
|
970
|
+
* Configure any options by passing data-option="value"
|
971
|
+
* to the body tag.
|
972
|
+
*/
|
973
|
+
+function ($) {
|
974
|
+
'use strict';
|
975
|
+
|
976
|
+
var DataKey = 'lte.layout';
|
977
|
+
|
978
|
+
var Default = {
|
979
|
+
slimscroll : true,
|
980
|
+
resetHeight: true
|
981
|
+
};
|
982
|
+
|
983
|
+
var Selector = {
|
984
|
+
wrapper : '.wrapper',
|
985
|
+
contentWrapper: '.content-wrapper',
|
986
|
+
layoutBoxed : '.layout-boxed',
|
987
|
+
mainFooter : '.main-footer',
|
988
|
+
mainHeader : '.main-header',
|
989
|
+
sidebar : '.sidebar',
|
990
|
+
controlSidebar: '.control-sidebar',
|
991
|
+
fixed : '.fixed',
|
992
|
+
sidebarMenu : '.sidebar-menu',
|
993
|
+
logo : '.main-header .logo'
|
994
|
+
};
|
995
|
+
|
996
|
+
var ClassName = {
|
997
|
+
fixed : 'fixed',
|
998
|
+
holdTransition: 'hold-transition'
|
999
|
+
};
|
1000
|
+
|
1001
|
+
var Layout = function (options) {
|
1002
|
+
this.options = options;
|
1003
|
+
this.bindedResize = false;
|
1004
|
+
this.activate();
|
1005
|
+
};
|
1006
|
+
|
1007
|
+
Layout.prototype.activate = function () {
|
1008
|
+
this.fix();
|
1009
|
+
this.fixSidebar();
|
1010
|
+
|
1011
|
+
$('body').removeClass(ClassName.holdTransition);
|
1012
|
+
|
1013
|
+
if (this.options.resetHeight) {
|
1014
|
+
$('body, html, ' + Selector.wrapper).css({
|
1015
|
+
'height' : 'auto',
|
1016
|
+
'min-height': '100%'
|
1017
|
+
});
|
1018
|
+
}
|
1019
|
+
|
1020
|
+
if (!this.bindedResize) {
|
1021
|
+
$(window).resize(function () {
|
1022
|
+
this.fix();
|
1023
|
+
this.fixSidebar();
|
1024
|
+
|
1025
|
+
$(Selector.logo + ', ' + Selector.sidebar).one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend', function () {
|
1026
|
+
this.fix();
|
1027
|
+
this.fixSidebar();
|
1028
|
+
}.bind(this));
|
1029
|
+
}.bind(this));
|
1030
|
+
|
1031
|
+
this.bindedResize = true;
|
1032
|
+
}
|
1033
|
+
|
1034
|
+
$(Selector.sidebarMenu).on('expanded.tree', function () {
|
1035
|
+
this.fix();
|
1036
|
+
this.fixSidebar();
|
1037
|
+
}.bind(this));
|
1038
|
+
|
1039
|
+
$(Selector.sidebarMenu).on('collapsed.tree', function () {
|
1040
|
+
this.fix();
|
1041
|
+
this.fixSidebar();
|
1042
|
+
}.bind(this));
|
1043
|
+
};
|
1044
|
+
|
1045
|
+
Layout.prototype.fix = function () {
|
1046
|
+
// Remove overflow from .wrapper if layout-boxed exists
|
1047
|
+
$(Selector.layoutBoxed + ' > ' + Selector.wrapper).css('overflow', 'hidden');
|
1048
|
+
|
1049
|
+
// Get window height and the wrapper height
|
1050
|
+
var footerHeight = $(Selector.mainFooter).outerHeight() || 0;
|
1051
|
+
var headerHeight = $(Selector.mainHeader).outerHeight() || 0;
|
1052
|
+
var neg = headerHeight + footerHeight;
|
1053
|
+
var windowHeight = $(window).height();
|
1054
|
+
var sidebarHeight = $(Selector.sidebar).height() || 0;
|
1055
|
+
|
1056
|
+
// Set the min-height of the content and sidebar based on
|
1057
|
+
// the height of the document.
|
1058
|
+
if ($('body').hasClass(ClassName.fixed)) {
|
1059
|
+
$(Selector.contentWrapper).css('min-height', windowHeight - footerHeight);
|
1060
|
+
} else {
|
1061
|
+
var postSetHeight;
|
1062
|
+
|
1063
|
+
if (windowHeight >= sidebarHeight + headerHeight) {
|
1064
|
+
$(Selector.contentWrapper).css('min-height', windowHeight - neg);
|
1065
|
+
postSetHeight = windowHeight - neg;
|
1066
|
+
} else {
|
1067
|
+
$(Selector.contentWrapper).css('min-height', sidebarHeight);
|
1068
|
+
postSetHeight = sidebarHeight;
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
// Fix for the control sidebar height
|
1072
|
+
var $controlSidebar = $(Selector.controlSidebar);
|
1073
|
+
if (typeof $controlSidebar !== 'undefined') {
|
1074
|
+
if ($controlSidebar.height() > postSetHeight)
|
1075
|
+
$(Selector.contentWrapper).css('min-height', $controlSidebar.height());
|
1076
|
+
}
|
1077
|
+
}
|
1078
|
+
};
|
1079
|
+
|
1080
|
+
Layout.prototype.fixSidebar = function () {
|
1081
|
+
// Make sure the body tag has the .fixed class
|
1082
|
+
if (!$('body').hasClass(ClassName.fixed)) {
|
1083
|
+
if (typeof $.fn.slimScroll !== 'undefined') {
|
1084
|
+
$(Selector.sidebar).slimScroll({ destroy: true }).height('auto');
|
1085
|
+
}
|
1086
|
+
return;
|
1087
|
+
}
|
1088
|
+
|
1089
|
+
// Enable slimscroll for fixed layout
|
1090
|
+
if (this.options.slimscroll) {
|
1091
|
+
if (typeof $.fn.slimScroll !== 'undefined') {
|
1092
|
+
// Destroy if it exists
|
1093
|
+
// $(Selector.sidebar).slimScroll({ destroy: true }).height('auto')
|
1094
|
+
|
1095
|
+
// Add slimscroll
|
1096
|
+
$(Selector.sidebar).slimScroll({
|
1097
|
+
height: ($(window).height() - $(Selector.mainHeader).height()) + 'px'
|
1098
|
+
});
|
1099
|
+
}
|
1100
|
+
}
|
1101
|
+
};
|
1102
|
+
|
1103
|
+
// Plugin Definition
|
1104
|
+
// =================
|
1105
|
+
function Plugin(option) {
|
1106
|
+
return this.each(function () {
|
1107
|
+
var $this = $(this);
|
1108
|
+
var data = $this.data(DataKey);
|
1109
|
+
|
1110
|
+
if (!data) {
|
1111
|
+
var options = $.extend({}, Default, $this.data(), typeof option === 'object' && option);
|
1112
|
+
$this.data(DataKey, (data = new Layout(options)));
|
1113
|
+
}
|
1114
|
+
|
1115
|
+
if (typeof option === 'string') {
|
1116
|
+
if (typeof data[option] === 'undefined') {
|
1117
|
+
throw new Error('No method named ' + option);
|
1118
|
+
}
|
1119
|
+
data[option]();
|
1120
|
+
}
|
1121
|
+
});
|
1122
|
+
}
|
1123
|
+
|
1124
|
+
var old = $.fn.layout;
|
1125
|
+
|
1126
|
+
$.fn.layout = Plugin;
|
1127
|
+
$.fn.layout.Constuctor = Layout;
|
1128
|
+
|
1129
|
+
// No conflict mode
|
1130
|
+
// ================
|
1131
|
+
$.fn.layout.noConflict = function () {
|
1132
|
+
$.fn.layout = old;
|
1133
|
+
return this;
|
1134
|
+
};
|
1135
|
+
|
1136
|
+
// Layout DATA-API
|
1137
|
+
// ===============
|
1138
|
+
$(window).on('load', function () {
|
1139
|
+
Plugin.call($('body'));
|
1140
|
+
});
|
1141
|
+
}(jQuery);
|