From 5f27519c6754babbc1bec5cf52ceb8a7a4b65bb2 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 27 May 2016 14:44:32 +0800 Subject: [PATCH 01/47] =?UTF-8?q?table=E5=8F=AF=E6=8B=96=E6=8B=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_work/_evaluation_title.html.erb | 2 +- .../_evaluation_un_title.html.erb | 4 +- app/views/student_work/index.html.erb | 1 + public/javascripts/resizeable_table.js | 76 +++++++++++++++++++ public/stylesheets/courses.css | 6 +- 5 files changed, 83 insertions(+), 6 deletions(-) create mode 100644 public/javascripts/resizeable_table.js diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb index 064444f04..73bd5d4f2 100644 --- a/app/views/student_work/_evaluation_title.html.erb +++ b/app/views/student_work/_evaluation_title.html.erb @@ -1,4 +1,4 @@ - +
diff --git a/app/views/student_work/_evaluation_un_title.html.erb b/app/views/student_work/_evaluation_un_title.html.erb index 98e9f1f64..f25edc5ce 100644 --- a/app/views/student_work/_evaluation_un_title.html.erb +++ b/app/views/student_work/_evaluation_un_title.html.erb @@ -1,4 +1,4 @@ -
序号  
+
@@ -17,7 +17,7 @@ <% end%> <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %> - <% end %> diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 8e7d87302..3c077c6ea 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -1,5 +1,6 @@ <% content_for :header_tags do %> <%= javascript_include_tag "/assets/codemirror/codemirror_python_ruby_c" %> +<%= javascript_include_tag "resizeable_table" %> <%= stylesheet_link_tag "/assets/codemirror/codemirror" %> <% end %> diff --git a/public/javascripts/resizeable_table.js b/public/javascripts/resizeable_table.js new file mode 100644 index 000000000..eac4a1f36 --- /dev/null +++ b/public/javascripts/resizeable_table.js @@ -0,0 +1,76 @@ +/** + * Created by ttang on 2016/5/24. + */ + $(document).ready(function(){ + resizeable_table = function(colS,colE,padding){ + var headerTds = document.getElementById("homework_table").rows[0].cells; + var mousedown = false; + var resizeable = false; + var targetTd; + var screenXStart =0; + var tdWidth = 0; + var headerWidth = 0; + var tblObj = document.getElementById("homework_table"); + var tblWidth = tblObj.offsetWidth; + for(var i = colS;i 0){//实际改变前一单元格列宽,但是表格左边框线不可拖动 + targetTd=trObj.cells[srcObj.cellIndex - 1]; + resizeable = true; + srcObj.style.cursor='col-resize'; + }else{ + resizeable = false; + srcObj.style.cursor='default'; + } + } + } + document.onmouseup = function(event){ + tartgetTd = null; + resizeable = false; + mousedown = false; + document.body.style.cursor='default'; + } + function getTarget(evt){ + return evt.target || evt.srcElement; + } + function addListener(element,type,listener,useCapture){ + element.addEventListener?element.addEventListener(type,listener,useCapture):element.attachEvent("on" + type,listener); + } + } + }); diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 49f87416c..a76ec5464 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -59,7 +59,7 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;} .hworkList100 {width:100px; text-align:center;} .hworkList130 {width:130px; text-align:center;} .hworkList160 {width:160px; text-align:center;} -.hworkList220 {width:220px; text-align:center;} +.hworkList210 {width:210px; text-align:center;} .hworkList260 {width:260px; text-align:left;} .codeList{ float:right; font-size:12px; color:#484848; padding:0px 3px; width:714px; margin-bottom:10px; } .hworkName {width:80px; float:left; line-height:18px;} @@ -103,7 +103,7 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re .pr10{padding-right: 10px;} /*20160520作品列表table*/ -.hwork-table-wrap {width:720px; border-collapse:collapse; vertical-align:middle;} +.hwork-table-wrap {width:720px; border-collapse:collapse; vertical-align:middle; table-layout:fixed;} .hwork-table-wrap th {font-size:14px; color:#2d2d2d;} /*作业信息*/ @@ -1252,7 +1252,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;} .tac {text-align:center;} .proHelp {background:url(/images/course/hwork_icon.png) -5px -124px no-repeat; display:inline-block; width:15px; height:15px; display:inline-block;} .hworkPrName {width:160px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:65px; line-height:65px; vertical-align:middle; font-size:12px; color:#888888; text-align:center;} -.hworkPrName2 {width:220px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:65px; line-height:65px; vertical-align:middle; font-size:12px; color:#888888; text-align:center;} +.hworkPrName2 {width:210px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:65px; line-height:65px; vertical-align:middle; font-size:12px; color:#888888; text-align:center;} .mr150 {margin-right:150px;} .relatePInfo {text-align: left; position:absolute; background-color:#ffffff; padding:3px 8px; white-space:nowrap; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); z-index:999; color:#585858; cursor:pointer; display:none;} .captainName {max-width:75px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: inline-block;} From 513fe1a93d6e098eb82f15ff7d8d3f34f300c9bc Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 1 Jun 2016 13:46:05 +0800 Subject: [PATCH 02/47] =?UTF-8?q?=E4=BD=9C=E5=93=81=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=8F=AF=E6=8B=96=E6=8B=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_work/_evaluation_title.html.erb | 2 +- .../_evaluation_un_title.html.erb | 8 ++--- .../student_work/_evaluation_un_work.html.erb | 2 +- public/javascripts/resizeable_table.js | 29 ++++++++++--------- public/stylesheets/courses.css | 2 +- public/stylesheets/public.css | 1 + 6 files changed, 23 insertions(+), 21 deletions(-) diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb index 73bd5d4f2..bcb7f853f 100644 --- a/app/views/student_work/_evaluation_title.html.erb +++ b/app/views/student_work/_evaluation_title.html.erb @@ -1,4 +1,4 @@ -
序号   + 关联项目
+
diff --git a/app/views/student_work/_evaluation_un_title.html.erb b/app/views/student_work/_evaluation_un_title.html.erb index f25edc5ce..1c8de2923 100644 --- a/app/views/student_work/_evaluation_un_title.html.erb +++ b/app/views/student_work/_evaluation_un_title.html.erb @@ -1,16 +1,16 @@ -
序号  
+
- + <% if @homework.homework_type != 3 %> - -
序号  作品名称作品名称 + <%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl #{@homework.anonymous_comment == 1 ? 'ml35' : 'ml18'}" ,:remote => true%> <% if @show_all && @order == "lastname"%> <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%> <% end%> + <%= link_to "学号",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml30" ,:remote => true%> <% if @show_all && @order == "student_id"%> <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%> diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index ecdde77d8..0fc4ae480 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -12,7 +12,7 @@ <% if @homework.homework_type != 3 %> - + <%= student_work.user.show_name%> " onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;"> diff --git a/public/javascripts/resizeable_table.js b/public/javascripts/resizeable_table.js index eac4a1f36..6221b501c 100644 --- a/public/javascripts/resizeable_table.js +++ b/public/javascripts/resizeable_table.js @@ -2,7 +2,7 @@ * Created by ttang on 2016/5/24. */ $(document).ready(function(){ - resizeable_table = function(colS,colE,padding){ + resizeable_table = function(colS,colE,p1,p2){ var headerTds = document.getElementById("homework_table").rows[0].cells; var mousedown = false; var resizeable = false; @@ -24,6 +24,7 @@ screenXStart = evt.screenX; tdWidth = targetTd.offsetWidth; tdWidth2 = targetTd.nextElementSibling.offsetWidth; + totalWidth = tdWidth + tdWidth2; } } function onmousemove(event){ @@ -31,18 +32,22 @@ var srcObj = getTarget(evt); var offsetX = evt.offsetX || (evt.clientX - srcObj.getBoundingClientRect().left);//这个比较关键,解决了Firefox无offsetX属性的问题 if (mousedown == true){ - var width = (tdWidth + (evt.screenX - screenXStart)) - 10 + "px";//计算后的新的宽度 - var width2 = (tdWidth2 - (evt.screenX - screenXStart)) - 10 + "px"; - console.log(width, width2); - if (width<60){ - targetTd.style.width = "60px"; - console.log("width<60"); - }else if(width2<60){ - targetTd.nextElementSibling.style.width2 = "60px"; - console.log("width2<60"); + var width = (tdWidth + (evt.screenX - screenXStart)) - p1 + "px";//计算后的新的宽度 + var width2 = (tdWidth2 - (evt.screenX - screenXStart)) - p2 + "px"; + console.log(width, width2, totalWidth); + if (parseInt(width)<0 || parseInt(width2)<58 || tdWidth > totalWidth || tdWidth2 > totalWidth){ + tartgetTd = null; + resizeable = false; + mousedown = false; }else{ targetTd.style.width = width; targetTd.nextElementSibling.style.width = width2; + document.onmouseup = function(event){ + tartgetTd = null; + resizeable = false; + mousedown = false; + document.body.style.cursor='default'; + } } }else{ var trObj = tblObj.rows[0]; @@ -50,10 +55,6 @@ targetTd=srcObj; resizeable = true; srcObj.style.cursor='col-resize';//修改光标样式 - }else if(offsetX <=4 && srcObj.cellIndex > 0){//实际改变前一单元格列宽,但是表格左边框线不可拖动 - targetTd=trObj.cells[srcObj.cellIndex - 1]; - resizeable = true; - srcObj.style.cursor='col-resize'; }else{ resizeable = false; srcObj.style.cursor='default'; diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index a76ec5464..b41696779 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -104,7 +104,7 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re /*20160520作品列表table*/ .hwork-table-wrap {width:720px; border-collapse:collapse; vertical-align:middle; table-layout:fixed;} -.hwork-table-wrap th {font-size:14px; color:#2d2d2d;} +.hwork-table-wrap th {font-size:14px; color:#2d2d2d; border:1px solid #e1e1e1;} /*作业信息*/ .mt-2 {margin-top:-2px;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index a5c1ada12..2ef518bbd 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -56,6 +56,7 @@ h4{ font-size:14px; color:#3b3b3b;} .flow_hidden{ width:300px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} .white_space{white-space:nowrap;} .pr {position:relative;} +.hide-text {overflow:hidden; white-space:nowrap;} /* Spacing */ .ml2{ margin-left:2px;} From 308f247c711614fb4b1df92a15648ac3d470d8e3 Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 1 Jun 2016 16:09:01 +0800 Subject: [PATCH 03/47] =?UTF-8?q?=E5=8F=AF=E6=8B=96=E6=8B=BD=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../student_work/_evaluation_title.html.erb | 2 +- .../student_work/_evaluation_un_title.html.erb | 12 ++++++------ .../student_work/_evaluation_un_work.html.erb | 2 +- public/javascripts/resizeable_table.js | 18 +++++++++--------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/app/views/student_work/_evaluation_title.html.erb b/app/views/student_work/_evaluation_title.html.erb index 89ded10b3..8381a479b 100644 --- a/app/views/student_work/_evaluation_title.html.erb +++ b/app/views/student_work/_evaluation_title.html.erb @@ -1,5 +1,5 @@ - + <% if @homework.homework_type != 3 %> diff --git a/app/views/student_work/_evaluation_un_title.html.erb b/app/views/student_work/_evaluation_un_title.html.erb index 1a3220df6..d3b8c3443 100644 --- a/app/views/student_work/_evaluation_un_title.html.erb +++ b/app/views/student_work/_evaluation_un_title.html.erb @@ -1,16 +1,16 @@ -
序号  
- +
+ <% if @homework.homework_type != 3 %> - - + - <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %> - <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 0 %> diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index 688e31451..052230612 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -12,7 +12,7 @@ <%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%> - <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
序号  作品名称 + 作品名称 <%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl #{@homework.anonymous_comment == 1 ? 'ml35' : 'ml18'}" ,:remote => true%> <% if @show_all && @order == "lastname"%> <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%> <% end%> + <%= link_to "学号",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml30" ,:remote => true%> <% if @show_all && @order == "student_id"%> <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%> @@ -18,7 +18,7 @@ 作品名称 + 关联项目 + <%= student_work.user.show_name%> " onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;"> diff --git a/public/javascripts/resizeable_table.js b/public/javascripts/resizeable_table.js index 6221b501c..d7e48bb2e 100644 --- a/public/javascripts/resizeable_table.js +++ b/public/javascripts/resizeable_table.js @@ -2,6 +2,12 @@ * Created by ttang on 2016/5/24. */ $(document).ready(function(){ + window.onload = function(){ + $("th").each(function(){ + $(this).css("width",$(this).width()-1); + }); + } + resizeable_table = function(colS,colE,p1,p2){ var headerTds = document.getElementById("homework_table").rows[0].cells; var mousedown = false; @@ -34,20 +40,13 @@ if (mousedown == true){ var width = (tdWidth + (evt.screenX - screenXStart)) - p1 + "px";//计算后的新的宽度 var width2 = (tdWidth2 - (evt.screenX - screenXStart)) - p2 + "px"; - console.log(width, width2, totalWidth); - if (parseInt(width)<0 || parseInt(width2)<58 || tdWidth > totalWidth || tdWidth2 > totalWidth){ + if (parseInt(width)<0 || parseInt(width2)<0 || tdWidth > totalWidth || tdWidth2 > totalWidth){ tartgetTd = null; resizeable = false; mousedown = false; }else{ targetTd.style.width = width; targetTd.nextElementSibling.style.width = width2; - document.onmouseup = function(event){ - tartgetTd = null; - resizeable = false; - mousedown = false; - document.body.style.cursor='default'; - } } }else{ var trObj = tblObj.rows[0]; @@ -57,11 +56,12 @@ srcObj.style.cursor='col-resize';//修改光标样式 }else{ resizeable = false; + mousedown = false; srcObj.style.cursor='default'; } } } - document.onmouseup = function(event){ + document.body.onmouseup = function(event){ tartgetTd = null; resizeable = false; mousedown = false; From ed46ca0735afd15fff99b9eb768c97a260d2ac76 Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 2 Jun 2016 13:45:06 +0800 Subject: [PATCH 04/47] =?UTF-8?q?=E5=8F=AF=E6=8B=96=E6=8B=BD=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_evaluation_un_work.html.erb | 2 +- public/javascripts/resizeable_table.js | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index 052230612..93c800879 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -16,7 +16,7 @@ <%= student_work.user.show_name%> " onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;"> - + <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%> diff --git a/public/javascripts/resizeable_table.js b/public/javascripts/resizeable_table.js index d7e48bb2e..0d79ba737 100644 --- a/public/javascripts/resizeable_table.js +++ b/public/javascripts/resizeable_table.js @@ -2,12 +2,9 @@ * Created by ttang on 2016/5/24. */ $(document).ready(function(){ - window.onload = function(){ - $("th").each(function(){ - $(this).css("width",$(this).width()-1); - }); - } - + $("th").each(function(){ + $(this).css("width",$(this).width()-1); + }); resizeable_table = function(colS,colE,p1,p2){ var headerTds = document.getElementById("homework_table").rows[0].cells; var mousedown = false; From 1396cae14c9a29d5afad0fba4692eb46c2256759 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 3 Jun 2016 08:59:17 +0800 Subject: [PATCH 05/47] =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 4 ++++ app/views/layouts/_logined_header.html.erb | 24 +++++++++++++++++++++- public/stylesheets/new_user.css | 12 +++++++++++ public/stylesheets/public.css | 11 ++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 44ef54c95..a07f2421f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -370,6 +370,10 @@ class User < Principal messages_count = course_count + forge_count + user_feedback_count + user_memo_count + system_messages_count + at_count + org_count end + def user_messages_unviewed + + end + # 查询指派给我的缺陷记录 def issue_status_update self.status_updates diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index f5b421f62..e3fad5c6a 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -78,12 +78,28 @@ - @@ -95,6 +111,12 @@ $("#navHomepageSearchType").hide(); }); + $("#user_messages").mouseover(function(){ + $("#user_messages_list").show(); + }).mouseout(function(){ + $("#user_messages_list").hide(); + }); + $("#navHomepageProfile").mouseenter(function(){ $("#homepageProfileMenuIcon").addClass("homepageProfileMenuIconhover"); $("#topnav_login_list").show(); diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 0231f6a8a..1edb4ff80 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -1616,3 +1616,15 @@ ul.wlist li a{ border:1px solid #15bccf; padding: 1px 4px 1px 4px; margin-left:3 ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;} /*.wlist_select { background-color:#64bdd9; color:#fff; padding: 1px 5px 0px 5px; margin-left:3px;margin-top: -2px; border:1px solid #64bdd9;}*/ .wlist_select a{background-color: #64bdd9;cursor: default;} + +/*消息弹框*/ +.shadowbox_news{ width:305px; background-color:#fff; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position: absolute; left: -131px; top: 45px; z-index: 9999;} +.shadowbox_news_title{ height:40px; line-height:40px;padding-left:10px; font-size:12px; color:#333;border-bottom:1px solid #eee;} +.shadowbox_news font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); } +.shadowbox_news_list{ max-height:200px; overflow:hidden;} +.shadowbox_news_list a{ color:#999;} +.shadowbox_news_list li{ height:40px; border-bottom:1px dashed #ebebeb; line-height:40px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis; padding:0 10px;} +.shadowbox_news_list li:hover{ background-color:#eee;} +a.shadowbox_news_user{ color:#3b94d6;} +a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;} + diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 98fd0ec20..c28560506 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -1144,3 +1144,14 @@ a.st_down{ display: block; width:8px; float:left; height:13px; background:url(.. /*弹框*/ .apply_content{ border:1px solid #ddd;line-height: 16px; height:80px;width:420px; background:#fff; margin-bottom:10px;} + +/*消息弹框*/ +.shadowbox_news{ width:305px; background-color:#fff; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); position: absolute; left: -131px; top: 45px; z-index: 9999;} +.shadowbox_news_title{ height:40px; line-height:40px;padding-left:10px; font-size:12px; color:#333;border-bottom:1px solid #eee;} +.shadowbox_news font{ border: 1px solid #dddddd; display: block; border-width: 8px; position: absolute; top: -15px;left: 140px; border-style:solid; border-color: transparent transparent #fff transparent;font-size: 0;line-height: 0; box-shadow:2px rgba(146, 153, 169, 0.5); } +.shadowbox_news_list{ max-height:200px; overflow:hidden;} +.shadowbox_news_list a{ color:#999;} +.shadowbox_news_list li{ height:40px; border-bottom:1px dashed #ebebeb; line-height:40px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis; padding:0 10px;} +.shadowbox_news_list li:hover{ background-color:#eee;} +a.shadowbox_news_user{ color:#3b94d6;} +a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;} From d27a050ffa428c7f09d0f5805e0eda8de7ba9f1b Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 3 Jun 2016 16:28:11 +0800 Subject: [PATCH 06/47] =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 14 ++++ app/models/user.rb | 4 - app/views/layouts/_logined_header.html.erb | 23 ++---- app/views/layouts/_message_loading.html.erb | 6 ++ .../layouts/_show_messages_list.html.erb | 74 +++++++++++++++++++ app/views/users/_user_message_course.html.erb | 4 +- app/views/users/user_messages_unviewed.js.erb | 1 + config/routes.rb | 1 + public/stylesheets/new_user.css | 2 +- public/stylesheets/public.css | 2 +- 10 files changed, 107 insertions(+), 24 deletions(-) create mode 100644 app/views/layouts/_message_loading.html.erb create mode 100644 app/views/layouts/_show_messages_list.html.erb create mode 100644 app/views/users/user_messages_unviewed.js.erb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 4cb838b8c..e201d8611 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -123,6 +123,20 @@ class UsersController < ApplicationController end + #未读消息弹窗 + def user_messages_unviewed + @message_alls = [] + messages = MessageAll.where("user_id =?", User.current.id).includes(:message).order("created_at desc") + onclick_time = User.current.onclick_time.onclick_time + messages.each do |message_all| + # 未读的消息存放在数组 + if (message_all.message_type != "SystemMessage"&& !message_all.message.nil? && message_all.message.viewed == 0) || (message_all.message_type == "SystemMessage"&& !message_all.message.nil? && message_all.message.created_at > onclick_time) + @message_alls << message_all.message + break if @message_alls.length == 5 + end + end + end + # 用户消息 # 说明: homework 发布作业;message:讨论区; news:新闻; poll:问卷;works_reviewers:作品评阅;works_reply:作品回复,exercise:课程测验 # issue:问题;journal:缺陷状态更新; forum:公共贴吧: user_feedback: 用户留言; new_reply:新闻回复(comment) diff --git a/app/models/user.rb b/app/models/user.rb index a07f2421f..44ef54c95 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -370,10 +370,6 @@ class User < Principal messages_count = course_count + forge_count + user_feedback_count + user_memo_count + system_messages_count + at_count + org_count end - def user_messages_unviewed - - end - # 查询指派给我的缺陷记录 def issue_status_update self.status_updates diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index e3fad5c6a..7ba0a23be 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -85,20 +85,7 @@ <% end %> <%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %> @@ -111,10 +98,14 @@ $("#navHomepageSearchType").hide(); }); - $("#user_messages").mouseover(function(){ + $("#user_messages").mouseenter(function(){ $("#user_messages_list").show(); - }).mouseout(function(){ + $.get('<%=user_messages_unviewed_users_path %>'); + $("#ajax-indicator").hide(); + }).mouseleave(function(){ $("#user_messages_list").hide(); + $("#user_messages_list").html("<%=escape_javascript(render :partial => 'layouts/message_loading') %>"); + }); $("#navHomepageProfile").mouseenter(function(){ diff --git a/app/views/layouts/_message_loading.html.erb b/app/views/layouts/_message_loading.html.erb new file mode 100644 index 000000000..aae55205c --- /dev/null +++ b/app/views/layouts/_message_loading.html.erb @@ -0,0 +1,6 @@ + +
+ + 正在加载中,请稍后... +
+
\ No newline at end of file diff --git a/app/views/layouts/_show_messages_list.html.erb b/app/views/layouts/_show_messages_list.html.erb new file mode 100644 index 000000000..27e1d8896 --- /dev/null +++ b/app/views/layouts/_show_messages_list.html.erb @@ -0,0 +1,74 @@ + +

未读消息

+ +<%= link_to '查看全部', user_message_path(User.current), :class => "shadowbox_news_all", :target =>"_Blank" %> \ No newline at end of file diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index 60d5b6ed8..0c18dbcc3 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -259,7 +259,7 @@ '您申请引用作业"'+HomeworkCommon.find(ma.course_message_id).name+'"的申请已通过' : '您申请引用作业"'+HomeworkCommon.find(ma.course_message_id).name+'"的申请被拒绝' %> - <% if User.current.member_of_course?(ma.course_message.course) || User.current.admin? || ma.course_message.is_open == 1 %> + <% if User.current.member_of_course?(ma.course_message.course) || User.current.admin? || (ma.course_message.is_open == 1 && ma.course_message.course.is_public == 1) %> <%= link_to link_str, student_work_index_path(:homework => ma.course_message.id), :title => link_str,:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}", :target => '_blank' %> <% else %> <%=link_str %> @@ -399,7 +399,7 @@
  • <%= time_tag(ma.created_at).html_safe %>
  • <% end %> - <% elsif ma.course_message.jour_type == 'HomeworkCommon' %> + <% elsif ma.course_message.jour_type == 'HomeworkCommon' %>
    • <%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user), :target => '_blank' %> diff --git a/app/views/users/user_messages_unviewed.js.erb b/app/views/users/user_messages_unviewed.js.erb new file mode 100644 index 000000000..1019050c9 --- /dev/null +++ b/app/views/users/user_messages_unviewed.js.erb @@ -0,0 +1 @@ +$("#user_messages_list").html("<%=escape_javascript(render :partial => 'layouts/show_messages_list', :locals => {:messages => @message_alls}) %>"); \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 9abaef0ae..ed936115a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -538,6 +538,7 @@ RedmineApp::Application.routes.draw do get 'new_user_commit_homework' get 'reply_to' get 'show_all_replies' + get 'user_messages_unviewed' post "user_commit_homework" post 'user_select_homework' end diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 1edb4ff80..0d00f604d 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -1625,6 +1625,6 @@ ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;} .shadowbox_news_list a{ color:#999;} .shadowbox_news_list li{ height:40px; border-bottom:1px dashed #ebebeb; line-height:40px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis; padding:0 10px;} .shadowbox_news_list li:hover{ background-color:#eee;} -a.shadowbox_news_user{ color:#3b94d6;} +span.shadowbox_news_user{ color:#3b94d6;} a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index c28560506..b0f4df679 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -1153,5 +1153,5 @@ a.st_down{ display: block; width:8px; float:left; height:13px; background:url(.. .shadowbox_news_list a{ color:#999;} .shadowbox_news_list li{ height:40px; border-bottom:1px dashed #ebebeb; line-height:40px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis; padding:0 10px;} .shadowbox_news_list li:hover{ background-color:#eee;} -a.shadowbox_news_user{ color:#3b94d6;} +span.shadowbox_news_user{ color:#3b94d6;} a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;} From 4c92e73cf1400f20f1213a03218e679b2db10c9a Mon Sep 17 00:00:00 2001 From: yuanke <249218296@qq.com> Date: Mon, 6 Jun 2016 09:34:45 +0800 Subject: [PATCH 07/47] =?UTF-8?q?=E6=A0=B9=E6=8D=AEhttp=E5=92=8Chttps?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/application.js | 39 ++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 468bf64e9..b8d9da240 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1347,6 +1347,43 @@ function pop_up_box(value,tWidth,tTop,tLeft){ } } +//显示的时候根据当前网址是http 还是https 选择视频显示方式直接显示还是弹框 +function autoMedia(id){ + var rootPath = getRootPath(); + + function _mediaType(src) { + if (/\.(rm|rmvb)(\?|$)/i.test(src)) { + return 'audio/x-pn-realaudio-plugin'; + } + if (/\.(swf|flv)(\?|$)/i.test(src)) { + return 'application/x-shockwave-flash'; + } + return 'video/x-ms-asf-plugin'; + } + + if (rootPath.indexOf("https") < 0){ + $("#"+id+" img").each(function(){ + if ($(this).attr("class") == "mediaIco"){ + var href = $(this).parent().attr("href"); + //正则取地址 + if (href){ + var url = href.split("open('")[1].split("',")[0]; + if (url != ""){ + var type = _mediaType(url); + //1.video/x-ms-asf-plugin 类型的视频播放不了,2.audio/x-pn-realaudio-plugin没试过3.application/x-shockwave-flash可以播放 + if (type != "video/x-ms-asf-plugin"){ + var width = 550; + var height = 400; + var html = ''; + $(this).parent().replaceWith(html); + } + } + } + } + }); + } +} + //yk 自动识别URL 并加上链接 function autoUrl(id){ if ($("#"+id).children().length > 0 ){ @@ -1387,6 +1424,6 @@ function autoUrl(id){ }); $("#"+id).html(html); } + autoMedia(id); } - From ee12b3540bd88b1806133498eea8eba78637c235 Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 6 Jun 2016 11:05:25 +0800 Subject: [PATCH 08/47] =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E7=9A=84=E8=BF=98=E5=8E=9F=E3=80=81=E5=BE=AE=E4=BF=A1=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ app/views/layouts/_logined_header.html.erb | 14 +++++++------- config/menu.yml | 6 +++--- config/wechat.yml | 14 +++++++------- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 0727a920a..38f29a661 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,6 @@ vendor/cache /public/files /tags /config/initializers/gitlab_config.rb +/config/wechat.yml +/config/menu.yml 1234567 diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index 7ba0a23be..a87e83238 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -84,9 +84,9 @@
      <%= link_to User.current.count_new_message , user_message_path(User.current), :class => "newsActive", :target =>"_Blank" %>
      <% end %> <%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %> -
      - <%=render :partial => 'layouts/message_loading' %> -
      + @@ -98,15 +98,15 @@ $("#navHomepageSearchType").hide(); }); - $("#user_messages").mouseenter(function(){ + /*$("#user_messages").mouseenter(function(){ $("#user_messages_list").show(); - $.get('<%=user_messages_unviewed_users_path %>'); + $.get('<%#=user_messages_unviewed_users_path %>'); $("#ajax-indicator").hide(); }).mouseleave(function(){ $("#user_messages_list").hide(); - $("#user_messages_list").html("<%=escape_javascript(render :partial => 'layouts/message_loading') %>"); + $("#user_messages_list").html("<%#=escape_javascript(render :partial => 'layouts/message_loading') %>"); - }); + });*/ $("#navHomepageProfile").mouseenter(function(){ $("#homepageProfileMenuIcon").addClass("homepageProfileMenuIconhover"); diff --git a/config/menu.yml b/config/menu.yml index 79659fb90..56966cb5f 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -2,7 +2,7 @@ button: - type: "view" name: "最新动态" - url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.course.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=123#wechat_redirect" + url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=123#wechat_redirect" - type: "click" name: "意见反馈" @@ -13,8 +13,8 @@ button: - type: "view" name: "进入网站" - url: "https://test.course.trustie.net/" + url: "https://www.trustie.net/" - type: "view" name: "使用手册" - url: "https://test.course.trustie.net/organizations/1/downloads" \ No newline at end of file + url: "https://www.trustie.net/organizations/1/downloads" \ No newline at end of file diff --git a/config/wechat.yml b/config/wechat.yml index 3d679c4ce..d9a091db9 100644 --- a/config/wechat.yml +++ b/config/wechat.yml @@ -3,19 +3,19 @@ default: &default # corpsecret: "corpsecret" # agentid: 1 # Or if using public account, only need above two line - appid: "wxc09454f171153c2d" - secret: "dff5b606e34dcafe24163ec82c2715f8" + appid: "wx8e1ab05163a28e37" + secret: "beb4d3bc4b32b3557811680835357841" token: "123456" access_token: "1234567" encrypt_mode: false # if true must fill encoding_aes_key - encoding_aes_key: "QyocNOkRmrT5HzBpCG54EVPUQjk86nJapXNVDQm6Yy6" + encoding_aes_key: "QGfP13YP4BbQGkkrlYuxpn4ZIDXpBJww4fxl8CObvNw" jsapi_ticket: "C:/Users/[user_name]/wechat_jsapi_ticket" #template - binding_succ_notice: "n4KLwcWNrIMYkKxWL2hUwzunm5RTT54EbWem2MIUapU" - journal_notice: "XpHHYkqSGkwuF9vHthRdmPQLvCFRQ4_NbRBP12T7ciE" - homework_message_notice: "Kom0TsYYKsNKCS6luweYVRo9z-mH0wRPr24b1clGCPQ" - class_notice: "8LVu33l6bP-56SDomVgHn-yJc57YpCwwJ81rAJgRONk" + binding_succ_notice: "jjpDrgFErnmkrE9tf2M3o0t31ZrJ7mr0YtuE_wyLaMc" + journal_notice: "uC1zAw4F2q6HTA3Pcj8VUO6wKKKiYFwnPJB4iXxpdoM" + homework_message_notice: "tCf7teCVqc2vl2LZ_hppIdWmpg8yLcrI8XifxYePjps" + class_notice: "MQ_mFupbXP-9jWbeHT3C5xqNBvPo8EIlNv4ULakSpJA" production: <<: *default From 6a25adb37ecd019f31822cae5fde1999d1e2fab5 Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 6 Jun 2016 11:13:35 +0800 Subject: [PATCH 09/47] =?UTF-8?q?=E6=9C=80=E6=96=B0=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E6=94=B9=E6=88=90=E6=88=91=E7=9A=84=E5=8A=A8=E6=80=81=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/wechats_controller.rb | 2 +- config/menu.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/wechats_controller.rb b/app/controllers/wechats_controller.rb index ef59e0ed4..3ccdc3257 100644 --- a/app/controllers/wechats_controller.rb +++ b/app/controllers/wechats_controller.rb @@ -121,7 +121,7 @@ class WechatsController < ActionController::Base on :fallback, respond: 'fallback message' on :click, with: 'FEEDBACK' do |request, key| - request.reply.text "如有反馈问题,请直接切入至输入框,发微信给我们即可" + request.reply.text "如有反馈问题,请直接切换至输入框,发微信给我们即可" end on :click, with: 'MY_NEWS' do |request, key| diff --git a/config/menu.yml b/config/menu.yml index 56966cb5f..155553bc2 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -1,7 +1,7 @@ button: - type: "view" - name: "最新动态" + name: "我的动态" url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=123#wechat_redirect" - type: "click" From 5ea6913278981da15473f6c97bd1f6e760f50955 Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 6 Jun 2016 11:19:10 +0800 Subject: [PATCH 10/47] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 -- config/menu.yml | 6 +++--- config/wechat.yml | 14 +++++++------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 38f29a661..0727a920a 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,4 @@ vendor/cache /public/files /tags /config/initializers/gitlab_config.rb -/config/wechat.yml -/config/menu.yml 1234567 diff --git a/config/menu.yml b/config/menu.yml index 155553bc2..3787be2e2 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -2,7 +2,7 @@ button: - type: "view" name: "我的动态" - url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=123#wechat_redirect" + url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.course.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=123#wechat_redirect" - type: "click" name: "意见反馈" @@ -13,8 +13,8 @@ button: - type: "view" name: "进入网站" - url: "https://www.trustie.net/" + url: "https://test.course.trustie.net/" - type: "view" name: "使用手册" - url: "https://www.trustie.net/organizations/1/downloads" \ No newline at end of file + url: "https://test.course.trustie.net/organizations/1/downloads" \ No newline at end of file diff --git a/config/wechat.yml b/config/wechat.yml index d9a091db9..3d679c4ce 100644 --- a/config/wechat.yml +++ b/config/wechat.yml @@ -3,19 +3,19 @@ default: &default # corpsecret: "corpsecret" # agentid: 1 # Or if using public account, only need above two line - appid: "wx8e1ab05163a28e37" - secret: "beb4d3bc4b32b3557811680835357841" + appid: "wxc09454f171153c2d" + secret: "dff5b606e34dcafe24163ec82c2715f8" token: "123456" access_token: "1234567" encrypt_mode: false # if true must fill encoding_aes_key - encoding_aes_key: "QGfP13YP4BbQGkkrlYuxpn4ZIDXpBJww4fxl8CObvNw" + encoding_aes_key: "QyocNOkRmrT5HzBpCG54EVPUQjk86nJapXNVDQm6Yy6" jsapi_ticket: "C:/Users/[user_name]/wechat_jsapi_ticket" #template - binding_succ_notice: "jjpDrgFErnmkrE9tf2M3o0t31ZrJ7mr0YtuE_wyLaMc" - journal_notice: "uC1zAw4F2q6HTA3Pcj8VUO6wKKKiYFwnPJB4iXxpdoM" - homework_message_notice: "tCf7teCVqc2vl2LZ_hppIdWmpg8yLcrI8XifxYePjps" - class_notice: "MQ_mFupbXP-9jWbeHT3C5xqNBvPo8EIlNv4ULakSpJA" + binding_succ_notice: "n4KLwcWNrIMYkKxWL2hUwzunm5RTT54EbWem2MIUapU" + journal_notice: "XpHHYkqSGkwuF9vHthRdmPQLvCFRQ4_NbRBP12T7ciE" + homework_message_notice: "Kom0TsYYKsNKCS6luweYVRo9z-mH0wRPr24b1clGCPQ" + class_notice: "8LVu33l6bP-56SDomVgHn-yJc57YpCwwJ81rAJgRONk" production: <<: *default From 91f7e950eec9cb5edf4b20d0f22c4ed1a94efc29 Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 6 Jun 2016 12:22:52 +0800 Subject: [PATCH 11/47] =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E7=89=88=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/wechats/user_activities.html.erb | 2 +- config/menu.yml | 6 +++--- config/wechat.yml | 14 +++++++------- public/assets/wechat/app.html | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/views/wechats/user_activities.html.erb b/app/views/wechats/user_activities.html.erb index b45587ae0..79e2e05e2 100644 --- a/app/views/wechats/user_activities.html.erb +++ b/app/views/wechats/user_activities.html.erb @@ -1,7 +1,7 @@ - 最新动态 + 我的动态 diff --git a/config/menu.yml b/config/menu.yml index 3787be2e2..155553bc2 100644 --- a/config/menu.yml +++ b/config/menu.yml @@ -2,7 +2,7 @@ button: - type: "view" name: "我的动态" - url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc09454f171153c2d&redirect_uri=https://test.course.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=123#wechat_redirect" + url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=123#wechat_redirect" - type: "click" name: "意见反馈" @@ -13,8 +13,8 @@ button: - type: "view" name: "进入网站" - url: "https://test.course.trustie.net/" + url: "https://www.trustie.net/" - type: "view" name: "使用手册" - url: "https://test.course.trustie.net/organizations/1/downloads" \ No newline at end of file + url: "https://www.trustie.net/organizations/1/downloads" \ No newline at end of file diff --git a/config/wechat.yml b/config/wechat.yml index 3d679c4ce..d9a091db9 100644 --- a/config/wechat.yml +++ b/config/wechat.yml @@ -3,19 +3,19 @@ default: &default # corpsecret: "corpsecret" # agentid: 1 # Or if using public account, only need above two line - appid: "wxc09454f171153c2d" - secret: "dff5b606e34dcafe24163ec82c2715f8" + appid: "wx8e1ab05163a28e37" + secret: "beb4d3bc4b32b3557811680835357841" token: "123456" access_token: "1234567" encrypt_mode: false # if true must fill encoding_aes_key - encoding_aes_key: "QyocNOkRmrT5HzBpCG54EVPUQjk86nJapXNVDQm6Yy6" + encoding_aes_key: "QGfP13YP4BbQGkkrlYuxpn4ZIDXpBJww4fxl8CObvNw" jsapi_ticket: "C:/Users/[user_name]/wechat_jsapi_ticket" #template - binding_succ_notice: "n4KLwcWNrIMYkKxWL2hUwzunm5RTT54EbWem2MIUapU" - journal_notice: "XpHHYkqSGkwuF9vHthRdmPQLvCFRQ4_NbRBP12T7ciE" - homework_message_notice: "Kom0TsYYKsNKCS6luweYVRo9z-mH0wRPr24b1clGCPQ" - class_notice: "8LVu33l6bP-56SDomVgHn-yJc57YpCwwJ81rAJgRONk" + binding_succ_notice: "jjpDrgFErnmkrE9tf2M3o0t31ZrJ7mr0YtuE_wyLaMc" + journal_notice: "uC1zAw4F2q6HTA3Pcj8VUO6wKKKiYFwnPJB4iXxpdoM" + homework_message_notice: "tCf7teCVqc2vl2LZ_hppIdWmpg8yLcrI8XifxYePjps" + class_notice: "MQ_mFupbXP-9jWbeHT3C5xqNBvPo8EIlNv4ULakSpJA" production: <<: *default diff --git a/public/assets/wechat/app.html b/public/assets/wechat/app.html index 63e88490f..b4920838a 100644 --- a/public/assets/wechat/app.html +++ b/public/assets/wechat/app.html @@ -1,7 +1,7 @@ - 最新动态 + 我的动态 From 0bf46f2ecd736d8006a0874a67b07d6fe9145bf5 Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 6 Jun 2016 15:03:21 +0800 Subject: [PATCH 12/47] =?UTF-8?q?=E5=B8=AE=E5=8A=A9=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E7=9A=84=E5=BC=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_base_footer_public.html.erb | 2 +- app/views/layouts/_footer.html.erb | 2 +- app/views/memos/show.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/_base_footer_public.html.erb b/app/views/layouts/_base_footer_public.html.erb index eb2e83ba2..7c5ab571e 100644 --- a/app/views/layouts/_base_footer_public.html.erb +++ b/app/views/layouts/_base_footer_public.html.erb @@ -4,7 +4,7 @@
    • <%= l(:label_about_us)%>|
    • <%= l(:label_contact_us)%>|
    • <%= l(:label_recruitment_information)%>|
    • -
    • <%= link_to l(:label_surpport_group), "https://#{Setting.host_name}/forums/1/memos/1168", :class => "f_grey mw20", :target=>"_blank" %>|
    • +
    • <%= link_to l(:label_surpport_group), "#{Setting.protocol}://#{Setting.host_name}/forums/1/memos/1168", :class => "f_grey mw20", :target=>"_blank" %>|
    • <%= l(:label_forums)%>|
    • <%= l(:label_language)%>