Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
grade
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anton Yushko
grade
Commits
ca2b1568
Commit
ca2b1568
authored
10 years ago
by
Andrew Rudenets
Browse files
Options
Downloads
Patches
Plain Diff
Such a perfect bike...
parent
7c717a85
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
media/js/transfer/controller.js
+18
-13
18 additions, 13 deletions
media/js/transfer/controller.js
media/js/transfer/view.js
+15
-10
15 additions, 10 deletions
media/js/transfer/view.js
~dev_rating/application/views/controls/transfer.twig
+0
-1
0 additions, 1 deletion
~dev_rating/application/views/controls/transfer.twig
with
33 additions
and
24 deletions
media/js/transfer/controller.js
+
18
−
13
View file @
ca2b1568
...
...
@@ -25,6 +25,7 @@ function Controller() {
};
var
onTransfer
=
function
(
groupID
,
semesterID
)
{
if
(
groupID
!=
-
1
)
{
$
.
post
(
URLdir
+
'
handler/Students/transfer/
'
,
{
studyGroupID
:
groupID
,
...
...
@@ -32,12 +33,16 @@ function Controller() {
transferList
:
JSON
.
stringify
(
groups
.
Transfer
.
getIDs
())
},
function
(
data
)
{
console
.
log
(
data
);
EventInspector
.
success
(
'
Студенты успешно переведены
'
);
groups
[
'
Transfer
'
].
clear
();
groups
[
'
Right
'
].
setList
(
data
);
view
.
fillList
(
'
Right
'
,
data
);
view
.
clearList
(
'
Transfer
'
);
},
'
json
'
);
}
else
{
EventInspector
.
error
(
'
Не выбрана группа для перевода
'
);
}
};
var
onAddition
=
function
(
from
,
to
,
listStudentsID
)
{
...
...
This diff is collapsed.
Click to expand it.
media/js/transfer/view.js
+
15
−
10
View file @
ca2b1568
...
...
@@ -5,16 +5,22 @@ function View(_$root) {
this
.
template
=
'
<li id="%type%-%studentID%" class="TransferListItem">%studentName%</li>
'
;
this
.
adjustHeight
=
function
()
{
// Эталонный костыль.
this
.
adjustHeight
=
function
(
reset
)
{
reset
=
typeof
reset
!==
'
undefined
'
?
reset
:
false
;
var
jTransferList
=
$
(
"
#TransferItemsList
"
);
var
jRightList
=
$
(
"
#RightItemsList
"
);
var
jLeftList
=
$
(
"
#LeftItemsList
"
);
// FIXME: No hardcode
var
HEIGHT
=
661
;
console
.
log
(
jTransferList
.
height
());
console
.
log
(
jRightList
.
height
());
if
(
!
reset
)
jRightList
.
height
(
HEIGHT
-
jTransferList
.
height
());
else
{
jRightList
.
height
(
HEIGHT
);
jTransferList
.
height
(
0
);
}
};
this
.
addToCounter
=
function
(
n
)
{
...
...
@@ -132,16 +138,15 @@ function View(_$root) {
}).
get
();
self
.
emit
(
'
deletion
'
,
from
,
listStudentsID
);
self
.
adjustHeight
();
self
.
adjustHeight
(
true
);
};
var
onTransfer
=
function
()
{
var
groupID
=
$
(
'
#groupRight
'
).
val
();
var
semesterID
=
+
semester
[
'
Right
'
].
val
();
if
(
groupID
!=
-
1
)
{
self
.
emit
(
'
transfer
'
,
groupID
,
semesterID
);
self
.
adjustHeight
();
}
self
.
adjustHeight
(
true
);
};
var
onGroupSelect
=
function
()
{
...
...
This diff is collapsed.
Click to expand it.
~dev_rating/application/views/controls/transfer.twig
+
0
−
1
View file @
ca2b1568
{%
macro
head
(
HandlerURL
)
%}
{{
HTML.script
(
'static/js/libs/mustache.min.js'
)
|
raw
}}
{{
HTML.script
(
'static/js/eventEmitter.js'
)
|
raw
}}
{{
HTML.script
(
'static/js/transfer/model.js'
)
|
raw
}}
{{
HTML.script
(
'static/js/transfer/view.js'
)
|
raw
}}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment