Changeset 1072291
- Timestamp:
- 01/21/2015 07:09:20 AM (11 years ago)
- Location:
- work-the-flow-file-upload/trunk
- Files:
-
- 8 edited
-
README.txt (modified) (3 diffs)
-
admin/class-wtf-fu-admin.php (modified) (1 diff)
-
public/assets/js/wtf-fu-file-upload.js (modified) (2 diffs)
-
public/assets/js/wtf-fu-workflow.js (modified) (3 diffs)
-
public/class-wtf-fu.php (modified) (5 diffs)
-
public/includes/class-wtf-fu-fileupload-shortcode.php (modified) (3 diffs)
-
public/includes/class-wtf-fu-show-files-shortcode.php (modified) (2 diffs)
-
work-the-flow-file-upload.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
work-the-flow-file-upload/trunk/README.txt
r988003 r1072291 4 4 Tags: file upload, upload, workflow, html5, image, gallery 5 5 Requires at least: 3.5.1 6 Tested up to: 4. 07 Stable tag: 2. 4.16 Tested up to: 4.1 7 Stable tag: 2.5.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 325 325 326 326 == Changelog == 327 = 2.5.0 = 328 * Fix for IOS and Mac Safari browsers getting stuck on the same stage. (Special thanks to Marie for her detailed help in testing on many platforms). 329 * Note that Mac / Safari 5.x will not work, the minimum required version is 6.04. 330 * Additional security features added. 331 327 332 = 2.4.1 = 328 333 * Fix for generated .htaccess file preventing image display on some servers. … … 467 472 468 473 == Upgrade Notice == 474 = 2.5.0 = 475 * Fix for IOS and Mac Safari browsers getting stuck on the same stage. (Special thanks to Marie for her detailed help in testing on many platforms). 476 * Note that Mac / Safari 5.x will not work, the minimum required version is 6.04. 477 * Additional security features added. 478 469 479 = 2.4.1 = 470 480 * Fix for generated .htaccess file preventing image display on some servers. -
work-the-flow-file-upload/trunk/admin/class-wtf-fu-admin.php
r984253 r1072291 52 52 */ 53 53 private function __construct() { 54 55 //log_me("admin constructor"); 54 56 55 57 $plugin = Wtf_Fu::get_instance(); -
work-the-flow-file-upload/trunk/public/assets/js/wtf-fu-file-upload.js
r907953 r1072291 10 10 // Capture form data fields to pass on to ajax request as POST vars. 11 11 var WtfFuUploadFormData = $("#fileupload").serializeArray(); 12 12 13 // add in the nonce to the request data. 14 WtfFuUploadFormData.push({name : "security", value : WtfFuAjaxVars.security}); 15 16 // console.log(WtfFuUploadFormData); 13 17 // Initialize the jQuery File Upload widget: 14 18 $('#fileupload').fileupload({ … … 29 33 30 34 $.ajax({ 31 url: WtfFuAjaxVars.url, // $('#fileupload').fileupload('option', 'url'),32 data: WtfFuUploadFormData, // serialized form fields,35 url: WtfFuAjaxVars.url, 36 data: WtfFuUploadFormData, 33 37 dataType: 'json', 34 38 context: $('#fileupload')[0] -
work-the-flow-file-upload/trunk/public/assets/js/wtf-fu-workflow.js
r954842 r1072291 20 20 if (item.querySelector('#accordion') !== null) { 21 21 wtf_accordion_init(); 22 } 23 22 } 24 23 //console.log(item); 25 24 } … … 33 32 observer.observe(target, config); 34 33 34 var clicked_name; 35 var clicked_value; 36 37 $(document).on('click' , '#workflow_submit_button', function(event) { 38 clicked_name = $(this).attr('name'); 39 clicked_value = $(this).val(); 40 console.log("clicked called"); 41 }); 35 42 36 43 $(document).on('submit', '#wtf_workflow_form', function(event) { 37 38 // The selected button that submitted the form.39 var btn = $(":input[type=submit]:focus");40 44 41 45 $(":input[type='submit']").attr("disabled", true); … … 46 50 workflow_id: this.workflow_id.value, 47 51 stage: this.stage.value, 48 button_name: btn.attr('name'),49 button_value: btn.val()52 button_name: clicked_name, 53 button_value: clicked_value 50 54 }; 51 55 -
work-the-flow-file-upload/trunk/public/class-wtf-fu.php
r988003 r1072291 44 44 * @var string 45 45 */ 46 const VERSION = '2. 4.1';46 const VERSION = '2.5.0'; 47 47 48 48 /** … … 67 67 private function __construct() { 68 68 69 // log_me('__construct Wtf_Fu ');69 // log_me('__construct Wtf_Fu '); 70 70 //log_me('memory=' . memory_get_usage(true) . "\n"); 71 71 //log_me('peak memory=' . memory_get_peak_usage(true) . "\n"); … … 95 95 // Short code hooks to methods which instantiate the required shortcode 96 96 // handler classes and return the handler output. 97 add_shortcode('wtf_fu', array($this, 'wtf_fu_shortcode')); 97 add_shortcode('wtf_fu', array($this, 'wtf_fu_shortcode')); 98 98 add_shortcode('wtf_fu_upload', array($this, 'file_upload_shortcode')); 99 99 add_shortcode('wtf_fu_show_files', array($this, 'show_files_shortcode')); … … 437 437 wp_enqueue_script($fileupload_handle); 438 438 439 $ret = wp_localize_script($fileupload_handle, 'WtfFuAjaxVars', array('url' => admin_url('admin-ajax.php'), 440 'absoluteurl' => wtf_fu_JQUERY_FILE_UPLOAD_URL . 'cors/result.html?%s' 439 $ret = wp_localize_script($fileupload_handle, 'WtfFuAjaxVars', 440 array( 441 'url' => admin_url('admin-ajax.php'), 442 'absoluteurl' => wtf_fu_JQUERY_FILE_UPLOAD_URL . 'cors/result.html?%s', 443 'security' => wp_create_nonce('wtf_fu_upload_nonce') 441 444 )); 442 445 … … 464 467 465 468 function file_upload_shortcode($attr) { 469 // log_me("upload_shortcode hook fired"); 466 470 $shortcode_instance = new Wtf_Fu_Fileupload_Shortcode($attr); 467 471 $content = $shortcode_instance->generate_content(); -
work-the-flow-file-upload/trunk/public/includes/class-wtf-fu-fileupload-shortcode.php
r984253 r1072291 42 42 43 43 public static function wtf_fu_load_ajax_function() { 44 45 // log_me(array("ajax handler REQUEST:" => $_REQUEST)); 46 check_ajax_referer( 'wtf_fu_upload_nonce', 'security' ); 44 47 45 48 ob_start(); … … 209 212 $options['action'] = 'load_ajax_function'; 210 213 214 211 215 // 212 216 // Put unmassaged options into POST vars for subsequent posts of … … 217 221 $form_vars = $form_vars . '<input type="hidden" name="' . $k . '" value="' . $v . '" />'; 218 222 }; 223 224 225 226 // log_me(array("form created"=>$form_vars)); 219 227 220 228 // The form action MUST be the wp admin hander which will then delegate -
work-the-flow-file-upload/trunk/public/includes/class-wtf-fu-show-files-shortcode.php
r954842 r1072291 65 65 , $attr); 66 66 67 68 /* 69 * Get files for ALL users if so requested. 70 */ 71 // if ($this->options['show_files_for_all_users'] === true) { 72 // $globstr = '/[0-9]+/' . wp_upload_dir() . $this->options['wtf_upload_dir']; 73 // 74 // if (!empty($this->options['wtf_upload_subdir'])) { 75 // $globstr .= "/{$this->options['wtf_upload_subdir']}"; 76 // } 77 // $filearray = glob( $globstr . '/*'); 78 // } 79 67 80 /* 68 81 * Current User upload directory paths. … … 70 83 $this->paths = wtf_fu_get_user_upload_paths($this->options['wtf_upload_dir'], $this->options['wtf_upload_subdir'], 0, $this->options['use_public_dir']); 71 84 72 log_me(array("showfiles paths="=>$this->paths));73 log_me("use_public_dir = {$this->options['use_public_dir']}");85 //log_me(array("showfiles paths="=>$this->paths)); 86 //log_me("use_public_dir = {$this->options['use_public_dir']}"); 74 87 75 88 /* -
work-the-flow-file-upload/trunk/work-the-flow-file-upload.php
r988003 r1072291 5 5 * Plugin URI: http://wtf-fu.com 6 6 * Description: Front end Html5 File Upload and configurable Workflow steps. Multiple file drag and drop, gallery image display, file reordering and archiving. 7 * Version: 2. 4.17 * Version: 2.5.0 8 8 * Author: Lynton Reed 9 9 * Author URI: http://wtf-fu.com … … 77 77 * because of a front end AJAX call. 78 78 */ 79 //if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {80 if ( is_admin() ) {79 if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) { 80 //if ( is_admin() ) { 81 81 require_once( plugin_dir_path( __FILE__ ) . 'admin/class-wtf-fu-admin.php' ); 82 82 add_action( 'plugins_loaded', array( 'Wtf_Fu_Admin', 'get_instance' ) );
Note: See TracChangeset
for help on using the changeset viewer.