Skip to content

Commit

Permalink
Revert "Turn off developer mode"
Browse files Browse the repository at this point in the history
This reverts commit 9141ed6.
  • Loading branch information
hjjerrychen committed Nov 26, 2018
1 parent c4f2ac0 commit 6b6285a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 144 deletions.
162 changes: 44 additions & 118 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-115566042-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-115566042-2');
gtag('config', 'UA-115566042-2');
</script>

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
Expand Down Expand Up @@ -40,8 +40,6 @@ <h5>Selected element</h5>
<a class="nav-item nav-link active" id="nav-jmp-tab" data-toggle="tab" href="#nav-jmp" role="tab" aria-controls="nav-jmp" aria-selected="true">Jumps</a>
<a class="nav-item nav-link" id="nav-sp-tab" data-toggle="tab" href="#nav-sp" role="tab" aria-controls="nav-sp" aria-selected="false">Spins</a>
<a class="nav-item nav-link" id="nav-seq-tab" data-toggle="tab" href="#nav-seq" role="tab" aria-controls="nav-seq" aria-selected="false">Sequences</a>
<a class="nav-item nav-link" id="nav-pcs-tab" data-toggle="tab" href="#nav-pcs" role="tab" aria-controls="nav-pcs" aria-selected="false">Program Components</a>

</div>
</nav>
<div class="tab-content" id="nav-tabContent">
Expand Down Expand Up @@ -78,37 +76,6 @@ <h6>Info</h6>
<button type="button" class="btn btn-outline-primary setInvalid">*</button>
</div>

<div class="goe-sel">
<h6>GOE</h6>
<div class="btn-toolbar setGOE" role="toolbar" aria-label="GOE Selector">
<div class="btn-group pr-2" role="group" aria-label="pos GOE">
<button type="button" class="btn btn-danger">-5</button>
<button type="button" class="btn btn-outline-danger">-4</button>
<button type="button" class="btn btn-outline-danger">-3</button>
<button type="button" class="btn btn-outline-danger">-2</button>
<button type="button" class="btn btn-outline-danger">-1</button>

</div>
<div class="btn-group" role="group" aria-label="zero GOE">
<button type="button" class="btn btn-dark">0</button>
</div>
<div class="btn-group pl-2" role="group" aria-label="neg GOE">

<button type="button" class="btn btn-outline-success">1</button>
<button type="button" class="btn btn-outline-success">2</button>
<button type="button" class="btn btn-outline-success">3</button>
<button type="button" class="btn btn-outline-success">4</button>
<button type="button" class="btn btn-success">5</button>

</div>

</div>

</div>
<div>
<button type="button" class="btn btn-outline-danger clearEntry">Clear Entry</button>
<button type="button" class="btn btn-outline-success addElement">Add Element</button>
</div>

</div>
<div class="tab-pane fade nav-sp" id="nav-sp" role="tabpanel" aria-labelledby="nav-sp-tab">
Expand Down Expand Up @@ -140,37 +107,6 @@ <h6>Info</h6>
<button type="button" class="btn btn-outline-dark setInvalid">*</button>
</div>

<div class="goe-sel">
<h6>GOE</h6>
<div class="btn-toolbar setGOE" role="toolbar" aria-label="GOE Selector">
<div class="btn-group pr-2" role="group" aria-label="pos GOE">
<button type="button" class="btn btn-danger">-5</button>
<button type="button" class="btn btn-outline-danger">-4</button>
<button type="button" class="btn btn-outline-danger">-3</button>
<button type="button" class="btn btn-outline-danger">-2</button>
<button type="button" class="btn btn-outline-danger">-1</button>

</div>
<div class="btn-group" role="group" aria-label="zero GOE">
<button type="button" class="btn btn-dark">0</button>
</div>
<div class="btn-group pl-2" role="group" aria-label="neg GOE">

<button type="button" class="btn btn-outline-success">1</button>
<button type="button" class="btn btn-outline-success">2</button>
<button type="button" class="btn btn-outline-success">3</button>
<button type="button" class="btn btn-outline-success">4</button>
<button type="button" class="btn btn-success">5</button>

</div>

</div>

</div>
<div>
<button type="button" class="btn btn-outline-danger clearEntry">Clear Entry</button>
<button type="button" class="btn btn-outline-success addElement">Add Element</button>
</div>
</div>

<div class="tab-pane fade nav-seq" id="nav-seq" role="tabpanel" aria-labelledby="nav-seq-tab">
Expand All @@ -196,51 +132,42 @@ <h6>Info</h6>
<div class="btn-group">
<button type="button" class="btn btn-outline-info setInvalid">*</button>
</div>
<div class="goe-sel">
<h6>GOE</h6>
<div class="btn-toolbar setGOE" role="toolbar" aria-label="GOE Selector">
<div class="btn-group pr-2" role="group" aria-label="pos GOE">
<button type="button" class="btn btn-danger">-5</button>
<button type="button" class="btn btn-outline-danger">-4</button>
<button type="button" class="btn btn-outline-danger">-3</button>
<button type="button" class="btn btn-outline-danger">-2</button>
<button type="button" class="btn btn-outline-danger">-1</button>

</div>
<div class="btn-group" role="group" aria-label="zero GOE">
<button type="button" class="btn btn-dark">0</button>
</div>
<div class="btn-group pl-2" role="group" aria-label="neg GOE">

<button type="button" class="btn btn-outline-success">1</button>
<button type="button" class="btn btn-outline-success">2</button>
<button type="button" class="btn btn-outline-success">3</button>
<button type="button" class="btn btn-outline-success">4</button>
<button type="button" class="btn btn-success">5</button>
</div>


</div>
<div id="goe-sel">
<h6>GOE</h6>
<div class="btn-toolbar setGOE" role="toolbar" aria-label="GOE Selector">
<div class="btn-group pr-2" role="group" aria-label="pos GOE">
<button type="button" class="btn btn-danger">-5</button>
<button type="button" class="btn btn-outline-danger">-4</button>
<button type="button" class="btn btn-outline-danger">-3</button>
<button type="button" class="btn btn-outline-danger">-2</button>
<button type="button" class="btn btn-outline-danger">-1</button>

</div>
<div class="btn-group" role="group" aria-label="zero GOE">
<button type="button" class="btn btn-dark">0</button>
</div>
<div class="btn-group pl-2" role="group" aria-label="neg GOE">

<button type="button" class="btn btn-outline-success">1</button>
<button type="button" class="btn btn-outline-success">2</button>
<button type="button" class="btn btn-outline-success">3</button>
<button type="button" class="btn btn-outline-success">4</button>
<button type="button" class="btn btn-success">5</button>

</div>

</div>
<div>
<button type="button" class="btn btn-outline-danger clearEntry">Clear Entry</button>
<button type="button" class="btn btn-outline-success addElement">Add Element</button>
</div>

</div>

<div class="tab-pane fade nav-pcs" id="nav-pcs" role="tabpanel" aria-labelledby="nav-pcs-tab">
<h3>Program Component Score</h3>
<h6>Factor</h6>
<h6>Skating Skills</h6>
<h6>Transition</h6>
<h6>Performance</h6>
<h6>Composition</h6>
<h6>Interpretation of the Music</h6>
<div>
<button type="button" class="btn btn-outline-danger clearEntry">Clear Entry</button>
<button type="button" class="btn btn-outline-success addElement">Add Element</button>
</div>


</div>
</div>
<div class="col-md-6">
Expand All @@ -258,23 +185,22 @@ <h6>Interpretation of the Music</h6>
</thead>
<tbody class="displayTable">
<!-- <tr>
<td>1</td>
<td>1A&lt;*</td>
<td>1.1</td>
<td>+4</td>
<td>0.5</td>
<td>1.6</td>
<td><i class="delete far fa-trash-alt"></i></td>
</tr> -->
</tbody>
</table>
<p id="tes-box"><span>Technical Element Score: </span><span id="tes"></span> </p>
<td>1</td>
<td>1A&lt;*</td>
<td>1.1</td>
<td>+4</td>
<td>0.5</td>
<td>1.6</td>
<td><i class="delete far fa-trash-alt"></i></td>
</tr> -->
</tbody>
</table>
<p id="tes-box"><span>Technical Element Score: </span><span id="tes"></span> </p>
</div>
</div>
</div>

<hr />
<p><small>Version 0.2 &centerdot; Nov XX, 2018. Made by <a href="https://github.com/jerry70450/FSCalc">Jerry Chen.</a></small></p>
</div>
<hr />
</div>

</body>
</html>
39 changes: 13 additions & 26 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ window.onload = function(){
$(".addElement").prop("disabled", true);
$(".addJump").prop("disabled", true);
$(".setEdge").prop("disabled", true);
$(".setSpinV").prop("disabled", true);

}

function setName(){
Expand All @@ -55,7 +55,7 @@ function setName(){
}

function setType(node){
$(".setSpinV").prop("disabled", false);

$("#nav-jmp .setLOD button").prop("disabled", false);
$("#nav-seq .setLOD button").prop("disabled", false);
$("#nav-sp .setLOD button").prop("disabled", false);
Expand Down Expand Up @@ -94,27 +94,18 @@ function setType(node){
}
//disable add element button
}
// if(buffer[0].name == null){
// $(".addJump").prop("disabled", true);
// }

//disable v if
if (buffer[buffer.length - 1].cof != true && buffer[buffer.length - 1].fly != true){
$(".setSpinV").prop("disabled", true);
}
//disable set edge unless lz or flip
if(buffer[buffer.length - 1].name == "Lz" || buffer[buffer.length - 1].name == "F"){
$(".setEdge").prop("disabled", false);
}
if(buffer[buffer.length - 1].name == null){
$(".addElement").prop("disabled", true);
if(buffer[0].name == null){
$(".addJump").prop("disabled", true);
}

// for (var i = 0; i < buffer.length; i++){
// if(buffer[i].name == null){
// $(".addElement").prop("disabled", true);
// }
// }
for (var i = 0; i < buffer.length; i++){
if(buffer[i].name == null){
$(".addElement").prop("disabled", true);
}
if(buffer[i].name == "Lz" || buffer[i].name == "F"){
$(".setEdge").prop("disabled", false);
}
}
}


Expand Down Expand Up @@ -209,7 +200,6 @@ function addJump(){
elemScore: 0.0
});
elementDisplay.append("+");
$(".addJump").prop("disabled", true);
}

function renderBufferedElement(){
Expand Down Expand Up @@ -308,7 +298,6 @@ function clearEntry() {
});

renderBufferedElement();

$("#nav-jmp .setLOD button").prop("disabled", false);
$("#nav-seq .setLOD button").prop("disabled", false);
$("#nav-sp .setLOD button").prop("disabled", false);
Expand All @@ -320,8 +309,6 @@ function clearEntry() {
$(".setEdge").prop("disabled", true);
$("#elem-disp").html("Element");
$("#goeDisplay").html("GOE");
$(".setSpinV").prop("disabled", false);


//setType();
}
Expand All @@ -331,7 +318,7 @@ function addElement(){
numElementsInTable++;
appendToTable();
calculateTotalScore();
clearEntry();
//clearEntry();
}

function calculateBuffer(){
Expand Down

0 comments on commit 6b6285a

Please sign in to comment.