MCPcopy Create free account
hub / github.com/Milkyroad/SCiPNET / clearanceEditListClick

Function clearanceEditListClick

public/src/js/edit.js:27–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25 clearanceEditListClick()
26
27 function clearanceEditListClick() {
28 $d.find("#clearanceEditList li").unbind('click').bind('click', function() {
29 $(this).parent("#clearanceEditList").find("li").unbind("click") //disable all clicking
30 $(this).parent("#clearanceEditList").attr("id", "") //remove the id so it won't cause error
31 $(this).parent("ul").attr("class", "") //fade the option
32 $(this).addClass("disabledList") //fade the option
33 if ($(this).index() > 5 || $(this).index() < 0) {
34 appendError("ERROR OCCURED, PLEASE TRY AGAIN")
35 appendNormal(clearanceText)
36 clearanceEditListClick()
37 } else {
38 clearance = $(this).index()
39 if (clearance == 5) {
40 errorEffect()
41 } else {
42 keyphrase = ""
43 $d.append(`Foundation security clearance selected: <span class="highlight">Level ${clearance}</span>`)
44 updateUsersInfo()
45 }
46 }
47 });
48 }
49 } else if (editState == 3) {
50 cmdHide()
51 var classText = `Please click and select your personnel classifications<br><ul id='personnelEditList' class='listClass'><li>Class A (Deemed essential to Foundation strategic operations)</li><li>Class B (Deemed essential to local Foundation operations)</li><li>Class C (Personnel with direct access to most anomalies not deemed strictly hostile or dangerous)</li><li>Class D (expendable personnel used to handle extremely hazardous anomalies)</li><li>Class E (Provisional classification applied to field agents and containment personnel)</li></ul><hr><small style='opacity:0.7'>Classifications are assigned to personnel based on their proximity to potentially dangerous anomalous objects, entities, or phenomena. </small>`

Callers 1

editFunction · 0.85

Calls 3

appendErrorFunction · 0.90
appendNormalFunction · 0.90
$Function · 0.50

Tested by

no test coverage detected