view src/main/webapp/resources/js/proxyMethods.js @ 54:a00efd5d9e77

new: adding delete saved table function
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 04 Feb 2016 11:30:46 +0100
parents ba9515f22897
children 90d5e86c157d
line wrap: on
line source


function setAction(action, formName){
	$("#loading").show();
  	
	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 deleteTopic(action, formName, topicId){
	
	var theForm = document.forms[formName];
    var input = document.createElement('input');
    input.type = 'hidden';
    input.name = 'topicId';
    input.value = topicId;
    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);
}