课程列表与项目列表样式统一

This commit is contained in:
txz 2016-07-25 15:31:44 +08:00
parent b9b9a867f4
commit 12e845c3ab
4 changed files with 2301 additions and 2693 deletions

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,7 @@
<img src="/images/wechat/dot.png" width="15px" class="class-list-dot" /> <img src="/images/wechat/dot.png" width="15px" class="class-list-dot" />
<span class="fl ml10 class-list-name hidden">{{course.name}}</span> <span class="fl ml10 class-list-name hidden">{{course.name}}</span>
<span class="fr c-grey4">&gt;</span> <span class="fr c-grey4">&gt;</span>
<span class="students-amount f12 fr mt10">{{course.member_count}}人</span> <span class="students-amount f12 fr mt10 mr5">{{course.member_count}}人</span>
</li> </li>
</ul> </ul>
</div> </div>
@ -26,7 +26,7 @@
<img src="/images/wechat/dot.png" width="15px" class="class-list-dot" /> <img src="/images/wechat/dot.png" width="15px" class="class-list-dot" />
<span class="fl ml10 class-list-name hidden">{{course.name}}</span> <span class="fl ml10 class-list-name hidden">{{course.name}}</span>
<span class="fr c-grey4">&gt;</span> <span class="fr c-grey4">&gt;</span>
<span class="students-amount f12 fr mt10">{{course.member_count}}人</span> <span class="students-amount f12 fr mt10 mr5">{{course.member_count}}人</span>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -6,8 +6,9 @@
<div class="course-diff-row"><span class="c-blue f13 ml10">我创建的项目</span></div> <div class="course-diff-row"><span class="c-blue f13 ml10">我创建的项目</span></div>
<div ng-repeat="project in projects" style="position:relative;"> <div ng-repeat="project in projects" style="position:relative;">
<div ng-click="goProject(project.id)" ng-show="project.can_setting" class="course-list-row f13 c-grey3 border-top-none"> <div ng-click="goProject(project.id)" ng-show="project.can_setting" class="course-list-row f13 c-grey3 border-top-none">
<span class="fl ml10 class-list-name hidden">{{project.name}}</span> <span class="fl ml15 class-list-name hidden">{{project.name}}</span>
<span class="students-amount f12 fr mt10 mr10">{{project.member_count}}人&gt;</span> <span class="fr c-grey4 mr10">&gt;</span>
<span class="students-amount f12 fr mt10 mr5">{{project.member_count}}人</span>
</div> </div>
</div> </div>
@ -18,8 +19,9 @@
<div class="course-diff-row mt10"><span class="c-blue f13 ml10">我参与的项目</span></div> <div class="course-diff-row mt10"><span class="c-blue f13 ml10">我参与的项目</span></div>
<div ng-click="goProject(project.id)" ng-repeat="project in projects" style="position:relative;"> <div ng-click="goProject(project.id)" ng-repeat="project in projects" style="position:relative;">
<div ng-show="!project.can_setting" class="course-list-row f13 c-grey3 border-top-none"> <div ng-show="!project.can_setting" class="course-list-row f13 c-grey3 border-top-none">
<span class="fl ml10 class-list-name hidden">{{project.name}}</span> <span class="fl ml15 class-list-name hidden">{{project.name}}</span>
<span class="students-amount f12 fr mt10 mr10">{{project.member_count}}人&gt;</span> <span class="fr c-grey4 mr10">&gt;</span>
<span class="students-amount f12 fr mt10 mr5">{{project.member_count}}人</span>
</div> </div>
</div> </div>

View File

@ -1,17 +1,18 @@
/** /**
* Created by Tim on 7/22/16. * Created by Tim on 7/22/16.
*/ */
app.directive('ellipsisShow',function(){ app.directive('ellipsisShow',["$timeout",function(timer){
return{ return{
restrict: 'A', restrict: 'A',
scope: {}, scope: {},
link: function(scope, element){ link: function(scope, element){
var textWrap = element.children().eq(0); timer(function() {
var textHeight = textWrap[0].scrollHeight; var textContent = element.text();
console.log(textWrap[0].innerHTML); console.log(textContent);
while (textHeight > 100) { //while (textHeight > 100) {
textWrap[0].innerTEXT = "replaced"; // element.text(element.text().replace(/(\s)*([a-zA-Z0-9]+|\W)(\.\.\.)?$/, "..."));
} //}
});
} }
} }
}); }]);