Mercurial > hg > LGServices
comparison src/main/webapp/resources/js/proxyMethods.js @ 0:3e62083dbcbf
First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
author | "jurzua <jurzua@mpiwg-berlin.mpg.de>" |
---|---|
date | Thu, 23 Apr 2015 15:46:01 +0200 |
parents | |
children | 37840afb7b80 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3e62083dbcbf |
---|---|
1 | |
2 | |
3 function setAction(action, formName){ | |
4 var theForm = document.forms[formName]; | |
5 var input = document.createElement('input'); | |
6 input.type = 'hidden'; | |
7 input.name = 'action'; | |
8 input.value = action; | |
9 theForm.appendChild(input); | |
10 } | |
11 | |
12 | |
13 function setAction0(action, formName, varName, varValue){ | |
14 | |
15 var theForm = document.forms[formName]; | |
16 var input = document.createElement('input'); | |
17 input.type = 'hidden'; | |
18 input.name = varName; | |
19 input.value = varValue; | |
20 theForm.appendChild(input); | |
21 | |
22 setAction(action, formName); | |
23 } | |
24 | |
25 function deleteBranch(action, formName, branchId){ | |
26 | |
27 var theForm = document.forms[formName]; | |
28 var input = document.createElement('input'); | |
29 input.type = 'hidden'; | |
30 input.name = 'branchId'; | |
31 input.value = branchId; | |
32 theForm.appendChild(input); | |
33 | |
34 setAction(action, formName); | |
35 } | |
36 | |
37 function addContributor(action, formName, userId){ | |
38 var theForm = document.forms[formName]; | |
39 var input = document.createElement('input'); | |
40 input.type = 'hidden'; | |
41 input.name = 'userId'; | |
42 input.value = userId; | |
43 theForm.appendChild(input); | |
44 setAction(action, formName); | |
45 } |