Commit 6d6f1f12 by Tran Hoang Viet

VietTH: Fix review code social feature

parent a9b16269
......@@ -38,7 +38,7 @@ label.error{
-moz-box-shadow: 0px 1px 5px 0px rgba(0,0,0,0.72);
box-shadow: 0px 1px 5px 0px rgba(0,0,0,0.72);
background-color: #F3F3F3;
.share-scocial{
.share-social{
display: block;
}
}
......@@ -47,6 +47,12 @@ label.error{
position: relative;
&.disable{
opacity: 0.4;
img{
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
filter: gray;
filter: url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' height='0'><filter id='greyscale'><feColorMatrix type='matrix' values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0' /></filter></svg>#greyscale");
}
}
img{
height: 180px;
......@@ -55,7 +61,7 @@ label.error{
}
}
.share-scocial{
.share-social{
display: none;
text-align: center;
margin-left: -15px;
......
......@@ -10,7 +10,7 @@
font-size: 16px;
}
.share-scocial{
.share-social{
display: block !important;
}
}
\ No newline at end of file
module ScocialHelper
module SocialHelper
def facebook_share_url(url)
"https://www.facebook.com/sharer/sharer.php?u=#{url || request.original_url}"
end
......
......@@ -31,7 +31,7 @@
= render 'layouts/cart'
.row
.col-md-12
= render 'layouts/share_scocial'
= render 'layouts/share_social'
.col-md-10
= yield
......
%h3.title Checkout
- if cart_valid?
#checkout-cart
#checkout-cart.table-responsive
= form_for Order.new do |f|
%table.table
%thead
......
.product-addto-cart.input-group
- max_quantity = product.stock - current_user.cart.find(product).try(:quantity).to_i
- max_quantity = product.stock
- max_quantity -= current_user.cart.find(product).try(:quantity).to_i if user_signed_in?
= form_tag add_cart_product_path(product), method: :get, class: 'form-quantity' do
= text_field_tag :quantity, 1, class: 'form-control quantity'
= hidden_field_tag :stock, max_quantity, class: 'max-quantity'
......
......@@ -14,7 +14,7 @@
.clearfix
.share-scocial
.share-social
= link_to facebook_share_url(product_url(product)), class: 'facebook', target: '_blank' do
= image_tag 'facebook.png'
= link_to twitter_share_url(product_url(product)), class: 'twitter', target: '_blank' do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment