Changeset 2195637
- Timestamp:
- 11/18/2019 01:24:51 PM (6 years ago)
- Location:
- instant-annotation
- Files:
-
- 1 added
- 8 deleted
- 5 edited
-
.idea (deleted)
-
trunk/README.txt (modified) (1 diff)
-
trunk/admin/class-iasemantify-admin.php (modified) (2 diffs)
-
trunk/admin/css/bootstrap-material-design.css (deleted)
-
trunk/admin/css/bootstrap.css (deleted)
-
trunk/admin/css/ia_plugin.css (added)
-
trunk/admin/css/iasemantify-admin.css (deleted)
-
trunk/admin/css/material-icons.css (deleted)
-
trunk/admin/css/semantify.css (deleted)
-
trunk/admin/js/snackbar.js (deleted)
-
trunk/admin/partials/iasemantify-admin-display.php (modified) (3 diffs)
-
trunk/admin/partials/meta_boxes_display.php (modified) (16 diffs)
-
trunk/iasemantify.php (modified) (2 diffs)
-
trunk/vendor (deleted)
Legend:
- Unmodified
- Added
- Removed
-
instant-annotation/trunk/README.txt
r2119352 r2195637 4 4 Tags: SEO, annotations, schema.org, semantify 5 5 Requires at least: 3.0.1 6 Tested up to: 5. 0.16 Tested up to: 5.3 7 7 Stable tag: 4.4 8 8 License: GPLv2 or later -
instant-annotation/trunk/admin/class-iasemantify-admin.php
r2119352 r2195637 93 93 94 94 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' ); 112 100 } 113 101 } … … 143 131 144 132 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 171 142 } 172 143 if ( $curScreenId == 'settings_page_iasemantify') { -
instant-annotation/trunk/admin/partials/iasemantify-admin-display.php
r2119352 r2195637 21 21 22 22 <div class="wrap"> 23 <div class="bootstrap semantify ">23 <div class="bootstrap semantify semantify-instant-annotations"> 24 24 <h2><?php echo esc_html( get_admin_page_title() ); ?></h2> 25 25 … … 48 48 <input type="text" 49 49 class="regular-text" 50 style="background: white; width:25rem" 50 51 id="<?php echo $this->plugin_name; ?>-websiteUID" 51 52 name="<?php echo $this->plugin_name; ?>[websiteUID]" … … 62 63 <input type="text" 63 64 class="regular-text" 65 style="background: white; width:25rem" 64 66 id="<?php echo $this->plugin_name; ?>-websiteSecret" 65 67 name="<?php echo $this->plugin_name; ?>[websiteSecret]" -
instant-annotation/trunk/admin/partials/meta_boxes_display.php
r2119352 r2195637 52 52 </style> 53 53 54 <div class="bootstrap semantify " id="ia_global_bootstrap_div">54 <div class="bootstrap semantify semantify-instant-annotations" id="ia_global_bootstrap_div"> 55 55 <div id="ia_warning_message_box" hidden> 56 56 <div class="alert alert-danger" role="alert"> … … 60 60 <div id="ia_injection_box"></div> 61 61 <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> 63 63 <button style="margin-left:10px;padding:5px 20px" title="Please select a type first!" 64 64 class="btn btn-sm button-sti-red" id="addPane" disabled="true" type="button"><i class="material-icons">note_add</i> … … 90 90 <script> 91 91 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 92 103 $('#ia_warning_message_box').slideUp(); 93 104 if (IA_injection_is_checked === 'true') { … … 105 116 dummy.setAttribute("id", "preview_id"); 106 117 $('#preview_id').append( 107 '<div class="bootstrap semantify ">' +118 '<div class="bootstrap semantify semantify-instant-annotations">' + 108 119 '<div class="modal fade" id="previewModal" role="dialog">' + 109 120 '<div class="modal-dialog">' + … … 147 158 } 148 159 160 149 161 function onChangeSelect(element) { 150 162 $('#addPane').prop("disabled", false); 151 163 $('#addPane').prop("title", "Add a new annotation box"); 152 164 } 153 154 var IA_dashboard_annotation_store = null; 155 var IA_currently_added_annotations = []; 165 window.onChangeSelect = onChangeSelect; 156 166 157 167 // add select options … … 161 171 return ((aName < bName) ? -1 : ((aName > bName) ? 1 : 0)); 162 172 } 163 164 var websiteUID = <?php echo json_encode( $websiteUID );?>;165 var websiteSecret = <?php echo json_encode( $websiteSecret );?>;166 //console.log(websiteUID);167 173 168 174 InstantAnnotation.util.httpGet(InstantAnnotation.util.semantifyUrl + "/api/domainSpecification/instantAnnotation", function (ds) { … … 172 178 ds.sort(SortByName); 173 179 $('#select_type').append('<option hidden>Select type</option>'); 174 $('#select_type').append('<optgroup label="Public template "/>');180 $('#select_type').append('<optgroup label="Public templates"/>'); 175 181 ds.forEach(function (d) { 176 182 $('#select_type').append($('<option>', { 177 183 value: d.hash, 178 text: d.name 184 text: d.name, 179 185 })); 180 186 }); … … 189 195 ds.sort(SortByName); 190 196 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 } 192 201 ds.forEach(function (d) { 193 202 personalDSHtml += '<option value="' + d.hash + '">' + … … 196 205 }); 197 206 personalDSHtml += '</optgroup>'; 198 personalDSHtml += '<option disabled style="font-style: italic">no private templates</option>';199 207 $('#select_type').prepend(personalDSHtml); 200 208 $('#select_type').prop("selectedIndex", 0); … … 208 216 209 217 // rest 210 211 iasi_saveWebsiteUID = <?php echo json_encode( $websiteUID );?>;212 iasi_saveWebsiteSecret = <?php echo json_encode( $websiteSecret );?>;213 218 214 219 var existingAnnotationsString = <?php echo json_encode( get_post_meta( get_the_ID(), $this->plugin_name . "_ann_id", true ) );?>; … … 279 284 dummy.setAttribute("id", "ia_menu_report_id"); 280 285 $('#ia_menu_report_id').append( 281 '<div class="bootstrap semantify ">' +286 '<div class="bootstrap semantify semantify-instant-annotations">' + 282 287 '<div class="modal fade" id="ia_menu_reportModal" role="dialog">' + 283 288 '<div class="modal-dialog">' + … … 318 323 } 319 324 }); 320 var slackReport = {325 var report = { 321 326 text: "*--- New Report ---*\n" + 322 327 "Origin: " + window.location.href + "\n" + … … 327 332 "*--- End Report ---* \n" 328 333 }; 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) { 330 335 if (res === 'ok') { 331 336 InstantAnnotation.util.send_snackbarMSG("Successfully sent message"); … … 352 357 dummy.setAttribute("id", "ia_menu_help_id"); 353 358 $('#ia_menu_help_id').append( 354 '<div class="bootstrap semantify ">' +359 '<div class="bootstrap semantify semantify-instant-annotations">' + 355 360 '<div class="modal fade" id="ia_menu_helpModal" role="dialog">' + 356 361 '<div class="modal-dialog">' + … … 420 425 dummy.setAttribute("id", "ia_menu_add_ann_id"); 421 426 $('#ia_menu_add_ann_id').append( 422 '<div class="bootstrap semantify ">' +427 '<div class="bootstrap semantify semantify-instant-annotations">' + 423 428 '<div class="modal fade" id="ia_menu_add_annModal" role="dialog">' + 424 429 '<div class="modal-dialog">' + … … 635 640 }); 636 641 642 }(jQuery)); 643 637 644 </script> -
instant-annotation/trunk/iasemantify.php
r2119352 r2195637 16 16 * Plugin Name: Instant Annotation 17 17 * Description: Deploy your annotations from semantify.it to your wordpress website with an easy interface. 18 * Version: 2. 3.118 * Version: 2.4.0 19 19 * Author: semantify.it 20 20 * Author URI: www.semantify.it … … 30 30 } 31 31 32 define('IASEMANTIFY_PLUGIN_NAME_VERSION', '2. 3.1');32 define('IASEMANTIFY_PLUGIN_NAME_VERSION', '2.4.0'); 33 33 34 34 /**
Note: See TracChangeset
for help on using the changeset viewer.