From 0ef58a80307d775fb6cf4bfdf1b215c4668ea4ea Mon Sep 17 00:00:00 2001
From: hf <fei.hong@yoho.cn>
Date: Tue, 22 Dec 2015 07:26:43 +0800
Subject: [PATCH] fixes some bugs to gzip css and js

---
 template/m.yohobuy.com/actions/cart/index/gift-advance.phtml |   1 -
 template/m.yohobuy.com/actions/cart/index/index.phtml        | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------
 template/m.yohobuy.com/actions/cart/index/order-ensure.phtml | 274 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------------------------------------------------------------------------------------------
 template/m.yohobuy.com/partials/cart/cart-content.phtml      |  12 +++++-------
 4 files changed, 194 insertions(+), 198 deletions(-)

diff --git a/template/m.yohobuy.com/actions/cart/index/gift-advance.phtml b/template/m.yohobuy.com/actions/cart/index/gift-advance.phtml
index 985380e..e0afafe 100644
--- a/template/m.yohobuy.com/actions/cart/index/gift-advance.phtml
+++ b/template/m.yohobuy.com/actions/cart/index/gift-advance.phtml
@@ -19,7 +19,6 @@
             </div>
         {{/ freebie}}
     {{/if}}
-
 <div id="chose-panel"></div>
 </div>
 {{> layout/footer}}
diff --git a/template/m.yohobuy.com/actions/cart/index/index.phtml b/template/m.yohobuy.com/actions/cart/index/index.phtml
index 566b1db..2da5e4c 100644
--- a/template/m.yohobuy.com/actions/cart/index/index.phtml
+++ b/template/m.yohobuy.com/actions/cart/index/index.phtml
@@ -1,60 +1,59 @@
 {{> layout/header}}
 <div id="mainCart" class="shopping-cart-page yoho-page">
     {{# shoppingCart}}
-        {{#if showLoginInfo}}
-            <p class="login-info">
-                <span class="iconfont">&#xe628;</span>
-                请您先
-                <a class="btn btn-login" href="{{signurl}}">登录</a>
-                可以同步电脑和手机中的商品
-            </p>
-        {{/if}}
-        {{#if isEmptyCart}}
-            <div class="cart-zero">
-                <i class="iconfont">&#xe640;</i>
-                <p>您的购物车暂无商品</p>
-                <a href="/product/new">随便逛逛</a>
+    {{#if showLoginInfo}}
+    <p class="login-info">
+        <span class="iconfont">&#xe628;</span>
+        请您先
+        <a class="btn btn-login" href="{{signurl}}">登录</a>
+        可以同步电脑和手机中的商品
+    </p>
+    {{/if}}
+    {{#if isEmptyCart}}
+    <div class="cart-zero">
+        <i class="iconfont">&#xe640;</i>
+        <p>您的购物车暂无商品</p>
+        <a href="/product/new">随便逛逛</a>
+    </div>
+    {{> product/recommend-for-you}}
+    {{^}}
+    {{#if cartNav}}
+    <ul class="cart-nav clearfix">
+        
+        <li class="active" id="common-cart-nav">
+            <span >
+                普通商品({{commonGoodsCount}})
+            </span>
+        </li>
+        <li id="presell-cart-nav">
+            <span >
+                预售商品({{presellGoodsCount}})
+            </span>
+            <div id="presell-tip" class="presell-tip hide">
+                <div class="triangle"></div>
+                <p class="pt-content">预售商品点这里结算哦~</p>
             </div>
-            {{> product/recommend-for-you}}
-        {{^}}
-            {{#if cartNav}}
-                <ul class="cart-nav clearfix">
-                    <li class="active" id="common-cart-nav">
-                        <span >
-                            普通商品({{commonGoodsCount}})
-                        </span>
-                    </li>
-                    <li id="presell-cart-nav">
-                        <span >
-                            预售商品({{presellGoodsCount}})
-                        </span>
-                        <div id="presell-tip" class="presell-tip hide">
-                            <div class="triangle"></div>
-                            <p class="pt-content">预售商品点这里结算哦~</p>
-                        </div>
-                    </li>
-                </ul>
-            {{/if}}
-
-            {{# commonCart}}
-                <div class="cart-content common">
-                    {{> cart/cart-content}}
-                </div>
-            {{/ commonCart}}
-
-            {{# preSellCart}}
-                <div class="cart-content presell hide">
-                    <p class="presell-info">
-                        <span class="iconfont">&#xe61a;</span>
-                        <span class="txt">预售商品全场包邮,到货后立即发货</span>
-                        <span class="txt">预售商品不参加活动,不可使用优惠券</span>
-                    </p>
-                    {{> cart/cart-content}}
-                </div>
-            {{/ preSellCart}}
-        {{/if}}
-
-         <input id="cartType" type="hidden" value="{{cartType}}">
+        </li>
+        
+    </ul>
+    {{/if}}
+    {{# commonCart}}
+    <div class="cart-content common">
+        {{> cart/cart-content}}
+    </div>
+    {{/ commonCart}}
+    {{# preSellCart}}
+    <div class="cart-content presell hide">
+        <p class="presell-info">
+            <span class="iconfont">&#xe61a;</span>
+            <span class="txt">预售商品全场包邮,到货后立即发货</span>
+            <span class="txt">预售商品不参加活动,不可使用优惠券</span>
+        </p>
+        {{> cart/cart-content}}
+    </div>
+    {{/ preSellCart}}
+    {{/if}}
+    <input id="cartType" type="hidden" value="{{cartType}}">
     {{/ shoppingCart}}
 </div>
 {{> layout/footer}}
diff --git a/template/m.yohobuy.com/actions/cart/index/order-ensure.phtml b/template/m.yohobuy.com/actions/cart/index/order-ensure.phtml
index 5d06faa..2784d8d 100644
--- a/template/m.yohobuy.com/actions/cart/index/order-ensure.phtml
+++ b/template/m.yohobuy.com/actions/cart/index/order-ensure.phtml
@@ -1,162 +1,162 @@
 {{> layout/header}}
 <div class="order-ensure-page yoho-page">
     {{# orderEnsure}}
-        <a class="address-wrap block" data-id="{{addressId}}" data-support="{{isSupport}}" href="/cart/index/selectAddress">
-            <p class="infos">
-                收货地址
-                <span class="per-info">{{name}} {{phoneNum}}</span>
-                <span class="address">{{area}} {{address}}</span>
-            </p>
-            <span class="iconfont">&#xe614;</span>
-        </a>
+    <a class="address-wrap block" data-id="{{addressId}}" data-support="{{isSupport}}" href="/cart/index/selectAddress">
+        <p class="infos">
+            收货地址
+            <span class="per-info">{{name}} {{phoneNum}}</span>
+            <span class="address">{{area}} {{address}}</span>
+        </p>
+        <span class="iconfont">&#xe614;</span>
+    </a>
 
-        <section class="dispatch block">
-            <div class="sub-block">
-                <h3 class="title">配送方式</h3>
-                <ul class="dispatch-mode clearfix">
-                    {{#each dispatchMode}}
-                        <li {{#if isSelected}}class="chosed"{{/if}} data-id="{{id}}">{{name}}</li>
-                    {{/each}}
-                </ul>
-            </div>
-
-            <div class="sub-block">
-                <h3 class="title">送货时间</h3>
-                <ul class="dispatch-time clearfix">
-                    {{#each dispatchTime}}
-                        <li {{#if isSelected}}class="chosed"{{/if}} data-id="{{id}}">{{name}}</li>
-                    {{/each}}
-                </ul>
-            </div>
-        </section>
-
-        <section class="block">
-            <h3 class="title">商品</h3>
-            <div class="goods">
-                {{#each goods}}
-                    {{> me/order/good}}
+    <section class="dispatch block">
+        <div class="sub-block">
+            <h3 class="title">配送方式</h3>
+            <ul class="dispatch-mode clearfix">
+                {{#each dispatchMode}}
+                <li {{#if isSelected}}class="chosed"{{/if}} data-id="{{id}}">{{name}}</li>
                 {{/each}}
-            </div>
-        </section>
+            </ul>
+        </div>
 
-        <section class="block">
-            <ul class="sale-invoice">
-                {{#if isOrdinaryCart}}
-                <li class="coupon">
-                    <a href="/cart/index/selectCoupon">
-                        <span class="title">优惠券</span>
-                        {{# coupon}}
-                            <span class="coupon-count">
-                                {{count}}张可用
-                            </span>
+        <div class="sub-block">
+            <h3 class="title">送货时间</h3>
+            <ul class="dispatch-time clearfix">
+                {{#each dispatchTime}}
+                <li {{#if isSelected}}class="chosed"{{/if}} data-id="{{id}}">{{name}}</li>
+                {{/each}}
+            </ul>
+        </div>
+    </section>
 
-                            {{#if couponName}}
-                                <span class="used coupon-use" data-name="{{couponName}}">
-                                    {{couponName}}
-                                    <i class="iconfont">&#xe614;</i>
-                                </span>
-                            {{^}}
-                                <span class="not-used coupon-use">
-                                    未使用
-                                    <i class="iconfont">&#xe614;</i>
-                                </span>
-                            {{/if}}
-                        {{/coupon}}
-                    </a>
-                </li>
-                {{/if}}
-                <li class="coin" data-yoho-coin="{{yohoCoin}}">
-                    <span class="title">YOHO币</span>
+    <section class="block">
+        <h3 class="title">商品</h3>
+        <div class="goods">
+            {{#each goods}}
+            {{> me/order/good}}
+            {{/each}}
+        </div>
+    </section>
 
-                    {{#if yohoCoin}}
-                        <span class="desc used {{#unless useYohoCoin}}hide{{/if}}">已抵¥{{useYohoCoin}}</span>
-                        <span class="desc can-use {{#if useYohoCoin}}hide{{/if}}">可抵¥{{yohoCoin}}</span>
+    <section class="block">
+        <ul class="sale-invoice">
+            {{#if isOrdinaryCart}}
+            <li class="coupon">
+                <a href="/cart/index/selectCoupon">
+                    <span class="title">优惠券</span>
+                    {{# coupon}}
+                    <span class="coupon-count">
+                        {{count}}张可用
+                    </span>
 
-                        {{#if useYohoCoin}}
-                        <span class="coin-check">
-                            <em>- ¥ {{useYohoCoin}}</em>
-                            <i class="iconfont checkbox icon-cb-checked"></i>
-                        </span>
-                        {{else}}
-                        <span class="coin-check">
-                            <em style="display: none;">- ¥ {{useYohoCoin}}</em>
-                            <i class="iconfont checkbox icon-checkbox"></i>
-                        </span>
-                        {{/if}}
+                    {{#if couponName}}
+                    <span class="used coupon-use" data-name="{{couponName}}">
+                        {{couponName}}
+                        <i class="iconfont">&#xe614;</i>
+                    </span>
                     {{^}}
-                        <span class="not-used coin-check">
-                            无YOHO币可用
-                        </span>
+                    <span class="not-used coupon-use">
+                        未使用
+                        <i class="iconfont">&#xe614;</i>
+                    </span>
                     {{/if}}
-                </li>
+                    {{/coupon}}
+                </a>
+            </li>
+            {{/if}}
+            <li class="coin" data-yoho-coin="{{yohoCoin}}">
+                <span class="title">YOHO币</span>
 
-                {{#if invoice}}
-                    <li class="invoice {{#if needInvoice}}focus{{/if}}">
-                        <span class="title">发票</span>
-                        <span class="iconfont checkbox {{#if needInvoice}}icon-cb-checked{{else}}icon-checkbox{{/if}}"></span>
-                        <form id="invoice">
-                            <input type="text" name="invoice-title" value="{{invoiceText}}" maxlength="30" placeholder="发票抬头">
-                            <label>
-                                发票类型
-                                <select class="invoice-type" name="invoice-type">
-                                    {{# invoice}}
-                                    <option value="{{id}}" {{#if isSelected}}selected{{/if}}>{{name}}</option>
-                                    {{/ invoice}}
-                                </select>
-                            </label>
-                        </form>
-                    </li>
+                {{#if yohoCoin}}
+                <span class="desc used {{#unless useYohoCoin}}hide{{/if}}">已抵¥{{useYohoCoin}}</span>
+                <span class="desc can-use {{#if useYohoCoin}}hide{{/if}}">可抵¥{{yohoCoin}}</span>
+
+                {{#if useYohoCoin}}
+                <span class="coin-check">
+                    <em>- ¥ {{useYohoCoin}}</em>
+                    <i class="iconfont checkbox icon-cb-checked"></i>
+                </span>
+                {{else}}
+                <span class="coin-check">
+                    <em style="display: none;">- ¥ {{useYohoCoin}}</em>
+                    <i class="iconfont checkbox icon-checkbox"></i>
+                </span>
                 {{/if}}
-            </ul>
+                {{^}}
+                <span class="not-used coin-check">
+                    无YOHO币可用
+                </span>
+                {{/if}}
+            </li>
 
-            <form id="msg" action="" method="post">
-                <input type="text" name="msg" value="{{msg}}" maxlength="40" placeholder="留言">
-            </form>
-        </section>
+            {{#if invoice}}
+            <li class="invoice {{#if needInvoice}}focus{{/if}}">
+                <span class="title">发票</span>
+                <span class="iconfont checkbox {{#if needInvoice}}icon-cb-checked{{else}}icon-checkbox{{/if}}"></span>
+                <form id="invoice">
+                    <input type="text" name="invoice-title" value="{{invoiceText}}" maxlength="30" placeholder="发票抬头">
+                    <label>
+                        发票类型
+                        <select class="invoice-type" name="invoice-type">
+                            {{# invoice}}
+                            <option value="{{id}}" {{#if isSelected}}selected{{/if}}>{{name}}</option>
+                            {{/ invoice}}
+                        </select>
+                    </label>
+                </form>
+            </li>
+            {{/if}}
+        </ul>
 
-        <section class="price-cal block">
-            <ul class="total">
-                {{#cartPayData}}
-                <li>
-                    <span>{{promotion}}</span>
-                    &nbsp;&nbsp;{{promotion_amount}}
-                </li>
-                {{/cartPayData}}
-                <li class="cost">
-                    应付金额: <em>¥{{price}}</em>
-                </li>
-            </ul>
-        </section>
+        <form id="msg" action="" method="post">
+            <input type="text" name="msg" value="{{msg}}" maxlength="40" placeholder="留言">
+        </form>
+    </section>
 
-        <ul class="pay-mode">
-            {{# paymentWay}}
-            {{#if isSupport}}
-            <li class="{{#if recommend}}default{{/if}}" data-pay-type="{{paymentType}}" data-pay-id="{{id}}">
-                <span class="iconfont">
-                    {{#if recommend}}
-                        &#xe62f;
-                    {{else}}
-                        &#xe62e;
-                    {{/if}}
-                </span>
-                {{name}}
+    <section class="price-cal block">
+        <ul class="total">
+            {{#cartPayData}}
+            <li>
+                <span>{{promotion}}</span>
+                &nbsp;&nbsp;{{promotion_amount}}
+            </li>
+            {{/cartPayData}}
+            <li class="cost">
+                应付金额: <em>¥{{price}}</em>
             </li>
-            {{/if}}
-            {{/ paymentWay}}
         </ul>
+    </section>
+
+    <ul class="pay-mode">
+        {{# paymentWay}}
+        {{#if isSupport}}
+        <li class="{{#if recommend}}default{{/if}}" data-pay-type="{{paymentType}}" data-pay-id="{{id}}">
+            <span class="iconfont">
+                {{#if recommend}}
+                &#xe62f;
+                {{else}}
+                &#xe62e;
+                {{/if}}
+            </span>
+            {{name}}
+        </li>
+        {{/if}}
+        {{/ paymentWay}}
+    </ul>
     {{/ orderEnsure}}
 </div>
 <script id="tmpl-price" type="text/tmpl">
     <ul class="total">
-        \{{#cartPayData}}
-        <li>
-            <span>\{{promotion}}</span>
-            &nbsp;&nbsp;\{{promotion_amount}}
-        </li>
-        \{{/cartPayData}}
-        <li class="cost">
-            应付金额: <em>¥\{{price}}</em>
-        </li>
+    \{{#cartPayData}}
+    <li>
+    <span>\{{promotion}}</span>
+    &nbsp;&nbsp;\{{promotion_amount}}
+    </li>
+    \{{/cartPayData}}
+    <li class="cost">
+    应付金额: <em>¥\{{price}}</em>
+    </li>
     </ul>
 </script>
 {{> layout/footer}}
diff --git a/template/m.yohobuy.com/partials/cart/cart-content.phtml b/template/m.yohobuy.com/partials/cart/cart-content.phtml
index e32fb1b..7a09a2f 100644
--- a/template/m.yohobuy.com/partials/cart/cart-content.phtml
+++ b/template/m.yohobuy.com/partials/cart/cart-content.phtml
@@ -1,10 +1,8 @@
-{{#if goods}}
-    <div class="cart-goods">
-        {{# goods}}
-            {{> cart/good}}
-        {{/ goods}}
-    </div>
-{{/if}}
+<div class="cart-goods">
+    {{# goods}}
+        {{> cart/good}}
+    {{/ goods}}
+</div>
 
 {{#if notValidGoods}}
     <div class="invalid-goods">
--
libgit2 0.24.0