diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/webapp/resources/js/proxyMethods.js	Thu Apr 23 15:46:01 2015 +0200
@@ -0,0 +1,45 @@
+
+
+function setAction(action, formName){
+	var theForm = document.forms[formName];
+    var input = document.createElement('input');
+    input.type = 'hidden';
+    input.name = 'action';
+    input.value = action;
+    theForm.appendChild(input);    
+}
+
+
+function setAction0(action, formName, varName, varValue){
+	
+	var theForm = document.forms[formName];
+    var input = document.createElement('input');
+    input.type = 'hidden';
+    input.name = varName;
+    input.value = varValue;
+    theForm.appendChild(input);  
+	
+	setAction(action, formName);
+}
+
+function deleteBranch(action, formName, branchId){
+	
+	var theForm = document.forms[formName];
+    var input = document.createElement('input');
+    input.type = 'hidden';
+    input.name = 'branchId';
+    input.value = branchId;
+    theForm.appendChild(input);  
+	
+	setAction(action, formName);
+}
+
+function addContributor(action, formName, userId){
+	var theForm = document.forms[formName];
+    var input = document.createElement('input');
+    input.type = 'hidden';
+    input.name = 'userId';
+    input.value = userId;
+    theForm.appendChild(input);  
+	setAction(action, formName);
+}
\ No newline at end of file