From 11f3060ca511498ed813d601ad8e0cde95380af3 Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 2 Sep 2016 14:40:40 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=87=AA=E5=B7=B1=E5=BB=BA=E7=9A=84issue?= =?UTF-8?q?=E6=8C=87=E5=90=91=E8=87=AA=E5=B7=B1=E4=B8=8D=E5=8F=91=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/issues_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 4c9411538..b97699058 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -196,8 +196,9 @@ class IssuesController < ApplicationController priority_id = params[:issue][:priority_id] ps = ProjectsService.new - ps.send_wechat_project_issue_notice senduser,@issue.project,issue_id,issue_title,priority_id - + if senduser.id != User.current.id + ps.send_wechat_project_issue_notice senduser,@issue.project,issue_id,issue_title,priority_id + end call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue}) respond_to do |format| format.html { From 877d1930f0db9b04f93c8c84a5d9f2cd8ef6a7c7 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 2 Sep 2016 15:35:20 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=B6=85=E7=BA=A7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E5=BA=94=E8=AF=A5=E6=9C=89=E6=9D=83=E9=99=90=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E4=B8=8D=E5=85=AC=E5=BC=80=E5=AD=A6=E7=94=9F=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=8F=AD=E7=BA=A7=E7=9A=84=E5=AD=A6=E7=94=9F=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 2614b6271..e542d1e1d 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -331,7 +331,7 @@ class CoursesController < ApplicationController @all_members = searchTeacherAndAssistant(@course) @members = @all_members when '2' - if @course.open_student == 1 || User.current.member_of_course?(@course) + if @course.open_student == 1 || User.current.member_of_course?(@course) || User.current.admin? @subPage_title = l :label_student_list page = params[:page].nil? ? 0 : (params['page'].to_i - 1) @all_members = student_homework_score(0,page, 10,@score_sort_by,@sort_type) From ed7308969cede9c5b1e5590b89e5e0fa97d6d4cc Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Fri, 2 Sep 2016 15:45:07 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=B8=96=E5=AD=90?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=90=8E=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/blog_detail.html | 8 ++++++++ public/assets/wechat/course_discussion.html | 8 ++++++++ public/assets/wechat/course_notice.html | 8 ++++++++ public/assets/wechat/homework_detail.html | 8 ++++++++ public/assets/wechat/issue_detail.html | 8 ++++++++ public/assets/wechat/jour_message_detail.html | 8 ++++++++ public/assets/wechat/project_discussion.html | 8 ++++++++ public/javascripts/wechat/controllers/blog.js | 5 +++++ public/javascripts/wechat/controllers/course_notice.js | 5 +++++ public/javascripts/wechat/controllers/discussion.js | 5 +++++ public/javascripts/wechat/controllers/homework.js | 5 +++++ public/javascripts/wechat/controllers/issue.js | 5 +++++ public/javascripts/wechat/controllers/journals.js | 5 +++++ public/javascripts/wechat/others/factory.js | 4 ++++ 14 files changed, 90 insertions(+) diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index 54dda1568..570bfb797 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -1,6 +1,14 @@
+
+
提示
+
+
    +
  • 啊哦,您来晚了,内容已经被删除了
  • +
+
+
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index 0daf0e1bb..a3f6ae496 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -1,6 +1,14 @@
+
+
提示
+
+
    +
  • 啊哦,您来晚了,内容已经被删除了
  • +
+
+
diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index a24321b5e..33e8e77be 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -1,6 +1,14 @@
+
+
提示
+
+
    +
  • 啊哦,您来晚了,内容已经被删除了
  • +
+
+
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 9ffdcea4a..bf2a89f35 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -1,6 +1,14 @@
+
+
提示
+
+
    +
  • 啊哦,您来晚了,内容已经被删除了
  • +
+
+
diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 8aefc8d17..5b55ebba0 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -1,6 +1,14 @@
+
+
提示
+
+
    +
  • 啊哦,您来晚了,内容已经被删除了
  • +
+
+
diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index 8062ccccc..5b06a22aa 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -1,5 +1,13 @@
+
+
提示
+
+
    +
  • 啊哦,您来晚了,内容已经被删除了
  • +
+
+
diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index e29b062dc..e0ee87d78 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -1,6 +1,14 @@
+
+
提示
+
+
    +
  • 啊哦,您来晚了,内容已经被删除了
  • +
+
+
diff --git a/public/javascripts/wechat/controllers/blog.js b/public/javascripts/wechat/controllers/blog.js index 21c1cf345..d14156b1a 100644 --- a/public/javascripts/wechat/controllers/blog.js +++ b/public/javascripts/wechat/controllers/blog.js @@ -11,6 +11,11 @@ app.controller('BlogController', loadCallback: function(data){ console.log(data.data); + if(data.status == -1){ + $scope.showtip = true; + return; + } + //回复级别 0 一级回复 1 二级回复 replytype = data.type; page = data.page; diff --git a/public/javascripts/wechat/controllers/course_notice.js b/public/javascripts/wechat/controllers/course_notice.js index 48ec19889..571078735 100644 --- a/public/javascripts/wechat/controllers/course_notice.js +++ b/public/javascripts/wechat/controllers/course_notice.js @@ -10,6 +10,11 @@ app.controller('CourseNoticeController', ['$scope', '$http', '$routeParams', 'au loadCallback: function(data){ console.log(data.data); + if(data.status == -1){ + $scope.showtip = true; + return; + } + //回复级别 0 一级回复 1 二级回复 replytype = data.type; page = data.page; diff --git a/public/javascripts/wechat/controllers/discussion.js b/public/javascripts/wechat/controllers/discussion.js index 21e842d0f..5f6c098e7 100644 --- a/public/javascripts/wechat/controllers/discussion.js +++ b/public/javascripts/wechat/controllers/discussion.js @@ -9,6 +9,11 @@ app.controller('DiscussionController', ['$scope', '$http', '$routeParams', 'auth loadCallback: function(data){ console.log(data.data); + if(data.status == -1){ + $scope.showtip = true; + return; + } + //回复级别 0 一级回复 1 二级回复 replytype = data.type; page = data.page; diff --git a/public/javascripts/wechat/controllers/homework.js b/public/javascripts/wechat/controllers/homework.js index f61f2be1d..381d04810 100644 --- a/public/javascripts/wechat/controllers/homework.js +++ b/public/javascripts/wechat/controllers/homework.js @@ -9,6 +9,11 @@ app.controller('HomeworkController', ['$scope', '$http', '$routeParams', 'auth', loadCallback: function(data){ console.log(data.data); + if(data.status == -1){ + $scope.showtip = true; + return; + } + //回复级别 0 一级回复 1 二级回复 replytype = data.type; page = data.page; diff --git a/public/javascripts/wechat/controllers/issue.js b/public/javascripts/wechat/controllers/issue.js index 91db1d535..b580da465 100644 --- a/public/javascripts/wechat/controllers/issue.js +++ b/public/javascripts/wechat/controllers/issue.js @@ -9,6 +9,11 @@ app.controller('IssueController', ['$scope', '$http', '$routeParams', 'auth', 'c loadCallback: function(data){ console.log(data.data); + if(data.status == -1){ + $scope.showtip = true; + return; + } + //回复级别 0 一级回复 1 二级回复 replytype = data.type; page = data.page; diff --git a/public/javascripts/wechat/controllers/journals.js b/public/javascripts/wechat/controllers/journals.js index 0570e695f..a768fe5fb 100644 --- a/public/javascripts/wechat/controllers/journals.js +++ b/public/javascripts/wechat/controllers/journals.js @@ -8,6 +8,11 @@ app.controller('JournalsController', ['$scope', '$http', '$routeParams', 'auth', loadCallback: function(data){ console.log(data.data); + if(data.status == -1){ + $scope.showtip = true; + return; + } + //回复级别 0 一级回复 1 二级回复 replytype = data.type; page = data.page; diff --git a/public/javascripts/wechat/others/factory.js b/public/javascripts/wechat/others/factory.js index f08ef5813..d4e365321 100644 --- a/public/javascripts/wechat/others/factory.js +++ b/public/javascripts/wechat/others/factory.js @@ -226,6 +226,10 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc var loadData = function(id,replytype,page){ loadCommonData(id, args.type,replytype,page).then(function successCallback(response) { console.log(response.data); + if(response.data.status == -1){ + args.loadCallback(response.data); + return; + } //--------------分享内容定制------------- var tmptile = "分享动态"; var imgUrl = ""; From 0d2a3cbe360496f241d491b3417c7ab5116937cc Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 2 Sep 2016 16:00:54 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=89=88=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E5=88=97=E8=A1=A8=E6=8A=A5500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_message_forge.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users/_user_message_forge.html.erb b/app/views/users/_user_message_forge.html.erb index d08396e16..09f399cc9 100644 --- a/app/views/users/_user_message_forge.html.erb +++ b/app/views/users/_user_message_forge.html.erb @@ -1,4 +1,4 @@ -<% if ma.class == ForgeMessage && ma.forge_message %> +<% if ma.class == ForgeMessage %> <% if ma.forge_message_type == "AppliedProject" %>
    @@ -130,7 +130,7 @@
<% end %> <% end %> - <% if ma.forge_message_type == "Journal" %> + <% if ma.forge_message_type == "Journal" && ma.forge_message %>
  • <%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %> From 01ca94bc989f811eb719cf9098a7fb7e8c30f41d Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 2 Sep 2016 16:21:58 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E6=9C=AA=E8=AF=BB=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_show_messages_list.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_show_messages_list.html.erb b/app/views/layouts/_show_messages_list.html.erb index d7887434f..584970f16 100644 --- a/app/views/layouts/_show_messages_list.html.erb +++ b/app/views/layouts/_show_messages_list.html.erb @@ -115,7 +115,7 @@ <%= link_to content.html_safe, { :controller=> "my",:action => "account", :flag => 1, :applied_message_id => ma.id }, :title => "系统提示:“#{ma.name}”的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!", :target => '_blank'%>
  • <% end %> - <% elsif ma.class == ForgeMessage && ma.forge_message %> + <% elsif ma.class == ForgeMessage %> <% if ma.forge_message_type == "AppliedProject" %>
  • " target="_blank" title="<%=ma.forge_message.user.show_name %> 申请加入项目:<%= ma.project.name%>"><%=ma.forge_message.user.show_name %> 申请加入项目:<%= ma.project.name%>
  • <% elsif ma.forge_message_type == "JoinProject" %> @@ -128,7 +128,7 @@
  • <%= ma.forge_message.subject%> 截止时间快到了!"><%=ma.forge_message.author.show_name %> <%= ma.forge_message.tracker_id == 5 ? "发布的周报:":"指派给你的问题:"%><%= ma.forge_message.subject%> 截止时间快到了!
  • <% elsif ma.forge_message_type == "Issue" && ma.status != 1 %>
  • <%= ma.forge_message.subject%>"><%=ma.forge_message.author.show_name %> <%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%><%= ma.forge_message.subject%>
  • - <% elsif ma.forge_message_type == "Journal" %> + <% elsif ma.forge_message_type == "Journal" && ma.forge_message %>
  • <%=ma.forge_message.user.show_name %> 更新了问题状态:<%= ma.forge_message.journalized.subject%>
  • <% elsif ma.forge_message_type == "Message" %>
  • <%= ma.forge_message.subject%>"><%=ma.forge_message.author.show_name %> <%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %><%= ma.forge_message.subject%>
  • From 7fe1394403cdde3254d94a03667dcfa523a7498d Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 2 Sep 2016 16:34:33 +0800 Subject: [PATCH 6/7] =?UTF-8?q?ios=E8=87=AA=E5=8A=A8=E5=AE=9A=E4=BD=8D?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wechat/directives/iphone_recognize.js | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/public/javascripts/wechat/directives/iphone_recognize.js b/public/javascripts/wechat/directives/iphone_recognize.js index f3b167b96..27462c7f0 100644 --- a/public/javascripts/wechat/directives/iphone_recognize.js +++ b/public/javascripts/wechat/directives/iphone_recognize.js @@ -9,24 +9,28 @@ app.directive('iphoneRecognize',["$timeout",function(timer){ timer(function(){ var contentHeight = $(".post-container").height(); var toBottom = function(){ - element.css({"position":"relative","padding":"1px 0"}); - $(".post-wrapper").css("marginBottom","0"); - $("#all_homework_reply").css("marginBottom","0"); - window.scrollTo(0,contentHeight); + element.css({"position":"absolute","padding":"1px 0","marginBottom":"-50px"}); + $(".post-wrapper").css({"marginBottom":"0","position":"relative"}); + $("#all_homework_reply,#all_blog_reply,#all_course_message_reply,#all_message_reply").css("marginBottom","0"); + window.scrollTo(0,contentHeight) }; - if (/ipad|iphone|mac/i.test(navigator.userAgent)){ +// if (/ipad|iphone|mac/i.test(navigator.userAgent)){ $("#postInput1").bind('focus',function(){ - toBottom(); + setTimeout(function(){ + toBottom(); + },200); }); $("#postInput1,#replyBlock").bind("click",function(){ - toBottom(); + setTimeout(function(){ + toBottom(); + },200); }); $("#postInput1").bind('blur',function(){ - element.css("position","fixed"); - $(".post-wrapper").css("marginBottom","10px"); - $("#all_homework_reply").css("marginBottom","50px"); + element.css({"position":"fixed","marginBottom":"0"}); + $(".post-wrapper").css({"marginBottom":"10px","position":""}); + $("#all_homework_reply,#all_blog_reply,#all_course_message_reply,#all_message_reply").css("marginBottom","52px"); }); - } +// } }) } } From 92ae8865f053355d9cbee6afa8e528b4844e88c2 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 2 Sep 2016 16:35:16 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E5=88=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/wechat/directives/iphone_recognize.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/javascripts/wechat/directives/iphone_recognize.js b/public/javascripts/wechat/directives/iphone_recognize.js index 27462c7f0..44fb5136a 100644 --- a/public/javascripts/wechat/directives/iphone_recognize.js +++ b/public/javascripts/wechat/directives/iphone_recognize.js @@ -14,7 +14,7 @@ app.directive('iphoneRecognize',["$timeout",function(timer){ $("#all_homework_reply,#all_blog_reply,#all_course_message_reply,#all_message_reply").css("marginBottom","0"); window.scrollTo(0,contentHeight) }; -// if (/ipad|iphone|mac/i.test(navigator.userAgent)){ + if (/ipad|iphone|mac/i.test(navigator.userAgent)){ $("#postInput1").bind('focus',function(){ setTimeout(function(){ toBottom(); @@ -30,7 +30,7 @@ app.directive('iphoneRecognize',["$timeout",function(timer){ $(".post-wrapper").css({"marginBottom":"10px","position":""}); $("#all_homework_reply,#all_blog_reply,#all_course_message_reply,#all_message_reply").css("marginBottom","52px"); }); -// } + } }) } }