En plus des tables currentTasks
et workflowHistory
, je souhaite ajouter deux autres tables. J'ai ajouté deux blocs avec les en-têtes dans workflow-form.get.html.ftl
et deux widgets dans workflow-form.js
. J'ai également ajouté des étiquettes de cartographie dans le fichier .properties
.Tables personnalisées dans la page des détails du workflow
Le problème est que mes tableaux sont toujours affichés en bas de la page et ils ont sans en-tête:
J'ai aussi remarqué que le bloc de la table d'historique (et la table en cours, aussi) a un ID, quelque chose comme:
page_x002e_data-form_x002e_workflow-details_x0023_default-workflowHistory-form-section
Mes tables n'ont pas cet ID. Ils sont simplement placés dans des conteneurs comme ceci:
<div class="form-element-background-color yui-dt">
Une partie de mon workflow-form.get.html.ftl
:
...
<#-- I added this div for additional table -->
<div id="${el}-finishedBpAttachmentsDetails-form-section" class="workflow-attachments-details">
<h3>${msg("header.finishedBpAttachmentsDetails")}</h3>
<div class="form-element-background-color"></div>
</div>
<#-- And also this div -->
<div id="${el}-finishedBpDetails-form-section" class="workflow-details">
<h3>${msg("header.finishedBpDetails")}</h3>
<div class="form-element-background-color"></div>
</div>
<#-- Will be inserted below "Items" in the form after its been loaded through ajax -->
<div id="${el}-currentTasks-form-section" class="current-tasks">
<a name="current-tasks"></a>
<h3>${msg("header.currentTasks")}</h3>
<div class="form-element-background-color"></div>
</div>
<#-- Will be inserted in the bottom of the form after its been loaded through ajax -->
<div id="${el}-workflowHistory-form-section" class="workflow-history">
<h3>${msg("header.history")}</h3>
<div class="form-element-background-color"></div>
</div>
...
Une partie de mon workflow-form.js
:
...
var finishedBpDetailsDS = new YAHOO.util.DataSource(dsRes,
{
responseType: YAHOO.util.DataSource.TYPE_JSARRAY
});
var finishedBpDetailsContainerEl = Dom.get(this.id + "-finishedBpDetails-form-section"),
finishedBpDetailsTasksEl = Selector.query("div", finishedBpDetailsContainerEl, true);
var finishedBpDetailsColumnDefinitions = [
...
];
this.widgets.finishedBpDetailsTasksDataTable = new YAHOO.widget.DataTable(finishedBpDetailsTasksEl,
finishedBpDetailsColumnDefinitions, finishedBpDetailsDS,
{
MSG_EMPTY: this.msg("label.noTasks")
});
var finishedBpAttachmentsDetailsColumnDefinitions = [
...
];
var finishedBpAttachmentsDetailsDS = new YAHOO.util.DataSource(this.dsAttachmentRes,
{
responseType: YAHOO.util.DataSource.TYPE_JSARRAY
});
var finishedBpAttachmentsDetailsContainerEl = Dom.get(this.id + "-finishedBpAttachmentsDetails-form-section"),
finishedBpAttachmentsDetailsTasksEl = Selector.query("div", finishedBpAttachmentsDetailsContainerEl, true);
this.widgets.finishedBpAttachmentsDetailsTasksDataTable = new YAHOO.widget.DataTable(finishedBpAttachmentsDetailsTasksEl,
finishedBpAttachmentsDetailsColumnDefinitions, finishedBpAttachmentsDetailsDS,
{
MSG_EMPTY: this.msg("label.noTasks")
});
Selector.query(".form-fields", this.id, true).appendChild(finishedBpAttachmentsDetailsTasksEl);
Selector.query(".form-fields", this.id, true).appendChild(finishedBpDetailsTasksEl);
...
Comment puis-je régler la position et les en-têtes pour mon tables? .. Par exemple, je voudrais afficher mes tables après le bloc avec des informations générales.
Est-il possible? ..
Je serais très reconnaissant pour l'information. Merci à tous.
Excellent! Merci beaucoup pour votre réponse! .. –
Cela fonctionne également - 'Selector.query (". Yui-us ", this.id, true) .appendChild (...);' –