微信的@回复功能,在班级和项目的所有微信动态的回复中增加。issue: 11026
This commit is contained in:
parent
29dda04a2d
commit
1967b89ff0
|
@ -9,40 +9,40 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="blog.act_type == 'BlogComment'">
|
||||
<div ng-if="object.act_type == 'BlogComment'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper" style="margin-top:0;">
|
||||
<div class="post-main">
|
||||
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{blog.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{object.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
{{blog.user.real_name}}
|
||||
<img ng-if="blog.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="blog.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
{{object.user.real_name}}
|
||||
<img ng-if="object.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="object.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ml40">
|
||||
<div class="post-dynamic-title c-black fb">{{blog.title}}<img ng-if="blog.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">博客</span><span>{{blog.created_at}}</span></div>
|
||||
<div class="post-dynamic-title c-black fb">{{object.title}}<img ng-if="object.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">博客</span><span>{{object.created_at}}</span></div>
|
||||
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="blog.content|safeHtml" img-preview></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="object.content|safeHtml" img-preview></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!blog.praise_count" ng-click="addPraise(blog);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="blog.praise_count && !blog.has_praise" ng-click="addPraise(blog);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{blog.praise_count}}</span></div>
|
||||
<div ng-if="blog.has_praise" ng-click="decreasePraise(blog);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{blog.praise_count}}</span></div>
|
||||
<div ng-if="!object.praise_count" ng-click="addPraise(object);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="object.praise_count && !object.has_praise" ng-click="addPraise(object);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{object.praise_count}}</span></div>
|
||||
<div ng-if="object.has_praise" ng-click="decreasePraise(object);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{object.praise_count}}</span></div>
|
||||
</div>
|
||||
<div id="replyBlock" class="fr mr25 f13" input-focus>
|
||||
<a ng-if="!blog.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="blog.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{blog.comment_count}}</span></a>
|
||||
<a ng-if="!object.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="object.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{object.comment_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="mb50" id="all_blog_reply" at-delete-link>
|
||||
|
||||
<div ng-if="blog.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in blog.all_children">
|
||||
<div ng-if="object.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in object.all_children">
|
||||
<div class="post-reply-row" ng-class="['post-reply-row',{'border-bottom-none' : $last}]">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-reply-author hidden fl">
|
||||
|
@ -73,13 +73,13 @@
|
|||
<div ng-if="journal.praise_count && !journal.has_praise" ng-click="addPraise(journal);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{journal.praise_count}}</span></div>
|
||||
<div ng-if="journal.has_praise" ng-click="decreasePraise(journal);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{journal.praise_count}}</span></div>
|
||||
</div>
|
||||
<div ng-click="clickReply(journal.act_id,blog)" class="fr mr25 f13 reply-icons multi-hide" >
|
||||
<div ng-click="clickReply(journal.act_id,object)" class="fr mr25 f13 reply-icons multi-hide" >
|
||||
<img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div ng-show="journal.showinput" class="post-input-container multi-input-container ml40 mb10">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea ng-focus="inputfocus(blog)" ng-blur="inputblur(blog)" input-auto type="text" class="post-reply-input" ng-model="journal.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<textarea ng-focus="inputfocus(object)" ng-blur="inputblur(object)" input-auto type="text" class="post-reply-input" ng-model="journal.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<button ng-click="addReply(journal,1);journal.showinput = false;" ng-disabled="journal.disabled" ng-hide="journal.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="journal.disabled" ng-hide="!journal.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<div class="cl"></div>
|
||||
|
@ -88,17 +88,17 @@
|
|||
</div>
|
||||
</div>
|
||||
<div ng-if="has_more">
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,blog);">更多</div>
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,object);">更多</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="!blog.notshow" ng-if="!blog.locked" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
|
||||
<div ng-show="!object.notshow" ng-if="!object.locked" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
|
||||
<div class="post-reply-row border-bottom-none">
|
||||
<div class="post-input-container">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="blog.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<button ng-click="addReply(blog,0)" ng-disabled="blog.disabled" ng-hide="blog.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="blog.disabled" ng-hide="!blog.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="object.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<button ng-click="addReply(object,0)" ng-disabled="object.disabled" ng-hide="object.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="object.disabled" ng-hide="!object.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -106,4 +106,6 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div at-directive></div>
|
|
@ -9,39 +9,39 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="discussion.act_type == 'Message'">
|
||||
<div ng-if="object.act_type == 'Message'">
|
||||
<div class="post-container">
|
||||
<div loading-spinner></div>
|
||||
<div class="post-wrapper" style="margin-top:0;">
|
||||
<div ng-show="is_public == 0" class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
|
||||
<div class="post-main">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{discussion.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{object.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
{{discussion.user.real_name}}
|
||||
<img ng-if="discussion.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="discussion.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
{{object.user.real_name}}
|
||||
<img ng-if="object.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="object.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ml40">
|
||||
<div class="post-dynamic-title c-black fb">{{discussion.subject}}<img ng-if="discussion.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">{{discussion.syllabus_title}}<font class="fb" style="height:18px; line-height:18px; vertical-align:top; margin:0 3px;">·</font>{{discussion.course_project_name}} - 班级讨论区</span><span>{{discussion.created_on}}</span></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="discussion.content|safeHtml" img-preview></div>
|
||||
<div class="post-dynamic-title c-black fb">{{object.subject}}<img ng-if="object.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">{{object.syllabus_title}}<font class="fb" style="height:18px; line-height:18px; vertical-align:top; margin:0 3px;">·</font>{{object.course_project_name}} - 班级讨论区</span><span>{{object.created_on}}</span></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="object.content|safeHtml" img-preview></div>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!discussion.praise_count" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="discussion.praise_count && !discussion.has_praise" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
|
||||
<div ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
|
||||
<div ng-if="!object.praise_count" ng-click="addPraise(object);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="object.praise_count && !object.has_praise" ng-click="addPraise(object);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{object.praise_count}}</span></div>
|
||||
<div ng-if="object.has_praise" ng-click="decreasePraise(object);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{object.praise_count}}</span></div>
|
||||
</div>
|
||||
<div id="replyBlock" class="fr mr25 f13" input-focus>
|
||||
<a ng-if="!discussion.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="discussion.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{discussion.comment_count}}</span></a>
|
||||
<a ng-if="!object.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="object.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{object.comment_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb50" id="all_course_message_reply" at-delete-link>
|
||||
<div ng-if="discussion.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in discussion.all_children">
|
||||
<div ng-if="object.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in object.all_children">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-reply-author hidden fl">
|
||||
|
@ -71,13 +71,13 @@
|
|||
<div ng-if="journal.praise_count && !journal.has_praise" ng-click="addPraise(journal);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{journal.praise_count}}</span></div>
|
||||
<div ng-if="journal.has_praise" ng-click="decreasePraise(journal);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{journal.praise_count}}</span></div>
|
||||
</div>
|
||||
<div ng-click="clickReply(journal.act_id,discussion)" class="fr mr25 f13 reply-icons multi-hide">
|
||||
<div ng-click="clickReply(journal.act_id,object)" class="fr mr25 f13 reply-icons multi-hide">
|
||||
<a><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div ng-show="journal.showinput" class="post-input-container multi-input-container ml40 mb10">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea ng-focus="inputfocus(discussion)" ng-blur="inputblur(discussion)" input-auto type="text" class="post-reply-input" ng-model="journal.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<textarea ng-focus="inputfocus(object)" ng-blur="inputblur(object)" input-auto type="text" class="post-reply-input" ng-model="journal.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<button ng-click="addReply(journal,1);journal.showinput = false;" ng-disabled="journal.disabled" ng-hide="journal.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="journal.disabled" ng-hide="!journal.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<div class="cl"></div>
|
||||
|
@ -85,17 +85,17 @@
|
|||
</div>
|
||||
</div>
|
||||
<div ng-if="has_more">
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,discussion);">更多</div>
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,object);">更多</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="!discussion.notshow" ng-if="!discussion.locked" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
|
||||
<div ng-show="!object.notshow" ng-if="!object.locked" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
|
||||
<div class="post-reply-row border-bottom-none">
|
||||
<div class="post-input-container">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="discussion.comment" placeholder="输入回复内容~" /></textarea>
|
||||
<button ng-click="addReply(discussion,0)" ng-disabled="discussion.disabled" ng-hide="discussion.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="discussion.disabled" ng-hide="!discussion.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="object.comment" placeholder="{{replytip}}" ng-change="onPostChange(object.comment, '{{object.comment}}')" /></textarea>
|
||||
<button ng-click="addReply(object,0)" ng-disabled="object.disabled" ng-hide="object.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="object.disabled" ng-hide="!object.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -103,3 +103,5 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div at-directive></div>
|
||||
|
|
|
@ -9,48 +9,48 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="homework.act_type == 'HomeworkCommon'">
|
||||
<div ng-if="object.act_type == 'HomeworkCommon'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper" style="margin-top:0;">
|
||||
<div ng-show="is_public == 0" class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
|
||||
<div class="post-main">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{homework.author.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{object.author.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
{{homework.author.real_name}}
|
||||
<img ng-if="homework.author.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="homework.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
{{object.author.real_name}}
|
||||
<img ng-if="object.author.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="object.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ml40">
|
||||
<div class="post-dynamic-title c-black fb">{{homework.name}}</div>
|
||||
<div class="c-grey4 mt5 f13"><span class="mr10">{{homework.syllabus_title}}<font class="fb" style="height:18px; line-height:18px; vertical-align:top; margin:0 3px;">·</font>{{homework.course_name}} - <span ng-if="homework.homework_type == 1">普通作业</span><span ng-if="homework.homework_type == 2">编程作业</span><span ng-if="homework.homework_type == 3">分组作业</span></span><span>{{homework.publish_time}}</span></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="homework.description|safeHtml" img-preview></div>
|
||||
<span class="c-grey f12 mr15">迟交扣分:{{homework.late_penalty}}分</span>
|
||||
<span ng-if="!homework.anonymous_comment" class="c-grey f12">匿评开启时间:{{homework.evaluation_start}}</span><br />
|
||||
<span ng-if="!homework.anonymous_comment" class="c-grey f12 mr15">缺评扣分:{{homework.absence_penalty}}分/作品</span>
|
||||
<span ng-if="!homework.anonymous_comment" class="c-grey f12">匿评关闭时间:{{homework.evaluation_end}}</span>
|
||||
<div class="post-dynamic-title c-black fb">{{object.name}}</div>
|
||||
<div class="c-grey4 mt5 f13"><span class="mr10">{{object.syllabus_title}}<font class="fb" style="height:18px; line-height:18px; vertical-align:top; margin:0 3px;">·</font>{{object.course_name}} - <span ng-if="object.homework_type == 1">普通作业</span><span ng-if="object.homework_type == 2">编程作业</span><span ng-if="object.homework_type == 3">分组作业</span></span><span>{{object.publish_time}}</span></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="object.description|safeHtml" img-preview></div>
|
||||
<span class="c-grey f12 mr15">迟交扣分:{{object.late_penalty}}分</span>
|
||||
<span ng-if="!object.anonymous_comment" class="c-grey f12">匿评开启时间:{{object.evaluation_start}}</span><br />
|
||||
<span ng-if="!object.anonymous_comment" class="c-grey f12 mr15">缺评扣分:{{object.absence_penalty}}分/作品</span>
|
||||
<span ng-if="!object.anonymous_comment" class="c-grey f12">匿评关闭时间:{{object.evaluation_end}}</span>
|
||||
<div class="cl"></div>
|
||||
<div ng-if="homework.homework_commit_count > 0" class="f12 c-grey mt5 mb5">作品提交数:<span class="c-blue">{{homework.homework_commit_count}}</span></div>
|
||||
<div ng-if="object.homework_commit_count > 0" class="f12 c-grey mt5 mb5">作品提交数:<span class="c-blue">{{object.homework_commit_count}}</span></div>
|
||||
<div class="f12 c-grey mb5">
|
||||
<div ng-if="homework.last_commit_info">#{{homework.last_commit_info.lasttime}} <span class="c-blue ml5 mr5">{{homework.last_commit_info.lastname}}</span> 提交了作品</div>
|
||||
<div ng-if="homework.last_score_info">#{{homework.last_score_info.lasttime}} <span class="c-blue ml5 mr5">{{homework.last_score_info.lastname}}</span> 评阅了作品</div>
|
||||
<div ng-if="object.last_commit_info">#{{object.last_commit_info.lasttime}} <span class="c-blue ml5 mr5">{{object.last_commit_info.lastname}}</span> 提交了作品</div>
|
||||
<div ng-if="object.last_score_info">#{{object.last_score_info.lasttime}} <span class="c-blue ml5 mr5">{{object.last_score_info.lastname}}</span> 评阅了作品</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!homework.praise_count" ng-click="addPraise(homework);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="homework.praise_count && !homework.has_praise" ng-click="addPraise(homework);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{homework.praise_count}}</span></div>
|
||||
<div ng-if="homework.has_praise" ng-click="decreasePraise(homework);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{homework.praise_count}}</span></div>
|
||||
<div ng-if="!object.praise_count" ng-click="addPraise(object);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="object.praise_count && !object.has_praise" ng-click="addPraise(object);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{object.praise_count}}</span></div>
|
||||
<div ng-if="object.has_praise" ng-click="decreasePraise(object);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{object.praise_count}}</span></div>
|
||||
</div>
|
||||
<div id="replyBlock" class="fr mr25 f13" input-focus>
|
||||
<a ng-if="!homework.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="homework.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{homework.comment_count}}</span></a>
|
||||
<a ng-if="!object.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="object.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{object.comment_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="mb50" id="all_homework_reply" at-delete-link>
|
||||
|
||||
<div ng-if="homework.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in homework.all_children">
|
||||
<div ng-if="object.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in object.all_children">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-reply-author hidden fl">
|
||||
|
@ -80,13 +80,13 @@
|
|||
<div ng-if="journal.praise_count && !journal.has_praise" ng-click="addPraise(journal);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{journal.praise_count}}</span></div>
|
||||
<div ng-if="journal.has_praise" ng-click="decreasePraise(journal);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{journal.praise_count}}</span></div>
|
||||
</div>
|
||||
<div ng-click="clickReply(journal.act_id,homework)" class="fr mr25 f13 reply-icons multi-hide">
|
||||
<div ng-click="clickReply(journal.act_id,object)" class="fr mr25 f13 reply-icons multi-hide">
|
||||
<a><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div ng-show="journal.showinput" class="post-input-container multi-input-container ml40 mb10">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea ng-focus="inputfocus(homework)" ng-blur="inputblur(homework)" input-auto type="text" class="post-reply-input" ng-model="journal.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<textarea ng-focus="inputfocus(object)" ng-blur="inputblur(object)" input-auto type="text" class="post-reply-input" ng-model="journal.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<button ng-click="addReply(journal,1);journal.showinput = false;" ng-disabled="journal.disabled" ng-hide="journal.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="journal.disabled" ng-hide="!journal.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<div class="cl"></div>
|
||||
|
@ -94,17 +94,18 @@
|
|||
</div>
|
||||
</div>
|
||||
<div ng-if="has_more">
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,homework);">更多</div>
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,object);">更多</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="!homework.notshow" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
|
||||
<div ng-show="!object.notshow" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
|
||||
<div class="post-reply-row border-bottom-none">
|
||||
<div class="post-input-container">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="homework.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<button ng-click="addReply(homework,0)" ng-disabled="homework.disabled" ng-hide="homework.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="homework.disabled" ng-hide="!homework.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="object.comment" placeholder="{{replytip}}" ng-change="onPostChange(object.comment, '{{object.comment}}')" /></textarea>
|
||||
|
||||
<button ng-click="addReply(object,0)" ng-disabled="object.disabled" ng-hide="object.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="object.disabled" ng-hide="!object.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -112,4 +113,6 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div at-directive></div>
|
||||
|
|
|
@ -9,28 +9,28 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="issue.act_type == 'Issue'">
|
||||
<div ng-if="object.act_type == 'Issue'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper" style="margin-top:0;">
|
||||
<div ng-show="is_public == false" class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
|
||||
<div class="post-main">
|
||||
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{issue.author.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{object.author.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
{{issue.author.real_name}}
|
||||
<img ng-if="issue.author.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="issue.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
{{object.author.real_name}}
|
||||
<img ng-if="object.author.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="object.author.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ml40">
|
||||
<div class="post-dynamic-title c-black fb">{{issue.subject}}</div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">{{issue.project_name}} - 项目问题</span><span>{{issue.created_on}}</span></div>
|
||||
<div class="post-dynamic-title c-black fb">{{object.subject}}</div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">{{object.project_name}} - 项目问题</span><span>{{object.created_on}}</span></div>
|
||||
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="issue.description|safeHtml" img-preview></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="object.description|safeHtml" img-preview></div>
|
||||
|
||||
|
||||
<ul class="weixin-files clear f14 mb10">
|
||||
<ol ng-repeat="attachment in issue.attachments"><img src="images/wechat/w-icons-file.png" width="18" style="vertical-align:top; margin-top:2px;" class="mr5" /><a class="c-blue " ng-href="{{attachment.download_url}}">{{attachment.filename}}</a><span class="c-grey ml5 ">({{attachment.attafile_size}})</span></ol>
|
||||
<ol ng-repeat="attachment in object.attachments"><img src="images/wechat/w-icons-file.png" width="18" style="vertical-align:top; margin-top:2px;" class="mr5" /><a class="c-blue " ng-href="{{attachment.download_url}}">{{attachment.filename}}</a><span class="c-grey ml5 ">({{attachment.attafile_size}})</span></ol>
|
||||
</ul>
|
||||
|
||||
<div class=" clear f14 mb10">
|
||||
|
@ -39,19 +39,19 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<span class="c-grey f12 mr15">状 态:{{issue.issue_status}}</span>
|
||||
<span class="c-grey f12">优先级:{{issue.issue_priority}}</span><br/>
|
||||
<span class="c-grey f12 mr15">指派给:{{issue.issue_assigned_to}}</span>
|
||||
<span class="c-grey f12">完成度:{{issue.done_ratio}}%</span>
|
||||
<span class="c-grey f12 mr15">状 态:{{object.issue_status}}</span>
|
||||
<span class="c-grey f12">优先级:{{object.issue_priority}}</span><br/>
|
||||
<span class="c-grey f12 mr15">指派给:{{object.issue_assigned_to}}</span>
|
||||
<span class="c-grey f12">完成度:{{object.done_ratio}}%</span>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!issue.praise_count" ng-click="addPraise(issue);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="issue.praise_count && !issue.has_praise" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{issue.praise_count}}</span></div>
|
||||
<div ng-if="issue.has_praise" ng-click="decreasePraise(issue);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{issue.praise_count}}</span></div>
|
||||
<div ng-if="!object.praise_count" ng-click="addPraise(object);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="object.praise_count && !object.has_praise" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{object.praise_count}}</span></div>
|
||||
<div ng-if="object.has_praise" ng-click="decreasePraise(object);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{object.praise_count}}</span></div>
|
||||
</div>
|
||||
<div id="replyBlock" class="fr mr25 f13" input-focus>
|
||||
<a ng-if="!issue.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="issue.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{issue.comment_count}}</span></a>
|
||||
<a ng-if="!object.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="object.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{object.comment_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
@ -73,8 +73,8 @@
|
|||
<!--</div>-->
|
||||
|
||||
<div class="mb50" id="all_course_message_reply" at-delete-link>
|
||||
<div ng-if="issue.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in issue.all_children">
|
||||
<div ng-if="object.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in object.all_children">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-reply-author hidden fl">
|
||||
|
@ -104,13 +104,13 @@
|
|||
<div ng-if="journal.praise_count && !journal.has_praise" ng-click="addPraise(journal);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{journal.praise_count}}</span></div>
|
||||
<div ng-if="journal.has_praise" ng-click="decreasePraise(journal);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{journal.praise_count}}</span></div>
|
||||
</div>
|
||||
<div ng-click="clickReply(journal.act_id,issue)" class="fr mr25 f13 reply-icons multi-hide">
|
||||
<div ng-click="clickReply(journal.act_id,object)" class="fr mr25 f13 reply-icons multi-hide">
|
||||
<a><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div ng-show="journal.showinput" class="post-input-container multi-input-container ml40 mb10">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea ng-focus="inputfocus(issue)" ng-blur="inputblur(issue)" input-auto type="text" class="post-reply-input" ng-model="journal.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<textarea ng-focus="inputfocus(object)" ng-blur="inputblur(object)" input-auto type="text" class="post-reply-input" ng-model="journal.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<button ng-click="addReply(journal,1);journal.showinput = false;" ng-disabled="journal.disabled" ng-hide="journal.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="journal.disabled" ng-hide="!journal.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<div class="cl"></div>
|
||||
|
@ -118,17 +118,17 @@
|
|||
</div>
|
||||
</div>
|
||||
<div ng-if="has_more">
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,issue);">更多</div>
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,object);">更多</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="!issue.notshow" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
|
||||
<div ng-show="!object.notshow" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
|
||||
<div class="post-reply-row border-bottom-none">
|
||||
<div class="post-input-container">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-change="onPostChange(issue.comment, '{{issue.comment}}')" ng-model="issue.comment" placeholder="输入回复内容,您可以@别人啦~" /></textarea>
|
||||
<button ng-click="addReply(issue,0)" ng-disabled="issue.disabled" ng-hide="issue.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="issue.disabled" ng-hide="!issue.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-change="onPostChange(object.comment, '{{object.comment}}')" ng-model="object.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<button ng-click="addReply(object,0)" ng-disabled="object.disabled" ng-hide="object.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="object.disabled" ng-hide="!object.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -138,19 +138,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div at-directive></div>
|
||||
|
||||
|
||||
<div class="post-container wechat-at" ng-show="showAtDialog">
|
||||
<div class="wechat-at-inner">
|
||||
<div loading-spinner></div>
|
||||
<div class="class-detail-name"><span class="course-name-width hidden inline-block">选择您要@的人</span>
|
||||
<button ng-click="cancelAt()" class="cancel-btn-new fr border-radius">取消</button>
|
||||
</div>
|
||||
<ul class="weixin-users-all">
|
||||
<li ng-repeat="person in at_persons track by $index" ng-click="selectAtPerson($index)"><p class="fl ">{{person.name}}</p><p class="fl ">({{person.login}})</p></li>
|
||||
<li ng-repeat="person in at_persons track by $index" ng-click="selectAtPerson($index)"><p class="fl ">{{person.name}}</p><p class="fl ">({{person.login}})</p></li>
|
||||
<li ng-repeat="person in at_persons track by $index" ng-click="selectAtPerson($index)"><p class="fl ">{{person.name}}</p><p class="fl ">({{person.login}})</p></li>
|
||||
<li ng-repeat="person in at_persons track by $index" ng-click="selectAtPerson($index)"><p class="fl ">{{person.name}}</p><p class="fl ">({{person.login}})</p></li>
|
||||
<li ng-repeat="person in at_persons track by $index" ng-click="selectAtPerson($index)"><p class="fl ">{{person.name}}</p><p class="fl ">({{person.login}})</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -8,40 +8,40 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="message.act_type == 'JournalsForMessage'">
|
||||
<div ng-if="object.act_type == 'JournalsForMessage'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper" style="margin-top:0;">
|
||||
<div ng-show="is_public == 0 && is_public == false" class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
|
||||
<div class="post-main">
|
||||
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{message.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{object.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
{{message.user.real_name}}
|
||||
<img ng-if="message.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="message.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
{{object.user.real_name}}
|
||||
<img ng-if="object.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="object.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ml40">
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">留言</span><span>{{message.created_on}}</span></div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">留言</span><span>{{object.created_on}}</span></div>
|
||||
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="message.content|safeHtml" img-preview></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="object.content|safeHtml" img-preview></div>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!message.praise_count" ng-click="addPraise(message);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="message.praise_count && !message.has_praise" ng-click="addPraise(message);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{message.praise_count}}</span></div>
|
||||
<div ng-if="message.has_praise" ng-click="decreasePraise(message);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{message.praise_count}}</span></div>
|
||||
<div ng-if="!object.praise_count" ng-click="addPraise(object);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="object.praise_count && !object.has_praise" ng-click="addPraise(object);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{object.praise_count}}</span></div>
|
||||
<div ng-if="object.has_praise" ng-click="decreasePraise(object);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{object.praise_count}}</span></div>
|
||||
</div>
|
||||
<div id="replyBlock" class="fr mr25 f13" input-focus>
|
||||
<a ng-if="!message.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="message.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{message.comment_count}}</span></a>
|
||||
<a ng-if="!object.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="object.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{object.comment_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb50" id="all_message_reply" at-delete-link>
|
||||
|
||||
<div ng-if="message.child_reply == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in message.all_children">
|
||||
<div ng-if="object.child_reply == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in object.all_children">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-reply-author hidden fl">
|
||||
|
@ -70,13 +70,13 @@
|
|||
<div ng-if="journal.praise_count && !journal.has_praise" ng-click="addPraise(journal);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{journal.praise_count}}</span></div>
|
||||
<div ng-if="journal.has_praise" ng-click="decreasePraise(journal);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{journal.praise_count}}</span></div>
|
||||
</div>
|
||||
<div ng-click="clickReply(journal.act_id,message)" class="fr mr25 f13 reply-icons multi-hide">
|
||||
<div ng-click="clickReply(journal.act_id,object)" class="fr mr25 f13 reply-icons multi-hide">
|
||||
<a><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div ng-show="journal.showinput" class="post-input-container multi-input-container ml40 mb10">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea ng-focus="inputfocus(message)" ng-blur="inputblur(message)" input-auto type="text" class="post-reply-input" ng-model="journal.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<textarea ng-focus="inputfocus(object)" ng-blur="inputblur(object)" input-auto type="text" class="post-reply-input" ng-model="journal.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<button ng-click="addReply(journal,1);journal.showinput = false;" ng-disabled="journal.disabled" ng-hide="journal.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="journal.disabled" ng-hide="!journal.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<div class="cl"></div>
|
||||
|
@ -84,17 +84,17 @@
|
|||
</div>
|
||||
</div>
|
||||
<div ng-if="has_more">
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,message);">更多</div>
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,object);">更多</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-show="!message.notshow" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
|
||||
<div ng-show="!object.notshow" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
|
||||
<div class="post-reply-row border-bottom-none">
|
||||
<div class="post-input-container">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="message.comment" placeholder="输入回复内容~" /></textarea>
|
||||
<button ng-click="addReply(message,0)" ng-disabled="message.disabled" ng-hide="message.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="message.disabled" ng-hide="!message.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="object.comment" placeholder="输入回复内容~" /></textarea>
|
||||
<button ng-click="addReply(object,0)" ng-disabled="object.disabled" ng-hide="object.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="object.disabled" ng-hide="!object.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -102,4 +102,5 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div at-directive></div>
|
||||
|
|
|
@ -9,40 +9,40 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="discussion.act_type == 'Message'">
|
||||
<div ng-if="object.act_type == 'Message'">
|
||||
<div class="post-container">
|
||||
<div class="post-wrapper" style="margin-top:0;">
|
||||
<div ng-show="is_public == false" class="tac f16 fb c-black" style="padding-top:10px;">私有内容,请谨慎传播</div>
|
||||
<div class="post-main">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{discussion.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{object.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-dynamic-author hidden fl">
|
||||
{{discussion.user.real_name}}
|
||||
<img ng-if="discussion.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="discussion.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
{{object.user.real_name}}
|
||||
<img ng-if="object.user.gender == '0'" src="images/wechat/male.png" width="14" class="ml5" />
|
||||
<img ng-if="object.user.gender != '0'" src="images/wechat/female.png" width="14" class="ml5" />
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="ml40">
|
||||
<div class="post-dynamic-title c-black fb">{{discussion.subject}}<img ng-if="discussion.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">{{discussion.course_project_name}} - 项目讨论区</span><span>{{discussion.created_on}}</span></div>
|
||||
<div class="post-dynamic-title c-black fb">{{object.subject}}<img ng-if="object.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
||||
<div class="c-grey4 f13 mt5"><span class="mr10">{{object.course_project_name}} - 项目讨论区</span><span>{{object.created_on}}</span></div>
|
||||
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="discussion.content|safeHtml" img-preview></div>
|
||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="object.content|safeHtml" img-preview></div>
|
||||
<div class="cl"></div>
|
||||
<div class="fr f13">
|
||||
<div ng-if="!discussion.praise_count" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="discussion.praise_count && !discussion.has_praise" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
|
||||
<div ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
|
||||
<div ng-if="!object.praise_count" ng-click="addPraise(object);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>赞</span></div>
|
||||
<div ng-if="object.praise_count && !object.has_praise" ng-click="addPraise(object);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{object.praise_count}}</span></div>
|
||||
<div ng-if="object.has_praise" ng-click="decreasePraise(object);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{object.praise_count}}</span></div>
|
||||
</div>
|
||||
<div id="replyBlock" class="fr mr25 f13" input-focus>
|
||||
<a ng-if="!discussion.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="discussion.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{discussion.comment_count}}</span></a>
|
||||
<a ng-if="!object.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
<a ng-if="object.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{object.comment_count}}</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb50" id="all_course_message_reply" at-delete-link>
|
||||
<div ng-if="discussion.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in discussion.all_children">
|
||||
<div ng-if="object.all_children == ''" style="border-top:1px solid #ccc;"></div>
|
||||
<div class="post-reply-wrap" ng-repeat="journal in object.all_children">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-avatar fl mr10"><img ng-src="{{journal.user.img_url}}" width="30" height="30" class="border-radius img-circle" /></div>
|
||||
<div class="post-reply-author hidden fl">
|
||||
|
@ -71,13 +71,13 @@
|
|||
<div ng-if="journal.praise_count && !journal.has_praise" ng-click="addPraise(journal);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{journal.praise_count}}</span></div>
|
||||
<div ng-if="journal.has_praise" ng-click="decreasePraise(journal);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{journal.praise_count}}</span></div>
|
||||
</div>
|
||||
<div ng-click="clickReply(journal.act_id,discussion)" class="fr mr25 f13 reply-icons multi-hide">
|
||||
<div ng-click="clickReply(journal.act_id,object)" class="fr mr25 f13 reply-icons multi-hide">
|
||||
<a><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div ng-show="journal.showinput" class="post-input-container multi-input-container ml40 mb10">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea ng-focus="inputfocus(discussion)" ng-blur="inputblur(discussion)" input-auto type="text" class="post-reply-input" ng-model="journal.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<textarea ng-focus="inputfocus(object)" ng-blur="inputblur(object)" input-auto type="text" class="post-reply-input" ng-model="journal.comment" placeholder="{{replytip}}" /></textarea>
|
||||
<button ng-click="addReply(journal,1);journal.showinput = false;" ng-disabled="journal.disabled" ng-hide="journal.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="journal.disabled" ng-hide="!journal.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<div class="cl"></div>
|
||||
|
@ -85,20 +85,22 @@
|
|||
</div>
|
||||
</div>
|
||||
<div ng-if="has_more">
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,discussion);">更多</div>
|
||||
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,object);">更多</div>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-show="!discussion.notshow" ng-if="!discussion.locked" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
|
||||
<div ng-show="!object.notshow" ng-if="!object.locked" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
|
||||
<div class="post-reply-row border-bottom-none">
|
||||
<div class="post-input-container">
|
||||
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="discussion.comment" placeholder="输入回复内容~" /></textarea>
|
||||
<button ng-click="addReply(discussion,0)" ng-disabled="discussion.disabled" ng-hide="discussion.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="discussion.disabled" ng-hide="!discussion.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<textarea input-auto type="text" class="post-reply-input" id="postInput1" ng-model="object.comment" placeholder="输入回复内容~" /></textarea>
|
||||
<button ng-click="addReply(object,0)" ng-disabled="object.disabled" ng-hide="object.disabled" class="post-reply-submit fr border-radius">提交</button>
|
||||
<button ng-disabled="object.disabled" ng-hide="!object.disabled" class="post-reply-submit bg-grey fr border-radius">提交</button>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div at-directive></div>
|
|
@ -0,0 +1,11 @@
|
|||
<div class="post-container wechat-at" ng-show="showAtDialog">
|
||||
<div class="wechat-at-inner">
|
||||
<div loading-spinner></div>
|
||||
<div class="class-detail-name"><span class="course-name-width hidden inline-block">选择您要@的人</span>
|
||||
<button ng-click="cancelAt()" class="cancel-btn-new fr border-radius">取消</button>
|
||||
</div>
|
||||
<ul class="weixin-users-all">
|
||||
<li ng-repeat="person in at_persons track by $index" ng-click="selectAtPerson($index)"><p class="fl ">{{person.name}}</p><p class="fl ">({{person.login}})</p></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -5,6 +5,7 @@ app.controller('BlogController',
|
|||
common.init({
|
||||
id: $routeParams.id,
|
||||
scope: $scope,
|
||||
at_enabled: true,
|
||||
type: 'blog_comments',
|
||||
replyType: 'BlogComment',
|
||||
urlName: 'blog_comment',
|
||||
|
@ -22,19 +23,19 @@ app.controller('BlogController',
|
|||
|
||||
if (replytype == 0){
|
||||
if (page == 0){
|
||||
$scope.blog = data.data;
|
||||
$scope.object = data.data;
|
||||
$scope.page = 0;
|
||||
}
|
||||
else{
|
||||
$scope.blog.all_children = $scope.blog.all_children.concat(data.data.all_children);
|
||||
$scope.object.all_children = $scope.object.all_children.concat(data.data.all_children);
|
||||
}
|
||||
$scope.has_more = $scope.blog.all_children.length < $scope.blog.comment_count;
|
||||
$scope.has_more = $scope.object.all_children.length < $scope.object.comment_count;
|
||||
console.log($scope.has_more);
|
||||
}
|
||||
else{
|
||||
comment_id = data.data.id;
|
||||
for (var i in $scope.blog.all_children) {
|
||||
var comment = $scope.blog.all_children[i];
|
||||
for (var i in $scope.object.all_children) {
|
||||
var comment = $scope.object.all_children[i];
|
||||
if(comment.id == comment_id){
|
||||
// comment.parents_reply_top = comment.parents_reply_top.concat(data.data.parents_reply_top);
|
||||
comment.parents_reply_top = data.data.parents_reply_top.concat(comment.parents_reply_top);
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
|
||||
app.controller('DiscussionController', ['$scope', '$http', '$routeParams', 'auth', 'common', function($scope, $http, $routeParams, auth, common){
|
||||
var vm = $scope;
|
||||
|
||||
common.init({
|
||||
id: $routeParams.id,
|
||||
scope: $scope,
|
||||
at_enabled: true,
|
||||
type: 'messages',
|
||||
replyType: 'Message',
|
||||
urlName: 'discussion',
|
||||
|
@ -20,20 +23,20 @@ app.controller('DiscussionController', ['$scope', '$http', '$routeParams', 'auth
|
|||
|
||||
if (replytype == 0){
|
||||
if (page == 0){
|
||||
$scope.discussion = data.data;
|
||||
$scope.object = data.data;
|
||||
$scope.page = 0;
|
||||
$scope.is_public = data.is_public;
|
||||
}
|
||||
else{
|
||||
$scope.discussion.all_children = $scope.discussion.all_children.concat(data.data.all_children);
|
||||
$scope.object.all_children = $scope.object.all_children.concat(data.data.all_children);
|
||||
}
|
||||
$scope.has_more = $scope.discussion.all_children.length < $scope.discussion.comment_count;
|
||||
$scope.has_more = $scope.object.all_children.length < $scope.object.comment_count;
|
||||
console.log($scope.has_more);
|
||||
}
|
||||
else{
|
||||
comment_id = data.data.id;
|
||||
for (var i in $scope.discussion.all_children) {
|
||||
var comment = $scope.discussion.all_children[i];
|
||||
for (var i in $scope.object.all_children) {
|
||||
var comment = $scope.object.all_children[i];
|
||||
if(comment.id == comment_id){
|
||||
// comment.parents_reply_top = comment.parents_reply_top.concat(data.data.parents_reply_top);
|
||||
comment.parents_reply_top = data.data.parents_reply_top.concat(comment.parents_reply_top);
|
||||
|
@ -42,6 +45,9 @@ app.controller('DiscussionController', ['$scope', '$http', '$routeParams', 'auth
|
|||
}
|
||||
},
|
||||
replyCallback: function(){
|
||||
},
|
||||
beforeReplay: function(data){
|
||||
return vm.parseAtPersons(data);
|
||||
}
|
||||
});
|
||||
}]);
|
|
@ -3,6 +3,7 @@ app.controller('HomeworkController', ['$scope', '$http', '$routeParams', 'auth',
|
|||
common.init({
|
||||
id: $routeParams.id,
|
||||
scope: $scope,
|
||||
at_enabled: true,
|
||||
type: 'whomeworks',
|
||||
replyType: 'HomeworkCommon',
|
||||
urlName: 'homework',
|
||||
|
@ -20,20 +21,20 @@ app.controller('HomeworkController', ['$scope', '$http', '$routeParams', 'auth',
|
|||
|
||||
if (replytype == 0){
|
||||
if (page == 0){
|
||||
$scope.homework = data.data;
|
||||
$scope.object = data.data;
|
||||
$scope.page = 0;
|
||||
$scope.is_public = data.is_public;
|
||||
}
|
||||
else{
|
||||
$scope.homework.all_children = $scope.homework.all_children.concat(data.data.all_children);
|
||||
$scope.object.all_children = $scope.object.all_children.concat(data.data.all_children);
|
||||
}
|
||||
$scope.has_more = $scope.homework.all_children.length < $scope.homework.comment_count;
|
||||
$scope.has_more = $scope.object.all_children.length < $scope.object.comment_count;
|
||||
console.log($scope.has_more);
|
||||
}
|
||||
else{
|
||||
comment_id = data.data.id;
|
||||
for (var i in $scope.homework.all_children) {
|
||||
var comment = $scope.homework.all_children[i];
|
||||
for (var i in $scope.object.all_children) {
|
||||
var comment = $scope.object.all_children[i];
|
||||
if(comment.id == comment_id){
|
||||
// comment.parents_reply_top = comment.parents_reply_top.concat(data.data.parents_reply_top);
|
||||
comment.parents_reply_top = data.data.parents_reply_top.concat(comment.parents_reply_top);
|
||||
|
|
|
@ -3,60 +3,11 @@ app.controller('IssueController', ['$scope', '$http', '$routeParams', 'auth', 'c
|
|||
|
||||
var vm = $scope;
|
||||
vm.previewImgUrls = [];
|
||||
vm.showAtDialog = false;
|
||||
|
||||
var parseAtPersons = function (comment) {
|
||||
var selectedPersons = [];
|
||||
var ss = comment.match(/@(.+?)\s+/g);
|
||||
|
||||
for(var i in ss){
|
||||
var personName = ss[i].substr(1, ss[i].length-2);
|
||||
console.log(personName);
|
||||
|
||||
for(var j in vm.at_persons){
|
||||
var person = vm.at_persons[j];
|
||||
if(person.name == personName){
|
||||
selectedPersons.push(person);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(var i in selectedPersons){
|
||||
var person = selectedPersons[i];
|
||||
comment = comment.replace('@'+person.name+' ',
|
||||
'<span class="atwho-inserted"><span class="at" data-user-id="'+person.id
|
||||
+'"><a href="/users/'+person.id+'">@'+person.name+'('+person.login+')'+' </a></span></span>'
|
||||
);
|
||||
}
|
||||
return comment;
|
||||
};
|
||||
|
||||
vm.onPostChange = function (newValue, oldValue) {
|
||||
if(newValue.length > oldValue.length && newValue.match(/@$/)=='@'){
|
||||
console.log('@ fire');
|
||||
vm.showAtDialog = true;
|
||||
if(!vm.at_persons){
|
||||
$http.get('/at/'+$routeParams.id+'.json?type=Issue').then(function (response) {
|
||||
vm.at_persons = response.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
console.log(vm.issue.comment);
|
||||
};
|
||||
|
||||
vm.selectAtPerson = function (index) {
|
||||
var person = vm.at_persons[index];
|
||||
vm.showAtDialog = false;
|
||||
vm.issue.comment += person.name + ' ';
|
||||
};
|
||||
|
||||
vm.cancelAt = function(){
|
||||
vm.showAtDialog = false;
|
||||
}
|
||||
|
||||
common.init({
|
||||
id: $routeParams.id,
|
||||
scope: $scope,
|
||||
at_enabled: true,
|
||||
type: 'issues',
|
||||
replyType: 'Issue',
|
||||
urlName: 'issues',
|
||||
|
@ -90,21 +41,21 @@ app.controller('IssueController', ['$scope', '$http', '$routeParams', 'auth', 'c
|
|||
|
||||
if (replytype == 0){
|
||||
if (page == 0){
|
||||
$scope.issue = data.data;
|
||||
$scope.object = data.data;
|
||||
$scope.page = 0;
|
||||
$scope.is_public = data.is_public;
|
||||
$scope.previewImgUrls = parseImgAttachment($scope.issue.attachments);
|
||||
$scope.previewImgUrls = parseImgAttachment($scope.object.attachments);
|
||||
}
|
||||
else{
|
||||
$scope.issue.all_children = $scope.issue.all_children.concat(data.data.all_children);
|
||||
$scope.object.all_children = $scope.object.all_children.concat(data.data.all_children);
|
||||
}
|
||||
$scope.has_more = $scope.issue.all_children.length < $scope.issue.comment_count;
|
||||
$scope.has_more = $scope.object.all_children.length < $scope.object.comment_count;
|
||||
console.log($scope.has_more);
|
||||
}
|
||||
else{
|
||||
comment_id = data.data.id;
|
||||
for (var i in $scope.issue.all_children) {
|
||||
var comment = $scope.issue.all_children[i];
|
||||
for (var i in $scope.object.all_children) {
|
||||
var comment = $scope.object.all_children[i];
|
||||
if(comment.id == comment_id){
|
||||
// comment.parents_reply_top = comment.parents_reply_top.concat(data.data.parents_reply_top);
|
||||
comment.parents_reply_top = data.data.parents_reply_top.concat(comment.parents_reply_top);
|
||||
|
@ -113,9 +64,6 @@ app.controller('IssueController', ['$scope', '$http', '$routeParams', 'auth', 'c
|
|||
}
|
||||
},
|
||||
replyCallback: function(){
|
||||
},
|
||||
beforeReplay: function(data){
|
||||
return parseAtPersons(data);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ app.controller('JournalsController', ['$scope', '$http', '$routeParams', 'auth',
|
|||
common.init({
|
||||
id: $routeParams.id,
|
||||
scope: $scope,
|
||||
at_enabled: true,
|
||||
type: 'journal_for_messages',
|
||||
replyType: 'JournalsForMessage',
|
||||
urlName: 'journal_for_message',
|
||||
|
@ -19,20 +20,20 @@ app.controller('JournalsController', ['$scope', '$http', '$routeParams', 'auth',
|
|||
|
||||
if (replytype == 0){
|
||||
if (page == 0){
|
||||
$scope.message = data.data;
|
||||
$scope.object = data.data;
|
||||
$scope.page = 0;
|
||||
$scope.is_public = data.is_public;
|
||||
}
|
||||
else{
|
||||
$scope.message.all_children = $scope.message.all_children.concat(data.data.all_children);
|
||||
$scope.object.all_children = $scope.object.all_children.concat(data.data.all_children);
|
||||
}
|
||||
$scope.has_more = $scope.message.all_children.length < $scope.message.comment_count;
|
||||
$scope.has_more = $scope.object.all_children.length < $scope.object.comment_count;
|
||||
console.log($scope.has_more);
|
||||
}
|
||||
else{
|
||||
comment_id = data.data.id;
|
||||
for (var i in $scope.message.all_children) {
|
||||
var comment = $scope.message.all_children[i];
|
||||
for (var i in $scope.object.all_children) {
|
||||
var comment = $scope.object.all_children[i];
|
||||
if(comment.id == comment_id){
|
||||
// comment.parents_reply_top = comment.parents_reply_top.concat(data.data.parents_reply_top);
|
||||
comment.parents_reply_top = data.data.parents_reply_top.concat(comment.parents_reply_top);
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
app.directive('atDirective', ['$http', 'config', function ($http, config) {
|
||||
return {
|
||||
templateUrl: config.rootPath+ 'templates/at.html',
|
||||
};
|
||||
}]);
|
|
@ -218,7 +218,7 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc
|
|||
};
|
||||
|
||||
var init = function(args){
|
||||
args.scope.replytip = "输入回复内容~";
|
||||
args.scope.replytip = "输入回复内容,您可以@别人啦~";
|
||||
// args.scope.formData = {comment: ''};
|
||||
var loadData = function(id,replytype,page){
|
||||
loadCommonData(id, args.type,replytype,page).then(function successCallback(response) {
|
||||
|
@ -301,10 +301,14 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc
|
|||
};
|
||||
|
||||
loadData(args.id,0,0);
|
||||
|
||||
if(args.at_enabled === true){
|
||||
enableAt(args.scope, args.replyType);
|
||||
}
|
||||
|
||||
args.scope.addReply = function(data,reply_type){
|
||||
console.log(data.comment);
|
||||
|
||||
addCommonReply(data.act_id, args.replyType, data,args, reply_type, args.beforeReplay, function(subscribe){
|
||||
addCommonReply(data.act_id, args.replyType, data,args, reply_type, args.at_enabled === true ? args.scope.parseAtPersons : args.beforeReplay, function(subscribe){
|
||||
// args.scope.formData = {comment: ''};
|
||||
if(subscribe == 0){
|
||||
$location.path("/login_tip");
|
||||
|
@ -486,5 +490,57 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
var enableAt = function(vm, atType){
|
||||
vm.showAtDialog = false;
|
||||
|
||||
vm.parseAtPersons = function (comment) {
|
||||
var selectedPersons = [];
|
||||
var ss = comment.match(/@(.+?)\s+/g);
|
||||
|
||||
for(var i in ss){
|
||||
var personName = ss[i].substr(1, ss[i].length-2);
|
||||
|
||||
for(var j in vm.at_persons){
|
||||
var person = vm.at_persons[j];
|
||||
if(person.name == personName){
|
||||
selectedPersons.push(person);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(var i in selectedPersons){
|
||||
var person = selectedPersons[i];
|
||||
comment = comment.replace('@'+person.name+' ',
|
||||
'<span class="atwho-inserted"><span class="at" data-user-id="'+person.id
|
||||
+'"><a href="/users/'+person.id+'">@'+person.name+'('+person.login+')'+' </a></span></span>'
|
||||
);
|
||||
}
|
||||
return comment;
|
||||
};
|
||||
|
||||
vm.onPostChange = function (newValue, oldValue) {
|
||||
if(newValue.length > oldValue.length && newValue.match(/@$/)=='@'){
|
||||
console.log('@ fire');
|
||||
vm.showAtDialog = true;
|
||||
if(!vm.at_persons){
|
||||
$http.get('/at/'+$routeParams.id+'.json?type='+atType).then(function (response) {
|
||||
vm.at_persons = response.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
vm.selectAtPerson = function (index) {
|
||||
var person = vm.at_persons[index];
|
||||
vm.showAtDialog = false;
|
||||
vm.object.comment += person.name + ' ';
|
||||
};
|
||||
|
||||
vm.cancelAt = function(){
|
||||
vm.showAtDialog = false;
|
||||
}
|
||||
};
|
||||
|
||||
return {init: init, addCommonReply: addCommonReply, loadCommonData: loadCommonData, addCommonPraise: addCommonPraise, decreaseCommonPraise: decreaseCommonPraise, wxConfig: wxConfig, checkLogin: checkLogin};
|
||||
}]);
|
||||
|
|
Loading…
Reference in New Issue