From 3d7b7b513b1d11a03dd0e2084da6a26fc1e34009 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 29 Jul 2016 16:11:43 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E8=97=8F=E6=96=87=E5=AD=97=E8=B6=85?= =?UTF-8?q?=E5=87=BA=E7=9C=81=E7=95=A5=E5=8F=B7=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/app.html | 2 +- .../javascripts/wechat/directives/ellipsis.js | 44 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/public/assets/wechat/app.html b/public/assets/wechat/app.html index 606164efe..00a55f553 100644 --- a/public/assets/wechat/app.html +++ b/public/assets/wechat/app.html @@ -36,7 +36,7 @@ - + diff --git a/public/javascripts/wechat/directives/ellipsis.js b/public/javascripts/wechat/directives/ellipsis.js index a5d5d9845..a5dcfa293 100644 --- a/public/javascripts/wechat/directives/ellipsis.js +++ b/public/javascripts/wechat/directives/ellipsis.js @@ -1,25 +1,25 @@ /** * Created by Tim on 7/22/16. */ -app.directive('ellipsisShow',["$timeout",function(timer){ - return{ - restrict: 'A', - scope: {}, - link: function(scope, element){ - timer(function() { - var textSplit = element.text().split(" "); - var newContent = []; - element.text(""); - for (var i = 0; i < textSplit.length; i++) { - newContent = newContent + " " + textSplit[i]; - element.text(newContent); - if(element[0].scrollHeight >= 100){ - newContent = newContent + " " + textSplit[i+1] + " " + textSplit[i+2] + " " + textSplit[i+3] + " " + textSplit[i+4] + "..."; - element.text(newContent); - break; - } - } - }); - } - } -}]); \ No newline at end of file +//app.directive('ellipsisShow',["$timeout",function(timer){ +// return{ +// restrict: 'A', +// scope: {}, +// link: function(scope, element){ +// timer(function() { +// var textSplit = element.text().split(" "); +// var newContent = []; +// element.text(""); +// for (var i = 0; i < textSplit.length; i++) { +// newContent = newContent + " " + textSplit[i]; +// element.text(newContent); +// if(element[0].scrollHeight >= 100){ +// newContent = newContent + " " + textSplit[i+1] + " " + textSplit[i+2] + " " + textSplit[i+3] + " " + textSplit[i+4] + "..."; +// element.text(newContent); +// break; +// } +// } +// }); +// } +// } +//}]); \ No newline at end of file