Changeset 2399263
- Timestamp:
- 10/14/2020 08:59:30 AM (5 years ago)
- Location:
- invelity-gls-parcelshop/trunk
- Files:
-
- 6 added
- 8 edited
-
README.txt (modified) (1 diff)
-
admin/class.InvelityGlsParcelShopAdmin.php (modified) (2 diffs)
-
admin/fonts (added)
-
admin/fonts/icomoon.eot (added)
-
admin/fonts/icomoon.svg (added)
-
admin/fonts/icomoon.ttf (added)
-
admin/fonts/icomoon.woff (added)
-
admin/fonts/index.php (added)
-
includes/WC_Gls_Parcel_Shop_Shipping_Method.php (modified) (1 diff)
-
includes/class.InvelityGlsParcelShop.php (modified) (2 diffs)
-
invelity-gls-parcelshop.php (modified) (2 diffs)
-
public/class.InvelityGlsParcelShopPublic.php (modified) (5 diffs)
-
public/css/invelity-gls-parcel-shop-public.css (modified) (14 diffs)
-
public/js/invelity-gls-parcel-shop-public.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
invelity-gls-parcelshop/trunk/README.txt
r2394221 r2399263 43 43 = 1.0.0 = 44 44 * Plugin Release 45 46 = 1.0.1 = 47 * Plugin Release 48 css fixes 49 added notification after install 50 renamed default shipping method 51 fixed notices -
invelity-gls-parcelshop/trunk/admin/class.InvelityGlsParcelShopAdmin.php
r2394221 r2399263 22 22 } 23 23 24 public function enqueueStyles(){ 25 26 } 24 27 25 28 public function customAdminNotices() … … 28 31 global $pagenow; 29 32 30 if ($pagenow == 'admin.php' && $_GET['page'] == 'wc-settings' && $_GET['tab'] == 'shipping') { 33 if (isset($_GET['tab'])) { 34 if ($pagenow == 'admin.php' && $_GET['page'] == 'wc-settings' && $_GET['tab'] == 'shipping') { 31 35 32 global $wpdb;33 $table_name = $wpdb->prefix . 'inv_gls_parcel_shop';34 $result = $wpdb->get_results('SELECT * FROM ' . $table_name . '');35 if (!$result) {36 echo "<div class=\"error\">";37 echo "<p>'Chyba pri aktualizovaní pobočiek GlsParcelShop'</p>";38 echo "</div>";36 global $wpdb; 37 $table_name = $wpdb->prefix . 'inv_gls_parcel_shop'; 38 $result = $wpdb->get_results('SELECT * FROM ' . $table_name . ''); 39 if (!$result) { 40 echo "<div class=\"error\">"; 41 echo "<p>'Chyba pri aktualizovaní pobočiek GlsParcelShop'</p>"; 42 echo "</div>"; 39 43 40 }else{ 41 echo "<div class=\"success\">"; 42 echo "<p>'Pobočky GlsParcelShop pridané'</p>"; 43 echo "</div>"; 44 } else { 45 echo "<div class=\"success\">"; 46 echo "<p>'Pobočky GlsParcelShop pridané'</p>"; 47 echo "</div>"; 48 } 49 44 50 } 45 46 51 } 47 52 } -
invelity-gls-parcelshop/trunk/includes/WC_Gls_Parcel_Shop_Shipping_Method.php
r2394221 r2399263 52 52 'type' => 'text', 53 53 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ), 54 'default' => __( ' Custom Shipping Method', 'woocommerce' ),54 'default' => __( 'GLS ParcelShop', 'woocommerce' ), 55 55 ), 56 56 -
invelity-gls-parcelshop/trunk/includes/class.InvelityGlsParcelShop.php
r2394221 r2399263 27 27 $this->loadDependencies(); 28 28 $this->setLocale(); 29 $this->defineAdminHooks();30 29 $this->definePublicHooks(); 31 30 $this->addShippingMethod(); … … 62 61 } 63 62 64 65 private function defineAdminHooks()66 {67 68 $plugin_admin = new InvelityGlsParcelShopAdmin($this->getPluginName(), $this->getVersion());69 70 71 $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueueStyles');72 $this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueueScripts');73 74 }75 63 76 64 -
invelity-gls-parcelshop/trunk/invelity-gls-parcelshop.php
r2394221 r2399263 8 8 Author: Invelity 9 9 Author URI: https://www.invelity.com 10 Version: 1.0. 010 Version: 1.0.1 11 11 */ 12 12 … … 88 88 } 89 89 90 91 90 add_action ('invelityGlsParcelShopCron', 'invelityGlsParcelShopCronJobAction'); 92 91 92 93 94 function activateInvelityGlsParcelShopPluginShowMessage() { 95 set_transient( 'invelity-admin-message-gls-parcelshop', true, 5 ); 96 } 97 98 add_action( 'admin_notices', 'invelityAdminMessageGlsParcelshop' ); 99 100 function invelityAdminMessageGlsParcelshop(){ 101 102 if( get_transient( 'invelity-admin-message-gls-parcelshop' ) ){ 103 ?> 104 <div class="updated notice is-dismissible"> 105 <p>Plugin úspešne nainštalovaný.Pridajte GLS ParcelShop<a href="<?= admin_url()?>admin.php?page=wc-settings&tab=shipping"> dopravnú metódu</a>.</p> 106 </div> 107 <?php 108 delete_transient( 'invelity-admin-message-gls-parcelshop' ); 109 } 110 } 111 93 112 register_activation_hook(__FILE__, 'activateInvelityGlsParcelShopPlugin'); 113 register_activation_hook( __FILE__, 'activateInvelityGlsParcelShopPluginShowMessage' ); 94 114 register_deactivation_hook(__FILE__, 'deactivateInvelityGlsParcelShopPlugin'); 95 115 register_deactivation_hook (__FILE__, 'invelityGlsParcelShopCronDeactivation'); -
invelity-gls-parcelshop/trunk/public/class.InvelityGlsParcelShopPublic.php
r2394221 r2399263 24 24 if (WC()->session->chosen_shipping_methods[0] == 'inv_gls_parcel_shop') { 25 25 ?> 26 <img src="<?= plugin_dir_url(__FILE__) ?>img/gls-logo.png" style="width: 50px;height: auto"> 27 <br> 28 <a id="gls_parcel_shop_map_init" class="gls_parcel_shop_map_init">Vybrať pobočku</a> 29 <span id="inv_gls_parcel_shop_picked_shop_name"></span> 30 <input type="hidden" name="inv_gls_picked_shop_id" value=""> 31 <input type="hidden" name="inv_gls_picked_shop_name" value=""> 32 <input type="hidden" name="inv_gls_picked_shop_address" value=""> 26 <div class="invelity-gls-parcelshop-box"> 27 <div> 28 <img src="<?= plugin_dir_url(__FILE__) ?>img/gls-logo.png" 29 style="width: 50px;height: auto"> 30 <a id="gls_parcel_shop_map_init" class="gls_parcel_shop_map_init">Vybrať pobočku</a> 31 </div> 32 <div> 33 <span id="inv_gls_parcel_shop_picked_shop_name"></span> 34 <input type="hidden" name="inv_gls_picked_shop_id" value=""> 35 <input type="hidden" name="inv_gls_picked_shop_name" value=""> 36 <input type="hidden" name="inv_gls_picked_shop_address" value=""> 37 </div> 38 </div> 33 39 <?php 34 40 } … … 49 55 add_action('woocommerce_checkout_update_order_meta', [$this, 'updateOrderMetaParcelShopInformations'], 15, 2); 50 56 add_action('wp_ajax_invGlsParcelShopOpenMap', [$this, 'invGlsParcelShopOpenMap']); 57 add_action('wp_ajax_nopriv_invGlsParcelShopOpenMap', [$this, 'invGlsParcelShopOpenMap']); 51 58 52 59 … … 141 148 142 149 <?php 143 echo ob_get_clean();150 echo ob_get_clean(); 144 151 wp_die(); 145 152 … … 168 175 wp_localize_script($this->plugin_name, 'inv_globals', [ 169 176 'pluginUrl' => plugin_dir_url(__FILE__), 170 'ajax_url' => admin_url( 'admin-ajax.php'),177 'ajax_url' => admin_url('admin-ajax.php'), 171 178 ]); 172 179 } … … 192 199 $saniteText = sanitize_text_field($_POST['inv_gls_picked_shop_id']); 193 200 194 if (!empty($saniteText) ){201 if (!empty($saniteText)) { 195 202 196 203 global $wpdb; -
invelity-gls-parcelshop/trunk/public/css/invelity-gls-parcel-shop-public.css
r2394221 r2399263 5 5 .gls_parcel_shop_map_init { 6 6 cursor: pointer; 7 } 7 margin-left: 10px; 8 } 9 8 10 9 11 #big-canvas { … … 21 23 22 24 .inv_gls_parcelshop_map { 23 height: 650px;25 height: 700px; 24 26 width: 650px; 27 max-height: 100%; 25 28 } 26 29 … … 32 35 } 33 36 37 .invelity-gls-parcelshop-box{ 38 display: flex; 39 flex-direction: column; 40 flex-wrap:wrap; 41 justify-content: space-evenly; 42 align-content: flex-end; 43 align-items: center; 44 } 45 .invelity-gls-parcelshop-box >div:first-of-type{ 46 display: flex; 47 align-items: center; 48 } 49 50 34 51 .inv_gls_parcelshop_map_section_container { 35 52 float: left; 36 53 width: 70%; 37 54 display: block; 38 height: 650px; 55 height: 100%; 56 display: flex; 39 57 } 40 58 … … 64 82 z-index: 100001; 65 83 width: 100%; 66 height: 100%;84 height: 80vh; 67 85 top: 0px; 68 86 left: 0px; … … 73 91 max-height: initial; 74 92 overflow: hidden; 75 top: 10%;93 top: 5vh; 76 94 margin: 0 auto; 77 95 padding-top: 45px 78 96 } 79 97 .inv_gls_parcelshop_list_shops_wrapper{ 98 overflow-y: scroll; 99 overflow-x: hidden; 100 } 80 101 .inv_gls_parcelshop_pop_up_wrapper .inv_gls_parcelshop_pop_up_container { 81 102 display: none; … … 100 121 vertical-align: middle; 101 122 width: 100%; 123 height: 100%; 124 display: flex; 102 125 } 103 126 … … 113 136 padding-right: 1em; 114 137 border-top: 5px solid #fdc344; 138 display: flex; 139 height: 100%; 140 flex-direction: column; 115 141 } 116 142 … … 122 148 123 149 .inv_gls_parcelshop_pop-up_list h6 { 124 font-size: 20px;125 color: #333 ;126 font-weight: 600 ;150 font-size: 18px!important; 151 color: #333!important; 152 font-weight: 600!important; 127 153 margin-top: 0.5em; 128 154 margin-bottom: 0.5em; 129 155 margin-left: 2em; 156 width:80%; 157 text-transform: none; 130 158 } 131 159 … … 173 201 margin: 0; 174 202 height: 415px; 175 overflow-y: scroll;176 203 margin-bottom: 10px; 177 204 205 } 206 .checkbox-custom-label{ 207 display: flex; 178 208 } 179 209 … … 184 214 padding: 0.5em; 185 215 padding-left: 2em; 216 margin-bottom: 0px!important; 186 217 } 187 218 … … 374 405 display: -webkit-box; 375 406 display: -ms-flexbox; 376 display: flex ;407 display: flex!important; 377 408 -webkit-box-align: center; 378 409 -ms-flex-align: center; … … 387 418 opacity: 0; 388 419 width: 0px; 420 margin:0!important; 421 display: none; 389 422 } 390 423 … … 393 426 display: block; 394 427 font-size: 12px; 428 text-align: left; 395 429 } 396 430 … … 511 545 height: 150px; 512 546 } 513 514 } 547 .inv_gls_parcelshop_pop_up_wrapper .inv_gls_parcelshop_pop_up_container{ 548 flex-direction: column; 549 } 550 .inv_gls_parcelshop_list_shop{ 551 padding-bottom: 0px; 552 } 553 554 .inv_gls_parcelshop_map_container{ 555 height: 250px; 556 max-height: 100%; 557 } 558 .inv_gls_parcelshop_pop-up_list h6{ 559 font-size:15px!important; 560 } 561 .inv_gls_parcelshop_pop-up_list{ 562 margin-bottom:10px; 563 } 564 565 } -
invelity-gls-parcelshop/trunk/public/js/invelity-gls-parcel-shop-public.js
r2394221 r2399263 196 196 197 197 function mapPopUpClose() { 198 $('body').css('overflow', 'auto'); 199 $('html').css('overflow-x', 'auto'); 198 200 $('#inv_gls_map_init_container').removeClass('show'); 199 201 } … … 209 211 cache: false, 210 212 success: function (result) { 213 $('body').css('overflow', 'hidden'); 214 $('html').css('overflow-x', 'inherit'); 211 215 $("#inv_gls_map_init_container").html(result); 212 216 $('#inv_gls_map_init_container').addClass('show');
Note: See TracChangeset
for help on using the changeset viewer.