Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
daiao 2016-07-29 16:12:01 +08:00
commit 45e33cc456
7 changed files with 52 additions and 38 deletions

View File

@ -35,7 +35,7 @@
<div class="cl"></div> <div class="cl"></div>
<div class="post-dynamic-title c-grey3 hidden mt12 fb">【作业】{{act.subject|safeHtml}}</div> <div class="post-dynamic-title c-grey3 hidden mt12 fb">【作业】{{act.subject|safeHtml}}</div>
<div class="post-content c-grey3 mt10 mb10"> <div class="post-content c-grey3 mt10 mb10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div> <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
<span class="mr15 f12 c-grey2">迟交扣分:{{act.homework_common_detail.late_penalty}}分</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="f12 c-grey2">匿评开启时间:{{act.homework_common_detail.evaluation_start}}</span><br /> <span class="mr15 f12 c-grey2">迟交扣分:{{act.homework_common_detail.late_penalty}}分</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="f12 c-grey2">匿评开启时间:{{act.homework_common_detail.evaluation_start}}</span><br />
<span ng-if="!act.homework_common_detail.anonymous_comment" class="mr15 f12 c-grey2">缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="f12 c-grey2">匿评关闭时间:{{act.homework_common_detail.evaluation_end}}</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="mr15 f12 c-grey2">缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="f12 c-grey2">匿评关闭时间:{{act.homework_common_detail.evaluation_end}}</span>
</div> </div>
@ -73,7 +73,7 @@
<div class="cl"></div> <div class="cl"></div>
<div class="post-dynamic-title c-grey3 hidden mt12 fb">【通知】{{act.subject|safeHtml}}</div> <div class="post-dynamic-title c-grey3 hidden mt12 fb">【通知】{{act.subject|safeHtml}}</div>
<div class="post-content c-grey3 mt10 mb10"> <div class="post-content c-grey3 mt10 mb10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div> <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
@ -109,7 +109,7 @@
<div class="cl"></div> <div class="cl"></div>
<div class="post-dynamic-title c-grey3 hidden mt12 fb">【帖子】{{act.subject|safeHtml}}</div> <div class="post-dynamic-title c-grey3 hidden mt12 fb">【帖子】{{act.subject|safeHtml}}</div>
<div class="post-content c-grey3 mt10 mb10"> <div class="post-content c-grey3 mt10 mb10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div> <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
</div> </div>
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>--> <!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
<div class="cl"></div> <div class="cl"></div>
@ -162,7 +162,7 @@
<div class="cl"></div> <div class="cl"></div>
<div class="post-dynamic-title c-grey3 hidden mt12 fb">【问题】{{act.subject|safeHtml}}</div> <div class="post-dynamic-title c-grey3 hidden mt12 fb">【问题】{{act.subject|safeHtml}}</div>
<div class="post-content c-grey3 mt10 mb10"> <div class="post-content c-grey3 mt10 mb10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div> <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
<span class="mr15 f12 c-grey2">状态:{{act.issue_detail.issue_status}}</span> <span class="mr15 f12 c-grey2">优先级:{{act.issue_detail.issue_priority}}</span> <br /> <span class="mr15 f12 c-grey2">状态:{{act.issue_detail.issue_status}}</span> <span class="mr15 f12 c-grey2">优先级:{{act.issue_detail.issue_priority}}</span> <br />
<span class="mr15 f12 c-grey2">指派给:{{act.issue_detail.issue_assigned_to}}</span> <span class="mr15 f12 c-grey2">完成度:{{act.issue_detail.done_ratio}}%</span> <span class="mr15 f12 c-grey2">指派给:{{act.issue_detail.issue_assigned_to}}</span> <span class="mr15 f12 c-grey2">完成度:{{act.issue_detail.done_ratio}}%</span>
</div> </div>
@ -201,7 +201,7 @@
<div class="cl"></div> <div class="cl"></div>
<div class="post-dynamic-title c-grey3 hidden mt12 fb">【帖子】{{act.subject|safeHtml}}</div> <div class="post-dynamic-title c-grey3 hidden mt12 fb">【帖子】{{act.subject|safeHtml}}</div>
<div class="post-content c-grey3 mt10 mb10"> <div class="post-content c-grey3 mt10 mb10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div> <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
@ -251,7 +251,7 @@
<div class="post-dynamic-time fr f13">{{act.latest_update}}</div> <div class="post-dynamic-time fr f13">{{act.latest_update}}</div>
<div class="cl"></div> <div class="cl"></div>
<div class="post-content c-grey3 mt10 mb10"> <div class="post-content c-grey3 mt10 mb10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div> <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
</div> </div>
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>--> <!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
<div class="cl"></div> <div class="cl"></div>
@ -289,7 +289,7 @@
<div class="cl"></div> <div class="cl"></div>
<div class="post-dynamic-title c-grey3 hidden mt12 fb">【博客】{{act.subject|safeHtml}}</div> <div class="post-dynamic-title c-grey3 hidden mt12 fb">【博客】{{act.subject|safeHtml}}</div>
<div class="post-content c-grey3 mt10 mb10"> <div class="post-content c-grey3 mt10 mb10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div> <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
</div> </div>
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>--> <!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
<div class="cl"></div> <div class="cl"></div>
@ -335,7 +335,7 @@
<div class="cl"></div> <div class="cl"></div>
<div class="post-dynamic-title c-grey3 hidden mt12 fb">【作业】{{act.subject|safeHtml}}</div> <div class="post-dynamic-title c-grey3 hidden mt12 fb">【作业】{{act.subject|safeHtml}}</div>
<div class="post-content c-grey3 mt10 mb10"> <div class="post-content c-grey3 mt10 mb10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div> <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
<span class="mr15 f13 c-grey2">迟交扣分:{{act.homework_common_detail.late_penalty}}分</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="f13 c-grey2">匿评开启时间:{{act.homework_common_detail.evaluation_start}}</span><br /> <span class="mr15 f13 c-grey2">迟交扣分:{{act.homework_common_detail.late_penalty}}分</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="f13 c-grey2">匿评开启时间:{{act.homework_common_detail.evaluation_start}}</span><br />
<span ng-if="!act.homework_common_detail.anonymous_comment" class="mr15 f13 c-grey2">缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="f13 c-grey2">匿评关闭时间:{{act.homework_common_detail.evaluation_end}}</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="mr15 f13 c-grey2">缺评扣分:{{act.homework_common_detail.absence_penalty}}分/作品</span> <span ng-if="!act.homework_common_detail.anonymous_comment" class="f13 c-grey2">匿评关闭时间:{{act.homework_common_detail.evaluation_end}}</span>
</div> </div>
@ -373,7 +373,7 @@
<div class="cl"></div> <div class="cl"></div>
<div class="post-dynamic-title c-grey3 hidden mt12 fb">【通知】{{act.subject|safeHtml}}</div> <div class="post-dynamic-title c-grey3 hidden mt12 fb">【通知】{{act.subject|safeHtml}}</div>
<div class="post-content c-grey3 mt10 mb10"> <div class="post-content c-grey3 mt10 mb10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div> <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
@ -409,7 +409,7 @@
<div class="cl"></div> <div class="cl"></div>
<div class="post-dynamic-title c-grey3 hidden mt12 fb">【帖子】{{act.subject|safeHtml}}</div> <div class="post-dynamic-title c-grey3 hidden mt12 fb">【帖子】{{act.subject|safeHtml}}</div>
<div class="post-content c-grey3 mt10 mb10"> <div class="post-content c-grey3 mt10 mb10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div> <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
</div> </div>
<!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>--> <!--<a herf="javascript:void(0);" class="c-grey2 f13 fr mt5 mb10 post-more mr20 undis" text-auto-height>点击展开</a>-->
<div class="cl"></div> <div class="cl"></div>
@ -469,7 +469,7 @@
<div class="cl"></div> <div class="cl"></div>
<div class="post-dynamic-title c-grey3 hidden mt12 fb">【问题】{{act.subject|safeHtml}}</div> <div class="post-dynamic-title c-grey3 hidden mt12 fb">【问题】{{act.subject|safeHtml}}</div>
<div class="post-content c-grey3 mt10 mb10"> <div class="post-content c-grey3 mt10 mb10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div> <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
<span class="mr15 f13 c-grey2">状态:{{act.issue_detail.issue_status}}</span> <span class="mr15 f13 c-grey2">优先级:{{act.issue_detail.issue_priority}}</span> <br /> <span class="mr15 f13 c-grey2">状态:{{act.issue_detail.issue_status}}</span> <span class="mr15 f13 c-grey2">优先级:{{act.issue_detail.issue_priority}}</span> <br />
<span class="mr15 f13 c-grey2">指派给:{{act.issue_detail.issue_assigned_to}}</span> <span class="mr15 f13 c-grey2">完成度:{{act.issue_detail.done_ratio}}%</span> <span class="mr15 f13 c-grey2">指派给:{{act.issue_detail.issue_assigned_to}}</span> <span class="mr15 f13 c-grey2">完成度:{{act.issue_detail.done_ratio}}%</span>
</div> </div>
@ -508,7 +508,7 @@
<div class="cl"></div> <div class="cl"></div>
<div class="post-dynamic-title c-grey3 hidden mt12 fb">【帖子】{{act.subject|safeHtml}}</div> <div class="post-dynamic-title c-grey3 hidden mt12 fb">【帖子】{{act.subject|safeHtml}}</div>
<div class="post-content c-grey3 mt10 mb10"> <div class="post-content c-grey3 mt10 mb10">
<div class="post-all-content" ng-bind-html="act.description|safeHtml"></div> <div class="post-all-content" ng-bind-html="act.description|safeHtml" ellipsis-show></div>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
</div> </div>

View File

@ -36,6 +36,7 @@
<script src="/javascripts/wechat/directives/form_validate.js"></script> <script src="/javascripts/wechat/directives/form_validate.js"></script>
<script src="/javascripts/wechat/directives/input_auto.js"></script> <script src="/javascripts/wechat/directives/input_auto.js"></script>
<script src="/javascripts/wechat/directives/loading_spinner.js"></script> <script src="/javascripts/wechat/directives/loading_spinner.js"></script>
<script src="/javascripts/wechat/directives/ellipsis.js"></script>
<script src="/javascripts/wechat/controllers/reg.js"></script> <script src="/javascripts/wechat/controllers/reg.js"></script>
<script src="/javascripts/wechat/controllers/login.js"></script> <script src="/javascripts/wechat/controllers/login.js"></script>
<script src="/javascripts/wechat/controllers/activity.js"></script> <script src="/javascripts/wechat/controllers/activity.js"></script>

View File

@ -3,9 +3,9 @@
<div class="blue-title">新建课程</div> <div class="blue-title">新建课程</div>
<form novalidate name="classForm"> <form novalidate name="classForm">
<div class="course-list-row f13 c-grey3 mt30"><span class="fl ml15 c-grey3">课程</span><input class="new-class-input ml25" ng-model="syllabus.title" required placeholder="请输入课程名,如:软件工程" /></div> <div class="course-list-row f13 c-grey3 mt30"><span class="fl ml15 c-grey3">课程名称</span><input class="new-class-input ml25" ng-model="syllabus.title" required placeholder="如:软件工程" /></div>
<div class="course-list-row f13 c-grey3 mt10" ng-repeat="course in syllabus.courses"><span class="fl ml15 c-grey3">班级</span><input required class="new-class-input ml25" ng-model="course.name" placeholder="请输入班级名,计算机学院A班" /><a ng-click="deleteClass($index)" ng-show="!$first" class="fr mr10 c-grey6 delete-class-link">删除</a></div> <div class="course-list-row f13 c-grey3 mt10" ng-repeat="course in syllabus.courses"><span class="fl ml15 c-grey3">班级名称</span><input required class="new-class-input ml25" ng-model="course.name" placeholder="如:软件工程计算机学院A班" /><a ng-click="deleteClass($index)" ng-show="!$first" class="fr mr10 c-grey6 delete-class-link">删除</a></div>
<div class="tac"><a ng-click="addClass()" class="link-blue2 f13 mt15 inline-block add-class-link">+新增班级</a></div> <div class="tac"><a ng-click="addClass()" class="link-blue2 f13 mt15 inline-block add-class-link">+新增班级</a></div>
<a ng-click="newClass(classForm, syllabus)" ng-class="['finish-btn', {'btn-disabled':!classForm.$valid} ]" >完成</a> <a ng-click="newClass(classForm, syllabus)" ng-class="['finish-btn', {'btn-disabled':!classForm.$valid} ]" >完成</a>
</form> </form>

View File

@ -3,8 +3,25 @@
<div class="blue-title">新建项目</div> <div class="blue-title">新建项目</div>
<form novalidate name="classForm"> <form novalidate name="classForm">
<div class="course-list-row f13 c-grey3 mt30"><span class="fl ml15 c-grey3">项目</span><input class="new-class-input ml25" ng-model="project.name" required placeholder="例如:团队写作方法与机制研究" /></div> <div class="course-list-row f13 c-grey3 mt30"><span class="fl ml15 c-grey3">项目名称</span><input class="new-class-input ml25" ng-model="project.name" required placeholder="如:团队协作方法与机制研究" /></div>
<a ng-click="newProject(classForm, project)" ng-class="['finish-btn', {'btn-disabled':!classForm.$valid} ]" >完成</a> <a ng-click="newProject(classForm, project)" ng-class="['finish-btn', {'btn-disabled':!classForm.$valid} ]" >完成</a>
<div class="f12 c-grey6" style="width:143px; margin:0 auto;">
<span class="f13 fb c-grey3">项目功能特性(微信版)</span>
<ul class="project-intro mb15 mt5">
<li>创建项目、加入项目</li>
<li>邀请成员、修改角色</li>
<li>浏览、回复项目动态</li>
<li>点赞、分享项目动态</li>
</ul>
</div>
<div class="f12 c-grey6" style="width:156px; margin:0 auto;">
<span class="f13 fb c-grey3">更多项目特性(浏览器版)</span>
<ul class="project-intro mt5">
<li>发布任务、问题跟踪</li>
<li>代码托管、质量分析</li>
<li>资源分享、交流研讨</li>
</ul>
</div>
</form> </form>
<my-alert message="alertService.message" title="alertService.title" visible="alertService.visible" cb="alertService.cb"></my-alert> <my-alert message="alertService.message" title="alertService.title" visible="alertService.visible" cb="alertService.cb"></my-alert>

View File

@ -15,20 +15,4 @@ app.controller('InviteCodeController', ['$scope','$http', '$routeParams','config
} }
); );
vm.share = function(){
window.WeixinJSBridge.invoke('sendAppMessage',{
'appid': 'wxf694495398c7d470', // 公众号appID
'type': 'link', // 非必填music,vido或link,默认为link。
'data_url': '', // 非必填,连接地址,如音乐的mp3数据地址,供内置播放器使用
'img_url': 'http://pnewsapp.tc.qq.com/newsapp_bt/0/9963967/640', // 缩略图地址
'img_height':370, // 缩略图高度
'img_width':550, // 缩略图宽度
'link':'http://view.inews.qq.com/a/WXN2013101101385701', // 链接地址
'desc':'desc', // 描述
'title':'title' // 标题
},function(res){
//alert(res.err_msg);
});
}
}]); }]);

View File

@ -7,11 +7,18 @@ app.directive('ellipsisShow',["$timeout",function(timer){
scope: {}, scope: {},
link: function(scope, element){ link: function(scope, element){
timer(function() { timer(function() {
var textContent = element.text(); var textSplit = element.text().split(" ");
console.log(textContent); var newContent = [];
//while (textHeight > 100) { element.text("");
// element.text(element.text().replace(/(\s)*([a-zA-Z0-9]+|\W)(\.\.\.)?$/, "...")); 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;
}
}
}); });
} }
} }

View File

@ -111,7 +111,7 @@ a.underline {text-decoration:underline;}
.fl {float:left;} .fl {float:left;}
.fr {float:right;} .fr {float:right;}
.cl {clear:both; overflow:hidden;} .cl {clear:both; overflow:hidden;}
.post-content {width:100%; font-size:14px; line-height:20px; height:100px; overflow:hidden; word-break:break-all; word-wrap:break-word;} .post-content {width:100%; font-size:14px; line-height:20px; height:100px; overflow:hidden; word-break:normal; word-wrap:break-word; text-align:justify;}
.post-all-content a {color:#136ec2;} .post-all-content a {color:#136ec2;}
.post-interactive {width:100%; height:35px; line-height:35px; vertical-align:middle; border-top:1px solid #e6e6e6; background-color:#f8f9fb;} .post-interactive {width:100%; height:35px; line-height:35px; vertical-align:middle; border-top:1px solid #e6e6e6; background-color:#f8f9fb;}
.post-interactive-column, .post-interactive-column,
@ -238,3 +238,8 @@ a.underline {text-decoration:underline;}
.mult-reply-content{ color:#555; font-size:13px;} .mult-reply-content{ color:#555; font-size:13px;}
.mult-reply-hide{ text-align:center; display:block; font-size:14px; color:#aaa; border-bottom:1px solid #F3DDB3; padding:8px 0;} .mult-reply-hide{ text-align:center; display:block; font-size:14px; color:#aaa; border-bottom:1px solid #F3DDB3; padding:8px 0;}
.mult-reply-arrow{ color:#aaa; margin-right:10px; font-size:14px; font-weight:bold;} .mult-reply-arrow{ color:#aaa; margin-right:10px; font-size:14px; font-weight:bold;}
/*20160729项目说明*/
.project-intro {line-height:2;}
.project-intro li {list-style:disc; margin-left:20px;}