Stop double-loading jquery

This commit is contained in:
snipe 2017-01-11 05:51:13 -08:00
parent 9bbfb64f17
commit e2d5401f3a
10 changed files with 144 additions and 113 deletions

View file

@ -32,6 +32,7 @@ elixir(function(mix) {
mix.webpack(
// jQuery is loaded from vue.js webpack process
'./resources/assets/js/vue.js',
'./resources/assets/js/vue-dist.js'
);
@ -41,17 +42,17 @@ elixir(function(mix) {
mix.scripts([
'vue-dist.js',
bowerPath + '/jquery-ui/**',
bowerPath + '/bootstrap/dist/js/**',
bowerPath + '/jquery-slimscroll/**',
bowerPath + '/jquery-ui/**',
bowerPath + '/jquery.iframe-transport/**',
bowerPath + '/fileupload/**',
bowerPath + '/fastclick/**',
bowerPath + '/select2/**',
bowerPath + '/bootstrap-colorpicker/**',
bowerPath + '/bootstrap-table/**',
bowerPath + '/bootstrap-datepicker/**',
bowerPath + '/iCheck/**',
bowerPath + '/select2/dist/js/select2.full.*',
bowerPath + '/ekko-lightbox/**',
'snipeit.js'

View file

@ -322,6 +322,9 @@ var pieOptions = {
$(document).ready(function () {
/*
* Slideout help menu
*/
$('.slideout-menu-toggle').on('click', function(event){
console.log('clicked');
event.preventDefault();
@ -345,6 +348,27 @@ $(document).ready(function () {
slideoutMenu.fadeOut();
}
});
/*
* iCheck checkbox plugin
*/
$('input[type="checkbox"].minimal, input[type="radio"].minimal').icheck({
checkboxClass: 'icheckbox_minimal-blue',
radioClass: 'iradio_minimal-blue'
});
/*
* Select2
*/
var iOS = /iPhone|iPad|iPod/.test(navigator.userAgent) && !window.MSStream;
if(!iOS)
{
$(".select2").select2();
}
$('.datepicker').datepicker();
});
//# sourceMappingURL=all.js.map

File diff suppressed because one or more lines are too long

View file

@ -322,6 +322,9 @@ var pieOptions = {
$(document).ready(function () {
/*
* Slideout help menu
*/
$('.slideout-menu-toggle').on('click', function(event){
console.log('clicked');
event.preventDefault();
@ -345,6 +348,27 @@ $(document).ready(function () {
slideoutMenu.fadeOut();
}
});
/*
* iCheck checkbox plugin
*/
$('input[type="checkbox"].minimal, input[type="radio"].minimal').icheck({
checkboxClass: 'icheckbox_minimal-blue',
radioClass: 'iradio_minimal-blue'
});
/*
* Select2
*/
var iOS = /iPhone|iPad|iPod/.test(navigator.userAgent) && !window.MSStream;
if(!iOS)
{
$(".select2").select2();
}
$('.datepicker').datepicker();
});
//# sourceMappingURL=all.js.map

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
{
"assets/css/app.css": "assets/css/app-0979ad0cf2.css",
"assets/js/all.js": "assets/js/all-990304f6ce.js"
"assets/js/all.js": "assets/js/all-14abf1eabb.js"
}

View file

@ -1,6 +1,3 @@
window.$ = window.jQuery = require('jquery')
/*! AdminLTE app.js
* ================
* Main JS application file for AdminLTE v2. This file

View file

@ -94,6 +94,9 @@ var pieOptions = {
$(document).ready(function () {
/*
* Slideout help menu
*/
$('.slideout-menu-toggle').on('click', function(event){
console.log('clicked');
event.preventDefault();
@ -117,4 +120,25 @@ $(document).ready(function () {
slideoutMenu.fadeOut();
}
});
/*
* iCheck checkbox plugin
*/
$('input[type="checkbox"].minimal, input[type="radio"].minimal').icheck({
checkboxClass: 'icheckbox_minimal-blue',
radioClass: 'iradio_minimal-blue'
});
/*
* Select2
*/
var iOS = /iPhone|iPad|iPod/.test(navigator.userAgent) && !window.MSStream;
if(!iOS)
{
$(".select2").select2();
}
$('.datepicker').datepicker();
});

View file

@ -37,27 +37,6 @@ $(function () {
});
// skin changer
$(".skins-nav .skin").click(function (e) {
e.preventDefault();
if ($(this).hasClass("selected")) {
return;
}
$(".skins-nav .skin").removeClass("selected");
$(this).addClass("selected");
if (!$("#skin-file").length) {
$("head").append('<link rel="stylesheet" type="text/css" id="skin-file" href="">');
}
var $skin = $("#skin-file");
if ($(this).attr("data-file")) {
$skin.attr("href", $(this).data("file"));
} else {
$skin.attr("href", "");
}
});
// sidebar menu dropdown toggle
$("#dashboard-menu .dropdown-toggle").click(function (e) {

View file

@ -643,27 +643,9 @@
<script src="{{ asset(elixir('assets/js/all.js')) }}"></script>
@section('moar_scripts')
<script>
$(function () {
//Initialize Select2 Elements
var iOS = /iPhone|iPad|iPod/.test(navigator.userAgent) && !window.MSStream;
if(!iOS)
{
$(".select2").select2();
}
$('.datepicker').datepicker();
});
//Flat blue color scheme for iCheck
$('input[type="checkbox"].minimal, input[type="radio"].minimal').iCheck({
checkboxClass: 'icheckbox_minimal-blue',
radioClass: 'iradio_minimal-blue'
});
</script>
@show
@if ((Session::get('topsearch')=='true') || (Request::is('/')))
<script>
$("#tagSearch").focus();