Skip to content

Commit

Permalink
Merge pull request #34 from sushantnadkar/develop
Browse files Browse the repository at this point in the history
Refactored CSS to have custom prefixes in awc
  • Loading branch information
vjFaLk authored Sep 19, 2017
2 parents 5c36025 + 1cfcd1a commit 11459e0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
20 changes: 10 additions & 10 deletions gateway_selector/public/js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ frappe.gateway_selector.AddressFormProvider = Class.extend({
this.data.pincode = $form.find('input[name="pincode"]').val();
this.data.country = $form.find('select[name="country"] option:checked').attr('value');
} else {
this.data.billing_address = $('#billing-addrs div.selected').attr('data-name');
this.data.title = $('#billing-addrs .selected span#title strong').text();
this.data.phone = $('#billing-addrs .selected span#phone').text();
this.data.address_1 = $('#billing-addrs .selected span#line1').text();
this.data.address_2 = $('#billing-addrs .selected span#line2').text();
this.data.city = $('#billing-addrs .selected span#city').text();
this.data.state = $('#billing-addrs .selected span#state').text();
this.data.pincode = $('#billing-addrs .selected span#postal_code').text();
this.data.country = $('#billing-addrs .selected span#country').text();
this.data.billing_address = $('#awc-billing-addrs div.awc-selected').attr('data-name');
this.data.title = $('#awc-billing-addrs .awc-selected span#title strong').text();
this.data.phone = $('#awc-billing-addrs .awc-selected span#phone').text();
this.data.address_1 = $('#awc-billing-addrs .awc-selected span#line1').text();
this.data.address_2 = $('#awc-billing-addrs .awc-selected span#line2').text();
this.data.city = $('#awc-billing-addrs .awc-selected span#city').text();
this.data.state = $('#awc-billing-addrs .awc-selected span#state').text();
this.data.pincode = $('#awc-billing-addrs .awc-selected span#postal_code').text();
this.data.country = $('#awc-billing-addrs .awc-selected span#country').text();
}

$form.trigger('address_change', this.data);
Expand Down Expand Up @@ -254,7 +254,7 @@ frappe.integration_service.gateway_selector_gateway = Class.extend({
})

$('#gateway-selector-continue').click(function() {

$('html, body').animate({ scrollTop: $('#awc-forms').offset().top - 60 }, 'slow');
if ( !base._is_enabled ) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<div id="billing-addrs">
<div id="awc-billing-addrs">
<h4>Select Billing Address</h4>
<div class="row">
{% if not addresses %}
<div class="addresses-container"></div>
<div class="awc-addresses-container"></div>
{% else %}
<div class="addresses-container">
<div class="awc-addresses-container">
{% for address in addresses%}
<div class="col-md-12 col-sm-12 address-item">
<div class="col-md-12 col-sm-12 awc-address-item">
<div class="well">
<div data-name="{{ address.name }}" class="addr" style="cursor: pointer">
<div data-name="{{ address.name }}" class="awc-addr" style="cursor: pointer">
<p>
<button title="Delete" class="pull-right delete"><span class="fa fa-trash" aria-hidden="true"></span></button>
<button title="Edit" data-type="bill" class="pull-right edit" style="margin:0 15px;"><span class="fa fa-pencil" aria-hidden="true"></span></button>
<button title="Delete" class="pull-right awc-delete"><span class="fa fa-trash" aria-hidden="true"></span></button>
<button title="Edit" data-type="bill" class="pull-right awc-edit" style="margin:0 15px;"><span class="fa fa-pencil" aria-hidden="true"></span></button>
<span id="line1">{{ address.address_line1 }}</span>, {% if address.address_line2 %}
<span id="line2">{{ address.address_line2 }}</span>, {% endif %}
<span id="city">{{ address.city }}</span>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h2>Select Payment Method</h2>
{% if not is_backend %}
<h2>Billing Address</h2>
<div class="row">
<div id="select-bill-addr">
<div id="awc-select-bill-addr">
{% include "templates/includes/integrations/gateway_selector/billing_address_select.html" with context %}
</div>
<div id="form-bill-addr" style="display: none;">
Expand Down

0 comments on commit 11459e0

Please sign in to comment.