diff --git a/assets/js/ajax-file-upload.js b/assets/js/ajax-file-upload.js index 7b2b72e61..f723b1aa5 100644 --- a/assets/js/ajax-file-upload.js +++ b/assets/js/ajax-file-upload.js @@ -3,7 +3,7 @@ jQuery(function($) { $(this).fileupload({ dataType: 'json', dropZone: $(this), - url: job_manager_ajax_filters.ajax_url.toString().replace( "%%endpoint%%", "upload_file" ), + url: job_manager_ajax_file_upload.ajax_url.toString().replace( "%%endpoint%%", "upload_file" ), maxNumberOfFiles: 1, formData: { script: true diff --git a/assets/js/ajax-file-upload.min.js b/assets/js/ajax-file-upload.min.js index 939dbbca5..017092cb2 100644 --- a/assets/js/ajax-file-upload.min.js +++ b/assets/js/ajax-file-upload.min.js @@ -1 +1 @@ -jQuery(function(a){a(".wp-job-manager-file-upload").each(function(){a(this).fileupload({dataType:"json",dropZone:a(this),url:job_manager_ajax_filters.ajax_url.toString().replace("%%endpoint%%","upload_file"),maxNumberOfFiles:1,formData:{script:!0},add:function(b,c){var d=a(this),e=d.closest("form"),f=d.parent().find(".job-manager-uploaded-files"),g=[],h=a(this).data("file_types");if(h){var i=new RegExp("(.|/)("+h+")$","i");c.originalFiles[0].name.length&&!i.test(c.originalFiles[0].name)&&g.push(job_manager_ajax_file_upload.i18n_invalid_file_type+" "+h)}g.length>0?alert(g.join("\n")):(e.find(':input[type="submit"]').attr("disabled","disabled"),c.context=a('').appendTo(f),c.submit())},progress:function(b,c){var d=a(this),e=(d.parent().find(".job-manager-uploaded-files"),parseInt(c.loaded/c.total*100,10));c.context.val(e)},fail:function(b,c){var d=a(this),e=d.closest("form");e.find(':input[type="submit"]').removeAttr("disabled")},done:function(b,c){var d=a(this),e=d.closest("form"),f=d.parent().find(".job-manager-uploaded-files"),g=d.attr("multiple")?1:0,h=["jpg","gif","png","jpeg","jpe"];c.context.remove(),a.each(c.result.files,function(b,c){if(c.error)alert(c.error);else{if(a.inArray(c.extension,h)>=0){var e=a.parseHTML(job_manager_ajax_file_upload.js_field_html_img);a(e).find(".job-manager-uploaded-file-preview img").attr("src",c.url)}else{var e=a.parseHTML(job_manager_ajax_file_upload.js_field_html);a(e).find(".job-manager-uploaded-file-name code").text(c.name)}a(e).find(".input-text").val(c.url),a(e).find(".input-text").attr("name","current_"+d.attr("name")),g?f.append(e):f.html(e)}}),e.find(':input[type="submit"]').removeAttr("disabled")}})})}); \ No newline at end of file +jQuery(function(a){a(".wp-job-manager-file-upload").each(function(){a(this).fileupload({dataType:"json",dropZone:a(this),url:job_manager_ajax_file_upload.ajax_url.toString().replace("%%endpoint%%","upload_file"),maxNumberOfFiles:1,formData:{script:!0},add:function(b,c){var d=a(this),e=d.closest("form"),f=d.parent().find(".job-manager-uploaded-files"),g=[],h=a(this).data("file_types");if(h){var i=new RegExp("(.|/)("+h+")$","i");c.originalFiles[0].name.length&&!i.test(c.originalFiles[0].name)&&g.push(job_manager_ajax_file_upload.i18n_invalid_file_type+" "+h)}g.length>0?alert(g.join("\n")):(e.find(':input[type="submit"]').attr("disabled","disabled"),c.context=a('').appendTo(f),c.submit())},progress:function(b,c){var d=a(this),e=(d.parent().find(".job-manager-uploaded-files"),parseInt(c.loaded/c.total*100,10));c.context.val(e)},fail:function(b,c){var d=a(this),e=d.closest("form");e.find(':input[type="submit"]').removeAttr("disabled")},done:function(b,c){var d=a(this),e=d.closest("form"),f=d.parent().find(".job-manager-uploaded-files"),g=d.attr("multiple")?1:0,h=["jpg","gif","png","jpeg","jpe"];c.context.remove(),a.each(c.result.files,function(b,c){if(c.error)alert(c.error);else{if(a.inArray(c.extension,h)>=0){var e=a.parseHTML(job_manager_ajax_file_upload.js_field_html_img);a(e).find(".job-manager-uploaded-file-preview img").attr("src",c.url)}else{var e=a.parseHTML(job_manager_ajax_file_upload.js_field_html);a(e).find(".job-manager-uploaded-file-name code").text(c.name)}a(e).find(".input-text").val(c.url),a(e).find(".input-text").attr("name","current_"+d.attr("name")),g?f.append(e):f.html(e)}}),e.find(':input[type="submit"]').removeAttr("disabled")}})})}); \ No newline at end of file diff --git a/readme.txt b/readme.txt index 1930b9465..e67fb495b 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mike.jol Tags: job manager, job listing, job board, job management, job lists, job list, job, jobs, company, hiring, employment, employer, employees, candidate, freelance, internship, job listings, positions, board, application, hiring, listing, manager, recruiting, recruitment, talent Requires at least: 4.1 Tested up to: 4.2 -Stable tag: 1.23.5 +Stable tag: 1.23.6 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -142,6 +142,9 @@ You can view (and contribute) translations via the [Transifex project here](http == Changelog == += 1.23.6 = +* Fix - job_manager_ajax_filters -> job_manager_ajax_file_upload in file upload script. + = 1.23.5 = * Feature - Allow [job_summary] to output multiple listings via 'limit' parameter. * Feature - Added flowplayer support. diff --git a/wp-job-manager.php b/wp-job-manager.php index b40582297..0ff114c73 100644 --- a/wp-job-manager.php +++ b/wp-job-manager.php @@ -3,7 +3,7 @@ Plugin Name: WP Job Manager Plugin URI: https://wpjobmanager.com/ Description: Manage job listings from the WordPress admin panel, and allow users to post jobs directly to your site. -Version: 1.23.5 +Version: 1.23.6 Author: Mike Jolley Author URI: http://mikejolley.com Requires at least: 4.1 @@ -31,7 +31,7 @@ class WP_Job_Manager { */ public function __construct() { // Define constants - define( 'JOB_MANAGER_VERSION', '1.23.5' ); + define( 'JOB_MANAGER_VERSION', '1.23.6' ); define( 'JOB_MANAGER_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'JOB_MANAGER_PLUGIN_URL', untrailingslashit( plugins_url( basename( plugin_dir_path( __FILE__ ) ), basename( __FILE__ ) ) ) );