zones empty state
This commit is contained in:
parent
7f61beee41
commit
d8f96f4dc9
File diff suppressed because one or more lines are too long
|
@ -2119,6 +2119,53 @@ table.wc-shipping-zones, table.wc-shipping-zone-methods {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
td.wc-shipping-zones-blank-state {
|
||||||
|
background: #F7F1F6 !important;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
padding: 7.5em 10% 15em;
|
||||||
|
border-bottom: 2px solid #EEE2EC;
|
||||||
|
p {
|
||||||
|
color: #a46497;
|
||||||
|
font-size: 1.5em;
|
||||||
|
line-height: 1.5em;
|
||||||
|
margin: 0 0 1em;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
text-shadow: 1px 1px 1px white;
|
||||||
|
|
||||||
|
&.main {
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:before {
|
||||||
|
content: "\f319";
|
||||||
|
font-family: 'dashicons';
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1;
|
||||||
|
color: #EEE2EC;
|
||||||
|
display: block;
|
||||||
|
width: 17px;
|
||||||
|
font-size: 50em;
|
||||||
|
top: 10%;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
.button-primary {
|
||||||
|
background-color: #a16696;
|
||||||
|
border-color: #a16696;
|
||||||
|
-webkit-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 0 rgba( 0, 0, 0, 0.15 );
|
||||||
|
box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 0 rgba( 0, 0, 0, 0.15 );
|
||||||
|
margin: 0;
|
||||||
|
opacity: 1;
|
||||||
|
text-shadow: 0px -1px 1px #8a4f7f, 1px 0px 1px #8a4f7f, 0px 1px 1px #8a4f7f, -1px 0px 1px #8a4f7f;
|
||||||
|
font-size: 1.5em;
|
||||||
|
padding: .75em 1em;
|
||||||
|
height: auto;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
tbody.wc-shipping-zone-rows {
|
tbody.wc-shipping-zone-rows {
|
||||||
tr:nth-child(odd) {
|
tr:nth-child(odd) {
|
||||||
td {
|
td {
|
||||||
|
|
|
@ -68,10 +68,9 @@
|
||||||
var zones = _.indexBy( this.model.get( 'zones' ), 'zone_id' ),
|
var zones = _.indexBy( this.model.get( 'zones' ), 'zone_id' ),
|
||||||
view = this;
|
view = this;
|
||||||
|
|
||||||
// Blank out the contents.
|
if ( _.size( zones ) ) {
|
||||||
this.$el.empty();
|
this.$el.empty();
|
||||||
|
|
||||||
if ( _.size( zones ) ) {
|
|
||||||
// Sort zones
|
// Sort zones
|
||||||
zones = _.sortBy( zones, function( zone ) {
|
zones = _.sortBy( zones, function( zone ) {
|
||||||
return parseInt( zone.zone_order, 10 );
|
return parseInt( zone.zone_order, 10 );
|
||||||
|
|
|
@ -20,7 +20,16 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
<tbody class="wc-shipping-zone-rows"></tbody>
|
<tbody class="wc-shipping-zone-rows">
|
||||||
|
<tr>
|
||||||
|
<td class="wc-shipping-zones-blank-state" colspan="5">
|
||||||
|
<p class="main"><?php _e( 'Shipping Zones are regions you ship products to.', 'woocommerce' ); ?></p>
|
||||||
|
<p><?php _e( 'You can add as many zones as you want, for example you could have "Local", "Domestic", and "Europe" zones depending on your needs.', 'woocommerce' ); ?></p>
|
||||||
|
<p><?php _e( 'Once a zone has been added, you can add multiple shipping rates within each. Customers will only see rates that apply to them.', 'woocommerce' ); ?></p>
|
||||||
|
<a class="button button-primary wc-shipping-zone-add"><?php _e( 'Add a shipping zone', 'woocommerce' ); ?></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="1%" class="wc-shipping-zone-worldwide"></td>
|
<td width="1%" class="wc-shipping-zone-worldwide"></td>
|
||||||
|
|
|
@ -34,7 +34,7 @@ class WC_Shipping_Zones {
|
||||||
$zones[ $zone->get_zone_id() ]['shipping_methods'] = $zone->get_shipping_methods();
|
$zones[ $zone->get_zone_id() ]['shipping_methods'] = $zone->get_shipping_methods();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $zones;
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue