diff --git a/public/javascripts/document/run/mapSelector.js b/public/javascripts/document/run/mapSelector.js deleted file mode 100644 index 037cf5ef..00000000 --- a/public/javascripts/document/run/mapSelector.js +++ /dev/null @@ -1,86 +0,0 @@ -var app = angular.module("MapSelector", ['ngTouch','pascalprecht.translate', 'ngCookies','ngSanitize']); -app.controller("MapSelectorController", ['$scope', '$http', function ($scope, $http) { - - $scope.go = function (path) { - window.location = path - } - - $scope.selectedMap = null; - $scope.movie = movie; - $scope.rounds = round.split(','); - $scope.createB = true; - - $http.get("/api/competitions/leagues/"+leagueId).then(function (response) { - $scope.league = response.data - $http.get("/api/competitions/" + competitionId + "/" + $scope.league.type + "/maps").then(function (response) { - $scope.maps = response.data.filter(m=>maps.includes(m._id)); - console.log($scope.maps) - }) - }); - - $http.get("/api/competitions/" + competitionId + - "/fields").then(function (response) { - $scope.fields = response.data - console.log($scope.fields) - }) - - $scope.select = function(num){ - $scope.selectedMap = num; - } - - $http.get("/api/document/files/" + teamId + '/' + token).then(function (response) { - $scope.uploaded = response.data; - }) - - $scope.checkUploaded = function(name){ - return($scope.uploaded.some((n) => new RegExp('^' + name + '\\.*').test(n))); - } - - $scope.getVideoLink = function(path){ - return("/api/document/files/" + teamId + "/" + token + "/" + path); - } - - $scope.getVideoList = function(name){ - let res = $scope.uploaded.filter(function(value) { - return new RegExp('^' + name + '\\.*').test(value); - }); - res.sort(function(first, second){ - if ( first.match(/.mp4/)) { - return -1; - } - if ( second.match(/.mp4/)) { - return -1; - } - }); - return res; - } - - $scope.createRun = function(){ - $(window).scrollTop(0); - $scope.createB = false; - let runs = []; - for(let r of $scope.rounds){ - var run = { - round: r, - field: $scope.fields[0]._id, - map: $scope.maps[$scope.selectedMap]._id, - startTime: new Date().getTime() - } - runs.push(run); - } - let data = { - "team": teamId, - "questionId": questionId, - "runs": runs - }; - - $http.post(`/api/runs/${$scope.league.type}/pre_recorded`, data).then(function (response) { - location.reload(); - }, function (error) { - console.log(error) - swal("Oops!", error.data.err, "error"); - }) - } - - -}]); diff --git a/public/javascripts/documentReview.js b/public/javascripts/documentReview.js index d2518578..3459e992 100644 --- a/public/javascripts/documentReview.js +++ b/public/javascripts/documentReview.js @@ -148,8 +148,6 @@ app.controller('DocumentReviewController', ['$scope', '$uibModal', '$log', '$htt $scope.updateUploaded(); $scope.updateReviewUploaded(); - - $scope.runScore = []; $http.get("/api/competitions/" + competitionId + "/documents/" + $scope.team.league + "/review").then(function (response) { $scope.blocks = response.data.blocks; @@ -157,15 +155,6 @@ app.controller('DocumentReviewController', ['$scope', '$uibModal', '$log', '$htt $scope.languages = response.data.languages; $scope.review = response.data.review; - for(let r of $scope.review){ - for(let q of r.questions){ - if(q.type != "run") continue; - $http.get(`/api/document/run/${teamId}/${q._id}`).then(function (response) { - $scope.runScore[q._id] = response.data; - }); - } - } - $http.get("/api/document/answer/"+ $scope.team._id + "/" + token).then(function (response) { $scope.answers = response.data; for(let b of $scope.blocks){ diff --git a/public/javascripts/documentReviewed.js b/public/javascripts/documentReviewed.js index c6b9f10e..b701a0b3 100644 --- a/public/javascripts/documentReviewed.js +++ b/public/javascripts/documentReviewed.js @@ -119,7 +119,6 @@ app.controller('DocumentReviewController', ['$scope', '$uibModal', '$log', '$htt $scope.updateUploaded(); $scope.updateReviewUploaded(); - $scope.runScore = []; $http.get("/api/competitions/" + competitionId + "/documents/" + $scope.team.league + "/review").then(function (response) { $scope.blocks = response.data.blocks; @@ -128,17 +127,6 @@ app.controller('DocumentReviewController', ['$scope', '$uibModal', '$log', '$htt $scope.review = response.data.review; publicToken = response.data.publicToken; - - for(let r of $scope.review){ - for(let q of r.questions){ - reviewQuestions[q._id] = q; - if(q.type != "run") continue; - $http.get(`/api/document/run/${teamId}/${q._id}`).then(function (response) { - $scope.runScore[q._id] = response.data; - }); - } - } - $http.get("/api/document/answer/"+ $scope.team._id + "/" + token).then(function (response) { $scope.answers = response.data; for(let b of $scope.blocks){ diff --git a/routes/api/document.js b/routes/api/document.js index 391ff7f1..e08b16be 100644 --- a/routes/api/document.js +++ b/routes/api/document.js @@ -29,8 +29,6 @@ const logger = require('../../config/logger').mainLogger; const documentDb = require('../../models/document'); const escape = require('escape-html'); const sanitize = require("sanitize-filename"); -const { lineRun } = require('../../models/lineRun'); -const { mazeRun } = require('../../models/mazeRun'); read = gracefulFs.gracefulify(read); const S = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; @@ -1721,87 +1719,6 @@ privateRouter.get('/map/:fileName', } ); -privateRouter.get('/run/:teamId/:questionId', function (req, res, next) { - const { teamId } = req.params; - const { questionId } = req.params; - - if (!ObjectId.isValid(teamId)) { - return next(); - } - - competitiondb.team - .findById(teamId) - .select('competition league') - .exec(function (err, dbTeam) { - if (err || dbTeam == null) { - if (!err) err = { message: 'No team found' }; - res.status(400).send({ - msg: 'Could not get team', - err: err.message, - }); - } else if (dbTeam) { - if (auth.authCompetition(req.user, dbTeam.competition, ACCESSLEVELS.VIEW)) { - competitiondb.competition - .findById(dbTeam.competition) - .select('documents') - .exec(function (err, dbCompetition) { - let review = dbCompetition.documents.leagues.filter(l=>l.league == dbTeam.league)[0].review; - for(let b of review){ - let q = b.questions.filter(q=>q._id == questionId && q.type=="run"); - if(q.length > 0){ - //Runs already exists? - if(GetleagueType(dbTeam.league) == "line"){ - //LineRun - lineRun.find({ - competition: dbTeam.competition, - team: dbTeam._id, - round: q[0].runReview.round, - map: q[0].runReview.map - }) - .select('round score') - .populate('round') - .exec(function (err, dbRun) { - if(!dbRun || dbRun.length == 0){ - res.status(400).send([]); - }else{ - res.status(200).send(dbRun); - } - }); - }else{ - //MazeRun - mazeRun.find({ - competition: dbTeam.competition, - team: dbTeam._id, - round: q[0].runReview.round, - map: q[0].runReview.map - }) - .select('round score') - .populate('round') - .exec(function (err, dbRun) { - if(!dbRun || dbRun.length == 0){ - res.status(400).send([]); - }else{ - res.status(200).send(dbRun); - } - }); - } - return; - } - } - res.status(401).send({ - msg: 'Operation not permited', - }); - - }); - } else { - res.status(401).send({ - msg: 'Operation not permited', - }); - } - } - }); -}); - publicRouter.all('*', function (req, res, next) { next(); }); diff --git a/routes/document.js b/routes/document.js index f6bc3648..686be130 100644 --- a/routes/document.js +++ b/routes/document.js @@ -8,8 +8,6 @@ const fs = require('fs'); const dateformat = require('dateformat'); const competitiondb = require('../models/competition'); const { LEAGUES_JSON } = competitiondb; -const { lineRun } = require('../models/lineRun'); -const { mazeRun } = require('../models/mazeRun'); const logger = require('../config/logger').mainLogger; const { ObjectId } = require('mongoose').Types; const auth = require('../helper/authLevels'); @@ -82,83 +80,6 @@ privateRouter.get('/review/:teamId', function (req, res, next) { }); }); -privateRouter.get('/review/run/:teamId/:questionId', function (req, res, next) { - const { teamId } = req.params; - const { questionId } = req.params; - - if (!ObjectId.isValid(teamId)) { - return next(); - } - - competitiondb.team - .findById(teamId) - .select('competition document.token league') - .exec(function (err, dbTeam) { - if (err || dbTeam == null) { - if (!err) err = { message: 'No team found' }; - res.status(400).send({ - msg: 'Could not get team', - err: err.message, - }); - } else if (dbTeam) { - if (auth.authCompetition(req.user, dbTeam.competition, ACCESSLEVELS.JUDGE)) { - competitiondb.competition - .findById(dbTeam.competition) - .select('documents rule') - .exec(function (err, dbCompetition) { - let review = dbCompetition.documents.leagues.filter(l=>l.league == dbTeam.league)[0].review; - for(let b of review){ - let q = b.questions.filter(q=>q._id == questionId && q.type=="run"); - if(q.length > 0){ - let simpleJudge = false; - if(q[0].runReview.round.length == 1 && q[0].runReview.movie == "") simpleJudge = true; - //Runs already exists? - if(GetleagueType(dbTeam.league) == "line"){ - //LineRun - lineRun.find({ - competition: dbTeam.competition, - team: dbTeam._id, - round: q[0].runReview.round, - map: q[0].runReview.map - }) - .exec(function (err, dbRun) { - if(!dbRun || dbRun.length == 0){ - res.render('document/run/mapSelector', { user: req.user, team: dbTeam._id, competition: dbTeam.competition, league: dbTeam.league, token: dbTeam.document.token, map: q[0].runReview.map, movie: q[0].runReview.movie, round: q[0].runReview.round, questionId }); - }else{ - if(simpleJudge) res.redirect('/line/judge/' + dbRun[0]._id); - else res.render('document/run/line', { user: req.user, team: dbTeam._id, id: dbRun.map((obj)=>obj._id), rule: dbCompetition.rule, token: dbTeam.document.token, movie: q[0].runReview.movie}); - } - }); - }else{ - //MazeRun - mazeRun.find({ - competition: dbTeam.competition, - team: dbTeam._id, - round: q[0].runReview.round, - map: q[0].runReview.map - }) - .exec(function (err, dbRun) { - if(!dbRun || dbRun.length == 0){ - res.render('document/run/mapSelector', { user: req.user, team: dbTeam._id, competition: dbTeam.competition, league: dbTeam.league, token: dbTeam.document.token, map: q[0].runReview.map, movie: q[0].runReview.movie, round: q[0].runReview.round, questionId }); - }else{ - if(simpleJudge) res.redirect('/maze/judge/' + dbRun[0]._id); - else res.render('document/run/maze', { user: req.user, team: dbTeam._id, id: dbRun.map((obj)=>obj._id), rule: dbCompetition.rule, token: dbTeam.document.token, movie: q[0].runReview.movie}); - } - }); - } - return; - } - } - res.render('access_denied', { user: req.user }); - - }); - } else { - res.render('access_denied', { user: req.user }); - } - } - }); -}); - privateRouter.get('/reviewed/:teamId', function (req, res, next) { const { teamId } = req.params; diff --git a/views/document/run/line.pug b/views/document/run/line.pug deleted file mode 100644 index 184d176e..00000000 --- a/views/document/run/line.pug +++ /dev/null @@ -1,294 +0,0 @@ -html(ng-app="ddApp") - head - title Rescue Line Judge - script. - var runId = "#{id}" - const movie = "#{movie}" - const token = "#{token}" - const teamId = "#{team}" - - include ../../includes/common_component - - script(src="/javascripts/line_judge."+rule+".js") - script(src="/javascripts/score_calc."+rule+".js") - script(src="/javascripts/deflate.js") - script(src="/components/jquery-qrcode/jquery.qrcode.min.js") - script(src="/javascripts/makeQR.js") - script(src="/javascripts/translate_config.js") - script(src='/components/lightbox2/dist/js/lightbox.min.js') - - link(rel='stylesheet',href='/components/lightbox2/dist/css/lightbox.min.css') - link(href="/stylesheets/fredrik.css" rel="stylesheet") - link(href="/components/css-toggle-switch/dist/toggle-switch.css" rel="stylesheet") - - meta(name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0") - - body(ng-controller="ddController") - nav.navbar(style='background-color: #e74c3c; color: #ecf0f1; position: fixed; top: 0; z-index:10 ; width: 100%') - // Navbar content - .col-md-6.col-sm4.col-12 - li.navbar-brand(href='#', ng-show='!networkError') - i.fas.fa-sync(ng-class="{'fa-spin' : sync > 0}")   - | {{team.name}} : {{round}} - li.navbar-brand(href='#', ng-show='networkError') - i.fas.fa-exclamation-triangle(style='color: #f1c40f;')   - | Network ERROR {{team.name}} - .col-md-3.col-sm4.col-7 - i.fas.fa-calculator.fa-2x(aria-hidden='true')   - li.navbar-brand(href='#') {{score}} {{'common.point' | translate}} - .col-md-3.col-sm4.col-5 - i.fas.fa-stopwatch.fa-2x(aria-hidden='true')   - li.navbar-brand(href='#') {{time | date:'mm:ss'}} - .container-fluid.nav-cont - div - .alert.alert-warning(role='alert', ng-show='networkError') - h4.alert-heading {{'line.judge.networkError' | translate}} - .row - .col-md-10 - p {{'line.judge.networkErrorDescription' | translate}} - .col-md-2 - button.btn.btn-warning(type='button', ng-click='saveEverything()') {{'line.judge.reSend' | translate}} - .row - .col-md-6.col-lg-5 - div#video_area(style="text-align:center;margin:0 0 5px 0;") - video(style="width:100%;max-height:50vh;", controls, preload="metadata", ng-attr-poster="{{getThumbnailLink(movie)}}") - source(ng-src="{{getVideoLink(v)}}", ng-repeat="v in getVideoList(movie)") - button.btn.btn-primary(style='margin:0 10px 10px 0;', type='button', ng-click='toggleScoring()') - i.far.fa-clipboard(aria-hidden='true') - | {{ startedScoring ? 'line.judge.run_end' : 'line.judge.run_start' | translate }} - button.btn.btn-success(style='margin:0 10px 10px 0;', type='button', ng-click='toggleTime()') - i.fas.fa-stopwatch(aria-hidden='true') {{ startedTime ? 'line.judge.tim_stop' : 'line.judge.tim_start' |translate }} - button.btn.btn-warning(ng-show='!startedTime && time!=0', style='margin:0 10px 10px 0;', type='button', ng-click='TimeReset()') - i.fas.fa-stopwatch(aria-hidden='true') {{'line.judge.tim_reset' | translate}} - .alert.alert-info(role='alert', ng-show='numberOfDropTiles - placedDropTiles == 0 && !startedScoring && !fromSign') - | {{'line.judge.ready' | translate}} - br - strong(style='font-size:20px;') {{'line.judge.push_start' | translate}} - .row(ng-if="league != 'LineNL'", ng-show='(!startedScoring || fromSign) && EvacuationAreaLoPIndex != -1') - .col-6 - .card - h4.card-header - i.fas.fa-ambulance(aria-hidden='true') - | {{'line.judge.select_elevel' | translate}} - .card-body - br - .row - .col-6(style='position: relative;', ng-click='changeLevel(1)') - img.img-thumbnail(src='/images/level1.png', width='100%', ng-style="{'background-color': evacuationLevel==1?'#2ecc71':'#95a5a6' , 'opacity':evacuationLevel==1?'1':'0.4' }") - div(style='position:absolute; top:10px; left:30px;') {{'line.judge.low' | translate}} - div(style='position:absolute; bottom:10px; right:25px;', ng-show='evacuationLevel==1') - i.far.fa-3x.fa-check-circle(aria-hidden='true', style='color:#27ae60;') - .col-6(style='position: relative;', ng-click='changeLevel(2)') - img.img-thumbnail(src='/images/level2.png', width='100%', ng-style="{'background-color': evacuationLevel==2?'#2ecc71':'#95a5a6' , 'opacity':evacuationLevel==2?'1':'0.4' }") - div(style='position:absolute; top:10px; left:30px;') {{'line.judge.high' | translate}} - div(style='position:absolute; bottom:10px; right:25px;', ng-show='evacuationLevel==2') - i.far.fa-3x.fa-check-circle(aria-hidden='true', style='color:#27ae60;') - .col-6 - .card - h4.card-header - i.fas.fa-medkit(aria-hidden='true') - | {{'line.judge.select_klevel' | translate}} - .card-body - br - .row - .col-6(style='position: relative;', ng-click='changeLevelK(1)') - img.img-thumbnail(src='/images/line-kit-1.png', width='100%', ng-style="{'background-color': kitLevel==1?'#2ecc71':'#95a5a6' , 'opacity':kitLevel==1?'1':'0.4' }") - div(style='position:absolute; top:10px; left:30px;') {{'line.judge.noSearch' | translate}} - div(style='position:absolute; bottom:10px; right:25px;', ng-show='kitLevel==1') - i.far.fa-3x.fa-check-circle(aria-hidden='true', style='color:#27ae60;') - .col-6(style='position: relative;', ng-click='changeLevelK(2)') - img.img-thumbnail(src='/images/line-kit-2.png', width='100%', ng-style="{'background-color': kitLevel==2?'#2ecc71':'#95a5a6' , 'opacity':kitLevel==2?'1':'0.4' }") - div(style='position:absolute; top:10px; left:30px;') {{'line.judge.search' | translate}} - div(style='position:absolute; bottom:10px; right:25px;', ng-show='kitLevel==2') - i.far.fa-3x.fa-check-circle(aria-hidden='true', style='color:#27ae60;') - br - #card_area.scrool(style='overflow: scroll;', ng-show='startedScoring') - #lops.card - h3.card-header - i.fas.fa-step-forward(aria-hidden='true') - | {{'common.lops' | translate}} - .card-body - div(ng-repeat='dropTile in range(actualUsedDropTiles+1) track by $index', ng-show='startedScoring') - .card-text(style='display:flex;' ng-style="{'background-color': $index == EvacuationAreaLoPIndex?'#ffcccc':''}") - div(style='width:40%;font-size:10px;', align='center') - | {{$index==0?'line.judge.start':'line.judge.checkpoint'|translate}} - b(style='font-size:15px;color:#FF8300;') {{$index==0?'':$index}} - br - i.fas.fa-forward.fa-rotate-90(aria-hidden='true') - span(ng-if="$index == EvacuationAreaLoPIndex") - br - i.fas.fa-ambulance.fa-2x(aria-hidden='true' style="color:#c0392b;") - br - i.fas.fa-forward.fa-rotate-90(aria-hidden='true') - br - | {{!$last?'line.judge.checkpoint':'line.judge.Lexit' | translate}} - b(style='font-size:15px;color:#FF8300;') {{!$last?$index+1:''}} - div(style='width:60%;position: relative;') - .input-group.mb-3(style='width:100%; height:40px;position:absolute;margin: auto;top: calc(50% - 20px);') - .input-group-prepend - button.btn.btn-danger(type='button', ng-click='decrement($index,$last)') - i.fas.fa-minus(aria-hidden='true') - div(style='background-color: #F2F2F2; width:40%; text-align: center;') - span.count {{LoPs[$index]?LoPs[$index]:0}} - .input-group-append - button.btn.btn-success(type='button', ng-click='increment($index,$last)') - i.fas.fa-plus(aria-hidden='true') - div(ng-if="$index == EvacuationAreaLoPIndex && league != 'LineNL'", style="border: solid 3px #e74c3c;border-radius:calc(0.5rem - 1px);max-width:300px;margin-left:calc(50% - 150px);") - h3.card-header(style="background-color: #e74c3c;color: #fff;border-radius:calc(0.2rem - 1px) calc(0.2rem - 1px) 0 0;margin-left:-1px;") {{'line.judge.rescue' | translate}} - span.badge.badge-danger {{evacuationLevel-1?'line.judge.high':'line.judge.low' | translate}} - .row - .col-4(ng-click="addVictimTmp('L')") - span Max : {{maxLiveVictims}} - br - .victim_btn(style='width:100%;position: relative;', ng-style="{'background-color': count_victim_list('L') + count_victim_tmp('L') >= maxLiveVictims?'#ccc':'#E1FFFE'}") - img.img-thumbnail(src='/images/liveVictim.png', height='60px') - - .col-4(style='', ng-click="addVictimTmp('D')") - span Max : {{maxDeadVictims}} - br - .victim_btn(style='width:100%;position: relative;', ng-style="{'background-color': count_victim_list('D') + count_victim_tmp('D') >= maxDeadVictims?'#ccc':'#E1FFFE'}") - img.img-thumbnail(src='/images/deadVictim.png', height='60px') - .col-4(style='', ng-click="addVictimTmp('K')") - span Max : 1 - br - .victim_btn(style='width:100%;position: relative;', ng-style="{'background-color': count_victim_list('K') + count_victim_tmp('K') >= 1?'#ccc':'#E1FFFE'}") - img.img-thumbnail(src='/images/rescuekit-1.png', height='60px', ng-if="kitLevel==1") - img.img-thumbnail(src='/images/rescuekit-2.png', height='60px', ng-if="kitLevel==2") - table(border='1', style='width:100%; text-align: center; margin-top: 10px;', ng-repeat='j in range(6)', ng-if='victim_tmp.length > j*5') - tbody - tr - td(ng-repeat='i in range(5)', ng-dblclick='delete_victim_tmp(j*5 + i)', ng-swipe-left='delete_victim_tmp(j*5 + i)') - img(src='/images/liveVictim.png', width='30px', ng-if="victim_tmp[j*5 + i] == 'L'") - img(src='/images/deadVictim.png', width='30px', ng-if="victim_tmp[j*5 + i] == 'D'") - img(src='/images/rescuekit-1.png', width='30px', ng-if="victim_tmp[j*5 + i] == 'K' && kitLevel==1") - img(src='/images/rescuekit-2.png', width='30px', ng-if="victim_tmp[j*5 + i] == 'K' && kitLevel==2") - span(style='width:30px;', ng-hide='victim_tmp[j*5 + i]') --- - div(style='margin-top:20px;', ng-show='victim_tmp[0]') - button.btn.btn-warning(style='margin:0 10px 10px 0;', type='button', ng-click='victim_tmp_clear()') - i.far.fa-trash-alt(aria-hidden='true')   Clear - button.btn.btn-success(style='margin:0 10px 10px 0;', type='button', ng-click='victimRegist()') - i.fas.fa-arrow-down(aria-hidden='true')   Register - div(ng-show="victim_list.length > 0") - hr - h6 {{'line.judge.rescuedVictims' | translate}} - span(style='font-size:9px;') {{'line.judge.rescuedVictimsMes' | translate}} - table(border='1', style='width:100%; text-align: center; margin-top: 10px;', ng-repeat='j in range(6)', ng-if='victim_list.length > j*5 || j == 0') - tbody - tr - th(style='text-align:center;', ng-repeat='i in range(5)') {{j*5 + i+1}} - tr - td(ng-repeat='i in range(5)', ng-style="{'background-color': victim_list[j*5 + i].effective?'#E1FFFE':'#ccc'}", ng-dblclick='delete_victim(j*5 + i)', ng-swipe-left='delete_victim(j*5 + i)') - img(src='/images/liveVictim.png', width='30px', ng-if="victim_list[j*5 + i].type == 'L'") - img(src='/images/deadVictim.png', width='30px', ng-if="victim_list[j*5 + i].type == 'D'") - img(src='/images/rescuekit-1.png', width='30px', ng-if="victim_list[j*5 + i].type == 'K' && kitLevel==1") - img(src='/images/rescuekit-2.png', width='30px', ng-if="victim_list[j*5 + i].type == 'K' && kitLevel==2") - span(style='width:30px;', ng-hide='victim_list[j*5 + i]') --- - br - span(ng-show='victim_list[j*5 + i]') - | {{calc_victim_multipliers(victim_list[j*5 + i].type,victim_list[j*5 + i].effective)}} - div(ng-if="$index == EvacuationAreaLoPIndex && league == 'LineNL'", style="border: solid 3px #e74c3c;border-radius:calc(0.5rem - 1px);") - h3.card-header(style="background-color: #e74c3c;color: #fff;border-radius:calc(0.2rem - 1px) calc(0.2rem - 1px) 0 0;margin-left:-1px;") {{'line.judge.rescue' | translate}} (NL) - .row(style="margin-top:20px;") - div(style='width:40%;font-size:10px;', align='center') - img(src='/images/blackVictim.png', height='40px') - div(style='width:60%;position: relative;') - .input-group.mb-3(style='width:100%; height:40px;position:absolute;margin: auto;top: calc(50% - 20px);') - .input-group-prepend - button.btn.btn-danger(type='button', ng-click='victimNL("S",-1)') - i.fas.fa-minus(aria-hidden='true') - div(style='background-color: #F2F2F2; width:40%; text-align: center;') - span.count {{victimNL_S}} - .input-group-append - button.btn.btn-success(type='button', ng-click='victimNL("S",1)') - i.fas.fa-plus(aria-hidden='true') - .row(style="margin-top:20px;") - div(style='width:40%;font-size:10px;', align='center') - img(src='/images/greenVictim.png', height='40px') - div(style='width:60%;position: relative;') - .input-group.mb-3(style='width:100%; height:40px;position:absolute;margin: auto;top: calc(50% - 20px);') - .input-group-prepend - button.btn.btn-danger(type='button', ng-click='victimNL("G",-1)') - i.fas.fa-minus(aria-hidden='true') - div(style='background-color: #F2F2F2; width:40%; text-align: center;') - span.count {{victimNL_G}} - .input-group-append - button.btn.btn-success(type='button', ng-click='victimNL("G",1)') - i.fas.fa-plus(aria-hidden='true') - //hr - //.row(style="margin-top:10px;padding-bottom:20px;") - div(style='width:40%;font-size:10px;', align='center') - img(src='/images/misidentNL.png', height='40px') - div(style='width:60%;position: relative;') - .input-group.mb-3(style='width:100%; height:40px;position:absolute;margin: auto;top: calc(50% - 20px);') - .input-group-prepend - button.btn.btn-danger(type='button', ng-click='misidentNL(-1)') - i.fas.fa-minus(aria-hidden='true') - div(style='background-color: #F2F2F2; width:40%; text-align: center;') - span.count(style="color: #c0392b;") {{misidentNL_C}} - .input-group-append - button.btn.btn-success(type='button', ng-click='misidentNL(1)') - i.fas.fa-plus(aria-hidden='true') - hr(ng-show='!$last') - h3.card-header - i.fas.fa-door-open(aria-hidden='true') - | {{'line.judge.exit' | translate}}  - .card-body - .col-md-12(style='position: relative;', ng-click='changeExitBonus()') - img.img-thumbnail(src='/images/line_bonus.png', width='186.3px', height='118px', ng-style="{'background-color': exitBonus?'#2ecc71':'#D91E18'}", ng-if="league != 'LineNL'") - img.img-thumbnail(src='/images/nl_bonus.png', width='186.3px', ng-style="{'background-color': exitBonus?'#2ecc71':'#D91E18'}", ng-if="league == 'LineNL'") - div(style='position:absolute; top:20px; left:65px;') - i.fas.fa-check.fa-fw.fa-5x(ng-show='exitBonus', style='color:#27ae60; opacity:0.9;') - i.fas.fa-times.fa-fw.fa-5x(ng-show='!exitBonus ', style='padding-top:4px; color:#e74c3c; opacity:0.9;') - .col-md-6.col-lg-7.tilearea - div(style='text-align:left;float:left;') - .btn-group - .input-group-prepend - span.input-group-text - i.fas.fa-arrows-alt-v(aria-hidden='true') - button.btn.btn-outline-dark(type='button', ng-click='changeFloor(zz)', ng-repeat='zz in range(height)', ng-class='{active: zz == z}')  {{zz}}  - div(style='text-align:right;float:right;') - .btn-group - button.btn.btn-outline-dark(type='button', ng-click='tileRot(-90)') - i.fas.fa-undo(aria-hidden='true') - button.btn.btn-outline-dark(type='button', ng-click='tileRot(90)') - i.fas.fa-redo(aria-hidden='true') - div(style='clear:both;') - #wrapTile.mx-auto(style='margin-top:5px;') - div(ng-repeat='r in range(length)', ng-if='sRotate==0', style='display: flex;') - div(style='text-align:center;') - .slot(ng-repeat='c in range(width)') - tile(tile="mtiles[c+','+r+','+z]", ng-click='doScoring(c,r,z)') - div(ng-repeat='r in range(length)', ng-if='sRotate==180', style='display: flex;') - .slot(ng-repeat='c in range(width)') - tile(tile="mtiles[width - c -1+','+(length - r -1)+','+z]", ng-click='doScoring(width - c -1,length - r -1,z)') - div(ng-repeat='r in range(width)', ng-if='sRotate==270', style='display: flex;') - .slot(ng-repeat='c in range(length)') - tile(tile="mtiles[width - r -1+','+c+','+z]", ng-click='doScoring(width-r-1,c,z)') - div(ng-repeat='r in range(width)', ng-if='sRotate==90', style='display: flex;') - .slot(ng-repeat='c in range(length)') - tile(tile="mtiles[r+','+ (length - c-1) +','+z]", ng-click='doScoring(r,length-c-1,z)') - .row(style='margin:50 0 0 0;') - .col-md-12.confirmation - div - h4 {{'line.judge.adjust'| translate}} - br - strong(ng-if='!startedTime') - | {{'line.judge.confirm_text'| translate}} - strong(ng-if='startedTime', style='color:red') - | {{'line.judge.disabled_confirm_text'| translate}} - .row - .col-sm-7(style='margin-bottom:10px;') - .input-group.input-group-lg - input.form-control(type='tel', placeholder='', aria-label='min', min='0', max='8', ng-model='minutes', ng-disabled='startedTime') - .input-group-append - span.input-group-text {{'common.min' | translate}} - input.form-control(type='tel', placeholder='', aria-label='sec', min='0', max='60', ng-model='seconds', ng-disabled='startedTime') - .input-group-append - span.input-group-text {{'common.sec' | translate}} - .col-sm-5 - div(style='text-align:right;') - button.btn.btn-danger(type='button', ng-click='nextRun(1)', ng-disabled='startedTime', ng-if="nowRun < runNum - 1") - i.fas.fa-arrow-right.fa-2x(aria-hidden='true') Next - button.btn.btn-danger(type='button', ng-click='nextRun(0)', ng-disabled='startedTime', ng-if="nowRun == runNum - 1") - i.fas.fa-check.fa-2x(aria-hidden='true') Finish - br diff --git a/views/document/run/mapSelector.pug b/views/document/run/mapSelector.pug deleted file mode 100644 index 51ace854..00000000 --- a/views/document/run/mapSelector.pug +++ /dev/null @@ -1,46 +0,0 @@ -//- -*- tab-width: 2 -*- -extends ../../includes/layout - -block vars - - var ngAppDef = 'MapSelector' - -append scripts - script. - const competitionId = "#{competition}" - const leagueId = "#{league}" - const teamId = "#{team}" - const maps = "#{map}" - const movie = "#{movie}" - const token = "#{token}" - const round = "#{round}" - const questionId = "#{questionId}" - script(src='/javascripts/document/run/mapSelector.js') - - - - -block content - .row - .col-md-1 - .col-md-10 - h2 Pre-recored Run - div(style="text-align:center;margin:10px 0px;") - video(style="max-width:500px;max-height:300px;", controls, preload="metadata", ng-attr-poster="{{getThumbnailLink(movie)}}") - source(ng-src="{{getVideoLink(v)}}", ng-repeat="v in getVideoList(movie)") - br - a(ng-href="{{getVideoLink(getVideoList(movie)[0])}}" download) {{"document.form.cantplay" | translate}} - hr - h6 Please select a map - - br - - .row.row-height(style="display: flex;justify-content: space-between;") - .col-md-4(ng-repeat='map in maps' style="margin-bottom:20px;") - .card(ng-click="select($index)" style="width:100%;height:100%;text-align:center;" ng-style="{'backgroundColor': selectedMap==$index ? '#2ecc71':''}") - img.card-img-top(ng-src="/api/document/map/{{map._id}}", alt='' style="max-height:300px;width:100%;object-fit: contain;") - .card-body - h3(style="text-align:center" ng-cloak) {{map.name}} - br - button(ng-click="createRun()" class='btn btn-success btn-lg btn-block' ng-cloak ng-if="selectedMap!=null&&createB") - i.fas.fa-calculator   Start Scoring! - br diff --git a/views/document/run/maze.pug b/views/document/run/maze.pug deleted file mode 100644 index 209cb282..00000000 --- a/views/document/run/maze.pug +++ /dev/null @@ -1,284 +0,0 @@ -html(ng-app="ddApp") - head - title Rescue Maze Judge - script. - var runId = "#{id}" - const movie = "#{movie}" - const token = "#{token}" - const teamId = "#{team}" - - include ../../includes/common_component - script(src="/javascripts/maze_judge."+rule+".js") - script(src="/javascripts/score_calc."+rule+".js") - script(src="/javascripts/deflate.js") - script(src="/components/jquery-qrcode/jquery.qrcode.min.js") - script(src="/javascripts/makeQR.js") - script(src="/javascripts/translate_config.js") - script(src='/components/lightbox2/dist/js/lightbox.min.js') - - link(rel='stylesheet',href='/components/lightbox2/dist/css/lightbox.min.css') - link(href="/stylesheets/fredrik.css" rel="stylesheet") - - link(href="/stylesheets/maze.css" rel="stylesheet") - - meta(name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0") - - - body(ng-controller="ddController") - nav.navbar(style='background-color: #e74c3c; color: #ecf0f1; position: fixed; top: 0; z-index:10 ; width: 100%') - // Navbar content - .col-md-6.col-sm4.col-12 - li.navbar-brand(href='#', ng-show='!networkError') - i.fas.fa-sync(ng-class="{'fa-spin' : sync > 0}") - | {{team.name}} : {{round}} - li.navbar-brand(href='#', ng-show='networkError') - i.fas.fa-exclamation-triangle(style='color: #f1c40f;') - | Network ERROR {{team.name}} - .col-md-3.col-sm4.col-7 - i.fas.fa-calculator.fa-2x(aria-hidden='true') - li.navbar-brand(href='#') {{score}} {{'common.point' | translate}} - .col-md-3.col-sm4.col-5 - i.fas.fa-stopwatch.fa-2x(aria-hidden='true') - li.navbar-brand(href='#') {{time | date:'mm:ss'}} - .container-fluid.nav-cont - div - .alert.alert-warning(role='alert', ng-show='networkError') - h4.alert-heading {{'maze.judge.networkError' | translate}} - .row - .col-md-10 - p {{'maze.judge.networkErrorDescription' | translate}} - .col-md-2 - button.btn.btn-warning(type='button', ng-click='saveEverything()') {{'maze.judge.reSend' | translate}} - .row - .col-md-6.col-lg-5(style='margin-bottom:30px;') - div#video_area(style="text-align:center;margin:0 0 5px 0;") - video(style="width:100%;max-height:50vh;", controls, preload="metadata", ng-attr-poster="{{getThumbnailLink(movie)}}") - source(ng-src="{{getVideoLink(v)}}", ng-repeat="v in getVideoList(movie)") - button.btn.btn-success(style='margin:0 10px 10px 0;', type='button', ng-click='toggleTime()') - i.fas.fa-stopwatch(aria-hidden='true') {{ startedTime ? 'maze.judge.tim_stop' : 'maze.judge.tim_start' |translate }} - button.btn.btn-warning(ng-show='!startedTime && time!=0', style='margin:0 10px 10px 0;', type='button', ng-click='timeReset()') - i.fas.fa-stopwatch(aria-hidden='true') {{'maze.judge.tim_reset' | translate}} - - #card_area.scrool(style='overflow: scroll;') - .card - h3.card-header - i.fas.fa-clipboard(aria-hidden='true') - | Operation - .card-body - .col-md-12(style='position: relative;') - strong {{'maze.judge.total_lops' | translate}} - .input-group.mb-3(style='width:100%;height:40px;') - .input-group-prepend - button.btn.btn-danger(type='button', ng-click='decrement()') - i.fas.fa-minus(aria-hidden='true') - div(style='background-color: #F2F2F2; width:calc(100% - 80px); text-align: center;') - span.count {{LoPs}} - .input-group-append - button.btn.btn-success(type='button', ng-click='increment()') - i.fas.fa-plus(aria-hidden='true') - .col-md-12(style='position: relative;') - strong {{'maze.judge.misidentification' | translate}} - .input-group.mb-3(style='width:100%;height:40px;') - .input-group-prepend - button.btn.btn-danger(type='button', ng-click='decrementMis()') - i.fas.fa-minus(aria-hidden='true') - div(style='background-color: #F2F2F2; width:calc(100% - 80px); text-align: center;') - span.count {{MisIdent}} - .input-group-append - button.btn.btn-success(type='button', ng-click='incrementMis()') - i.fas.fa-plus(aria-hidden='true') - .col-md-12(style='position: relative;', ng-click='changeExitBonus()') - strong {{'maze.judge.return' | translate}} - br - img.img-thumbnail(src='/images/maze_bonus.png', width='100px', height='100px', ng-style="{'background-color': exitBonus?'#2ecc71':'#D91E18'}") - div(style='position:absolute; top:30px; left:25px;') - i.fas.fa-check.fa-fw.fa-5x(ng-show='exitBonus', style='color:#27ae60; opacity:0.9;') - i.fas.fa-times.fa-fw.fa-5x(ng-show='!exitBonus', style='padding-top:4px; color:#e74c3c; opacity:0.9;') - .col-md-6.col-lg-7.tilearea - div(style='text-align:left;float:left;') - .btn-group - .input-group-prepend - span.input-group-text - i.fas.fa-arrows-alt-v(aria-hidden='true') - button.btn.btn-outline-dark(type='button', ng-click='changeFloor(zz)', ng-repeat='zz in range(height)', ng-class='{active: zz == z}')  {{zz}}  - div(style='text-align:right;float:right;') - .btn-group - button.btn.btn-outline-dark(type='button', ng-click='tileRot(-90)') - i.fas.fa-undo(aria-hidden='true') - button.btn.btn-outline-dark(type='button', ng-click='tileRot(90)') - i.fas.fa-redo(aria-hidden='true') - div(style='clear:both;') - #wrapTile.mx-auto(style='margin-top:5px;') - table.map(ng-if='sRotate == 0') - tbody - tr(ng-repeat='r in range(2*length + 1)') - td.cell(ng-repeat='c in range(2*width + 1)', ng-class="{'tile': $odd && $parent.$odd, 'wall': cells[c+','+r+','+z].isWall, 'checkpoint': cells[c+','+r+','+z].tile.checkpoint, 'black': cells[c+','+r+','+z].tile.black, 'linear': cells[c+','+r+','+z].isLinear}", ng-click='cellClick(c, r, z, $odd != $parent.$odd, $odd && $parent.$odd)', ng-style="wallColor(c,r,z,0)") - .tile-image-container(ng-show="cells[c+','+r+','+z].isTile") - img.tile-image(ng-src='/images/log.png', ng-show="cells[c+','+r+','+z].tile.speedbump") - img.tile-image(ng-src='/images/elevator.png', ng-show="!isUndefined(cells[c+','+r+','+z].tile.changeFloorTo) && cells[c+','+r+','+z].tile.changeFloorTo != z") - img.tile-image(ng-src='/images/start.png', ng-show='startTile.x == c && startTile.y == r && startTile.z == z') - img.tile-image(ng-src='/images/ramp.png', ng-show="cells[c+','+r+','+z].tile.ramp") - img.tile-image(ng-src='/images/steps.png', ng-show="cells[c+','+r+','+z].tile.steps") - img.tile-image(ng-src='/images/h_top.png', ng-show="cells[c+','+r+','+z].tile.victims.top == 'H'") - img.tile-image(ng-src='/images/h_right.png', ng-show="cells[c+','+r+','+z].tile.victims.right == 'H'") - img.tile-image(ng-src='/images/h_bottom.png', ng-show="cells[c+','+r+','+z].tile.victims.bottom == 'H'") - img.tile-image(ng-src='/images/h_left.png', ng-show="cells[c+','+r+','+z].tile.victims.left == 'H'") - img.tile-image(ng-src='/images/s_top.png', ng-show="cells[c+','+r+','+z].tile.victims.top == 'S'") - img.tile-image(ng-src='/images/s_right.png', ng-show="cells[c+','+r+','+z].tile.victims.right == 'S'") - img.tile-image(ng-src='/images/s_bottom.png', ng-show="cells[c+','+r+','+z].tile.victims.bottom == 'S'") - img.tile-image(ng-src='/images/s_left.png', ng-show="cells[c+','+r+','+z].tile.victims.left == 'S'") - img.tile-image(ng-src='/images/u_top.png', ng-show="cells[c+','+r+','+z].tile.victims.top == 'U'") - img.tile-image(ng-src='/images/u_right.png', ng-show="cells[c+','+r+','+z].tile.victims.right == 'U'") - img.tile-image(ng-src='/images/u_bottom.png', ng-show="cells[c+','+r+','+z].tile.victims.bottom == 'U'") - img.tile-image(ng-src='/images/u_left.png', ng-show="cells[c+','+r+','+z].tile.victims.left == 'U'") - img.tile-image(ng-src='/images/red_top.png', ng-show="cells[c+','+r+','+z].tile.victims.top == 'Red'") - img.tile-image(ng-src='/images/red_right.png', ng-show="cells[c+','+r+','+z].tile.victims.right == 'Red'") - img.tile-image(ng-src='/images/red_bottom.png', ng-show="cells[c+','+r+','+z].tile.victims.bottom == 'Red'") - img.tile-image(ng-src='/images/red_left.png', ng-show="cells[c+','+r+','+z].tile.victims.left == 'Red'") - img.tile-image(ng-src='/images/yellow_top.png', ng-show="cells[c+','+r+','+z].tile.victims.top == 'Yellow'") - img.tile-image(ng-src='/images/yellow_right.png', ng-show="cells[c+','+r+','+z].tile.victims.right == 'Yellow'") - img.tile-image(ng-src='/images/yellow_bottom.png', ng-show="cells[c+','+r+','+z].tile.victims.bottom == 'Yellow'") - img.tile-image(ng-src='/images/yellow_left.png', ng-show="cells[c+','+r+','+z].tile.victims.left == 'Yellow'") - img.tile-image(ng-src='/images/green_top.png', ng-show="cells[c+','+r+','+z].tile.victims.top == 'Green'") - img.tile-image(ng-src='/images/green_right.png', ng-show="cells[c+','+r+','+z].tile.victims.right == 'Green'") - img.tile-image(ng-src='/images/green_bottom.png', ng-show="cells[c+','+r+','+z].tile.victims.bottom == 'Green'") - img.tile-image(ng-src='/images/green_left.png', ng-show="cells[c+','+r+','+z].tile.victims.left == 'Green'") - i.fas.fa-check.fa-fw.tile-image.tile-font(ng-show="tileStatus(c,r,z,$odd && $parent.$odd) == 'done'", style='padding-top:4px; color:#27ae60; opacity:0.9;') - i.fas.fa-play.fa-fw.fa-rotate-270.tile-image.tile-font(ng-show="tileStatus(c,r,z,$odd && $parent.$odd) == 'halfdone'", style='padding-top:4px; color:#f4d03f; opacity:0.9;') - i.fas.fa-times.fa-fw.tile-image.tile-font(ng-show="tileStatus(c,r,z,$odd && $parent.$odd) == 'undone'", style='padding-top:6px; color:#e74c3c; opacity:0.9;') - table.map(ng-if='sRotate == 90') - tbody - tr(ng-repeat='r in range(2*width + 1)') - td.cell(ng-repeat='c in range(2*length + 1)', ng-class="{'tile': $odd && $parent.$odd, 'wall': cells[r+','+(2*length - c)+','+z].isWall, 'checkpoint': cells[r+','+(2*length - c)+','+z].tile.checkpoint, 'black': cells[r+','+(2*length - c)+','+z].tile.black, 'linear': cells[r+','+(2*length - c)+','+z].isLinear}", ng-click='cellClick(r, (2*length - c), z, $odd != $parent.$odd, $odd && $parent.$odd)', ng-style="wallColor(r,2*length - c,z,90)") - .tile-image-container(ng-show="cells[r+','+(2*length - c)+','+z].isTile") - img.tile-image(ng-src='/images/log.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.speedbump") - img.tile-image(ng-src='/images/elevator.png', ng-show="!isUndefined(cells[r+','+(2*length - c)+','+z].tile.changeFloorTo) && cells[r+','+(2*length - c)+','+z].tile.changeFloorTo != z") - img.tile-image(ng-src='/images/start.png', ng-show='startTile.x == r && startTile.y == (2*length - c) && startTile.z == z') - img.tile-image(ng-src='/images/ramp.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.ramp") - img.tile-image(ng-src='/images/steps.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.steps") - img.tile-image(ng-src='/images/h_right.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.top == 'H'") - img.tile-image(ng-src='/images/h_bottom.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.right == 'H'") - img.tile-image(ng-src='/images/h_left.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.bottom == 'H'") - img.tile-image(ng-src='/images/h_top.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.left == 'H'") - img.tile-image(ng-src='/images/s_right.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.top == 'S'") - img.tile-image(ng-src='/images/s_bottom.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.right == 'S'") - img.tile-image(ng-src='/images/s_left.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.bottom == 'S'") - img.tile-image(ng-src='/images/s_top.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.left == 'S'") - img.tile-image(ng-src='/images/u_right.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.top == 'U'") - img.tile-image(ng-src='/images/u_bottom.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.right == 'U'") - img.tile-image(ng-src='/images/u_left.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.bottom == 'U'") - img.tile-image(ng-src='/images/u_top.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.left == 'U'") - img.tile-image(ng-src='/images/red_right.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.top == 'Red'") - img.tile-image(ng-src='/images/red_bottom.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.right == 'Red'") - img.tile-image(ng-src='/images/red_left.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.bottom == 'Red'") - img.tile-image(ng-src='/images/red_top.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.left == 'Red'") - img.tile-image(ng-src='/images/yellow_right.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.top == 'Yellow'") - img.tile-image(ng-src='/images/yellow_bottom.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.right == 'Yellow'") - img.tile-image(ng-src='/images/yellow_left.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.bottom == 'Yellow'") - img.tile-image(ng-src='/images/yellow_top.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.left == 'Yellow'") - img.tile-image(ng-src='/images/green_right.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.top == 'Green'") - img.tile-image(ng-src='/images/green_bottom.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.right == 'Green'") - img.tile-image(ng-src='/images/green_left.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.bottom == 'Green'") - img.tile-image(ng-src='/images/green_top.png', ng-show="cells[r+','+(2*length - c)+','+z].tile.victims.left == 'Green'") - i.fas.fa-check.fa-fw.tile-image.tile-font(ng-show="tileStatus(r,(2*length - c),z,$odd && $parent.$odd) == 'done'", style='padding-top:4px; color:#27ae60; opacity:0.9;') - i.fas.fa-play.fa-fw.fa-rotate-270.tile-image.tile-font(ng-show="tileStatus(r,(2*length - c),z,$odd && $parent.$odd) == 'halfdone'", style='padding-top:4px; color:#f4d03f; opacity:0.9;') - i.fas.fa-times.fa-fw.tile-image.tile-font(ng-show="tileStatus(r,(2*length - c),z,$odd && $parent.$odd) == 'undone'", style='padding-top:6px; color:#e74c3c; opacity:0.9;') - table.map(ng-if='sRotate == 180') - tbody - tr(ng-repeat='r in range(2*length + 1)') - td.cell(ng-repeat='c in range(2*width + 1)', ng-class="{'tile': $odd && $parent.$odd, 'wall': cells[2*width - c+','+(2*length - r)+','+z].isWall, 'checkpoint': cells[2*width - c+','+(2*length - r)+','+z].tile.checkpoint, 'black': cells[2*width - c+','+(2*length - r)+','+z].tile.black, 'linear': cells[2*width - c+','+(2*length - r)+','+z].isLinear}", ng-click='cellClick(2*width - c, 2*length - r, z, $odd != $parent.$odd, $odd && $parent.$odd)', ng-style="wallColor(2*width - c, 2*length - r, z,180)") - .tile-image-container(ng-show="cells[2*width - c+','+(2*length - r)+','+z].isTile") - img.tile-image(ng-src='/images/log.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.speedbump") - img.tile-image(ng-src='/images/elevator.png', ng-show="!isUndefined(cells[2*width - c+','+(2*length - r)+','+z].tile.changeFloorTo) && cells[2*width - c+','+(2*length - r)+','+z].tile.changeFloorTo != z") - img.tile-image(ng-src='/images/start.png', ng-show='startTile.x == 2*width - c && startTile.y == 2*length - r && startTile.z == z') - img.tile-image(ng-src='/images/ramp.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.ramp") - img.tile-image(ng-src='/images/steps.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.steps") - img.tile-image(ng-src='/images/h_bottom.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.top == 'H'") - img.tile-image(ng-src='/images/h_left.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.right == 'H'") - img.tile-image(ng-src='/images/h_top.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.bottom == 'H'") - img.tile-image(ng-src='/images/h_right.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.left == 'H'") - img.tile-image(ng-src='/images/s_bottom.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.top == 'S'") - img.tile-image(ng-src='/images/s_left.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.right == 'S'") - img.tile-image(ng-src='/images/s_top.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.bottom == 'S'") - img.tile-image(ng-src='/images/s_right.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.left == 'S'") - img.tile-image(ng-src='/images/u_bottom.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.top == 'U'") - img.tile-image(ng-src='/images/u_left.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.right == 'U'") - img.tile-image(ng-src='/images/u_top.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.bottom == 'U'") - img.tile-image(ng-src='/images/u_right.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.left == 'U'") - img.tile-image(ng-src='/images/red_bottom.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.top == 'Red'") - img.tile-image(ng-src='/images/red_left.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.right == 'Red'") - img.tile-image(ng-src='/images/red_top.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.bottom == 'Red'") - img.tile-image(ng-src='/images/red_right.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.left == 'Red'") - img.tile-image(ng-src='/images/yellow_bottom.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.top == 'Yellow'") - img.tile-image(ng-src='/images/yellow_left.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.right == 'Yellow'") - img.tile-image(ng-src='/images/yellow_top.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.bottom == 'Yellow'") - img.tile-image(ng-src='/images/yellow_right.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.left == 'Yellow'") - img.tile-image(ng-src='/images/green_bottom.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.top == 'Green'") - img.tile-image(ng-src='/images/green_left.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.right == 'Green'") - img.tile-image(ng-src='/images/green_top.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.bottom == 'Green'") - img.tile-image(ng-src='/images/green_right.png', ng-show="cells[2*width - c+','+(2*length - r)+','+z].tile.victims.left == 'Green'") - i.fas.fa-check.fa-fw.tile-image.tile-font(ng-show="tileStatus(2*width - c,2*length - r,z,$odd && $parent.$odd) == 'done'", style='padding-top:4px; color:#27ae60; opacity:0.9;') - i.fas.fa-play.fa-fw.fa-rotate-270.tile-image.tile-font(ng-show="tileStatus(2*width - c,2*length - r,z,$odd && $parent.$odd) == 'halfdone'", style='padding-top:4px; color:#f4d03f; opacity:0.9;') - i.fas.fa-times.fa-fw.tile-image.tile-font(ng-show="tileStatus(2*width - c,2*length - r,z,$odd && $parent.$odd) == 'undone'", style='padding-top:6px; color:#e74c3c; opacity:0.9;') - table.map(ng-if='sRotate == 270') - tbody - tr(ng-repeat='r in range(2*width + 1)') - td.cell(ng-repeat='c in range(2*length + 1)', ng-class="{'tile': $odd && $parent.$odd, 'wall': cells[2*width - r+','+c+','+z].isWall, 'checkpoint': cells[2*width - r+','+c+','+z].tile.checkpoint, 'black': cells[2*width - r+','+c+','+z].tile.black, 'linear': cells[2*width - r+','+c+','+z].isLinear}", ng-click='cellClick(2*width - r, c, z, $odd != $parent.$odd, $odd && $parent.$odd)', ng-style="wallColor(2*width - r, c, z,270)") - .tile-image-container(ng-show="cells[2*width - r+','+c+','+z].isTile") - img.tile-image(ng-src='/images/log.png', ng-show="cells[2*width - r+','+c+','+z].tile.speedbump") - img.tile-image(ng-src='/images/elevator.png', ng-show="!isUndefined(cells[2*width - r+','+c+','+z].tile.changeFloorTo) && cells[2*width - r+','+c+','+z].tile.changeFloorTo != z") - img.tile-image(ng-src='/images/start.png', ng-show='startTile.x == 2*width - r && startTile.y == c && startTile.z == z') - img.tile-image(ng-src='/images/ramp.png', ng-show="cells[2*width - r+','+c+','+z].tile.ramp") - img.tile-image(ng-src='/images/steps.png', ng-show="cells[2*width - r+','+c+','+z].tile.steps") - img.tile-image(ng-src='/images/h_left.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.top == 'H'") - img.tile-image(ng-src='/images/h_top.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.right == 'H'") - img.tile-image(ng-src='/images/h_right.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.bottom == 'H'") - img.tile-image(ng-src='/images/h_bottom.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.left == 'H'") - img.tile-image(ng-src='/images/s_left.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.top == 'S'") - img.tile-image(ng-src='/images/s_top.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.right == 'S'") - img.tile-image(ng-src='/images/s_right.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.bottom == 'S'") - img.tile-image(ng-src='/images/s_bottom.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.left == 'S'") - img.tile-image(ng-src='/images/u_left.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.top == 'U'") - img.tile-image(ng-src='/images/u_top.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.right == 'U'") - img.tile-image(ng-src='/images/u_right.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.bottom == 'U'") - img.tile-image(ng-src='/images/u_bottom.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.left == 'U'") - img.tile-image(ng-src='/images/red_left.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.top == 'Red'") - img.tile-image(ng-src='/images/red_top.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.right == 'Red'") - img.tile-image(ng-src='/images/red_right.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.bottom == 'Red'") - img.tile-image(ng-src='/images/red_bottom.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.left == 'Red'") - img.tile-image(ng-src='/images/yellow_left.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.top == 'Yellow'") - img.tile-image(ng-src='/images/yellow_top.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.right == 'Yellow'") - img.tile-image(ng-src='/images/yellow_right.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.bottom == 'Yellow'") - img.tile-image(ng-src='/images/yellow_bottom.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.left == 'Yellow'") - img.tile-image(ng-src='/images/green_left.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.top == 'Green'") - img.tile-image(ng-src='/images/green_top.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.right == 'Green'") - img.tile-image(ng-src='/images/green_right.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.bottom == 'Green'") - img.tile-image(ng-src='/images/green_bottom.png', ng-show="cells[2*width - r+','+c+','+z].tile.victims.left == 'Green'") - i.fas.fa-check.fa-fw.tile-image.tile-font(ng-show="tileStatus(2*width - r,c,z,$odd && $parent.$odd) == 'done'", style='padding-top:4px; color:#27ae60; opacity:0.9;') - i.fas.fa-play.fa-fw.fa-rotate-270.tile-image.tile-font(ng-show="tileStatus(2*width - r,c,z,$odd && $parent.$odd) == 'halfdone'", style='padding-top:4px; color:#f4d03f; opacity:0.9;') - i.fas.fa-times.fa-fw.tile-image.tile-font(ng-show="tileStatus(2*width - r,c,z,$odd && $parent.$odd) == 'undone'", style='padding-top:6px; color:#e74c3c; opacity:0.9;') - .row(style='margin:50 0 0 0;') - .col-md-12.confirmation - div - h4 {{'maze.judge.adjust'| translate}} - br - strong(ng-if='!startedTime') - | {{'maze.judge.confirm_text'| translate}} - strong(ng-if='startedTime', style='color:red') - | {{'maze.judge.disabled_confirm_text'| translate}} - .row - .col-sm-7(style='margin-bottom:10px;') - .input-group.input-group-lg - input.form-control(type='tel', placeholder='', aria-label='min', min='0', max='8', ng-model='minutes', ng-disabled='startedTime') - .input-group-append - span.input-group-text {{'common.min' | translate}} - input.form-control(type='tel', placeholder='', aria-label='sec', min='0', max='60', ng-model='seconds', ng-disabled='startedTime') - .input-group-append - span.input-group-text {{'common.sec' | translate}} - .col-sm-5 - div(style='text-align:right;') - button.btn.btn-danger(type='button', ng-click='nextRun(1)', ng-disabled='startedTime', ng-if="nowRun < runNum - 1") - i.fas.fa-arrow-right.fa-2x(aria-hidden='true') Next - button.btn.btn-danger(type='button', ng-click='nextRun(0)', ng-disabled='startedTime', ng-if="nowRun == runNum - 1") - i.fas.fa-check.fa-2x(aria-hidden='true') Finish - br \ No newline at end of file