Plugin Directory

Changeset 914770


Ignore:
Timestamp:
05/15/2014 05:03:41 PM (12 years ago)
Author:
rafdizzle86
Message:

Updated stable tag

Location:
smartpost-templates
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • smartpost-templates/tags/2.3.2/components/attachments/js/sp_postAttachments.js

    r914739 r914770  
    4646         * @param postID
    4747         */
    48         initFileDrop: function(component, postID){
     48        initFileDrop: function( component ){
    4949            var self = this;
    5050            var compID = component.data('compid');
     
    5555            // Get a handle onto the previous unload event as our message will change throughout upload
    5656            var prev_onbeforeunload = window.onbeforeunload;
    57 
    58             if(postID == undefined){
    59                 postID = jQuery('#postID').val(); // Single post
    60                 if(postID == undefined){
    61                     postID = jQuery('#sp_qpPostID').val(); // Using the quickpost widget
    62                 }
    63             }
    6457
    6558            var uploader = new plupload.Uploader({
     
    7871                    action  : 'attachmentsUploadAJAX',
    7972                    nonce   : SP_NONCE,
    80                     compID  : compID,
    81                     postID  : postID
     73                    compID  : compID
    8274                },
    8375                max_file_size : '1gb',
     
    196188            // Init plupload file drop for the drop zones
    197189            $( '.sp-attachments-uploads-row' ).each(function(){
    198                 self.initFileDrop( $(this), null );
     190                self.initFileDrop( $(this) );
    199191            });
    200192
  • smartpost-templates/tags/2.3.2/components/gallery/js/sp_postGallery.js

    r914739 r914770  
    4444         * @param object component The gallery component
    4545         */
    46         initFileDrop: function(component, postID){
     46        initFileDrop: function( component ){
    4747            var self = this;
    4848            var compID = component.data('compid');
    4949            var browse_id = 'sp-gallery-upload-' + compID;
    5050            var prev_onbeforeunload = window.onbeforeunload;
    51 
    52             if(postID == undefined){
    53                 postID = jQuery('#postID').val();
    54                 if(postID == undefined){
    55                     postID = jQuery('#sp_qpPostID').val();
    56                 }
    57             }
    5851
    5952            var uploader = new plupload.Uploader({
     
    7265                    action  : 'galleryUploadAJAX',
    7366                    nonce   : SP_NONCE,
    74                     compID  : compID,
    75                     postID  : postID
     67                    compID  : compID
    7668                },
    7769                max_file_size : '1gb',
  • smartpost-templates/tags/2.3.2/components/photo/ajax/sp_postPhotoAJAX.php

    r914739 r914770  
    136136                }
    137137
    138 
    139 
    140138                $name = '';
    141139                if ( isset( $_REQUEST["name"] ) ) {
  • smartpost-templates/tags/2.3.2/components/photo/js/sp_postPhoto.js

    r914739 r914770  
    4343         * @param object component The photo component
    4444         */
    45         initFileDrop: function(component, postID){
     45        initFileDrop: function( component ){
    4646            var self = this;
    4747            var compID = component.data('compid');
    4848            var browse_id = 'sp-photo-upload-' + compID;
    4949            var prev_onbeforeunload = window.onbeforeunload;
    50 
    51             if(postID == undefined){
    52                 postID = jQuery('#postID').val();
    53                 if(postID == undefined){
    54                     postID = jQuery('#sp_qpPostID').val();
    55                 }
    56             }
    5750
    5851            var uploader = new plupload.Uploader({
     
    7164                    action  : 'photoUploadAJAX',
    7265                    nonce   : SP_NONCE,
    73                     compID  : compID,
    74                     postID  : postID
     66                    compID  : compID
    7567                },
    7668                max_file_size : '1gb',
  • smartpost-templates/tags/2.3.2/components/video/ajax/sp_postVideoAJAX.php

    r914739 r914770  
    102102            }
    103103
    104             if( empty($_POST['postID']) ){
    105                 header("HTTP/1.0 409 Could find post ID.");
    106                 exit;
    107             }
    108 
    109104            if(empty($_FILES)){
    110105                header("HTTP/1.0 409 Files uploaded are empty!");
  • smartpost-templates/tags/2.3.2/components/video/js/sp_postVideo.js

    r914739 r914770  
    3232        /**
    3333         * Initializes HTML5 filedrop for the media component
    34          * @param object component The video compoennt
    35          * @param int    postID    The PostID
     34         * @param component - The video compoennt
    3635         * @see $plupload_init array in /wp-admin/includes/media.php
    3736         */
    38         initFileDrop: function(component, postID){
     37        initFileDrop: function( component ){
    3938            var self = this;
    4039            var compID    = component.attr('data-compid');
    4140            var browse_id = 'sp_videoBrowse-' + compID;
    4241            var prev_onbeforeunload = window.onbeforeunload;
    43 
    44             if(postID == undefined){
    45                 postID = jQuery('#postID').val();
    46                 if(postID == undefined){
    47                     postID = jQuery('#sp_qpPostID').val();
    48                 }
    49             }
    5042
    5143            var videoFilters;
     
    7870                    action  : 'videoUploadAJAX',
    7971                    nonce   : SP_NONCE,
    80                     compID  : compID,
    81                     postID  : postID
     72                    compID  : compID
    8273                },
    8374                max_file_size : '1gb',
     
    223214
    224215            $('.sp_video').each(function(){
    225                 self.initFileDrop($(this));
     216                self.initFileDrop( $(this) );
    226217            });
    227218        }
  • smartpost-templates/tags/2.3.2/widgets/js/sp_quickPostWidget.js

    r914739 r914770  
    8484                            post_title: title
    8585                        },
     86                        dataType: 'json',
    8687                        success: function(response, statusText, jqXHR){
    87                             //Refresh the page
    8888                            if( response.permalink ){
    8989                                window.location.replace( response.permalink );
  • smartpost-templates/trunk/components/attachments/js/sp_postAttachments.js

    r914746 r914770  
    4646         * @param postID
    4747         */
    48         initFileDrop: function(component, postID){
     48        initFileDrop: function( component ){
    4949            var self = this;
    5050            var compID = component.data('compid');
     
    5555            // Get a handle onto the previous unload event as our message will change throughout upload
    5656            var prev_onbeforeunload = window.onbeforeunload;
    57 
    58             if(postID == undefined){
    59                 postID = jQuery('#postID').val(); // Single post
    60                 if(postID == undefined){
    61                     postID = jQuery('#sp_qpPostID').val(); // Using the quickpost widget
    62                 }
    63             }
    6457
    6558            var uploader = new plupload.Uploader({
     
    7871                    action  : 'attachmentsUploadAJAX',
    7972                    nonce   : SP_NONCE,
    80                     compID  : compID,
    81                     postID  : postID
     73                    compID  : compID
    8274                },
    8375                max_file_size : '1gb',
     
    196188            // Init plupload file drop for the drop zones
    197189            $( '.sp-attachments-uploads-row' ).each(function(){
    198                 self.initFileDrop( $(this), null );
     190                self.initFileDrop( $(this) );
    199191            });
    200192
  • smartpost-templates/trunk/components/gallery/js/sp_postGallery.js

    r914746 r914770  
    4444         * @param object component The gallery component
    4545         */
    46         initFileDrop: function(component, postID){
     46        initFileDrop: function( component ){
    4747            var self = this;
    4848            var compID = component.data('compid');
    4949            var browse_id = 'sp-gallery-upload-' + compID;
    5050            var prev_onbeforeunload = window.onbeforeunload;
    51 
    52             if(postID == undefined){
    53                 postID = jQuery('#postID').val();
    54                 if(postID == undefined){
    55                     postID = jQuery('#sp_qpPostID').val();
    56                 }
    57             }
    5851
    5952            var uploader = new plupload.Uploader({
     
    7265                    action  : 'galleryUploadAJAX',
    7366                    nonce   : SP_NONCE,
    74                     compID  : compID,
    75                     postID  : postID
     67                    compID  : compID
    7668                },
    7769                max_file_size : '1gb',
  • smartpost-templates/trunk/components/photo/ajax/sp_postPhotoAJAX.php

    r914746 r914770  
    136136                }
    137137
    138 
    139 
    140138                $name = '';
    141139                if ( isset( $_REQUEST["name"] ) ) {
  • smartpost-templates/trunk/components/photo/js/sp_postPhoto.js

    r914746 r914770  
    4343         * @param object component The photo component
    4444         */
    45         initFileDrop: function(component, postID){
     45        initFileDrop: function( component ){
    4646            var self = this;
    4747            var compID = component.data('compid');
    4848            var browse_id = 'sp-photo-upload-' + compID;
    4949            var prev_onbeforeunload = window.onbeforeunload;
    50 
    51             if(postID == undefined){
    52                 postID = jQuery('#postID').val();
    53                 if(postID == undefined){
    54                     postID = jQuery('#sp_qpPostID').val();
    55                 }
    56             }
    5750
    5851            var uploader = new plupload.Uploader({
     
    7164                    action  : 'photoUploadAJAX',
    7265                    nonce   : SP_NONCE,
    73                     compID  : compID,
    74                     postID  : postID
     66                    compID  : compID
    7567                },
    7668                max_file_size : '1gb',
  • smartpost-templates/trunk/components/video/ajax/sp_postVideoAJAX.php

    r914746 r914770  
    102102            }
    103103
    104             if( empty($_POST['postID']) ){
    105                 header("HTTP/1.0 409 Could find post ID.");
    106                 exit;
    107             }
    108 
    109104            if(empty($_FILES)){
    110105                header("HTTP/1.0 409 Files uploaded are empty!");
  • smartpost-templates/trunk/components/video/js/sp_postVideo.js

    r914746 r914770  
    3232        /**
    3333         * Initializes HTML5 filedrop for the media component
    34          * @param object component The video compoennt
    35          * @param int    postID    The PostID
     34         * @param component - The video compoennt
    3635         * @see $plupload_init array in /wp-admin/includes/media.php
    3736         */
    38         initFileDrop: function(component, postID){
     37        initFileDrop: function( component ){
    3938            var self = this;
    4039            var compID    = component.attr('data-compid');
    4140            var browse_id = 'sp_videoBrowse-' + compID;
    4241            var prev_onbeforeunload = window.onbeforeunload;
    43 
    44             if(postID == undefined){
    45                 postID = jQuery('#postID').val();
    46                 if(postID == undefined){
    47                     postID = jQuery('#sp_qpPostID').val();
    48                 }
    49             }
    5042
    5143            var videoFilters;
     
    7870                    action  : 'videoUploadAJAX',
    7971                    nonce   : SP_NONCE,
    80                     compID  : compID,
    81                     postID  : postID
     72                    compID  : compID
    8273                },
    8374                max_file_size : '1gb',
     
    223214
    224215            $('.sp_video').each(function(){
    225                 self.initFileDrop($(this));
     216                self.initFileDrop( $(this) );
    226217            });
    227218        }
  • smartpost-templates/trunk/widgets/js/sp_quickPostWidget.js

    r914746 r914770  
    8484                            post_title: title
    8585                        },
     86                        dataType: 'json',
    8687                        success: function(response, statusText, jqXHR){
    87                             //Refresh the page
    8888                            if( response.permalink ){
    8989                                window.location.replace( response.permalink );
Note: See TracChangeset for help on using the changeset viewer.