Authored by biao

update the coding format

@@ -3,7 +3,8 @@ @@ -3,7 +3,8 @@
3 * @author: bikai<kai.bi@yoho.cn> 3 * @author: bikai<kai.bi@yoho.cn>
4 * @date: 2015/10/28 4 * @date: 2015/10/28
5 */ 5 */
6 -var $ = require('jquery'); 6 +var $ = require('jquery'),
  7 + security = require('../plugin/security');
7 8
8 var $searchBox = $('.search-box'), 9 var $searchBox = $('.search-box'),
9 $box = $('.box'), 10 $box = $('.box'),
@@ -52,6 +53,9 @@ $searchBox.children('.clear-text').on('touchstart', function() { @@ -52,6 +53,9 @@ $searchBox.children('.clear-text').on('touchstart', function() {
52 }); 53 });
53 54
54 $searchBox.children('.search-icon').on('touchstart', function() { 55 $searchBox.children('.search-icon').on('touchstart', function() {
  56 + if (security.hasDangerInput()) {
  57 + return false;
  58 + }
55 $indexSearch.submit(); 59 $indexSearch.submit();
56 }); 60 });
57 61
@@ -49,7 +49,7 @@ cHammer.on('tap', function() { @@ -49,7 +49,7 @@ cHammer.on('tap', function() {
49 49
50 $('#search').on('touchend', function() { 50 $('#search').on('touchend', function() {
51 if (security.hasDangerInput()) { 51 if (security.hasDangerInput()) {
52 - return false; 52 + return false;
53 } 53 }
54 $(this).closest('form').submit(); 54 $(this).closest('form').submit();
55 return false; 55 return false;