From 560655c28e9b2c4831bf0b62a2edea7643ab556e Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 2 Jun 2017 17:51:13 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E7=AB=8B=E5=8D=B3=E6=BF=80=E6=B4=BB?=
=?UTF-8?q?=E9=82=AE=E7=AE=B1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/account/_change_user_email.html.erb | 15 +---
app/views/account/email_activation.html.erb | 64 +----------------
app/views/account/email_valid.html.erb | 69 ++-----------------
public/javascripts/bigdata.js | 3 +-
public/javascripts/edu/application.js | 52 ++++++++++++++
5 files changed, 65 insertions(+), 138 deletions(-)
diff --git a/app/views/account/_change_user_email.html.erb b/app/views/account/_change_user_email.html.erb
index 337516f61..e50ba6f16 100644
--- a/app/views/account/_change_user_email.html.erb
+++ b/app/views/account/_change_user_email.html.erb
@@ -55,18 +55,5 @@
}
});
- function submit_user_emails(){
- if($mail_correct == false){
- return
- }else{
- $.get('<%= account_change_email_path(:user_id => @user.id) %>',
- { valid: "mail",
- value: document.getElementById("user_mail").value },
- function (data){
- $("#user_email_show").html(data.email);
- hideModal();
- return;
- });
- }
- }
+
\ No newline at end of file
diff --git a/app/views/account/email_activation.html.erb b/app/views/account/email_activation.html.erb
index 7a833e608..bef34c6fd 100644
--- a/app/views/account/email_activation.html.erb
+++ b/app/views/account/email_activation.html.erb
@@ -30,7 +30,7 @@
- 确定
+ 确定
请输入正确的邮箱
@@ -60,68 +60,10 @@
}
}
}
-
//跳转到指定的邮箱登录页面
- $("#user_email_link").click(function () {
- console.log('<%= email %>');
+ $(function(){
var uurl = '<%= email %>';
uurl = gotoEmail(uurl);
- if (uurl != "") {
- $("#user_email_link").attr("href", "http://"+uurl);
- $("#user_email_link").click();
- } else {
- alert("抱歉!未找到对应的邮箱登录地址,请自己登录邮箱查看邮件!");
- }
+ $("#user_email_link").attr("href", "http://"+uurl);
});
-
- //功能:根据用户输入的Email跳转到相应的电子邮箱首页
- function gotoEmail($mail) {
- $t = $mail;
- $t = $t.toLowerCase();
- if ($t == '163.com') {
- return 'mail.163.com';
- } else if ($t == 'vip.163.com') {
- return 'vip.163.com';
- } else if ($t == '126.com') {
- return 'mail.126.com';
- } else if ($t == 'qq.com' || $t == 'vip.qq.com' || $t == 'foxmail.com') {
- return 'mail.qq.com';
- } else if ($t == 'gmail.com') {
- return 'mail.google.com';
- } else if ($t == 'sohu.com') {
- return 'mail.sohu.com';
- } else if ($t == 'tom.com') {
- return 'mail.tom.com';
- } else if ($t == 'vip.sina.com') {
- return 'vip.sina.com';
- } else if ($t == 'sina.com.cn' || $t == 'sina.com') {
- return 'mail.sina.com.cn';
- } else if ($t == 'tom.com') {
- return 'mail.tom.com';
- } else if ($t == 'yahoo.com.cn' || $t == 'yahoo.cn') {
- return 'mail.cn.yahoo.com';
- } else if ($t == 'tom.com') {
- return 'mail.tom.com';
- } else if ($t == 'yeah.net') {
- return 'www.yeah.net';
- } else if ($t == '21cn.com') {
- return 'mail.21cn.com';
- } else if ($t == 'hotmail.com') {
- return 'www.hotmail.com';
- } else if ($t == 'sogou.com') {
- return 'mail.sogou.com';
- } else if ($t == '188.com') {
- return 'www.188.com';
- } else if ($t == '139.com') {
- return 'mail.10086.cn';
- } else if ($t == '189.cn') {
- return 'webmail15.189.cn/webmail';
- } else if ($t == 'wo.com.cn') {
- return 'mail.wo.com.cn/smsmail';
- } else if ($t == '139.com') {
- return 'mail.10086.cn';
- } else {
- return '';
- }
- };
\ No newline at end of file
diff --git a/app/views/account/email_valid.html.erb b/app/views/account/email_valid.html.erb
index 3e30c484b..11fed1fbd 100644
--- a/app/views/account/email_valid.html.erb
+++ b/app/views/account/email_valid.html.erb
@@ -28,7 +28,7 @@
- 确定
+ 确定
请输入正确的邮箱
@@ -58,66 +58,11 @@
}
}
}
- //跳转到指定的邮箱登录页面
- $("#user_email_link").click(function () {
- var uurl = '<%= email %>';
- uurl = gotoEmail(uurl);
- if (uurl != "") {
- $("#user_email_link").attr("href", "http://"+uurl);
- $("#user_email_link").click();
- } else {
- alert("抱歉!未找到对应的邮箱登录地址,请自己登录邮箱查看邮件!");
- }
- });
- //功能:根据用户输入的Email跳转到相应的电子邮箱首页
- function gotoEmail($mail) {
- $t = $mail;
- $t = $t.toLowerCase();
- if ($t == '163.com') {
- return 'mail.163.com';
- } else if ($t == 'vip.163.com') {
- return 'vip.163.com';
- } else if ($t == '126.com') {
- return 'mail.126.com';
- } else if ($t == 'qq.com' || $t == 'vip.qq.com' || $t == 'foxmail.com') {
- return 'mail.qq.com';
- } else if ($t == 'gmail.com') {
- return 'mail.google.com';
- } else if ($t == 'sohu.com') {
- return 'mail.sohu.com';
- } else if ($t == 'tom.com') {
- return 'mail.tom.com';
- } else if ($t == 'vip.sina.com') {
- return 'vip.sina.com';
- } else if ($t == 'sina.com.cn' || $t == 'sina.com') {
- return 'mail.sina.com.cn';
- } else if ($t == 'tom.com') {
- return 'mail.tom.com';
- } else if ($t == 'yahoo.com.cn' || $t == 'yahoo.cn') {
- return 'mail.cn.yahoo.com';
- } else if ($t == 'tom.com') {
- return 'mail.tom.com';
- } else if ($t == 'yeah.net') {
- return 'www.yeah.net';
- } else if ($t == '21cn.com') {
- return 'mail.21cn.com';
- } else if ($t == 'hotmail.com') {
- return 'www.hotmail.com';
- } else if ($t == 'sogou.com') {
- return 'mail.sogou.com';
- } else if ($t == '188.com') {
- return 'www.188.com';
- } else if ($t == '139.com') {
- return 'mail.10086.cn';
- } else if ($t == '189.cn') {
- return 'webmail15.189.cn/webmail';
- } else if ($t == 'wo.com.cn') {
- return 'mail.wo.com.cn/smsmail';
- } else if ($t == '139.com') {
- return 'mail.10086.cn';
- } else {
- return '';
- }
- };
+ $(function(){
+ var uurl = '<%= email %>';
+ console.log(uurl);
+ uurl = gotoEmail(uurl);
+ $("#user_email_link").attr("href", "http://"+uurl);
+ });
diff --git a/public/javascripts/bigdata.js b/public/javascripts/bigdata.js
index 1f76c2c3a..953804f2c 100644
--- a/public/javascripts/bigdata.js
+++ b/public/javascripts/bigdata.js
@@ -193,8 +193,9 @@ function submit_user_emails(id){
user_id: id
},
function (change_data){
+ var uurl = gotoEmail(change_data.email_link);
$("#user_email_show").html(change_data.email);
- $("#user_email_link").attr('href', 'http://mail.' + change_data.email_link);
+ $("#user_email_link").attr('href', 'http://' + uurl);
$("#user_new_email").val("");
$("#change_user_email_block").toggle();
return;
diff --git a/public/javascripts/edu/application.js b/public/javascripts/edu/application.js
index 57929d455..db6ba91e4 100644
--- a/public/javascripts/edu/application.js
+++ b/public/javascripts/edu/application.js
@@ -39,6 +39,58 @@ $(function(){
});
+// 邮箱验证
+//功能:根据用户输入的Email跳转到相应的电子邮箱首页
+function gotoEmail($mail) {
+ $t = $mail;
+ $t = $t.toLowerCase();
+ if ($t == '163.com') {
+ return 'mail.163.com';
+ } else if ($t == 'vip.163.com') {
+ return 'vip.163.com';
+ } else if ($t == '126.com') {
+ return 'mail.126.com';
+ } else if ($t == 'qq.com' || $t == 'vip.qq.com' || $t == 'foxmail.com') {
+ return 'mail.qq.com';
+ } else if ($t == 'gmail.com') {
+ return 'mail.google.com';
+ } else if ($t == 'sohu.com') {
+ return 'mail.sohu.com';
+ } else if ($t == 'tom.com') {
+ return 'mail.tom.com';
+ } else if ($t == 'vip.sina.com') {
+ return 'vip.sina.com';
+ } else if ($t == 'sina.com.cn' || $t == 'sina.com') {
+ return 'mail.sina.com.cn';
+ } else if ($t == 'tom.com') {
+ return 'mail.tom.com';
+ } else if ($t == 'yahoo.com.cn' || $t == 'yahoo.cn') {
+ return 'mail.cn.yahoo.com';
+ } else if ($t == 'tom.com') {
+ return 'mail.tom.com';
+ } else if ($t == 'yeah.net') {
+ return 'www.yeah.net';
+ } else if ($t == '21cn.com') {
+ return 'mail.21cn.com';
+ } else if ($t == 'hotmail.com') {
+ return 'www.hotmail.com';
+ } else if ($t == 'sogou.com') {
+ return 'mail.sogou.com';
+ } else if ($t == '188.com') {
+ return 'www.188.com';
+ } else if ($t == '139.com') {
+ return 'mail.10086.cn';
+ } else if ($t == '189.cn') {
+ return 'webmail15.189.cn/webmail';
+ } else if ($t == 'wo.com.cn') {
+ return 'mail.wo.com.cn/smsmail';
+ } else if ($t == '139.com') {
+ return 'mail.10086.cn';
+ } else {
+ return '';
+ }
+};
+
//------------------弹框相关--------------------//
function hideModal(el) {
if($("#popupWrap").length > 0){
From cfb0903e24bdbdaebcdc8de457171cc0ab90a9cb Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 2 Jun 2017 19:08:41 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E7=A9=BA=E7=99=BD=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E6=97=B6=E8=83=8C=E6=99=AF=E6=B2=A1=E6=9C=89100%?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/shixuns/_shixun_list.html.erb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/views/shixuns/_shixun_list.html.erb b/app/views/shixuns/_shixun_list.html.erb
index 56c4733ba..a4c98daa2 100644
--- a/app/views/shixuns/_shixun_list.html.erb
+++ b/app/views/shixuns/_shixun_list.html.erb
@@ -1,5 +1,7 @@
<% if @shixuns.blank? %>
+
<%= render :partial => "welcome/no_data" %>
+
<% else %>
<% @shixuns.each do |shixun| %>
From f6da468f26e67c953107748981242721b3ba90fa Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 2 Jun 2017 19:22:29 +0800
Subject: [PATCH 3/4] =?UTF-8?q?=E6=99=BA=E8=83=BD=E8=AF=BE=E5=A0=82?=
=?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=9A=84=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/courses_controller.rb | 9 ++++++++-
app/views/courses/_courseList.html.erb | 11 ++++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb
index 13a112ced..389efc638 100644
--- a/app/controllers/courses_controller.rb
+++ b/app/controllers/courses_controller.rb
@@ -52,7 +52,7 @@ class CoursesController < ApplicationController
# 我参与的课程
join_syllabuses = Syllabus.where("(id in #{syllabus_ids} or id in #{syllabus_member_ids}) and user_id != #{@user.id} and title like '%#{search}%'").order("created_at desc")
# 我的所有课程
- all_syllabuses = Syllabus.where("(id in #{syllabus_ids} or id in #{syllabus_member_ids}) and title like '%#{search}%'").order("created_at desc")
+ all_syllabuses = Syllabus.where("title like '%#{search}%'").order("created_at desc")
@syllabus_count = Syllabus.all.count
@join_syllabuses_count = join_syllabuses.count
@@ -65,6 +65,13 @@ class CoursesController < ApplicationController
else
@syllabuses = all_syllabuses
end
+
+ @syllabuses_count = @syllabuses.count
+ @limit = 16
+ @is_remote = true
+ @syllabuses_pages = Paginator.new @syllabuses_count, @limit, params['page'] || 1
+ @offset ||= @syllabuses_pages.offset
+ @syllabuses = paginateHelper @syllabuses, @limit
respond_to do |format|
format.js
format.html { render :layout => "base_edu" }
diff --git a/app/views/courses/_courseList.html.erb b/app/views/courses/_courseList.html.erb
index 48e75cb4a..f3a2a4e07 100644
--- a/app/views/courses/_courseList.html.erb
+++ b/app/views/courses/_courseList.html.erb
@@ -34,4 +34,13 @@
-<% end %>
\ No newline at end of file
+<% end %>
+
+
+
+
+ <%= pagination_links_full @syllabuses_pages, @syllabus_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
+
+
+
+
\ No newline at end of file
From c597fc3f396dc22a837842853146625708d5428d Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 2 Jun 2017 19:39:50 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E7=8F=AD=E7=BA=A7?=
=?UTF-8?q?=E5=BC=B9=E6=A1=86=E7=9A=84checkbox=E8=AF=B7=E6=9B=BF=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/courses/_join_private_course.html.erb | 6 +++---
app/views/layouts/base_edu_user.html.erb | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/views/courses/_join_private_course.html.erb b/app/views/courses/_join_private_course.html.erb
index 9dfc618aa..aa6e22178 100644
--- a/app/views/courses/_join_private_course.html.erb
+++ b/app/views/courses/_join_private_course.html.erb
@@ -15,15 +15,15 @@
-
+
-
+
-
+
请至少选择一个身份
diff --git a/app/views/layouts/base_edu_user.html.erb b/app/views/layouts/base_edu_user.html.erb
index e80df0ba2..48d23a4e9 100644
--- a/app/views/layouts/base_edu_user.html.erb
+++ b/app/views/layouts/base_edu_user.html.erb
@@ -6,7 +6,7 @@
<%= csrf_meta_tag %>
- <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/font-awesome', 'css/edu-common', "css/edu-public", "css/edu-user", 'css/edu-popup', 'css/ketang',:media => 'all' %>
+ <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/font-awesome', 'css/edu-common', "css/edu-public", "css/edu-user", 'css/edu-popup', 'css/ketang', 'css/magic-check', :media => 'all' %>
<%= javascript_heads %>
<%= javascript_include_tag "edu/application","edu/user"%>
<%= yield :header_tags -%>