From bb2294be2837d3fe29525fec3a507979b8ed60d6 Mon Sep 17 00:00:00 2001
From: PavelBegunkov <asml.Silence@gmail.com>
Date: Fri, 24 Oct 2014 23:02:48 +0400
Subject: [PATCH] ..

---
 ~dev_rating/media/css/discipline.css          |  2 +-
 .../media/js/discipline/EditStudents.js       | 37 +++++++++++++------
 2 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/~dev_rating/media/css/discipline.css b/~dev_rating/media/css/discipline.css
index 3754cfd80..c3f3b8c91 100644
--- a/~dev_rating/media/css/discipline.css
+++ b/~dev_rating/media/css/discipline.css
@@ -479,7 +479,7 @@
 			background: #EDF1F5;
 		}
 		.StudentsList .StatusUnbind {
-			background: #dffcf5;
+			background: #F7F0D0;
 		}
 		.StudentsList .Student .action{
 			font-weight: bold;
diff --git a/~dev_rating/media/js/discipline/EditStudents.js b/~dev_rating/media/js/discipline/EditStudents.js
index 74fdf59f8..d208a047c 100644
--- a/~dev_rating/media/js/discipline/EditStudents.js
+++ b/~dev_rating/media/js/discipline/EditStudents.js
@@ -29,7 +29,9 @@ $(function() {
     var jGroupPrototype = $($.parseHTML("<option value='0'></option>"));
 
     var jGroupContainerPrototype = $($.parseHTML(	"<div class='GroupContainerAttached' id='0'>\
-    													<div class='groupInfo'></div>\
+    													<div class='groupInfo'>\
+                                                            <div class = 'groupInfoAlone'></div>\
+                                                        </div>\
 													</div>"));
 
 
@@ -69,9 +71,9 @@ $(function() {
 
     function ConstructGroupContainer(GroupID, Group, Grade) {
     	var jClone = jGroupContainerPrototype.clone();
-    	var text = "<div class = 'groupInfoAlone'>"+Grade+"."+Group+"</div>"; 
+    	var text = Grade+"."+Group; 
     	jClone.attr("id", GroupID);
-    	jClone.children().html(text);
+    	jClone.children().first().children().html(text);
     	return jClone;
     }
 
@@ -124,22 +126,33 @@ $(function() {
         ); //!post 
     }
 
-    $(".SelectStudyGroup").change(function(){
-        SearchStudents();
-    });
-    $(".InputStudentName").focusout(function(){
+
+    $(".searchBtn").click(function(){
         SearchStudents();
+        $(this).blur();
     });
-    $(".InputStudentName").keydown(function(e){
-        if(e.keyCode==13){
+
+    // $(".SelectStudyGroup").change(function(){
+    //     SearchStudents();
+    // });
+    // $(".InputStudentName").focusout(function(){
+    //     SearchStudents();
+    // });
+    // $(".InputStudentName").keydown(function(e){
+    //     if(e.keyCode==13){
+    //         SearchStudents();
+    //         $(this).blur();
+    //     }
+    // });
+
+    $(".InputStudentName").keydown(function(e) {
+        if(e.which == 13) {
             SearchStudents();
             $(this).blur();
         }
     });
 
 
-
-
     function GetStudyGroups() {
         $.post(
             g_URLdir + "handler/map/GetStudyGroups",
@@ -166,7 +179,7 @@ $(function() {
                         SearchStudents();
                     });
                 }
-                SearchStudents();
+                //SearchStudents();
             } //!callback
         ); //!post      
     }
-- 
GitLab