Skip to content

Commit

Permalink
wa-plugins/shipping/courier v.1.5.1
Browse files Browse the repository at this point in the history
  * Improved support of the delivery sheet for the Webasyst 2 interface.
  • Loading branch information
Leonix committed Dec 27, 2023
1 parent 55f174d commit c2ff990
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wa-plugins/shipping/courier/lib/config/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'description' => /*_wp*/('Shipping is restricted to the specific country and region only. Shipping rate is calculated based on either total amount or weight of the shipment.'),
'icon' => 'img/courier16.png',
'logo' => 'img/courier.png',
'version' => '1.5.0',
'version' => '1.5.1',
'vendor' => 'webasyst',
'type' => 'todoor',
'backend_custom_fields' => true,
Expand Down
31 changes: 29 additions & 2 deletions wa-plugins/shipping/courier/templates/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
<script>
function textAreaAdjust(textarea) {
var $textarea = $(textarea);
{if $wa->whichUi() == '1.3'}
$textarea.css("min-height", 0);
var scroll_h = $textarea[0].scrollHeight;
$textarea.css("min-height", (scroll_h + 10) + "px");
{/if}

var value = nl2br( escape($textarea.val()) );

Expand All @@ -30,6 +32,31 @@
return $("<div />").text(string).html();
}
</script>
<style>
.block.double-padded {
padding: 20px;
}
.c-layout {
display: table;
width: 100%;
}
.c-layout.fixed {
table-layout: fixed;
}
.c-layout > .c-column {
display: table-cell;
vertical-align: top;
}
.c-sidebar-column {
width: 40%;
}
.c-comment-section {
margin: 2em 0 0;
}
.c-map-section {
margin: 2em 0 0;
}
</style>
</head>

<body onLoad="textAreaAdjust(document.getElementById('comment'))">
Expand All @@ -45,7 +72,7 @@ <h1>{$order.id_str}</h1>
<div class="clear-left"></div>

<!-- order content -->
<ul class="menu-v order-content">
<ul class="menu-v order-content unstyled">
{foreach $order.items as $item}
<li>
{$item.name|escape}
Expand Down Expand Up @@ -86,7 +113,7 @@ <h2>{$order.total|wa_format_amount:$order.currency:'%{s}'}</h2>
<h3>{$order.contact.name|escape}</h3>

{if $main_contact_info}
<ul class="menu-v with-icons compact contact-info">
<ul class="menu-v with-icons compact contact-info unstyled">
{foreach $main_contact_info as $top_field}
<li><i class="icon16 {$top_field.id}"></i>{$top_field.value}</li>
{/foreach}
Expand Down

0 comments on commit c2ff990

Please sign in to comment.