From b5d007ccf7d1b29f4e479f1da432174938bd75ad Mon Sep 17 00:00:00 2001
From: alan <547533434@qq.com>
Date: Sat, 6 Dec 2014 00:52:06 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E3=80=8A=E7=82=B9=E5=87=BB?=
=?UTF-8?q?=E5=88=86=E7=BB=84=E5=90=8D=EF=BC=8C=E8=AF=A5=E5=88=86=E7=BB=84?=
=?UTF-8?q?=E5=90=8D=E5=BA=95=E8=89=B2=E5=8F=91=E7=94=9F=E6=94=B9=E5=8F=98?=
=?UTF-8?q?=E3=80=8B=20Signed-off-by:=20alan=20<547533434@qq.com>?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/courses/_groups_name.html.erb | 33 +++++++++++++++++--------
public/stylesheets/course_group.css | 1 +
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/app/views/courses/_groups_name.html.erb b/app/views/courses/_groups_name.html.erb
index 7bff77a79..096e84372 100644
--- a/app/views/courses/_groups_name.html.erb
+++ b/app/views/courses/_groups_name.html.erb
@@ -5,6 +5,18 @@
alert('<%= l(:label_limit_groupname) %>');
}
}
+ function checkclass(value) {
+
+ for(var i = 0; i < document.getElementsByName("check_group_name").length; i++) {
+ if(document.getElementsByName("check_group_name")[i].id == value) {
+ document.getElementById(value).className = "selected";
+ }
+ else {
+ document.getElementsByName("check_group_name")[i].className = "classbox";
+ }
+
+ }
+ }
function validate_groupname_null(value1) {
value1 = value1.trim();
if(value1.length == 0 ) {
@@ -16,25 +28,26 @@
validate_groupname(value1);
}
- function validate_add_group() {
- value1 = document.getElementById('group_name').value;
- validate_groupname(value1);
- validate_groupname_null(value1);
+ function validate_add_group() {
+ value1 = document.getElementById('group_name').value;
+ validate_groupname(value1);
+ validate_groupname_null(value1);
- }
+ }
- -
+
-
<% course_member_count = l(:label_all) + " ( " + @membercount.to_s + "人)" %>
- <%= link_to course_member_count, searchgroupmembers_course_path(@course,:group_id => 0), method: 'get', remote: true,:style => " border:0px; color: #0d90c3; float:left;"%>
+ <%= link_to course_member_count, searchgroupmembers_course_path(@course,:group_id => 0), :onclick => "checkclass('group_name_0')", method: 'get', remote: true,:style => " border:0px; color: #0d90c3; float:left;"%>
<% if course_groups.any? %>
<% course_groups.each do |group| %>
- <% group_display = group.name + " (" + group.members.count.to_s + "人)" %>
- -
- <%= link_to group_display, searchgroupmembers_course_path(@course,:group_id => group.id), method: 'get', remote: true, :onclick => "$asign_id(#{group.id})",:style => " border:0px; color: #0d90c3; float:left;"%>
+ <% group_display = group.name + " ( " + group.members.count.to_s + "人)" %>
+
-
+ <%= link_to group_display, searchgroupmembers_course_path(@course,:group_id => group.id), method: 'get', remote: true,
+ :onclick => "checkclass('group_name_#{group.id}')",:style => " border:0px; color: #0d90c3; float:left;"%>
<% if @canShowCode %>
<% end %>
diff --git a/public/stylesheets/course_group.css b/public/stylesheets/course_group.css
index ebc861b0f..edfcb9091 100644
--- a/public/stylesheets/course_group.css
+++ b/public/stylesheets/course_group.css
@@ -45,6 +45,7 @@ input.f_2 {
/*.st_search input.f_2{ background:#1c9ec7; padding: 3px; margin-left: 3px; color:#fff;border:1px solid #1c9ec7; text-align:center; display:block; width:45px; height:28px; font-size:12px; }*/
.classbox{ border:1px solid #f8df8c; background:#fffce6; color:#0d90c3; padding:0 3px; float:left; margin-left:15px;}
+.st_addclass ul li.selected { border:1px solid #f8df8c; background:#f8df8c; color:#0d90c3; padding:0 3px; float:left; margin-left:15px;}
.st_addclass{ margin-top:5px;}
.st_addclass ul li{ margin-bottom:10px;}
.st_addclass ul li,.st_addclass a,.st_addclass img{ float:left;}