/** * Admin * This page allows administrators to manage users */ $( document ).ready(function() { 'use-strict'; // JQuery Filer data var filerData = { limit: 1, maxSize: 5, extensions: ['zip'], changeInput: '

Drag & Drop file here

or
Browse Files
', showThumbs: true, theme: "dragdropbox", templates: { box: '', item: '
  • \
    \
    \
    \
    \
    \ {{fi-name | limitTo: 25}}\ {{fi-size2}}\
    \ {{fi-image}}\
    \
    \
      \
    • {{fi-progressBar}}
    • \
    \
      \
    • \
    \
    \
    \
    \
  • ', itemAppend: '
  • \
    \
    \
    \
    \
    \ {{fi-name | limitTo: 25}}\ {{fi-size2}}\
    \ {{fi-image}}\
    \
    \
      \
    • {{fi-icon}}
    • \
    \
      \
    • \
    \
    \
    \
    \
  • ', progressBar: '
    ', itemAppendToEnd: false, removeConfirmation: false, _selectors: { list: '.jFiler-items-list', item: '.jFiler-item', progressBar: '.bar', remove: '.jFiler-item-trash-action' } }, dragDrop: { dragEnter: null, dragLeave: null, drop: null, }, uploadFile: { url: 'backend/process_integration-data-upload.php', data: null, type: 'POST', enctype: 'multipart/form-data', beforeSend: function(){}, success: function(data, el){ var parent = el.find(".jFiler-jProgressBar").parent(); el.find(".jFiler-jProgressBar").fadeOut("slow", function(){ $("
    Success
    ").hide().appendTo(parent).fadeIn("slow"); }); var responseJSON = JSON.parse(data); if (responseJSON.active == 'inactive'){ window.location.replace('/'); } else if ($(responseJSON.error).size() > 0){ displayError(responseJSON.error); } else { displaySuccess(responseJSON.success); } $('#fileDataImport').prop('jFiler').reset(); $('#importModal').modal('hide'); }, error: function(el){ var parent = el.find(".jFiler-jProgressBar").parent(); el.find(".jFiler-jProgressBar").fadeOut("slow", function(){ $("
    Error
    ").hide().appendTo(parent).fadeIn("slow"); }); }, statusCode: null, onProgress: null, onComplete: null }, addMore: false, clipBoardPaste: true, excludeName: null, beforeRender: null, afterRender: null, beforeShow: null, beforeSelect: null, onSelect: null, afterShow: null, onRemove: null, onEmpty: null, options: null, captions: { button: "Choose Files", feedback: "Choose files To Upload", feedback2: "files were chosen", drop: "Drop file here to Upload", removeConfirmation: "Are you sure you want to remove this file?", errors: { filesLimit: "Only {{fi-limit}} files are allowed to be uploaded.", filesType: "Only ZIP files are allowed to be uploaded.", filesSize: "{{fi-name}} is too large! Please upload file up to {{fi-maxSize}} MB.", filesSizeAll: "Files you've choosed are too large! Please upload files up to {{fi-maxSize}} MB." } } }; $("#fileDataImport").filer(filerData); $('#buttonDataExport').on('click', function(){ window.open('/backend/export-backup.php'); }); });