[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/js/fileupload/ -> upload_iframe.js (source)

   1  jQuery(document).ready( function() {
   2      jQuery('input#mp_fileupload_file_' + uploadhtmlL10n.id).change(function(){
   3          var file = jQuery('input#mp_fileupload_file_' + uploadhtmlL10n.id).val(); 
   4  
   5          jQuery('#upload_form_' + uploadhtmlL10n.id).submit(function(){
   6              jQuery('label#mp_fileupload_file').hide();
   7              var filea = jQuery('input#mp_fileupload_file_' + uploadhtmlL10n.id).val();
   8              var fileb = filea.match(/(.*)[\/\\]([^\/\\]+\.\w+)$/)
   9                  var file  = (fileb === null) ? jQuery('input#mp_fileupload_file_' + uploadhtmlL10n.id).val() : fileb[2];
  10  
  11              var i = document.createElement('input');
  12              i.setAttribute('type', 'hidden');
  13              i.setAttribute('name', 'file');
  14              i.setAttribute('value', file);
  15              var f = document.getElementById('upload_form_' + uploadhtmlL10n.id);
  16              f.appendChild(i);
  17  
  18              parent.mp_fileupload.submitted(uploadhtmlL10n.id, file); 
  19              return true;
  20          });
  21          jQuery('#upload_form_' + uploadhtmlL10n.id).submit();
  22      });
  23  });


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1