[gen] Added the posssibility to create a custom widget that displays an icon for generating a doc from a pod field, but with an additional param allowing to customize the pod context.

This commit is contained in:
Gaetan Delannay 2013-06-20 17:35:52 +02:00
parent e83f0f3815
commit 086f93e845
7 changed files with 16 additions and 3 deletions

View file

@ -460,13 +460,16 @@ function toggleCookie(cookieId) {
}
// Function that allows to generate a document from a pod template.
function generatePodDocument(contextUid, fieldName, podFormat, queryData) {
function generatePodDocument(contextUid, fieldName, podFormat, queryData,
customParams) {
var theForm = document.getElementById("podTemplateForm");
theForm.objectUid.value = contextUid;
theForm.fieldName.value = fieldName;
theForm.podFormat.value = podFormat;
theForm.askAction.value = "False";
theForm.queryData.value = queryData;
if (customParams) { theForm.customParams.value = customParams; }
else { theForm.customParams.value = ''; }
var askActionWidget = document.getElementById(contextUid + '_' + fieldName + '_cb');
if (askActionWidget && askActionWidget.checked) {
theForm.askAction.value = "True";