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); - } + }