From cef08a717c5c402957f423f865b844e1a6c5d12a Mon Sep 17 00:00:00 2001 From: txz Date: Fri, 22 Jul 2016 16:09:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E8=BF=87=E9=95=BF=E6=97=B6=EF=BC=8C=E9=82=80=E8=AF=B7=E7=A0=81?= =?UTF-8?q?=E6=97=A0=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;} From 7d2ba823e9860bc64a354eefa6b0fbe440cdfe10 Mon Sep 17 00:00:00 2001 From: txz Date: Fri, 22 Jul 2016 16:26:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BC=93=E5=AD=98=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E9=A1=B5tab=EF=BC=8C=E8=AF=A6=E6=83=85=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=88=B0=E5=AF=B9=E5=BA=94tab=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/controllers/activity.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/javascripts/wechat/controllers/activity.js b/public/javascripts/wechat/controllers/activity.js index 8847e8e10..3d7ec2251 100644 --- a/public/javascripts/wechat/controllers/activity.js +++ b/public/javascripts/wechat/controllers/activity.js @@ -122,12 +122,14 @@ app.controller('ActivityController', } break; } + rms.save("tab_num",$scope.currentTab); } - $scope.currentTab = 1; + + $scope.currentTab = rms.get('tab_num') || 1; if($scope.activities.length<=0){ - $scope.loadActData(1,0); + $scope.loadActData('tab_num',0); } else { $timeout(function(){ window.scrollTo(0, rms.get("yoffset"));