Plugin Directory

Changeset 2195637


Ignore:
Timestamp:
11/18/2019 01:24:51 PM (6 years ago)
Author:
semantify
Message:

patch for wordpress 5.3

Location:
instant-annotation
Files:
1 added
8 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • instant-annotation/trunk/README.txt

    r2119352 r2195637  
    44Tags: SEO, annotations, schema.org, semantify
    55Requires at least: 3.0.1
    6 Tested up to: 5.0.1
     6Tested up to: 5.3
    77Stable tag: 4.4
    88License: GPLv2 or later
  • instant-annotation/trunk/admin/class-iasemantify-admin.php

    r2119352 r2195637  
    9393
    9494        if ((array_key_exists ($curScreenId, $post_types) || $curScreenId == 'settings_page_iasemantify')) {
    95             wp_register_style( 'prefix_css_bootstrap', $path . 'css/bootstrap.css' );
    96             wp_enqueue_style( 'prefix_css_bootstrap' );
    97 
    98             wp_register_style( 'prefix_css_bootstrap-material', $path . 'css/bootstrap-material-design.css' );
    99             wp_enqueue_style( 'prefix_css_bootstrap-material' );
    100 
    101             wp_register_style( 'prefix_css_material-icons', $path . 'css/material-icons.css' );
    102             wp_enqueue_style( 'prefix_css_material-icons' );
    103 
    104             wp_register_style( 'prefix_css_snack', 'https://cdnjs.cloudflare.com/ajax/libs/snackbarjs/1.1.0/snackbar.min.css' );
    105             wp_enqueue_style( 'prefix_css_snack' );
    106 
    107             wp_register_style( 'prefix_css_datetime', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css' );
    108             wp_enqueue_style( 'prefix_css_datetime' );
    109 
    110             wp_register_style( 'prefix_css_semantify', $path . 'css/semantify.css');
    111             wp_enqueue_style( 'prefix_css_semantify' );
     95            wp_register_style( 'prefix_css_ia', 'https://cdn.jsdelivr.net/gh/semantifyit/instant-annotator/css/instantAnnotations.css' );
     96            wp_enqueue_style( 'prefix_css_ia' );
     97
     98            wp_register_style( 'prefix_css_ia_plugin', $path . 'css/ia_plugin.css');
     99            wp_enqueue_style( 'prefix_css_ia_plugin' );
    112100        }
    113101    }
     
    143131
    144132        if (array_key_exists ($curScreenId, $post_types) || $curScreenId == 'settings_page_iasemantify') {
    145             wp_register_script( 'prefix_bootstrap', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js' );
    146             wp_enqueue_script( 'prefix_bootstrap' );
    147 
    148             wp_register_script( 'prefix_snackbar', $path . 'js/snackbar.js', null, time() );
    149             wp_enqueue_script( 'prefix_snackbar' );
    150 
    151             wp_register_script( 'prefix_moment', 'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js' );
    152             wp_enqueue_script( 'prefix_moment' );
    153 
    154             wp_register_script( 'prefix_datetime', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js' );
    155             wp_enqueue_script( 'prefix_datetime' );
    156 
    157             wp_register_script( 'prefix_datetime', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js' );
    158             wp_enqueue_script( 'prefix_datetime' );
    159 
    160              wp_register_script( 'prefix_instantannotation', 'https://cdn.jsdelivr.net/gh/semantifyit/instant-annotator/dist/instantAnnotation.js', array( 'jquery' ), time() );
    161              //wp_register_script( 'prefix_instantannotation', 'http://localhost:8080/main.js', array( 'jquery' ), time() );
    162 
    163              wp_localize_script( 'prefix_instantannotation', 'myAjax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' )));
    164              wp_enqueue_script( 'prefix_instantannotation' );
    165 
    166             /**
    167             * wp_register_script( 'prefix_instantannotation', $path . '../vendor/instantAnnotations.js', array( 'jquery' ), time() );
    168             * wp_localize_script( 'prefix_instantannotation', 'myAjax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' )));
    169             * wp_enqueue_script( 'prefix_instantannotation' );
    170              */
     133            wp_register_script( 'prefix_bootstrap', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.js' );
     134            wp_enqueue_script( 'prefix_bootstrap', array( 'jquery' ) );
     135
     136            wp_register_script( 'prefix_instantannotation', 'https://cdn.jsdelivr.net/gh/semantifyit/instant-annotator/dist/instantAnnotation.bundle.js', array( 'jquery' ), time() );
     137            //wp_register_script( 'prefix_instantannotation', 'http://localhost:8080/main.js', array( 'jquery' ), time() );
     138
     139            wp_localize_script( 'prefix_instantannotation', 'myAjax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' )));
     140            wp_enqueue_script( 'prefix_instantannotation' );
     141           
    171142        }
    172143        if ( $curScreenId == 'settings_page_iasemantify') {
  • instant-annotation/trunk/admin/partials/iasemantify-admin-display.php

    r2119352 r2195637  
    2121
    2222<div class="wrap">
    23     <div class="bootstrap semantify">
     23    <div class="bootstrap semantify semantify-instant-annotations">
    2424        <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
    2525
     
    4848                    <input type="text"
    4949                           class="regular-text"
     50                           style="background: white; width:25rem"
    5051                           id="<?php echo $this->plugin_name; ?>-websiteUID"
    5152                           name="<?php echo $this->plugin_name; ?>[websiteUID]"
     
    6263                    <input type="text"
    6364                           class="regular-text"
     65                           style="background: white; width:25rem"
    6466                           id="<?php echo $this->plugin_name; ?>-websiteSecret"
    6567                           name="<?php echo $this->plugin_name; ?>[websiteSecret]"
  • instant-annotation/trunk/admin/partials/meta_boxes_display.php

    r2119352 r2195637  
    5252</style>
    5353
    54 <div class="bootstrap semantify" id="ia_global_bootstrap_div">
     54<div class="bootstrap semantify semantify-instant-annotations" id="ia_global_bootstrap_div">
    5555    <div id="ia_warning_message_box" hidden>
    5656        <div class="alert alert-danger" role="alert">
     
    6060    <div id="ia_injection_box"></div>
    6161    <select title="choose a type" onchange="onChangeSelect(this);" name="box_select" id="select_type"
    62             style="background-color: white !important; min-width:150px "></select>
     62            style="background-color: white !important; min-width:150px; color:black"></select>
    6363    <button style="margin-left:10px;padding:5px 20px" title="Please select a type first!"
    6464            class="btn btn-sm button-sti-red" id="addPane" disabled="true" type="button"><i class="material-icons">note_add</i>
     
    9090<script>
    9191    var IA_delete_id_whitelist = [];
     92    var IA_dashboard_annotation_store = null;
     93    var IA_currently_added_annotations = [];
     94    var websiteUID = <?php echo json_encode( $websiteUID );?>;
     95    var websiteSecret = <?php echo json_encode( $websiteSecret );?>;
     96    // iasi_saveWebsiteUID = <?php echo json_encode( $websiteUID );?>;
     97    // iasi_saveWebsiteSecret = <?php echo json_encode( $websiteSecret );?>;
     98
     99(function($) {
     100
     101    $('.dropdown-toggle').dropdown();
     102
    92103    $('#ia_warning_message_box').slideUp();
    93104    if (IA_injection_is_checked === 'true') {
     
    105116                    dummy.setAttribute("id", "preview_id");
    106117                    $('#preview_id').append(
    107                         '<div class="bootstrap semantify">' +
     118                        '<div class="bootstrap semantify semantify-instant-annotations">' +
    108119                        '<div class="modal fade" id="previewModal" role="dialog">' +
    109120                        '<div class="modal-dialog">' +
     
    147158    }
    148159
     160
    149161    function onChangeSelect(element) {
    150162        $('#addPane').prop("disabled", false);
    151163        $('#addPane').prop("title", "Add a new annotation box");
    152164    }
    153 
    154     var IA_dashboard_annotation_store = null;
    155     var IA_currently_added_annotations = [];
     165    window.onChangeSelect = onChangeSelect;
    156166
    157167    // add select options
     
    161171        return ((aName < bName) ? -1 : ((aName > bName) ? 1 : 0));
    162172    }
    163 
    164     var websiteUID = <?php echo json_encode( $websiteUID );?>;
    165     var websiteSecret = <?php echo json_encode( $websiteSecret );?>;
    166     //console.log(websiteUID);
    167173
    168174    InstantAnnotation.util.httpGet(InstantAnnotation.util.semantifyUrl + "/api/domainSpecification/instantAnnotation", function (ds) {
     
    172178        ds.sort(SortByName);
    173179        $('#select_type').append('<option hidden>Select type</option>');
    174         $('#select_type').append('<optgroup label="Public template"/>');
     180        $('#select_type').append('<optgroup label="Public templates"/>');
    175181        ds.forEach(function (d) {
    176182            $('#select_type').append($('<option>', {
    177183                value: d.hash,
    178                 text: d.name
     184                text: d.name,
    179185            }));
    180186        });
     
    189195                ds.sort(SortByName);
    190196
    191                 var personalDSHtml ='<option hidden>Select type</option>'+'<optgroup label="Private template"/>';
     197                var personalDSHtml ='<option hidden>Select type</option>+<optgroup label="Private templates"/>';
     198                if(ds.length === 0) {
     199                    personalDSHtml += '<option disabled style="font-style: italic">no private templates</option>';
     200                }
    192201                ds.forEach(function (d) {
    193202                    personalDSHtml += '<option value="' + d.hash + '">' +
     
    196205                });
    197206                personalDSHtml += '</optgroup>';
    198                 personalDSHtml += '<option disabled style="font-style: italic">no private templates</option>';
    199207                $('#select_type').prepend(personalDSHtml);
    200208                $('#select_type').prop("selectedIndex", 0);
     
    208216
    209217    // rest
    210 
    211     iasi_saveWebsiteUID = <?php echo json_encode( $websiteUID );?>;
    212     iasi_saveWebsiteSecret = <?php echo json_encode( $websiteSecret );?>;
    213218
    214219    var existingAnnotationsString = <?php echo json_encode( get_post_meta( get_the_ID(), $this->plugin_name . "_ann_id", true ) );?>;
     
    279284        dummy.setAttribute("id", "ia_menu_report_id");
    280285        $('#ia_menu_report_id').append(
    281             '<div class="bootstrap semantify">' +
     286            '<div class="bootstrap semantify semantify-instant-annotations">' +
    282287            '<div class="modal fade" id="ia_menu_reportModal" role="dialog">' +
    283288            '<div class="modal-dialog">' +
     
    318323                }
    319324            });
    320             var slackReport = {
     325            var report = {
    321326                text: "*--- New Report ---*\n" +
    322327                "Origin: " + window.location.href + "\n" +
     
    327332                "*--- End Report ---* \n"
    328333            };
    329             httpCall('POST', 'https://hooks.slack.com/services/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', undefined, undefined, slackReport, function (res) {
     334            InstantAnnotation.util.httpCall('POST', atob('aHR0cHM6Ly9ob29rcy5zbGFjay5jb20vc2VydmljZXMvVDJWRTdMNEIxL0JMMzE1WDFVRDI2L0hKbVkzZGxuSWFYMWRjWWdsZTFBdkhPRlgxOEU').replace(/X1/g, ''), undefined, undefined, report, function (res) {
    330335                if (res === 'ok') {
    331336                    InstantAnnotation.util.send_snackbarMSG("Successfully sent message");
     
    352357        dummy.setAttribute("id", "ia_menu_help_id");
    353358        $('#ia_menu_help_id').append(
    354             '<div class="bootstrap semantify">' +
     359            '<div class="bootstrap semantify semantify-instant-annotations">' +
    355360            '<div class="modal fade" id="ia_menu_helpModal" role="dialog">' +
    356361            '<div class="modal-dialog">' +
     
    420425        dummy.setAttribute("id", "ia_menu_add_ann_id");
    421426        $('#ia_menu_add_ann_id').append(
    422             '<div class="bootstrap semantify">' +
     427            '<div class="bootstrap semantify semantify-instant-annotations">' +
    423428            '<div class="modal fade" id="ia_menu_add_annModal" role="dialog">' +
    424429            '<div class="modal-dialog">' +
     
    635640    });
    636641
     642}(jQuery));
     643
    637644</script>
  • instant-annotation/trunk/iasemantify.php

    r2119352 r2195637  
    1616 * Plugin Name:       Instant Annotation
    1717 * Description:       Deploy your annotations from semantify.it to your wordpress website with an easy interface.
    18  * Version:           2.3.1
     18 * Version:           2.4.0
    1919 * Author:            semantify.it
    2020 * Author URI:        www.semantify.it
     
    3030}
    3131
    32 define('IASEMANTIFY_PLUGIN_NAME_VERSION', '2.3.1');
     32define('IASEMANTIFY_PLUGIN_NAME_VERSION', '2.4.0');
    3333
    3434/**
Note: See TracChangeset for help on using the changeset viewer.