Authored by biao

Merge branch 'release/1.0' of http://git.yoho.cn/fe/yoho-blk into release/1.0

@@ -44,7 +44,7 @@ $('.search-entry').click(function() { @@ -44,7 +44,7 @@ $('.search-entry').click(function() {
44 $searchWrap.show(); 44 $searchWrap.show();
45 }); 45 });
46 46
47 -$searchForm.on('keyup', '#search-key', function(e) { 47 +$searchKey.keyup(function(e) {
48 var key = $searchKey.val(); 48 var key = $searchKey.val();
49 49
50 if (e.which === 13) { 50 if (e.which === 13) {
@@ -60,6 +60,23 @@ $searchForm.on('keyup', '#search-key', function(e) { @@ -60,6 +60,23 @@ $searchForm.on('keyup', '#search-key', function(e) {
60 } 60 }
61 }); 61 });
62 62
  63 +// ie8输入框提示特殊处理
  64 +if ($.browser && $.browser.msie && parseInt($.browser.version, 10) === 8) {
  65 + $searchKey.focus(function() {
  66 + var key = $searchKey.val();
  67 +
  68 + if (key === 'search') {
  69 + $searchKey.val('').css('color', '#fff');
  70 + }
  71 + }).blur(function() {
  72 + var key = $searchKey.val();
  73 +
  74 + if ($.trim(key) === '') {
  75 + $searchKey.val('search').css('color', '#aaa');
  76 + }
  77 + });
  78 +}
  79 +
63 $clearInput.click(function() { 80 $clearInput.click(function() {
64 $searchKey.val(''); 81 $searchKey.val('');
65 $(this).hide(); 82 $(this).hide();
1 var lazyload = require('yoho-jquery-lazyload'); 1 var lazyload = require('yoho-jquery-lazyload');
2 -var Handlebars = require('yoho-handlebars');  
3 -  
4 -var tpl = '{{#each products}}' +  
5 - '<div class="goods-info" data-skn="{{productSkn}}">' +  
6 - '<a href="{{url}}" target="_blank">' +  
7 - '<img class="lazy thumb" src="{{defaultImages}}" style="display: block;">' +  
8 - '</a>' +  
9 - '<div class="desc">' +  
10 - '<a class="name" href="{{url}}" target="_blank">{{productName}}</a>' +  
11 - '<p class="price">¥{{salesPrice}}</p>' +  
12 - '</div>' +  
13 - '</div>' +  
14 - '{{/each}}';  
15 -  
16 -var tplFn = Handlebars.compile(tpl);  
17 -  
18 -require('../common/header');  
19 -require('./list/favorite'); 2 +
  3 +var tplFn = require('../../tpl/product/shop-goods.hbs');
  4 +
  5 +// require('../common/header');
  6 +// require('./list/favorite');
  7 +
  8 +
  9 +
20 lazyload(); 10 lazyload();
21 11
22 $(function() { 12 $(function() {
  1 +{{#each products}}
  2 + <div class="goods-info" data-skn="{{productSkn}}">
  3 + <a href="{{url}}" target="_blank">
  4 + <img class="lazy thumb" src="{{defaultImages}}" style="display: block;">
  5 + </a>
  6 + <div class="desc">
  7 + <a class="name" href="{{url}}" target="_blank">{{productName}}</a>
  8 + <p class="price">{{salesPrice}}</p>
  9 + </div>
  10 + </div>
  11 +{{/each}}