|
|
|
@ -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'
|
|
|
|
|