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

Function editProcess

public/src/js/edit.js:76–103  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

74 }
75}
76export const editProcess = (val) => {
77 if (val.length < 501) {
78 if (editState != 2 && val.length > 100) {
79 appendError("INPUT MUST NOT EXCEED 100 CHARACTERS, PLEASE TRY AGAIN.")
80 } else {
81 cmdHide()
82 if (editState == 1) {
83 displayName = val
84 UserTag = `${displayName}#${Math.ceil(Math.random()*10000)}`
85 checkUsernameAva("edit", function() {
86 updateUsersInfo()
87 })
88 }
89 if (editState == 2) {
90 keyphrase = val
91 updateUsersInfo()
92 } else if (editState == 4) {
93 title = val
94 updateUsersInfo()
95 } else if (editState == 5) {
96 site = val
97 updateUsersInfo()
98 }
99 }
100 } else {
101 appendError("INPUT TOO LONG, PLEASE TRY AGAIN.")
102 }
103}
104//setup listener for the personnel edit menu
105function personnellistEditClick() {
106 $d.find("#personnelEditList li").unbind('click').bind('click', function() {

Callers 1

script.jsFile · 0.85

Calls 2

appendErrorFunction · 0.90
cmdHideFunction · 0.90

Tested by

no test coverage detected