Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
yotta
/
pictogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
60
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e3e03f60
authored
Jul 26, 2017
by
Arturo Montejo Ráez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
error with tries lists solved
parent
d01deb37
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
sails/src/assets/scripts/modules/student/controllers/session.js
sails/src/assets/scripts/modules/student/views/session.html
sails/src/assets/scripts/modules/student/controllers/session.js
View file @
e3e03f60
...
...
@@ -29,6 +29,8 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
paused
:
false
,
showSessions
:
false
,
showLastTry
:
true
,
showTries
:
false
,
tryRunning
:
false
,
section
:
'new'
};
...
...
@@ -77,7 +79,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
if
(
$scope
.
selected
.
item
==
-
1
)
return
;
$scope
.
showLastTry
=
false
;
$scope
.
flags
.
showLastTry
=
false
;
var
ids
=
$scope
.
selected
.
item
.
split
(
"-"
);
// this is because Angular 1.2 doesn't assign objects in ng-value
$scope
.
selected
.
method
=
$scope
.
methods
[
parseInt
(
ids
[
0
])];
...
...
@@ -328,7 +330,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
$scope
.
startTimer
=
function
(){
$scope
.
$broadcast
(
'timer-start'
);
$scope
.
flags
.
paused
=
false
;
$scope
.
tryRunning
=
true
;
$scope
.
flags
.
tryRunning
=
true
;
};
$scope
.
pauseTimer
=
function
(){
...
...
@@ -344,7 +346,7 @@ dashboardControllers.controller('StudentSessionCtrl', function StudentSessionCtr
$scope
.
stopTimer
=
function
(){
$scope
.
$broadcast
(
'timer-stop'
);
$scope
.
flags
.
paused
=
false
;
$scope
.
tryRunning
=
false
;
$scope
.
flags
.
tryRunning
=
false
;
};
$scope
.
$on
(
'timer-stopped'
,
function
(
event
,
data
){
...
...
sails/src/assets/scripts/modules/student/views/session.html
View file @
e3e03f60
...
...
@@ -113,7 +113,7 @@
</div>
<!-- running try -->
<div
id=
"actual_try"
ng-model=
"actual_try"
ng-show=
"tryRunning && flags.section == 'new'"
>
<div
id=
"actual_try"
ng-model=
"actual_try"
ng-show=
"
flags.
tryRunning && flags.section == 'new'"
>
<div
class=
"try_time"
>
<timer
id=
"time_try"
class=
"color_blue"
interval=
"1000"
auto-start=
"false"
>
{{mminutes}}:{{sseconds}}
...
...
@@ -193,7 +193,7 @@
<!-- / running try -->
<!-- sessions list -->
<div
class=
"list-group pre-scrollable"
ng-show=
"flags.showSessions && flags.section == 'previous' || flags.showLastTry && wsessions.length > 0 || ws_recover || tryRunning"
>
<div
class=
"list-group pre-scrollable"
ng-show=
"flags.showSessions && flags.section == 'previous' || flags.showLastTry && wsessions.length > 0 || ws_recover ||
flags.
tryRunning"
>
<div
ng-repeat=
"s in wsessions | orderBy: '-begin'"
>
<!-- div class="list-group-item" ng-repeat="s in wsessions | orderBy: '-begin' | limitTo: numPerPage:(currentPage-1)*numPerPage" -->
...
...
@@ -212,11 +212,11 @@
<!-- show/hide tries button -->
<div
class=
"form-group pull-right"
ng-show=
"ws.id != s.id && !ws_recover"
>
<span
class=
"control-label"
>
{{ s.tries.length }} {{ 'tries' | translate }}
</span>
<button
ng-click=
"
showTries = !
showTries"
class=
"btn btn-default btn-sm"
>
<div
ng-show=
"!showTries"
>
<button
ng-click=
"
flags.showTries = !flags.
showTries"
class=
"btn btn-default btn-sm"
>
<div
ng-show=
"!
flags.
showTries"
>
{{ 'show' | translate }}
<span
class=
"glyphicon glyphicon-collapse-down"
aria-hidden=
"true"
></span>
</div>
<div
ng-show=
"showTries"
>
<div
ng-show=
"
flags.
showTries"
>
{{ 'hide' | translate }}
<span
class=
"glyphicon glyphicon-collapse-up"
aria-hidden=
"true"
></span>
</div>
</button>
...
...
@@ -229,7 +229,7 @@
<button
ng-show=
"ws_recover"
class=
"btn btn-warning btn-sm pull-right"
type=
"button"
ng-click=
"close_ws()"
translate
>
close_session
</button>
<!-- tries list -->
<div
class=
"sessionTries"
ng-show=
"showTries || ws.id == s.id || ws_recover"
>
<div
class=
"sessionTries"
ng-show=
"
flags.
showTries || ws.id == s.id || ws_recover"
>
<div
class=
"try"
ng-repeat=
"t in s.tries"
>
<div
ng-show=
"!is_currentOpenTry(t)"
>
<table
width=
"100%"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment