Skip to content
Snippets Groups Projects
Commit de03932a authored by Andrew Rudenets's avatar Andrew Rudenets
Browse files

Merge branch 'master' of http://itlab.mmcs.sfedu.ru/git/grade-rating

Conflicts:
	application/classes/Controller/Admin/Departaments.php
	application/classes/Controller/Teacher/Admin/Index.php
	web/application/classes/Controller/Teacher/Admin/Index.php
	web/application/classes/Model/Account.php
parents ad959dc3 88ceb036
No related merge requests found
Showing
with 244 additions and 75 deletions
var $ = jQuery;
$(function() {
var URL = (window.location.href).split('/');
var DisciplineID = URL[URL.length - 1]
// Открыть окно 'Прикрепить группы'
$('.AttachGroups').click(function(){
wnd.open({title: 'Тестовое eeeeeокно', content: '<p>Theew text</p>', width: 700});
});
// Открыть окно 'Прикрепить студентов'
$('.AttachStudents').click(function(){
wnd.open({title: 'Тестовое eeeeeокно', content: '<p>Theew text</p>', width: 700});
});
})
\ No newline at end of file
var $ = jQuery;
$(function() {
// Изменения базовых параметров дисциплины
$(".AddDiscipline").click(function(){
$.post(
'/~dev_rating/handler/map/AddDiscipline',
{
'Grade': $('.SelectGrade').val(),
'SubjectID': $('.SelectSubject').val(),
'ExamType': $('input:radio[name=ExamType]:checked').val(),
'LectionCount': $('.InputLectionCount').val(),
'PracticeCount': $('.InputPracticeCount').val(),
'DepartmentID': $('.SelectDepartment').val()
},
function(data){
data = $.parseJSON(data);
if(data.success === true) {
alert('Ок, AddDiscipline');
setTimeout('location.replace("/~dev_rating/map/'+data.DisciplineID+'")',5000);
} else alert('Error, AddDiscipline');
}
);
});
});
\ No newline at end of file
.EventInspectorList {
position: fixed;
height: auto;
width: 200px;
top: 50px;
right: 20px
}
.EventInspectorList .EventItem {
width: auto;
padding: 10px 15px;
margin-bottom: 10px;
border-radius: 4px;
font-size: 14px;
}
.EventInspectorList .success {
color: #3c763d;
background-color: #dff0d8;
border: 1px solid #d6e9c6;
}
.EventInspectorList .error {
color: #a94442;
background-color: #f2dede;
border: 1px solid #ebccd1;
}
\ No newline at end of file
var $ = jQuery;
$(function() {
$('body').append('<div class="EventInspectorList"></div>');
});
function EventInspector_ShowMsg(text, type){
var MsgDiv = $('.EventInspectorList').append('<div class="EventItem '+ type +'">' + text + '</div>').children().last();
setTimeout(
function(){
MsgDiv.animate({opacity: 0}, 1000, function() {$(this).remove()});
},
5000
);
}
// Проверка на число, причем NaN не помеха
function isNum(v) {
return typeof v === 'number' && isFinite(v);
}
// Разрешаем вводить только цифры
function KeyDownOnlyNumber(event) {
// Разрешаем: backspace, delete, tab и escape
if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 ||
// Разрешаем: Ctrl+A
(event.keyCode == 65 && event.ctrlKey === true) ||
// Разрешаем: home, end, влево, вправо
(event.keyCode >= 35 && event.keyCode <= 39)) {
// Ничего не делаем
return;
}
else {
// Убеждаемся, что это цифра, и останавливаем событие keypress
if ((event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105 )) {
event.preventDefault();
}
}
}
\ No newline at end of file
File moved
File moved
File moved
......@@ -97,25 +97,6 @@ $(function() {
tdUnFocus($(this));
});
// Разрешаем вводить только цифры
function KeyDownOnlyNumber(event) {
// Разрешаем: backspace, delete, tab и escape
if ( event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 ||
// Разрешаем: Ctrl+A
(event.keyCode == 65 && event.ctrlKey === true) ||
// Разрешаем: home, end, влево, вправо
(event.keyCode >= 35 && event.keyCode <= 39)) {
// Ничего не делаем
return;
}
else {
// Убеждаемся, что это цифра, и останавливаем событие keypress
if ((event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105 )) {
event.preventDefault();
}
}
}
// В inputCredit (где баллы вводить) разрешаем вводить только цифры
$('.rateCell').children('input').keydown(function(event) {
KeyDownOnlyNumber(event);
......
File moved
File moved
web/media/js/wnd/close.png

309 B

.window {
display: none;
position: absolute;
top: 0;
left: 0;
z-index: 1000;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,.5);
font-family: sans-serif;
}
.window-shadow {
position: absolute;
width: 100%;
height: 100%;
}
.window-block {
position: relative;
z-index: 1;
margin: 20px auto;
background-color: #fff;
}
.window-title {
line-height: 20px;
font-size: 13px;
text-align: center;
}
.window-close {
position: absolute;
top: 0;
right: 0;
display: block;
width: 20px;
height: 20px;
background: url("close.png") center;
}
.window-content {
padding: 5px 10px;
}
.window-content p {
line-height: 16px;
font-size: 14px;
}
\ No newline at end of file
This diff is collapsed.
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment