From b1fa344680921cfdd43aa985eae95e466015ccd7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A8=D0=B0=D0=BB=D0=B8?=
 =?UTF-8?q?=D0=BC=D0=BE=D0=B2?= <solidovic@gmail.com>
Date: Sat, 30 Aug 2014 18:14:02 +0400
Subject: [PATCH] css

---
 .../classes/Controller/Handler/Map.php          |  2 ++
 .../classes/Controller/Teacher/Map.php          |  3 ++-
 .../views/teacher/map/EditStructure.twig        |  4 ++--
 .../views/teacher/map/EditStudents.twig         |  4 ++--
 ~dev_rating/media/css/construct.css             | 17 ++++++++++-------
 ~dev_rating/media/js/construct/edit.js          | 10 +++++-----
 6 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/~dev_rating/application/classes/Controller/Handler/Map.php b/~dev_rating/application/classes/Controller/Handler/Map.php
index c661b8b75..91b7b8a03 100644
--- a/~dev_rating/application/classes/Controller/Handler/Map.php
+++ b/~dev_rating/application/classes/Controller/Handler/Map.php
@@ -415,6 +415,7 @@ class Controller_Handler_Map extends Controller_Handler {
 					$this->post->offsetGet('DisciplineID')
 				); 
 				$SearchResult = array();
+
 				$i = 0;
 				foreach($SeResult as $row){
 					$i++;
@@ -424,6 +425,7 @@ class Controller_Handler_Map extends Controller_Handler {
 					$SearchResult[$i]['StudentSecond'] = $row['StudentSecond'];
 					$SearchResult[$i]['GroupGrade'] = $row['GroupGrade'];
 					$SearchResult[$i]['GroupNum'] = $row['GroupNum'];
+					$SearchResult[$i]['GroupID'] = $row['GroupID'];
 				}
 				$SearchResult['Count'] = $i;
 			}
diff --git a/~dev_rating/application/classes/Controller/Teacher/Map.php b/~dev_rating/application/classes/Controller/Teacher/Map.php
index 6738f2cc3..3274dbb2e 100644
--- a/~dev_rating/application/classes/Controller/Teacher/Map.php
+++ b/~dev_rating/application/classes/Controller/Teacher/Map.php
@@ -250,7 +250,7 @@ class Controller_Teacher_Map extends Controller_UserEnvi {
         $students = $db->GetStudentsForDiscipline($this->UserInfo['TeacherID'], $DisciplineID);
         $studentsHandled = array();
         $i = 0;
-
+		
         foreach($students as $row) {
 			$i++;
 			$studentsHandled[$i]['StudentID'] = $row['StudentID'];
@@ -260,6 +260,7 @@ class Controller_Teacher_Map extends Controller_UserEnvi {
 			$studentsHandled[$i]['Grade'] = $row['Grade'];
 			$studentsHandled[$i]['GroupNum'] = $row['GroupNum'];
 			$studentsHandled[$i]['Type'] = $row['Type'];
+			$studentsHandled[$i]['GroupID'] = $row['GroupID'];
         }
         return $studentsHandled;
 	}
diff --git a/~dev_rating/application/views/teacher/map/EditStructure.twig b/~dev_rating/application/views/teacher/map/EditStructure.twig
index 8c6b9e274..cae846acf 100644
--- a/~dev_rating/application/views/teacher/map/EditStructure.twig
+++ b/~dev_rating/application/views/teacher/map/EditStructure.twig
@@ -6,13 +6,13 @@
 
 {% block map_content %}
 	<p class="top_center_info" style="display: none">Учебная карта дисциплины на 1 семестр 2014 года</p>
-	<div class="studyMap">
+	<div class="studyMap StructureTable">
 		<div class="name">Виды контрольных мероприятий</div>
 		<div class="currentControl">Текущий контроль</div>
 		<div class="landmarkControl">Рубежный контроль</div>
 		<div class="actions" style="text-align: right; padding-right: 30px;">Действия</div>
 	</div>
-	<div class="moduleList">
+	<div class="moduleList StructureTable">
 	{% for i in range(1, Map.ModulesCount) if Map.ModulesCount > 0 %}
 		<div class="moduleGroup" id="{{ Map[i].ModuleID }}">
 			<div class="moduleHead">
diff --git a/~dev_rating/application/views/teacher/map/EditStudents.twig b/~dev_rating/application/views/teacher/map/EditStudents.twig
index 15c5cd7b6..b54734b75 100644
--- a/~dev_rating/application/views/teacher/map/EditStudents.twig
+++ b/~dev_rating/application/views/teacher/map/EditStudents.twig
@@ -15,9 +15,9 @@
 				{% if not loop.first %}
 					</div>
 				{% endif %}
-				<div class="GradeAndGroupTitle" id="{{ Student.Grade }}_{{ Student.GroupNum }}">
+				<div class="GradeAndGroupTitle ActionShowHideGroupContainer" id="{{ Student.GroupID }}">
 					<span class="info">Курс {{ Student.Grade }}, Группа {{ Student.GroupNum }}</span>
-					<span class="ActionShowHideGroupContainer">Открыть список ▼</span>
+					<span class="Action">Открыть список ▼</span>
 				</div>
 				<div class="GroupContainer">
 					{% set NowGroupNum = Student.GroupNum %}
diff --git a/~dev_rating/media/css/construct.css b/~dev_rating/media/css/construct.css
index 1fdf146c5..05fa6cf09 100644
--- a/~dev_rating/media/css/construct.css
+++ b/~dev_rating/media/css/construct.css
@@ -109,23 +109,23 @@
 		Общие стили для шапки учебной карты (НЕ шапки страницы),
 		модуля и мероприятия (подмодуля)
 	*/
-	.name { /* Название */
+	.StructureTable .name { /* Название */
 		width: 250px;
 		float: left;
 		display: inline;
 		margin-right: 60px;
 	}
-	.currentControl{ /* Текущий контроль */
+	.StructureTable .currentControl{ /* Текущий контроль */
 		width: 150px;
 		float: left;
 		display: inline;
 	}
-	.landmarkControl{ /* Рубежный контроль */
+	.StructureTable .landmarkControl{ /* Рубежный контроль */
 		width: 150px;
 		float: left;
 		display: inline;
 	}
-	.actions{ /* Действия */
+	.StructureTable .actions{ /* Действия */
 		width: 160px;
 		float: right;
 		display: inline;
@@ -243,8 +243,11 @@
 		font-size: 14px;
 		color: #333;
 	}
-		.GradeAndGroupTitle .ActionShowHideGroupContainer{
-			margin-left: 40px;
+		.GradeAndGroupTitle .info {
+			float: left;
+		}
+		.GradeAndGroupTitle .Action{
+			float: right;
 			font-size: 13px;
 			cursor: pointer
 		}
@@ -253,7 +256,7 @@
 	}
 	.StudentsList .Student {
 		margin: 10px 0;
-		padding: 10px;
+		padding: 7px 10px;
 	}
 		.StudentsList .Student .Name {
 			float: left;
diff --git a/~dev_rating/media/js/construct/edit.js b/~dev_rating/media/js/construct/edit.js
index 8b1f549dd..97e6546aa 100644
--- a/~dev_rating/media/js/construct/edit.js
+++ b/~dev_rating/media/js/construct/edit.js
@@ -663,13 +663,13 @@ $('.StudentsList').on('click', '.Action_UnbindStudent', function(){
 });
 
 $('.StudentsList').on('click', '.ActionShowHideGroupContainer', function(){
-	if ($(this).parent().next('.GroupContainer').css('display') == 'none') {
-		$(this).text('Скрыть список ▲');
-		$(this).parent().next('.GroupContainer').show();
+	if ($(this).next('.GroupContainer').css('display') == 'none') {
+		$(this).children('.Action').text('Скрыть список ▲');
+		$(this).next('.GroupContainer').show();
 	}
 	else {
-		$(this).text('Открыть список ▼');
-		$(this).parent().next('.GroupContainer').hide();
+		$(this).children('.Action').text('Открыть список ▼');
+		$(this).next('.GroupContainer').hide();
 	}
 });
 
-- 
GitLab