view src/main/webapp/resources/js/proxyMethods.js @ 35:89a5ca7d44f7

new: rename branch to task, add fields in task table, add scroll bar
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 19 Nov 2015 17:14:06 +0100
parents 3e62083dbcbf
children 37840afb7b80
line wrap: on
line source



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);
}