[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";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 829 B

After

Width:  |  Height:  |  Size: 832 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 791 B

After

Width:  |  Height:  |  Size: 774 B

Before After
Before After

View file

@ -45,6 +45,7 @@
<input type="hidden" name="podFormat"/>
<input type="hidden" name="askAction"/>
<input type="hidden" name="queryData"/>
<input type="hidden" name="customParams"/>
</form>
</div>