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/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/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
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 -%>
diff --git a/app/views/shixuns/_shixun_list.html.erb b/app/views/shixuns/_shixun_list.html.erb
index a0d902855..a98252822 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| %>
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){