import './vue'; window.axios = require('axios'); window.axios.defaults.headers.common = { 'X-Requested-With': 'XMLHttpRequest', 'X-CSRF-TOKEN' : document.querySelector('meta[name="csrf-token"]').getAttribute('content') }; let _ = require('lodash'); 'use strict'; try { window.$ = window.jQuery = require('jquery') } catch (e) {} jQuery.fn.scrollParent = function() { var overflowRegex = /(auto|scroll)/, position = this.css( "position" ), excludeStaticParent = position === "absolute", scrollParent = this.parents().filter( function() { var parent = $( this ); if ( excludeStaticParent && parent.css( "position" ) === "static" ) { return false; } var overflowState = parent.css(["overflow", "overflowX", "overflowY"]); return (overflowRegex).test( overflowState.overflow + overflowState.overflowX + overflowState.overflowY ); }).eq( 0 ); return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent; }; // ---- Configuration de base des filtres médias $(window).data('offset', 0); $(window).data('limit', 50); $(window).data('currentFolder', 0); $(window).data('currentBasket', null); $(window).data('filter', {}); //confirm popup $.fancyConfirm = function( opts ) { opts = $.extend( true, { title : 'Are you sure?', message : '', okButton : 'OK', noButton : 'Cancel', callback : $.noop }, opts || {} ); $.fancybox.open({ type : 'html', src : '
' + opts.message + '
' + '${opts.type == "error" ? '' : ''}` + opts.message + '
' + '