Plugin Directory

Changeset 2868132


Ignore:
Timestamp:
02/20/2023 11:24:26 AM (2 years ago)
Author:
soflyy
Message:

Release a new version

Location:
wp-all-export
Files:
426 added
30 edited

Legend:

Unmodified
Added
Removed
  • wp-all-export/trunk/actions/wp_ajax_scheduling_dialog_content.php

    r2830466 r2868132  
    288288                    updateSaveButtonState();
    289289
    290                     $('input[name="scheduling_enable"]').change(function(){
     290                    $('input[name="scheduling_enable"]').on('change', function(){
    291291                        updateSaveButtonState();
    292292                    });
     
    365365                    };
    366366
    367                     $('#weekly li').click(function () {
     367                    $('#weekly li').on('click', function () {
    368368
    369369                        $('#weekly li').removeClass('error');
     
    386386                    });
    387387
    388                     $('#monthly li').click(function () {
     388                    $('#monthly li').on('click', function () {
    389389
    390390                        $('#monthly li').removeClass('error');
     
    395395                    });
    396396
    397                     $('input[name="scheduling_run_on"]').change(function () {
     397                    $('input[name="scheduling_run_on"]').on('change', function () {
    398398                        var val = $('input[name="scheduling_run_on"]:checked').val();
    399399                        if (val == "weekly") {
     
    440440                    $('#timezone').chosen({width: '284px'});
    441441
    442                     $('.wpae-save-button').click(function (e) {
     442                    $('.wpae-save-button').on('click', function (e) {
    443443
    444444                        var initialValue = $(this).find('.save-text').html();
     
    536536                    var saveSubscription = false;
    537537
    538                     $('#add-subscription').click(function () {
     538                    $('#add-subscription').on('click', function () {
    539539
    540540                        $('#add-subscription-field').show();
     
    553553                    });
    554554
    555                     $('#subscribe-button').click(function () {
     555                    $('#subscribe-button').on('click', function () {
    556556
    557557                        if (saveSubscription) {
     
    619619            });
    620620            // help scheduling template
    621             $('.help_scheduling').click(function () {
     621            $('.help_scheduling').on('click', function () {
    622622
    623623                $('.wp-all-export-scheduling-help').css('left', ($(document).width() / 2) - 255).show();
     
    629629            });
    630630
    631             $('.wp_all_export_scheduling_help').find('h3').unbind('click').click(function () {
     631            $('.wp_all_export_scheduling_help').find('h3').off('click').on('click', function () {
    632632                var $action = $(this).find('span').html();
    633633                $('.wp_all_export_scheduling_help').find('h3').each(function () {
     
    645645            });
    646646
    647             $('.wpallexport-super-overlay').click(function () {
     647            $('.wpallexport-super-overlay').on('click', function () {
    648648                $('.wp-all-export-scheduling-help, .wp-all-export-scheduling-help-inner').hide();
    649649                $('.wp-pointer').show();
  • wp-all-export/trunk/actions/wp_ajax_wpae_filtering.php

    r2654009 r2868132  
    4747    $response['html'] = ob_get_clean();
    4848
    49     if ( (XmlExportEngine::$is_user_export && $post['cpt'] != 'shop_customer' && !$addons->isUserAddonActive()) || XmlExportEngine::$is_comment_export || XmlExportEngine::$is_taxonomy_export || ($post['cpt'] == 'shop_customer' && (!$addons->isUserAddonActive() || PMUE_EDITION != 'paid')) )
     49    if ( (XmlExportEngine::$is_user_export && (isset($post['cpt']) && $post['cpt'] != 'shop_customer') && !$addons->isUserAddonActive()) || XmlExportEngine::$is_comment_export || XmlExportEngine::$is_taxonomy_export || (isset($post['cpt']) && $post['cpt'] == 'shop_customer' && (!$addons->isUserAddonActive() || PMUE_EDITION != 'paid')) )
    5050    {
    5151        $response['btns'] = '';
     
    5353    }
    5454
    55     $cpt = $post['cpt'];
     55    $cpt = $post['cpt'] ?? '';
    5656
    5757    if(!is_array($cpt)) {
  • wp-all-export/trunk/classes/config.php

    r1933403 r2868132  
    8989     * @return array
    9090     */
    91     public function toArray($section = NULL) {
     91    public function toArray($section = NULL): array
     92    {
    9293        return ! is_null($section) ? $this->config[$section]->toArray() : $this->config;
    9394    }
    9495   
    95     public function getIterator() {
     96    public function getIterator(): \Traversable {
    9697        return new ArrayIterator($this->config);
    9798    }
  • wp-all-export/trunk/helpers/pmxe_functions.php

    r2726809 r2868132  
    163163        }
    164164    }
     165
     166
     167if ( ! function_exists( 'wpae_wp_enqueue_code_editor' ) ) {
     168    function wpae_wp_enqueue_code_editor( $args ) {
     169
     170        // We need syntax highlighting to work in the plugin regardless of user setting.
     171        // Function matches https://developer.wordpress.org/reference/functions/wp_enqueue_code_editor/ otherwise.
     172        /*if ( is_user_logged_in() && 'false' === wp_get_current_user()->syntax_highlighting ) {
     173            return false;
     174        }*/
     175
     176        $settings = wp_get_code_editor_settings( $args );
     177
     178        if ( empty( $settings ) || empty( $settings['codemirror'] ) ) {
     179            return false;
     180        }
     181
     182        wp_enqueue_script( 'code-editor' );
     183        wp_enqueue_style( 'code-editor' );
     184
     185        if ( isset( $settings['codemirror']['mode'] ) ) {
     186            $mode = $settings['codemirror']['mode'];
     187            if ( is_string( $mode ) ) {
     188                $mode = array(
     189                    'name' => $mode,
     190                );
     191            }
     192
     193            if ( ! empty( $settings['codemirror']['lint'] ) ) {
     194                switch ( $mode['name'] ) {
     195                    case 'css':
     196                    case 'text/css':
     197                    case 'text/x-scss':
     198                    case 'text/x-less':
     199                        wp_enqueue_script( 'csslint' );
     200                        break;
     201                    case 'htmlmixed':
     202                    case 'text/html':
     203                    case 'php':
     204                    case 'application/x-httpd-php':
     205                    case 'text/x-php':
     206                        wp_enqueue_script( 'htmlhint' );
     207                        wp_enqueue_script( 'csslint' );
     208                        wp_enqueue_script( 'jshint' );
     209                        if ( ! current_user_can( 'unfiltered_html' ) ) {
     210                            wp_enqueue_script( 'htmlhint-kses' );
     211                        }
     212                        break;
     213                    case 'javascript':
     214                    case 'application/ecmascript':
     215                    case 'application/json':
     216                    case 'application/javascript':
     217                    case 'application/ld+json':
     218                    case 'text/typescript':
     219                    case 'application/typescript':
     220                        wp_enqueue_script( 'jshint' );
     221                        wp_enqueue_script( 'jsonlint' );
     222                        break;
     223                }
     224            }
     225        }
     226
     227        wp_add_inline_script( 'code-editor', sprintf( 'jQuery.extend( wp.codeEditor.defaultSettings, %s );', wp_json_encode( $settings ) ) );
     228
     229        /**
     230         * Fires when scripts and styles are enqueued for the code editor.
     231         *
     232         * @param array $settings Settings for the enqueued code editor.
     233         *
     234         * @since 4.9.0
     235         *
     236         */
     237        do_action( 'wp_enqueue_code_editor', $settings );
     238
     239        return $settings;
     240    }
     241}
     242
  • wp-all-export/trunk/readme.txt

    r2861447 r2868132  
    33Requires at least: 5.0
    44Tested up to: 6.1
    5 Stable tag: 1.3.8
     5Stable tag: 1.3.9
    66Tags: export, wordpress csv export, wordpress xml export, export woocommerce, migrate, export csv from wordpress, export xml from wordpress, advanced xml export, advanced csv export, export data, bulk csv export, export custom post type, export woocommerce products, export woocommerce orders, migrate woocommerce, csv export, export csv, xml export, export xml, csv exporter, datafeed
    77
     
    111111
    112112== Changelog ==
     113
     114= 1.3.9 =
     115* improvement: remove deprecated jQuery functions
     116* bug fix: resolve various PHP notices and warnings
     117* bug fix: error on Step 1 when 'Disable syntax highlighting when editing code' User option is enabled
    113118
    114119= 1.3.8 =
  • wp-all-export/trunk/src/Reviews/ReviewsUI.php

    r2698910 r2868132  
    125125            <script type="text/javascript">
    126126                jQuery(document).ready(function () {
    127                     jQuery('.wpae-review-buttons button').click(function (e) {
     127                    jQuery('.wpae-review-buttons button').on('click', function (e) {
    128128
    129129                        e.preventDefault();
     
    143143                    });
    144144
    145                     jQuery('.wpae-reviews-notice .notice-dismiss').click(function(e){
     145                    jQuery('.wpae-reviews-notice .notice-dismiss').on('click', function(e){
    146146
    147147                        e.preventDefault();
     
    164164                    });
    165165
    166                     jQuery('.review-link').click(function(){
     166                    jQuery('.review-link').on('click', function(){
    167167
    168168                        var request = {
     
    184184                    });
    185185
    186                     jQuery('.wpae-submit-feedback button').click(function(){
     186                    jQuery('.wpae-submit-feedback button').on('click', function(){
    187187
    188188                        jQuery(this).prop("disabled", true);
  • wp-all-export/trunk/src/Scheduling/views/CommonJs.php

    r2830466 r2868132  
    99
    1010            // Main accordion logic
    11             $('input[name="scheduling_enable"]').change(function () {
     11            $('input[name="scheduling_enable"]').on('change', function () {
    1212                if ($('input[name="scheduling_enable"]:checked').val() == 1) {
    1313                    $('#automatic-scheduling').slideDown();
  • wp-all-export/trunk/src/Scheduling/views/SchedulingOptions.php

    r2830466 r2868132  
    298298
    299299
    300                 $('#weekly li').click(function () {
     300                $('#weekly li').on('click', function () {
    301301
    302302                    $('#weekly li').removeClass('error');
     
    319319                });
    320320
    321                 $('#monthly li').click(function () {
     321                $('#monthly li').on('click', function () {
    322322
    323323                    $('#monthly li').removeClass('error');
     
    328328                });
    329329
    330                 $('input[name="scheduling_run_on"]').change(function () {
     330                $('input[name="scheduling_run_on"]').on('change', function () {
    331331                    var val = $('input[name="scheduling_run_on"]:checked').val();
    332332                    if (val == "weekly") {
     
    374374
    375375
    376                 $('.wpae-save-button').click(function (e) {
     376                $('.wpae-save-button').on('click', function (e) {
    377377
    378378                    var initialValue = $(this).find('.save-text').html();
     
    439439                });
    440440
    441                 $('.wp_all_export_confirm_and_run').click(function(e){
     441                $('.wp_all_export_confirm_and_run').on('click', function(e){
    442442
    443443                    e.preventDefault();
     
    513513                        return false;
    514514                    } else {
    515                         $('form.choose-export-options').submit();
     515                        $('form.choose-export-options').trigger('submit');
    516516
    517517                    }
     
    543543                var saveSubscription = false;
    544544
    545                 $('#add-subscription').click(function(){
     545                $('#add-subscription').on('click', function(){
    546546
    547547                    $('#add-subscription-field').show();
     
    561561                });
    562562
    563                 $('#subscribe-button').click(function(){
     563                $('#subscribe-button').on('click', function(){
    564564
    565565                    if(saveSubscription) {
     
    621621            });
    622622            // help scheduling template
    623             $('.help_scheduling').click(function(){
     623            $('.help_scheduling').on('click', function(){
    624624
    625625                $('.wp-all-export-scheduling-help').css('left', ($( document ).width()/2) - 255 ).show();
     
    629629            });
    630630
    631             $('.wp_all_export_scheduling_help').find('h3').click(function(){
     631            $('.wp_all_export_scheduling_help').find('h3').on('click', function(){
    632632                var $action = $(this).find('span').html();
    633633                $('.wp_all_export_scheduling_help').find('h3').each(function(){
  • wp-all-export/trunk/src/Scheduling/views/SchedulingUI.php

    r2830466 r2868132  
    301301                };
    302302
    303                 $('#weekly li').click(function () {
     303                $('#weekly li').on('click', function () {
    304304
    305305                    $('#weekly li').removeClass('error');
     
    322322                });
    323323
    324                 $('#monthly li').click(function () {
     324                $('#monthly li').on('click', function () {
    325325
    326326                    $('#monthly li').removeClass('error');
     
    331331                });
    332332
    333                 $('input[name="scheduling_run_on"]').change(function () {
     333                $('input[name="scheduling_run_on"]').on('change', function () {
    334334                    var val = $('input[name="scheduling_run_on"]:checked').val();
    335335                    if (val == "weekly") {
     
    376376                $('#timezone').chosen({width: '320px'});
    377377
    378                 $('.wpae-export-complete-save-button').click(function (e) {
     378                $('.wpae-export-complete-save-button').on('click', function (e) {
    379379
    380380                    if($('.wpae-save-button').hasClass('disabled')) {
     
    445445                var saveSubscription = false;
    446446
    447                 $('#add-subscription').click(function(){
     447                $('#add-subscription').on('click', function(){
    448448
    449449                    $('#add-subscription-field').show();
     
    462462                });
    463463
    464                 $('#subscribe-button').click(function(){
     464                $('#subscribe-button').on('click', function(){
    465465
    466466                    if(saveSubscription) {
     
    521521            });
    522522            // help scheduling template
    523             $('.help_scheduling').click(function(){
     523            $('.help_scheduling').on('click', function(){
    524524
    525525                $('.wp-all-export-scheduling-help').css('left', ($( document ).width()/2) - 255 ).show();
     
    529529            });
    530530
    531             $('.wp_all_export_scheduling_help').find('h3').click(function(){
     531            $('.wp_all_export_scheduling_help').find('h3').on('click', function(){
    532532                var $action = $(this).find('span').html();
    533533                $('.wp_all_export_scheduling_help').find('h3').each(function(){
  • wp-all-export/trunk/src/WordPress/SitewideAdminDismissibleNotice.php

    r2654009 r2868132  
    1919        <script type="text/javascript">
    2020            jQuery(document).ready(function(){
    21                 jQuery('.wpae-general-notice-dismiss').click(function(){
     21                jQuery('.wpae-general-notice-dismiss').on('click', function(){
    2222
    2323                    var $parent = jQuery(this).parent();
  • wp-all-export/trunk/static/css/admin.css

    r2830466 r2868132  
    45704570    100% { -o-origin-transform: translate(0px); }
    45714571}
     4572
     4573/*
     4574    New footer styles.
     4575 */
     4576.wpallexport-plugin .wpallexport-cta-text-link {
     4577    display: flex;
     4578    justify-content: right;
     4579    align-content: center;
     4580    flex-wrap: wrap;
     4581    flex-direction: row;
     4582    font-size: 13px;
     4583}
     4584
     4585.wpallexport-plugin .wpallexport-negative-margin .wpallexport-cta-text-link {
     4586    margin-top: -45px;
     4587}
     4588
     4589.wpallexport-plugin .wpallexport-negative-margin.sixty .wpallexport-cta-text-link {
     4590    margin-top: -60px;
     4591}
     4592
     4593.wpallexport-plugin .wpallexport-cta-text-link img {
     4594    padding-top: 14px;
     4595    padding-bottom: 10px;
     4596    padding-right: 5px;
     4597    height: 15px;
     4598}
     4599
     4600.wpallexport-plugin .wpallexport-footer {
     4601    display: flex;
     4602    justify-content: center;
     4603    flex-direction: column-reverse;
     4604}
     4605
     4606.wpallexport-plugin .wpallexport-negative-margin.sixty .wpallexport-footer {
     4607    margin-top: -60px;
     4608}
     4609
     4610.wpallexport-plugin .wpallexport-negative-margin.fifteen .wpallexport-footer {
     4611    margin-top: -15px;
     4612}
     4613
     4614.wpallexport-plugin .wpallexport-display-columns .wpallexport-footer div {
     4615    width: 33%;
     4616}
     4617
     4618.wpallexport-plugin .wpallexport-display-columns .wpallexport-footer{
     4619    flex-direction: row;
     4620}
     4621
     4622.wpallexport-plugin .wpallexport-display-columns .wpallexport-footer .wpallexport-soflyy {
     4623    margin-bottom: 15px;
     4624}
     4625
     4626.wpallexport-plugin .wpallexport-margin-top-forty .wpallexport-footer {
     4627    margin-top: 40px;
     4628}
  • wp-all-export/trunk/static/js/admin.js

    r2830466 r2868132  
    137137        $('.wpallexport-xml-options').show();
    138138        $('input[name=export_to]').val('xml');
    139         $('.xml_template_type').change();
     139        $('.xml_template_type').trigger('change');
    140140
    141141        $('.wpallexport-csv-advanced-options').css('display', 'none');
     
    264264    initDraggable();
    265265   
    266     $('.export_variations').change(function(){
     266    $('.export_variations').on('change', function(){
    267267        setTimeout(liveFiltering, 200);
    268268        $('.wp-all-export-product-bundle-warning').hide();
     
    313313        html: true,
    314314        opacity: 1
    315     }).click(function () {
     315    }).on('click', function () {
    316316        return false;
    317317    }).each(function () { // fix tipsy title for IE
     
    366366
    367367    // swither show/hide logic
    368     $('input.switcher').change(function (e) {
     368    $('input.switcher').on('change', function (e) {
    369369
    370370        if ($(this).is(':radio:checked')) {
    371             $(this).parents('form').find('input.switcher:radio[name="' + $(this).attr('name') + '"]').not(this).change();
     371            $(this).parents('form').find('input.switcher:radio[name="' + $(this).attr('name') + '"]').not(this).trigger('change');
    372372        }
    373373        var $switcherID = $(this).attr('id');
     
    382382            $targets.hide().find('.clear-on-switch').add($targets.filter('.clear-on-switch')).val('');
    383383        }
    384     }).change();
    385 
    386 
    387     $('input#enable_real_time_exports').click(function(e){
     384    }).trigger('change');
     385
     386
     387    $('input#enable_real_time_exports').on('click', function(e){
    388388        $('.wpallexport-free-edition-notice.php-rte-upgrade').slideDown();
    389389
     
    402402    });
    403403
    404     $('input#export_only_new_stuff').click(function(e){
     404    $('input#export_only_new_stuff').on('click', function(e){
    405405        $('.wpallexport-free-edition-notice.only-export-posts-once').slideDown();
    406406
     
    418418    });
    419419
    420     $('input#export_only_modified_stuff').click(function(e){
     420    $('input#export_only_modified_stuff').on('click', function(e){
    421421        $('.wpallexport-free-edition-notice.only-export-modified-posts').slideDown();
    422422
     
    434434    });
    435435
    436     $('input#allow_client_mode').click(function(e){
     436    $('input#allow_client_mode').on('click', function(e){
    437437        $('.wpallexport-free-edition-notice.client-mode-notice').slideDown();
    438438
     
    455455
    456456    // swither show/hide logic
    457     $('input.switcher-horizontal').change('change', function (e) {
     457    $('input.switcher-horizontal').on('change', function (e) {
    458458
    459459        if ($(this).is(':checked')) {
    460             $(this).parents('form').find('input.switcher-horizontal[name="' + $(this).attr('name') + '"]').not(this).change();
     460            $(this).parents('form').find('input.switcher-horizontal[name="' + $(this).attr('name') + '"]').not(this).trigger('change');
    461461        }
    462462        var $targets = $('.switcher-target-' + $(this).attr('id'));
     
    469469            $targets.animate({width:'0px'}, 1000).find('.clear-on-switch').add($targets.filter('.clear-on-switch')).val('');
    470470        }
    471     }).change();
     471    }).trigger('change');
    472472
    473473    // autoselect input content on click
     
    482482    // choose file form: option selection dynamic
    483483    // options form: highlight options of selected post type
    484     $('form.choose-post-type input[name="type"]').click(function() {
     484    $('form.choose-post-type input[name="type"]').on('click', function() {
    485485        var $container = $(this).parents('.file-type-container');
    486486        $('.file-type-container').not($container).removeClass('selected').find('.file-type-options').hide();
    487487        $container.addClass('selected').find('.file-type-options').show();
    488     }).filter(':checked').click();
     488    }).filter(':checked').trigger('click');
    489489
    490490    $('.wpallexport-collapsed').each(function(){
     
    887887        var formHeight = $wrap.height();
    888888
    889         $('.wpallexport-import-from').click(function(){
     889        $('.wpallexport-import-from').on('click', function(){
    890890
    891891            var showImportType = false;
     
    999999        });
    10001000
    1001         $('.wpallexport-import-from.selected').click();
     1001        $('.wpallexport-import-from.selected').trigger('click');
    10021002
    10031003        window.wpaeFiltersDisabled = false;
     
    11811181            });
    11821182
    1183             $(this).parents('form:first').submit();
    1184         });
    1185 
    1186         $('form.wpallexport-choose-file').find('input[type=submit]').click(function(e){
     1183            $(this).parents('form:first').trigger('submit');
     1184        });
     1185
     1186        $('form.wpallexport-choose-file').find('input[type=submit]').on('click', function(e){
    11871187            e.preventDefault();
    11881188
     
    11941194            });
    11951195
    1196             $(this).parents('form:first').submit();
     1196            $(this).parents('form:first').trigger('submit');
    11971197        });
    11981198
     
    12601260            }
    12611261        });
    1262         $('.open-plugin-details-modal').click(function(){
     1262        $('.open-plugin-details-modal').on('click', function(){
    12631263            var request = {
    12641264                action: 'redirect_after_addon_installed',
     
    14661466
    14671467        // Add Another btn click
    1468         $addAnother.click(function(){
     1468        $addAnother.on('click', function(){
    14691469
    14701470            $addAnotherForm.find('form')[0].reset();
     
    14991499            $addAnotherForm.find('select[name=column_value_type]').find('option').each(function(){
    15001500                if ($(this).val() == 'id')
    1501                     $(this).attr({'selected':'selected'}).click();
     1501                    $(this).attr({'selected':'selected'}).trigger('click');
    15021502                else
    15031503                    $(this).removeAttr('selected');
     
    15091509            $('.wpallexport-overlay').show();
    15101510
    1511             $addAnotherForm.find('input.switcher').change();
     1511            $addAnotherForm.find('input.switcher').trigger('change');
    15121512            $addAnotherForm.show();
    15131513
     
    15151515
    15161516        // Delete custom column action
    1517         $addAnotherForm.find('.delete_action').click(function(){
     1517        $addAnotherForm.find('.delete_action').on('click', function(){
    15181518
    15191519            $('.custom_column').removeClass('active');
     
    15321532
    15331533        // Add/Edit custom column action
    1534         $addAnotherForm.find('.save_action').click(function(event){
     1534        $addAnotherForm.find('.save_action').on('click', function(event){
    15351535
    15361536            if($(this).hasClass('disabled')) {
     
    17141714            $addAnotherForm.find('select[name=column_value_type]').find('option').each(function(){
    17151715                if ($(this).attr('label') == $elementLabel.val() && $(this).val() == $elementType.val())
    1716                     $(this).attr({'selected':'selected'}).click();
     1716                    $(this).attr({'selected':'selected'}).trigger('click');
    17171717                else
    17181718                    $(this).removeAttr('selected');
     
    17371737
    17381738            if($isCombineMultipleFieldsIntoOne == "1") {
    1739                 $addAnotherForm.find('input[name="combine_multiple_fields"][value="1"]').attr('checked', true);
     1739                $addAnotherForm.find('input[name="combine_multiple_fields"][value="1"]').prop('checked', true);
    17401740                $addAnotherForm.find('#combine_multiple_fields_value').val($(this).find('input[name^=cc_combine_multiple_fields_value]').val());
    17411741
     
    17441744                $('.export-single').hide();
    17451745            } else {
    1746                 $addAnotherForm.find('input[name="combine_multiple_fields"][value="0"]').attr('checked', true);
     1746                $addAnotherForm.find('input[name="combine_multiple_fields"][value="0"]').prop('checked', true);
    17471747
    17481748                $('#combine_multiple_fields_value_container').hide();
     
    17671767                    {
    17681768                        var $field_options = window.JSON.parse($settings);
    1769                         if ($field_options.export_images_from_gallery) $addAnotherForm.find('#export_images_from_gallery').attr('checked','checked');
     1769                        if ($field_options.export_images_from_gallery) $addAnotherForm.find('#export_images_from_gallery').prop('checked','checked');
    17701770                    }
    17711771                    else{
    17721772                        // this option should be enabled by default
    1773                         $addAnotherForm.find('#export_images_from_gallery').attr('checked','checked');
     1773                        $addAnotherForm.find('#export_images_from_gallery').prop('checked',true);
    17741774                    }
    17751775                    break;
     
    17851785                        {
    17861786                            var $field_options = window.JSON.parse($settings);
    1787                             if ($field_options.repeater_field_item_per_line) $addAnotherForm.find('#repeater_field_item_per_line').attr('checked','checked');
    1788                             if ($field_options.repeater_field_fill_empty_columns) $addAnotherForm.find('#repeater_field_fill_empty_columns').attr('checked','checked');
     1787                            if ($field_options.repeater_field_item_per_line) $addAnotherForm.find('#repeater_field_item_per_line').prop('checked',true);
     1788                            if ($field_options.repeater_field_fill_empty_columns) $addAnotherForm.find('#repeater_field_fill_empty_columns').prop('checked',true);
    17891789                        }
    17901790                    }
     
    18011801                            $addAnotherForm.find('select.linked_field_export_data').find('option').each(function(){
    18021802                                if ($(this).val() == $settings)
    1803                                     $(this).attr({'selected':'selected'}).click();
     1803                                    $(this).attr({'selected':'selected'}).trigger('click');
    18041804                                else
    18051805                                    $(this).removeAttr('selected');
     
    18191819                            $addAnotherForm.find('select.date_field_export_data').find('option').each(function(){
    18201820                                if ($(this).val() == $settings || $settings != 'unix' && $(this).val() == 'php')
    1821                                     $(this).attr({'selected':'selected'}).click();
     1821                                    $(this).attr({'selected':'selected'}).trigger('click');
    18221822                                else
    18231823                                    $(this).removeAttr('selected');
     
    18411841                    $addAnotherForm.find('select.date_field_export_data').find('option').each(function(){
    18421842                        if ($(this).val() == $settings || $settings != 'unix' && $(this).val() == 'php')
    1843                             $(this).attr({'selected':'selected'}).click();
     1843                            $(this).attr({'selected':'selected'}).trigger('click');
    18441844                        else
    18451845                            $(this).removeAttr('selected');
     
    18651865                            var $field_options = window.JSON.parse($options);
    18661866
    1867                             if ($field_options.is_export_featured) $addAnotherForm.find('#is_image_export_featured').attr('checked','checked');
    1868                             if ($field_options.is_export_attached) $addAnotherForm.find('#is_image_export_attached_images').attr('checked','checked');
     1867                            if ($field_options.is_export_featured) $addAnotherForm.find('#is_image_export_featured').prop('checked',true);
     1868                            if ($field_options.is_export_attached) $addAnotherForm.find('#is_image_export_attached_images').prop('checked',true);
    18691869
    18701870                            $addAnotherForm.find('input[name=image_field_separator]').val($field_options.image_separator);
     
    18751875            }
    18761876
    1877             $addAnotherForm.find('input.switcher').change();
     1877            $addAnotherForm.find('input.switcher').trigger('change');
    18781878
    18791879            var $column_name = $(this).find('input[name^=cc_name]').val();
     
    19491949                    $preview.parent('.wp-pointer-content').removeClass('wp-pointer-content').addClass('wpallexport-pointer-content');
    19501950
    1951                     $preview.find('.navigation a').unbind('click').click(function () {
     1951                    $preview.find('.navigation a').unbind('click').on('click', function () {
    19521952
    19531953                        tagno += '#prev' == $(this).attr('href') ? -1 : 1;
     
    19841984        };
    19851985
    1986         $(this).find('.preview_a_row').click( function(){
     1986        $(this).find('.preview_a_row').on('click', function(){
    19871987            doPreview($(this), 1);
    19881988        });
    19891989
    19901990        // preview custom XML template
    1991         $(this).find('.preview_a_custom_xml_row').click(function(){
     1991        $(this).find('.preview_a_custom_xml_row').on('click', function(){
    19921992            doPreview($(this), 1);
    19931993        });
    19941994
    19951995        // help custom XML template
    1996         $(this).find('.help_custom_xml').click(function(){
     1996        $(this).find('.help_custom_xml').on('click', function(){
    19971997            $('.wp-all-export-custom-xml-help').css('left', ($( document ).width()/2) - 255 ).show();
    19981998            $('#wp-all-export-custom-xml-help-inner').css('max-height', $( window ).height()-150).show();
     
    20002000        });
    20012001
    2002         $('.wp_all_export_custom_xml_help').find('h3').click(function(){
     2002        $('.wp_all_export_custom_xml_help').find('h3').on('click', function(){
    20032003            var $action = $(this).find('span').html();
    20042004            $('.wp_all_export_custom_xml_help').find('h3').each(function(){
     
    20162016        });
    20172017
    2018         $('.wpae-available-fields-group').click(function(){
     2018        $('.wpae-available-fields-group').on('click', function(){
    20192019            var $mode = $(this).find('.wpae-expander').text();
    20202020            $(this).next('div').slideToggle();
     
    20262026        });
    20272027
    2028         $('.close_action').click(function(){
     2028        $('.close_action').on('click', function(){
    20292029            $(this).parents('fieldset:first').hide();
    20302030            $('.wpallexport-overlay').hide();
     
    20322032        });
    20332033
    2034         $('.date_field_export_data').change(function(){
     2034        $('.date_field_export_data').on('change', function(){
    20352035            if ($(this).val() == "unix")
    20362036                $('.pmxe_date_format_wrapper').hide();
     
    20982098        }
    20992099
    2100         $('.wp-all-export-advanced-field-options').click(function(){
     2100        $('.wp-all-export-advanced-field-options').on('click', function(){
    21012101            if ($(this).find('span').html() == '+'){
    21022102                $(this).find('span').html('-');
     
    21122112
    21132113        // Auto generate available data
    2114         $('.wp_all_export_auto_generate_data').click(function(){
     2114        $('.wp_all_export_auto_generate_data').on('click', function(){
    21152115
    21162116            $('ol#columns').find('li:not(.placeholder)').fadeOut().remove();
     
    21812181            liveFiltering();
    21822182
    2183             $('form.wpallexport-template').find('input[type=submit]').click(function(e){
     2183            $('form.wpallexport-template').find('input[type=submit]').on('click', function(e){
    21842184                e.preventDefault();
    21852185
     
    22262226                                    }
    22272227                                });
    2228                                 submitButton.parents('form:first').submit();
     2228                                submitButton.parents('form:first').trigger('submit');
    22292229                            }
    22302230                        },
     
    22512251                    });
    22522252                } else {
    2253                     submitButton.parents('form:first').submit();
     2253                    submitButton.parents('form:first').trigger('submit');
    22542254                }
    22552255            });
     
    22672267        }
    22682268
    2269         $('.wpallexport-import-to-format').click(function(){
     2269        $('.wpallexport-import-to-format').on('click', function(){
    22702270
    22712271            var isWooCommerceOrder = vm.isWoocommerceOrderExport();
     
    23172317                $('.wpallexport-xml-options').show();
    23182318                $('input[name=export_to]').val('xml');
    2319                 $('.xml_template_type').change();
     2319                $('.xml_template_type').trigger('change');
    23202320
    23212321                $('.wpallexport-csv-advanced-options').css('display', 'none');
     
    23432343
    23442344        // template form: auto submit when `load template` list value is picked
    2345         $(this).find('select[name="load_template"]').change(function () {
     2345        $(this).find('select[name="load_template"]').on('change', function () {
    23462346
    23472347            var template = $(this).find('option:selected').val();
     
    23532353                angular.element(document.getElementById('googleMerchants')).injector().get('$rootScope').$broadcast('selectedTemplate', template);
    23542354            } else {
    2355                 $(this).parents('form').submit();
     2355                $(this).parents('form').trigger('submit');
    23562356            }
    23572357        });
     
    23612361
    23622362        // dismiss export template warnings
    2363         $('.wp-all-export-warning').find('.notice-dismiss').click(function(){
     2363        $('.wp-all-export-warning').find('.notice-dismiss').on('click', function(){
    23642364
    23652365            var $parent = $(this).parent('.wp-all-export-warning');
     
    24152415                });
    24162416
    2417                 $('#wpae-options-form').submit();
     2417                $('#wpae-options-form').trigger('submit');
    24182418            });
    24192419        }
     
    24232423    // [ \Step 3 ( export options ) ]
    24242424
    2425     $('#download-bundle').click(function(e){
     2425    $('#download-bundle').on('click', function(e){
    24262426
    24272427        var exportCpt = $('#export-cpt').val();
     
    24372437
    24382438    // [ Step 4 ( export completed ) ]
    2439     $('.download_data').click(function(){
     2439    $('.download_data').on('click', function(){
    24402440        window.location.href = $(this).attr('rel');
    24412441    });
     
    24732473        $('.wp_all_export_filtering_rules').find('.condition:hidden').each(function(){
    24742474            $(this).show();
    2475             $(this).find('.rule_condition:first').attr('checked', 'checked');
     2475            $(this).find('.rule_condition:first').prop('checked', true);
    24762476        });
    24772477        $('.wp_all_export_filtering_rules').find('.condition').removeClass('last_condition');
     
    25262526    });
    25272527    // hide "value" input when "Is Empty" or "Is Not Empty" rule is selected
    2528     $('#wp_all_export_rule').change(function(){
     2528    $('#wp_all_export_rule').on('change', function(){
    25292529        if ($(this).val() == 'is_empty' || $(this).val() == 'is_not_empty')
    25302530            $('#wp_all_export_value').hide();
     
    25342534
    25352535    // auot-generate zapier API key
    2536     $('input[name=pmxe_generate_zapier_api_key]').click(function(e){
     2536    $('input[name=pmxe_generate_zapier_api_key]').on('click', function(e){
    25372537
    25382538        e.preventDefault();
     
    25502550    });
    25512551
    2552     $('.CodeMirror').click(function(e){
     2552    $('.CodeMirror').on('click', function(e){
    25532553        e.preventDefault();
    25542554        $('.php-functions-upgrade').slideDown();
    25552555    });
    25562556
    2557     $('.wp_all_export_save_functions').click(function(e){
     2557    $('.wp_all_export_save_functions').on('click', function(e){
    25582558        $('.wp_all_export_save_functions_container').addClass('wpae-shake');
    25592559        setTimeout(function(){
     
    25652565
    25662566
    2567     $('.wp_all_export_save_client_mode').click(function(e){
     2567    $('.wp_all_export_save_client_mode').on('click', function(e){
    25682568        $('.wp_all_export_save_client_mode_container').addClass('wpae-shake');
    25692569        setTimeout(function(){
     
    25772577    var $xml_template_first_load = true;
    25782578
    2579     $('.xml_template_type').change(function(e){
     2579    $('.xml_template_type').on('change', function(e){
    25802580
    25812581        switch ($(this).find('option:selected').val()){
     
    25972597
    25982598                if(!angular.isUndefined(e.originalEvent)) {
    2599                     if ( ! $('.wpallexport-file-options').hasClass('closed')) $('.wpallexport-file-options').find('.wpallexport-collapsed-header').click();
     2599                    if ( ! $('.wpallexport-file-options').hasClass('closed')) $('.wpallexport-file-options').find('.wpallexport-collapsed-header').trigger('click');
    26002600                }
    26012601
     
    26152615                // If the event was not triggered by the user
    26162616                if(!angular.isUndefined(e.originalEvent)) {
    2617                     if ( ! $('.wpallexport-file-options').hasClass('closed')) $('.wpallexport-file-options').find('.wpallexport-collapsed-header').click();
     2617                    if ( ! $('.wpallexport-file-options').hasClass('closed')) $('.wpallexport-file-options').find('.wpallexport-collapsed-header').trigger('click');
    26182618                }
    26192619
     
    26692669
    26702670                if ( ! $('.wpallexport-file-options').hasClass('closed')) {
    2671                     $('.wpallexport-file-options').find('.wpallexport-collapsed-header').click();
     2671                    $('.wpallexport-file-options').find('.wpallexport-collapsed-header').trigger('click');
    26722672                }
    26732673
     
    27012701        }
    27022702        $xml_template_first_load = false;
    2703     }).change();
    2704 
    2705     $('.wpallexport-overlay').click(function(){
     2703    }).trigger('change');
     2704
     2705    $('.wpallexport-overlay').on('click', function(){
    27062706        $('.wp-pointer').hide();
    27072707        $('#columns').find('div.active').removeClass('active');
     
    27232723
    27242724    // Logic for radio boxes (CDATA settings)
    2725     $('input[name=simple_custom_xml_cdata_logic]').change(function(){
     2725    $('input[name=simple_custom_xml_cdata_logic]').on('change', function(){
    27262726        var value = $('input[name=simple_custom_xml_cdata_logic]:checked').val();
    27272727        $('#custom_custom_xml_cdata_logic_'+value).prop('checked', true);
     
    27302730
    27312731
    2732     $('input[name=custom_custom_xml_cdata_logic]').change(function(event) {
     2732    $('input[name=custom_custom_xml_cdata_logic]').on('change', function(event) {
    27332733        event.stopImmediatePropagation();
    27342734        var value = $('input[name=custom_custom_xml_cdata_logic]:checked').val();
     
    27392739
    27402740    // Logic for show CDATA tags in preview
    2741     $('.show_cdata_in_preview').change(function(){
     2741    $('.show_cdata_in_preview').on('change', function(){
    27422742        if($(this).is(':checked')) {
    27432743            $('#show_cdata_in_preview').val(1);
     
    27502750
    27512751    // Logic to show CSV advanced options
    2752     $('#export_to_sheet').change(function(e){
     2752    $('#export_to_sheet').on('change', function(e){
    27532753
    27542754        if ( $('input[name=export_to]').val() === 'xml' ) return;
     
    27792779    });
    27802780
    2781     $('#templateForm').submit(function(event){
     2781    $('#templateForm').on('submit', function(event){
    27822782       
    27832783        var exportType = $('select.xml_template_type').val();
     
    27892789    });
    27902790
    2791     $('select[name=column_value_type]').change(function(){
     2791    $('select[name=column_value_type]').on('change', function(){
    27922792        var disabledFields = ['fees', 'notes', 'refunds', 'taxes', 'item_data', 'items'];
    27932793        var selectedField  = $(this).find('option:selected').attr('options');
     
    28472847                        $pointer.find('.wp-pointer-buttons').append('<button class="close-pointer button button-primary button-hero wpallexport-large-button" style="float: right; background: #F1F1F1 none;text-shadow: 0 0 black; color: #777; margin-right: 10px;">Cancel</button>');
    28482848
    2849                         $(".close-pointer, .wpallexport-overlay").unbind('click').click(function () {
     2849                        $(".close-pointer, .wpallexport-overlay").unbind('click').on('click', function () {
    28502850                            $self.pointer('close');
    28512851                            $self.pointer('destroy');
     
    28742874                            html: true,
    28752875                            opacity: 1
    2876                         }).click(function () {
     2876                        }).on('click', function () {
    28772877                            return false;
    28782878                        }).each(function () { // fix tipsy title for IE
     
    28812881                        });
    28822882
    2883                         $(".save-changes").unbind('click').click(function () {
     2883                        $(".save-changes").unbind('click').on('click', function () {
    28842884                            if($(this).hasClass('disabled')) {
    28852885                                return false;
  • wp-all-export/trunk/static/js/jquery/jquery.ddslick.min.js

    r1214634 r2868132  
    1 (function (a) { function g(a, b) { var c = a.data("ddslick"); var d = a.find(".dd-selected"), e = d.siblings(".dd-selected-value"), f = a.find(".dd-options"), g = d.siblings(".dd-pointer"), h = a.find(".dd-option").eq(b), k = h.closest("li"), l = c.settings, m = c.settings.data[b]; a.find(".dd-option").removeClass("dd-option-selected"); h.addClass("dd-option-selected"); c.selectedIndex = b; c.selectedItem = k; c.selectedData = m; if (l.showSelectedHTML) { d.html((m.text ? '<label class="dd-selected-text ' + (m.imageSrc ? m.imageSrc : "") + '">' + m.text + "</label>" : "") + (m.description ? '<small class="dd-selected-description dd-desc' + (l.truncateDescription ? " dd-selected-description-truncated" : "") + '" >' + m.description + "</small>" : "")) } else d.html(m.text); e.val(m.value); c.original.val(m.value); a.data("ddslick", c); i(a); j(a); if (typeof l.onSelected == "function") { l.onSelected.call(this, c) } } function h(b) { var c = b.find(".dd-select"), d = c.siblings(".dd-options"), e = c.find(".dd-pointer"), f = d.is(":visible"); a(".dd-click-off-close").not(d).slideUp(50); a(".dd-pointer").removeClass("dd-pointer-up"); if (f) { d.slideUp("fast", function(){ var l = b.data("ddslick"); l.settings.onSlideUpOptions.call(this); }); e.removeClass("dd-pointer-up") } else { d.slideDown("fast", function(){ var l = b.data("ddslick"); l.settings.onSlideDownOptions.call(this); }); e.addClass("dd-pointer-up") } k(b) } function i(a) { a.find(".dd-options").slideUp(50); a.find(".dd-pointer").removeClass("dd-pointer-up").removeClass("dd-pointer-up") } function j(a) { var b = a.find(".dd-select").css("height"); var c = a.find(".dd-selected-description"); var d = a.find(".dd-selected-image"); if (c.length <= 0 && d.length > 0) { a.find(".dd-selected-text").css("lineHeight", b) } } function k(b) { b.find(".dd-option").each(function () { var c = a(this); var d = c.css("height"); var e = c.find(".dd-option-description"); var f = b.find(".dd-option-image"); if (e.length <= 0 && f.length > 0) { c.find(".dd-option-text").css("lineHeight", d) } }) } a.fn.ddslick = function (c) { if (b[c]) { return b[c].apply(this, Array.prototype.slice.call(arguments, 1)) } else if (typeof c === "object" || !c) { return b.init.apply(this, arguments) } else { a.error("Method " + c + " does not exists.") } }; var b = {}, c = { data: [], keepJSONItemsOnTop: false, width: "98%", height: null, background: "#eee", selectText: "", defaultSelectedIndex: null, truncateDescription: true, imagePosition: "left", showSelectedHTML: true, clickOffToClose: true, onSelected: function () { }, onSlideDownOptions: function() { }, onSlideUpOptions: function() { } }, d = '<div class="dd-select"><input class="dd-selected-value" type="hidden" /><a class="dd-selected"></a><span class="dd-pointer dd-pointer-down"></span></div>', e = '<ul class="dd-options"></ul>', f = '<style id="css-ddslick" type="text/css">' + ".dd-select{ border-radius:4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; -webkit-border-radius: 4px; border:solid 1px #ccc; position:relative; cursor:pointer;}" + ".dd-desc { color:#aaa; display:block; overflow: hidden; font-weight:normal; line-height: 1.4em; }" + ".dd-selected{ overflow:hidden; display:block; padding:10px; font-weight:bold;}" + ".dd-pointer{ width:0; height:0; position:absolute; right:10px; top:50%; margin-top:-3px;}" + ".dd-pointer-down{ border:solid 5px transparent; border-top:solid 5px #000; }" + ".dd-pointer-up{border:solid 5px transparent !important; border-bottom:solid 5px #000 !important; margin-top:-8px;}" + ".dd-options{ border:solid 1px #ccc; border-top:none; list-style:none; box-shadow:0px 1px 5px #ddd; display:none; position:absolute; z-index:2000; margin:0; padding:0;background:#fff; overflow:auto;}" + ".dd-option{ padding:10px; display:block; border-bottom:solid 1px #ddd; overflow:hidden; text-decoration:none; color:#333; cursor:pointer;-webkit-transition: all 0.25s ease-in-out; -moz-transition: all 0.25s ease-in-out;-o-transition: all 0.25s ease-in-out;-ms-transition: all 0.25s ease-in-out; }" + ".dd-options > li:last-child > .dd-option{ border-bottom:none;}" + ".dd-option:hover{ background:#f3f3f3; color:#000;}" + ".dd-selected-description-truncated { text-overflow: ellipsis; white-space:nowrap; }" + ".dd-option-selected { background:#f6f6f6; }" + ".dd-option-image, .dd-selected-image { vertical-align:middle; float:left; margin-right:5px; max-width:64px;}" + ".dd-image-right { float:right; margin-right:15px; margin-left:5px;}" + ".dd-container{ position:relative;}​ .dd-selected-text { font-weight:bold}​</style>"; if (a("#css-ddslick").length <= 0) { a(f).appendTo("head") } b.init = function (b) { var b = a.extend({}, c, b); return this.each(function () { var c = a(this), f = c.data("ddslick"); if (!f) { var i = [], j = b.data; c.find("option").each(function () { var b = a(this), c = b.data(); i.push({ text: a.trim(b.text()), value: b.val(), selected: b.is(":selected"), description: c.description, imageSrc: c.imagesrc }) }); if (b.keepJSONItemsOnTop) a.merge(b.data, i); else b.data = a.merge(i, b.data); var k = c, l = a('<div id="' + c.attr("id") + '"></div>'); c.replaceWith(l); c = l; c.addClass("dd-container").append(d).append(e); var i = c.find(".dd-select"), m = c.find(".dd-options"); m.css({ width: b.width }); i.css({ width: b.width, background: b.background }); c.css({ width: b.width }); if (b.height != null) m.css({ height: b.height, overflow: "auto" }); a.each(b.data, function (a, c) { if (c.selected) b.defaultSelectedIndex = a; m.append("<li>" + '<a class="dd-option">' + (c.value ? ' <input class="dd-option-value" type="hidden" value="' + c.value + '" />' : "") + (c.text ? ' <label class="dd-option-text ' + (c.imageSrc ? c.imageSrc : "") + '">' + c.text + "</label>" : "") + (c.description ? ' <small class="dd-option-description dd-desc">' + c.description + "</small>" : "") + "</a>" + "</li>") }); var n = { settings: b, original: k, selectedIndex: -1, selectedItem: null, selectedData: null }; c.data("ddslick", n); if (b.selectText.length > 0 && b.defaultSelectedIndex == null) { c.find(".dd-selected").html(b.selectText) } else { var o = b.defaultSelectedIndex != null && b.defaultSelectedIndex >= 0 && b.defaultSelectedIndex < b.data.length ? b.defaultSelectedIndex : 0; g(c, o) } c.find(".dd-select").on("click.ddslick", function () { h(c) }); c.find(".dd-option").on("click.ddslick", function () { g(c, a(this).closest("li").index()) }); if (b.clickOffToClose) { m.addClass("dd-click-off-close"); c.on("click.ddslick", function (a) { a.stopPropagation() }); a("body").on("click", function () { a(".dd-click-off-close").slideUp(50).siblings(".dd-select").find(".dd-pointer").removeClass("dd-pointer-up") }) } } }) }; b.select = function (b) { return this.each(function () { if (b.index) g(a(this), b.index) }) }; b.open = function () { return this.each(function () { var b = a(this), c = b.data("ddslick"); if (c) h(b) }) }; b.close = function () { return this.each(function () { var b = a(this), c = b.data("ddslick"); if (c) i(b) }) }; b.destroy = function () { return this.each(function () { var b = a(this), c = b.data("ddslick"); if (c) { var d = c.original; b.removeData("ddslick").unbind(".ddslick").replaceWith(d) } }) } })(jQuery)
     1(function (a) { function g(a, b) { var c = a.data("ddslick"); var d = a.find(".dd-selected"), e = d.siblings(".dd-selected-value"), f = a.find(".dd-options"), g = d.siblings(".dd-pointer"), h = a.find(".dd-option").eq(b), k = h.closest("li"), l = c.settings, m = c.settings.data[b]; a.find(".dd-option").removeClass("dd-option-selected"); h.addClass("dd-option-selected"); c.selectedIndex = b; c.selectedItem = k; c.selectedData = m; if (l.showSelectedHTML) { d.html((m.text ? '<label class="dd-selected-text ' + (m.imageSrc ? m.imageSrc : "") + '">' + m.text + "</label>" : "") + (m.description ? '<small class="dd-selected-description dd-desc' + (l.truncateDescription ? " dd-selected-description-truncated" : "") + '" >' + m.description + "</small>" : "")) } else d.html(m.text); e.val(m.value); c.original.val(m.value); a.data("ddslick", c); i(a); j(a); if (typeof l.onSelected == "function") { l.onSelected.call(this, c) } } function h(b) { var c = b.find(".dd-select"), d = c.siblings(".dd-options"), e = c.find(".dd-pointer"), f = d.is(":visible"); a(".dd-click-off-close").not(d).slideUp(50); a(".dd-pointer").removeClass("dd-pointer-up"); if (f) { d.slideUp("fast", function(){ var l = b.data("ddslick"); l.settings.onSlideUpOptions.call(this); }); e.removeClass("dd-pointer-up") } else { d.slideDown("fast", function(){ var l = b.data("ddslick"); l.settings.onSlideDownOptions.call(this); }); e.addClass("dd-pointer-up") } k(b) } function i(a) { a.find(".dd-options").slideUp(50); a.find(".dd-pointer").removeClass("dd-pointer-up").removeClass("dd-pointer-up") } function j(a) { var b = a.find(".dd-select").css("height"); var c = a.find(".dd-selected-description"); var d = a.find(".dd-selected-image"); if (c.length <= 0 && d.length > 0) { a.find(".dd-selected-text").css("lineHeight", b) } } function k(b) { b.find(".dd-option").each(function () { var c = a(this); var d = c.css("height"); var e = c.find(".dd-option-description"); var f = b.find(".dd-option-image"); if (e.length <= 0 && f.length > 0) { c.find(".dd-option-text").css("lineHeight", d) } }) } a.fn.ddslick = function (c) { if (b[c]) { return b[c].apply(this, Array.prototype.slice.call(arguments, 1)) } else if (typeof c === "object" || !c) { return b.init.apply(this, arguments) } else { a.error("Method " + c + " does not exists.") } }; var b = {}, c = { data: [], keepJSONItemsOnTop: false, width: "98%", height: null, background: "#eee", selectText: "", defaultSelectedIndex: null, truncateDescription: true, imagePosition: "left", showSelectedHTML: true, clickOffToClose: true, onSelected: function () { }, onSlideDownOptions: function() { }, onSlideUpOptions: function() { } }, d = '<div class="dd-select"><input class="dd-selected-value" type="hidden" /><a class="dd-selected"></a><span class="dd-pointer dd-pointer-down"></span></div>', e = '<ul class="dd-options"></ul>', f = '<style id="css-ddslick" type="text/css">' + ".dd-select{ border-radius:4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; -webkit-border-radius: 4px; border:solid 1px #ccc; position:relative; cursor:pointer;}" + ".dd-desc { color:#aaa; display:block; overflow: hidden; font-weight:normal; line-height: 1.4em; }" + ".dd-selected{ overflow:hidden; display:block; padding:10px; font-weight:bold;}" + ".dd-pointer{ width:0; height:0; position:absolute; right:10px; top:50%; margin-top:-3px;}" + ".dd-pointer-down{ border:solid 5px transparent; border-top:solid 5px #000; }" + ".dd-pointer-up{border:solid 5px transparent !important; border-bottom:solid 5px #000 !important; margin-top:-8px;}" + ".dd-options{ border:solid 1px #ccc; border-top:none; list-style:none; box-shadow:0px 1px 5px #ddd; display:none; position:absolute; z-index:2000; margin:0; padding:0;background:#fff; overflow:auto;}" + ".dd-option{ padding:10px; display:block; border-bottom:solid 1px #ddd; overflow:hidden; text-decoration:none; color:#333; cursor:pointer;-webkit-transition: all 0.25s ease-in-out; -moz-transition: all 0.25s ease-in-out;-o-transition: all 0.25s ease-in-out;-ms-transition: all 0.25s ease-in-out; }" + ".dd-options > li:last-child > .dd-option{ border-bottom:none;}" + ".dd-option:hover{ background:#f3f3f3; color:#000;}" + ".dd-selected-description-truncated { text-overflow: ellipsis; white-space:nowrap; }" + ".dd-option-selected { background:#f6f6f6; }" + ".dd-option-image, .dd-selected-image { vertical-align:middle; float:left; margin-right:5px; max-width:64px;}" + ".dd-image-right { float:right; margin-right:15px; margin-left:5px;}" + ".dd-container{ position:relative;}​ .dd-selected-text { font-weight:bold}​</style>"; if (a("#css-ddslick").length <= 0) { a(f).appendTo("head") } b.init = function (b) { var b = a.extend({}, c, b); return this.each(function () { var c = a(this), f = c.data("ddslick"); if (!f) { var i = [], j = b.data; c.find("option").each(function () { var b = a(this), c = b.data(); i.push({ text: b.text().trim(), value: b.val(), selected: b.is(":selected"), description: c.description, imageSrc: c.imagesrc }) }); if (b.keepJSONItemsOnTop) a.merge(b.data, i); else b.data = a.merge(i, b.data); var k = c, l = a('<div id="' + c.attr("id") + '"></div>'); c.replaceWith(l); c = l; c.addClass("dd-container").append(d).append(e); var i = c.find(".dd-select"), m = c.find(".dd-options"); m.css({ width: b.width }); i.css({ width: b.width, background: b.background }); c.css({ width: b.width }); if (b.height != null) m.css({ height: b.height, overflow: "auto" }); a.each(b.data, function (a, c) { if (c.selected) b.defaultSelectedIndex = a; m.append("<li>" + '<a class="dd-option">' + (c.value ? ' <input class="dd-option-value" type="hidden" value="' + c.value + '" />' : "") + (c.text ? ' <label class="dd-option-text ' + (c.imageSrc ? c.imageSrc : "") + '">' + c.text + "</label>" : "") + (c.description ? ' <small class="dd-option-description dd-desc">' + c.description + "</small>" : "") + "</a>" + "</li>") }); var n = { settings: b, original: k, selectedIndex: -1, selectedItem: null, selectedData: null }; c.data("ddslick", n); if (b.selectText.length > 0 && b.defaultSelectedIndex == null) { c.find(".dd-selected").html(b.selectText) } else { var o = b.defaultSelectedIndex != null && b.defaultSelectedIndex >= 0 && b.defaultSelectedIndex < b.data.length ? b.defaultSelectedIndex : 0; g(c, o) } c.find(".dd-select").on("click.ddslick", function () { h(c) }); c.find(".dd-option").on("click.ddslick", function () { g(c, a(this).closest("li").index()) }); if (b.clickOffToClose) { m.addClass("dd-click-off-close"); c.on("click.ddslick", function (a) { a.stopPropagation() }); a("body").on("click", function () { a(".dd-click-off-close").slideUp(50).siblings(".dd-select").find(".dd-pointer").removeClass("dd-pointer-up") }) } } }) }; b.select = function (b) { return this.each(function () { if (b.index) g(a(this), b.index) }) }; b.open = function () { return this.each(function () { var b = a(this), c = b.data("ddslick"); if (c) h(b) }) }; b.close = function () { return this.each(function () { var b = a(this), c = b.data("ddslick"); if (c) i(b) }) }; b.destroy = function () { return this.each(function () { var b = a(this), c = b.data("ddslick"); if (c) { var d = c.original; b.removeData("ddslick").unbind(".ddslick").replaceWith(d) } }) } })(jQuery)
  • wp-all-export/trunk/static/js/pmxe.js

    r835969 r2868132  
    44(function($){$(function () {
    55       
    6     $('#dismiss').click(function(){
     6    $('#dismiss').on('click', function(){
    77
    88        $(this).parents('div.updated:first').slideUp();
  • wp-all-export/trunk/static/js/scheduling.js

    r1826194 r2868132  
    5858            };
    5959
    60             $('#weekly li').click(function () {
     60            $('#weekly li').on('click', function () {
    6161                if ($(this).hasClass('selected')) {
    6262                    $(this).removeClass('selected');
     
    7676            });
    7777
    78             $('#monthly li').click(function () {
     78            $('#monthly li').on('click', function () {
    7979                $(this).parent().parent().find('.days-of-week li').removeClass('selected');
    8080                $(this).addClass('selected');
    8181            });
    8282
    83             $('input[name="scheduling_run_on"]').change(function () {
     83            $('input[name="scheduling_run_on"]').on('change', function () {
    8484                var val = $('input[name="scheduling_run_on"]:checked').val();
    8585                if (val == "weekly") {
  • wp-all-export/trunk/views/admin/export/index.php

    r2806325 r2868132  
    306306                    <table><tr><td class="wpallexport-note"></td></tr></table>
    307307                </form>
    308                
    309                 <a href="http://soflyy.com/" target="_blank" class="wpallexport-created-by"><?php esc_html_e('Created by', 'wp_all_export_plugin'); ?> <span></span></a>
     308
     309                <div class="wpallexport-display-columns wpallexport-margin-top-forty">
     310                    <?php echo apply_filters('wpallexport_footer', ''); ?>
     311                </div>
    310312               
    311313            </div>
  • wp-all-export/trunk/views/admin/export/options.php

    r2830466 r2868132  
    129129                    </div>
    130130
     131                </form>
    131132
    132                 </form>                 
    133                                
    134                 <a href="http://soflyy.com/" target="_blank" class="wpallexport-created-by"><?php esc_html_e('Created by', 'wp_all_export_plugin'); ?> <span></span></a>
    135                    
     133                <div class="wpallexport-display-columns wpallexport-margin-top-forty">
     134                    <?php echo apply_filters('wpallexport_footer', ''); ?>
     135                </div>
     136
    136137            </td>           
    137138        </tr>
  • wp-all-export/trunk/views/admin/export/options/settings.php

    r2830466 r2868132  
    153153                                <input type="hidden" name="allow_client_mode" value="0"/>
    154154                                <input type="checkbox" id="allow_client_mode" name="allow_client_mode"
    155                                        value="1" <?php echo (isset($post['allow_client_mode']) && $post['allow_client_mode']) ? 'checked="checked"' : '' ?> />
     155                                       value="1" />
    156156                                <label for="allow_client_mode"><?php esc_html_e('Allow non-admins to run this export in Client Mode', 'wp_all_export_plugin') ?></label>
    157157                                <span>
  • wp-all-export/trunk/views/admin/export/process.php

    r2654009 r2868132  
    9797    </div>
    9898
    99     <a href="http://soflyy.com/" target="_blank"
    100        class="wpallexport-created-by"><?php esc_html_e('Created by', 'wp_all_export_plugin'); ?> <span></span></a>
     99    <div class="wpallexport-display-columns wpallexport-margin-top-forty">
     100        <?php echo apply_filters('wpallexport_footer', ''); ?>
     101    </div>
    101102
    102103</div>
  • wp-all-export/trunk/views/admin/export/success_page.php

    r2738627 r2868132  
    3030        <script type="text/javascript">
    3131            jQuery(document).ready(function () {
    32                 jQuery('.success-tabs .tab').click(function () {
     32                jQuery('.success-tabs .tab').on('click', function () {
    3333                    jQuery('.success-tabs .tab').removeClass('selected');
    3434                    jQuery(this).addClass('selected');
  • wp-all-export/trunk/views/admin/export/template.php

    r2738627 r2868132  
    621621
    622622            </fieldset>
     623            <?php echo apply_filters('wpallexport_info_panel', ''); ?>
    623624        </td>
    624625    </tr>
  • wp-all-export/trunk/views/admin/export/template/add_new_field.php

    r2654009 r2868132  
    2828
    2929            var $addAnotherForm = $('fieldset.wp-all-export-edit-column');
    30             $addAnotherForm.click(function () {
     30            $addAnotherForm.on('click', function () {
    3131                var rel = $addAnotherForm.attr('rel');
    3232            });
    3333
    34             $('select[name="column_value_type"]').change(function(){
     34            $('select[name="column_value_type"]').on('change', function(){
    3535                $('.column_name').val($(this).find('option:selected').text());
    3636            });
     
    4242            });
    4343
    44             $('.preview_action').unbind('click').click(function (event) {
     44            $('.preview_action').off('click').on('click', function (event) {
    4545                return false;
    4646            });
    4747
    48             $('input[name="combine_multiple_fields"]').change(function () {
     48            $('input[name="combine_multiple_fields"]').on('change', function () {
    4949                if ($(this).val() == '1') {
    5050                    $('#combine_multiple_fields_value_container').slideDown();
  • wp-all-export/trunk/views/admin/export/variation_options_common.php

    r2654009 r2868132  
    1515            }
    1616
    17             $('.export_variations').change(function () {
     17            $('.export_variations').on('change', function () {
    1818
    1919                var inputName = $(this).attr('name');
     
    2929            });
    3030           
    31             $('.export_variations_title').change(function(event){
     31            $('.export_variations_title').on('change', function(event){
    3232
    3333                var inputName = $(this).attr('name');
  • wp-all-export/trunk/views/admin/google/index.php

    r2654009 r2868132  
    77wp_enqueue_style('pmxe-angular-scss', PMXE_ROOT_URL . '/frontend/dist/styles.css', array(), PMXE_VERSION.PMXE_ASSETS_VERSION);
    88
    9 if(getenv('WPAE_DEV')) {
    10     // Livereload in dev mode
    11     echo '<script src="//localhost:35729/livereload.js"></script>';
    12 }
    139?>
    14 <script type="text/javascript">
    15     jQuery(document).ready(function(){
    16         jQuery('#testLink').click(function(){
    17             mediator.publish('something', { data: 'Some data' });
    18         });
    19     });
    20 </script>
    2110<div ng-app="GoogleMerchants" ng-controller="mainController" ng-init="init()">
    2211
  • wp-all-export/trunk/views/admin/manage/index.php

    r2830466 r2868132  
    44}
    55$addons = new \Wpae\App\Service\Addons\AddonService();
     6function is_broken($item) {
     7    return is_null($item['options']) || !$item['options'];
     8}
    69?>
    710
     
    3235
    3336        $(document).ready(function () {
    34             $('.open_cron_scheduling').click(function () {
     37            $('.open_cron_scheduling').on('click', function () {
    3538
    3639                var itemId = $(this).data('itemid');
     
    323326                            case 'data':
    324327                                ?>
    325                                 <td>
    326 
    327                     <?php
    328                     if (!empty($item['options']['cpt'])) {
    329 
    330                         echo '<strong>' . __('Post Types: ') . '</strong> <br/>';
    331 
    332                         if($is_rapid_addon_export) {
    333                             $form = GFAPI::get_form($item['options']['sub_post_type_to_export']);
    334                             echo 'Gravity Form Entries:<br/>';
    335                             echo esc_html($form['title']);
    336                         } else {
    337                             echo esc_html(implode(', ', $item['options']['cpt']));
    338                         }
    339                     }
    340                     else {
    341                         echo esc_html($item['options']['wp_query']);
    342                     }?>
    343                 </td>
     328                                <td>
     329                                    <?php
     330                                    if(is_broken($item)) {
     331                                        ?>
     332                                        <strong>Broken:</strong> please delete
     333                                        <?php
     334                                    }
     335                                    ?>
     336                                    <?php
     337                                    if (!empty($item['options']['cpt'])) {
     338
     339                                        echo '<strong>' . __('Post Types: ') . '</strong> <br/>';
     340
     341                                        if ($is_rapid_addon_export) {
     342                                            $form = GFAPI::get_form($item['options']['sub_post_type_to_export']);
     343                                            echo 'Gravity Form Entries:<br/>';
     344                                            echo $form['title'];
     345                                        } else {
     346                                            echo implode(', ', $item['options']['cpt']);
     347                                        }
     348                                    } else {
     349                                        echo $item['options']['wp_query'];
     350                                    } ?>
     351                                </td>
    344352                                <?php
    345353                                break;
     
    433441                                ?>
    434442                                <td style="min-width: 130px;">
    435                                     <?php if ( ! $item['processing'] and ! $item['executing'] ): ?>
    436                                     <h2 style="float:left;"><a class="add-new-h2" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'update'), $this->baseUrl)); ?>"><?php esc_html_e('Run Export', 'wp_all_export_plugin'); ?></a></h2>
    437                                     <?php elseif ($item['processing']) : ?>
    438                                     <h2 style="float:left;"><a class="add-new-h2" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'cancel'), $this->baseUrl)); ?>"><?php esc_html_e('Cancel Cron', 'wp_all_export_plugin'); ?></a></h2>
    439                                     <?php elseif ($item['executing']) : ?>
    440                                     <h2 style="float:left;"><a class="add-new-h2" href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'cancel'), $this->baseUrl)); ?>"><?php esc_html_e('Cancel', 'wp_all_export_plugin'); ?></a></h2>
    441                                     <?php endif; ?>
     443                                    <?php
     444                                    if(!is_broken($item)) {
     445                                        ?>
     446                                        <?php if (!$item['processing'] and !$item['executing']): ?>
     447                                            <h2 style="float:left;"><a class="add-new-h2"
     448                                                                       href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'update'), $this->baseUrl)); ?>"><?php esc_html_e('Run Export', 'wp_all_export_plugin'); ?></a>
     449                                            </h2>
     450                                        <?php elseif ($item['processing']) : ?>
     451                                            <h2 style="float:left;"><a class="add-new-h2"
     452                                                                       href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'cancel'), $this->baseUrl)); ?>"><?php esc_html_e('Cancel Cron', 'wp_all_export_plugin'); ?></a>
     453                                            </h2>
     454                                        <?php elseif ($item['executing']) : ?>
     455                                            <h2 style="float:left;"><a class="add-new-h2"
     456                                                                       href="<?php echo esc_url(add_query_arg(array('id' => $item['id'], 'action' => 'cancel'), $this->baseUrl)); ?>"><?php esc_html_e('Cancel', 'wp_all_export_plugin'); ?></a>
     457                                            </h2>
     458                                        <?php endif; ?>
     459                                        <?php
     460                                            }
     461                                        ?>
    442462                                </td>
    443463                                <?php
     
    475495        </div>
    476496    </div>
    477     <div class="clear"></div>       
    478 
    479     <a href="http://soflyy.com/" target="_blank" class="wpallexport-created-by"><?php esc_html_e('Created by', 'wp_all_export_plugin'); ?> <span></span></a>
     497    <div class="clear"></div>
     498
     499    <div class="wpallexport-negative-margin">
     500        <?php echo apply_filters('wpallexport_footer', ''); ?>
     501    </div>
     502
    480503   
    481504</form>
  • wp-all-export/trunk/views/admin/manage/scheduling.php

    r2654009 r2868132  
    6060</p>
    6161
    62 <a href="http://soflyy.com/" target="_blank" class="wpallexport-created-by"><?php esc_html_e('Created by', 'wp_all_export_plugin'); ?> <span></span></a>
     62<div class="wpallexport-display-columns wpallexport-margin-top-forty">
     63    <?php echo apply_filters('wpallexport_footer', ''); ?>
     64</div>
  • wp-all-export/trunk/views/admin/manage/templates.php

    r2654009 r2868132  
    1212    </p>
    1313    <img src="<?php echo PMXE_ROOT_URL; ?>/static/img/import-templates.png" width="400px" style="border: 1px solid #aaa;">
    14     <a href="http://soflyy.com/" target="_blank" class="wpallexport-created-by"><?php esc_html_e('Created by', 'wp_all_export_plugin'); ?> <span></span></a>
     14    <div class="wpallexport-display-columns wpallexport-margin-top-forty">
     15        <?php echo apply_filters('wpallexport_footer', ''); ?>
     16    </div>
    1517</div>
  • wp-all-export/trunk/views/admin/manage/update.php

    r2654009 r2868132  
    106106
    107107
    108                 </form>                 
    109                                
    110                 <a href="http://soflyy.com/" target="_blank" class="wpallexport-created-by"><?php esc_html_e('Created by', 'wp_all_export_plugin'); ?> <span></span></a>
     108                </form>
     109
     110                <div class="wpallexport-display-columns wpallexport-margin-top-forty">
     111                    <?php echo apply_filters('wpallexport_footer', ''); ?>
     112                </div>
    111113                   
    112114            </td>           
  • wp-all-export/trunk/views/admin/settings/index.php

    r2830466 r2868132  
    212212    </div>
    213213</div>
    214 <a href="http://soflyy.com/" target="_blank" class="wpallexport-created-by"><?php esc_html_e('Created by', 'wp_all_export_plugin'); ?> <span></span></a>
     214<div class="wpallexport-negative-margin fifteen">
     215    <?php echo apply_filters('wpallexport_footer', ''); ?>
     216</div>
  • wp-all-export/trunk/wp-all-export.php

    r2830466 r2868132  
    44Plugin URI: http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=export-plugin-free&utm_medium=wp-plugins-page&utm_campaign=upgrade-to-pro
    55Description: Export any post type to a CSV or XML file. Edit the exported data, and then re-import it later using WP All Import.
    6 Version: 1.3.8
     6Version: 1.3.9
    77Author: Soflyy
    88*/
     
    6060    define('PMXE_PREFIX', 'pmxe_');
    6161
    62     define('PMXE_VERSION', '1.3.8');
     62    define('PMXE_VERSION', '1.3.9');
    6363
    6464    define('PMXE_ASSETS_VERSION', '-1.0.2');
     
    218218            }
    219219
     220            add_action("admin_enqueue_scripts", [$this, 'add_admin_scripts']);
     221
    220222            // register filter handlers
    221223            if (is_dir(self::ROOT_DIR . '/filters')) foreach (PMXE_Helper::safe_glob(self::ROOT_DIR . '/filters/*.php', PMXE_Helper::GLOB_RECURSE | PMXE_Helper::GLOB_PATH) as $filePath) {
     
    241243            add_action('admin_init', array($this, 'fix_db_schema'), 10);
    242244            add_action('init', array($this, 'init'), 10);
     245        }
     246
     247        public function add_admin_scripts() {
     248            $cm_settings['codeEditor'] = wp_enqueue_code_editor(['type' => 'php']);
     249
     250            // Use our modified function if user has disabled the syntax editor.
     251            if(false === $cm_settings['codeEditor']){
     252                $cm_settings['codeEditor'] = wpae_wp_enqueue_code_editor(['type' => 'php']);
     253            }
     254
     255            wp_localize_script('jquery', 'wpae_cm_settings', $cm_settings);
    243256        }
    244257
     
    812825            $export_post_type = false;
    813826            $created_at = false;
    814            
     827
    815828            // Check if field exists
    816829            foreach ($tablefields as $tablefield) {
Note: See TracChangeset for help on using the changeset viewer.