From cef08a717c5c402957f423f865b844e1a6c5d12a Mon Sep 17 00:00:00 2001 From: txz Date: Fri, 22 Jul 2016 16:09:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=90=8D=E7=A7=B0=E8=BF=87?= =?UTF-8?q?=E9=95=BF=E6=97=B6=EF=BC=8C=E9=82=80=E8=AF=B7=E7=A0=81=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E7=82=B9=E5=87=BBbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/class.html | 2 +- .../javascripts/wechat/directives/ellipsis.js | 17 +++++++++++++++++ .../javascripts/wechat/directives/input_auto.js | 2 +- public/stylesheets/weui/weixin.css | 1 + 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 public/javascripts/wechat/directives/ellipsis.js diff --git a/public/assets/wechat/class.html b/public/assets/wechat/class.html index 01628c2f4..f9618411d 100644 --- a/public/assets/wechat/class.html +++ b/public/assets/wechat/class.html @@ -1,6 +1,6 @@
-
{{course.name}}邀请码
+
邀请码
diff --git a/public/javascripts/wechat/directives/ellipsis.js b/public/javascripts/wechat/directives/ellipsis.js new file mode 100644 index 000000000..a036ef81b --- /dev/null +++ b/public/javascripts/wechat/directives/ellipsis.js @@ -0,0 +1,17 @@ +/** + * Created by Tim on 7/22/16. + */ +app.directive('ellipsisShow',function(){ + return{ + restrict: 'A', + scope: {}, + link: function(scope, element){ + var textWrap = element.children().eq(0); + var textHeight = textWrap[0].scrollHeight; + console.log(textWrap[0].innerHTML); + while (textHeight > 100) { + textWrap[0].innerTEXT = "replaced"; + } + } + } +}); \ No newline at end of file diff --git a/public/javascripts/wechat/directives/input_auto.js b/public/javascripts/wechat/directives/input_auto.js index 1f2550882..9cd77188b 100644 --- a/public/javascripts/wechat/directives/input_auto.js +++ b/public/javascripts/wechat/directives/input_auto.js @@ -6,7 +6,7 @@ app.directive('inputAuto',function(){ var copyContainer = element.parent().children().children().eq(0); var sendButton = element.next(); element.on('input',function(){ - console.log(sendButton); + //console.log(sendButton); copyContainer.html(element[0].value); var textHeight = copyContainer[0].scrollHeight-10; element.css('height', textHeight + 'px'); diff --git a/public/stylesheets/weui/weixin.css b/public/stylesheets/weui/weixin.css index c3a38415a..9eb8a670b 100644 --- a/public/stylesheets/weui/weixin.css +++ b/public/stylesheets/weui/weixin.css @@ -198,6 +198,7 @@ a.underline {text-decoration:underline;} .resource-width {width:76%;} .courseware-from-width {max-width:57%;} .other-from-width {max-width:80%;} +.course-name-width {width:68%;} /*20160614班级列表*/ .course-diff-row {width:100%; height:28px; line-height:28px; vertical-align:middle; background-color:#fff; border-bottom:1px solid #ccc;}