项目缺陷详情页面修改

This commit is contained in:
txz 2016-04-06 19:29:00 +08:00
parent a1ef398b9d
commit ec47fb1949
7 changed files with 36 additions and 25 deletions

View File

@ -58,7 +58,7 @@
<div class="post-container">
<div class="post-wrapper">
<div class="post-main">
<div class="post-avatar fl"><img src="/images/post-avatar.jpg" width="45" height="45" class="border-radius" /></div>
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="45" height="45" class="border-radius" /></div>
<div class="post-title hidden mb5"><span class="c-grey3 f15 fb">{{act.subject|safeHtml}}</span></div>
<div class="post-title fl mb10 hidden"><a herf="javascript:void(0);" class="mr10">{{act.author.nickname}}</a>to<a herf="javascript:void(0);" class="ml10">{{act.course_project_name}}&nbsp;&nbsp;|&nbsp;&nbsp;{{act.activity_type_name}}</a></div>
<div class="cl"></div>
@ -139,17 +139,9 @@
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" class="c-grey"> 回复 ({{act.reply_count}}) </a></div>
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey"> 回复 ({{act.reply_count}}) </a></div>
<div class="post-interactive-column c-grey2">赞 ({{act.activity_praise_count}})</div>
</div>
<a herf="javascript:void(0);" class="link-blue f13 fl mt5 post-more undis" style="text-decoration:underline">点击展开</a>
<div class="cl"></div>
<span class="c-grey f13 mt10 fl"><!=activities[i].latest_update!></span>
<div class="cl"></div>
</div>
<div class="post-interactive">
<div class="post-interactive-column c-grey2"><a href="javascript:void(0);" ng-href="#/project_discussion/{{act.act_id}}" class="c-grey"> 回复 (<!=activities[i].reply_count!>) </a></div>
<div class="post-interactive-column c-grey2">赞 (<!=activities[i].activity_praise_count!>)</div>
</div>
</div>
</div>
@ -173,7 +165,7 @@
<div class="post-container">
<div class="post-wrapper">
<div class="post-main">
<div class="post-avatar fl"><img src="images/post-avatar.jpg" width="45" height="45" class="border-radius" /></div>
<div class="post-avatar fl"><img ng-src="{{replaceUrl(act.author.img_url)}}" width="45" height="45" class="border-radius" /></div>
<div class="post-title mb5 hidden"><a herf="javascript:void(0);" class="mr10">{{act.author.nickname}}</a> <span style="vertical-align:top;">给您留言了</span></div>
<div class="post-title hidden">{{act.latest_update}}</div>
<div class="cl"></div>

View File

@ -36,7 +36,7 @@
<div class="post-reply-row">
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
<button ng-click="addIssueReply(formData)" class="post-reply-submit fr mt10">回复</button>
<button ng-click="addDiscussionReply(formData)" class="post-reply-submit fr mt10">回复</button>
<div class="cl"></div>
</div>
</div>

View File

@ -36,7 +36,7 @@
<div class="post-reply-row">
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
<button ng-click="addIssueReply(formData)" class="post-reply-submit fr mt10">回复</button>
<button ng-click="addNoticeReply(formData)" class="post-reply-submit fr mt10">回复</button>
<div class="cl"></div>
</div>
</div>

View File

@ -38,7 +38,7 @@
<div class="post-reply-row">
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
<button ng-click="addIssueReply(formData)" value="回复" class="post-reply-submit fr mt10">回复</button>
<button ng-click="addHomeworkReply(formData)" value="回复" class="post-reply-submit fr mt10">回复</button>
<div class="cl"></div>
</div>
</div>

View File

@ -8,8 +8,9 @@
<div class="post-title hidden"><a herf="javascript:void(0);" class="mr10">{{issue.author.nickname}}</a>to<span class="ml10">{{issue.project_name}}&nbsp;&nbsp;|&nbsp;&nbsp;项目缺陷</span></div>
<div class="cl"></div>
<div class="post-content" style="height:auto;">
<div class="post-all-content c-grey2 mt10">{{issue.description}}<br />
<span class="mr15">状态:{{issue.issue_status}}</span> <span class="mr15">优先级:{{issue.issue_priority}}</span> <br /> <span class="mr15">指派给:{{issue.issue_assigned_to}}</span> <span class="mr15">完成度:{{issue.done_ratio}}%</span></div>
<div class="post-all-content c-grey2 mt10" ng-bind-html="issue.description|safeHtml"></div>
<span class="mr15">状态:{{issue.issue_status}}</span> <span class="mr15">优先级:{{issue.issue_priority}}</span> <br />
<span class="mr15">指派给:{{issue.issue_assigned_to}}</span> <span class="mr15">完成度:{{issue.done_ratio}}%</span>
</div>
<div class="cl"></div>
<span class="c-grey f13 mt10 fl">{{issue.created_on}}</span>

View File

@ -36,7 +36,7 @@
<div class="post-reply-row">
<!--<div class="post-reply-avatar fl"><img src="images/post-avatar.jpg" width="30" height="30" /></div>-->
<input type="text" class="post-reply-input" id="postInput" ng-model="formData.comment" />
<button ng-click="addIssueReply(formData)" class="post-reply-submit fr mt10">回复</button>
<button ng-click="addDiscussionReply(formData)" class="post-reply-submit fr mt10">回复</button>
<div class="cl"></div>
</div>
</div>

View File

@ -62,7 +62,7 @@ app.factory('rms', function(){
});
app.controller('ActivityController',function($scope, $http, auth, rms){
$scope.repaceUrl = function(url){
$scope.replaceUrl = function(url){
return "http://www.trustie.net/" + url;
}
@ -93,6 +93,24 @@ app.controller('ActivityController',function($scope, $http, auth, rms){
$scope.loadActData = loadActData;
var descToggle = function(){
$(".post-all-content").each(function(){
var postHeight = $(this).height();
if (postHeight > 90){
$(this).parent().next().css("display","block");
$(this).parent().next().toggle(function(){
$(this).text("点击隐藏");
$(this).prev().css("height",postHeight);
},function(){
$(this).text("点击展开");
$(this).prev().css("height",90);
});
}
});
}
$scope.descToggle = descToggle;
});
app.controller('IssueController', function($scope, $http, $routeParams, auth){
@ -157,7 +175,7 @@ app.controller('HomeworkController', function($scope, $http, $routeParams, auth)
loadData($routeParams.id);
$scope.addIssueReply = function(data){
$scope.addHomeworkReply = function(data){
console.log(data.comment);
if(!data.comment || data.comment.length<=0){
@ -201,7 +219,7 @@ app.controller('CourseNoticeController', function($scope, $http, $routeParams, a
loadData($routeParams.id);
$scope.addIssueReply = function(data){
$scope.addNoticeReply = function(data){
console.log(data.comment);
if(!data.comment || data.comment.length<=0){
@ -245,7 +263,7 @@ app.controller('CourseDiscussionController', function($scope, $http, $routeParam
loadData($routeParams.id);
$scope.addIssueReply = function(data){
$scope.addDiscussionReply = function(data){
console.log(data.comment);
if(!data.comment || data.comment.length<=0){
@ -373,6 +391,10 @@ app.config(['$routeProvider',function ($routeProvider) {
templateUrl: 'issue_detail.html',
controller: 'IssueController'
})
.when('/project_discussion/:id', {
templateUrl: 'project_discussion.html',
controller: 'CourseDiscussionController'
})
.when('/homework/:id', {
templateUrl: 'homework_detail.html',
controller: 'HomeworkController'
@ -385,10 +407,6 @@ app.config(['$routeProvider',function ($routeProvider) {
templateUrl: 'course_discussion.html',
controller: 'CourseDiscussionController'
})
.when('/project_discussion/:id', {
templateUrl: 'project_discussion.html',
controller: 'CourseDiscussionController'
})
.when('/journal_for_message/:id', {
templateUrl: 'jour_message_detail.html',
controller: 'JournalsController'