- π§πͺBelgium BramDriesen Belgium π§πͺ
We could look into implementing this with a recent core feature. Not that much logic needed for this.
Hi, I was searching about opening poll module results into a dialog but I didn't find anything about...Can you help me please?
And I was trying to opening by my own, but when I try to render the button via jQuery this always open the "vote" form and not the "result" form.
This is the code:
var form_action = jQuery("form").attr("action");
var ver_resultados_btn_div = '<div class="form-group" id="ver_resultados_btn_div"></div>';
var ver_resultados_btn = '<a id="ver_resultados_btn" class="btn btn-info btn-block use-ajax" href="' + form_action + '">Ver Resultados</a>';
jQuery(ver_resultados_btn_div).appendTo('[data-drupal-selector="edit-actions"]');
jQuery(ver_resultados_btn).appendTo('#ver_resultados_btn_div');
if (jQuery('#encuesta_vigente').has('[data-drupal-selector]')) {
jQuery('#ver_resultados_btn').attr({
'data-drupal-selector': 'edit-result',
'data-dialog-type': 'dialog',
'data-dialog-renderer': 'off_canvas',
'name': 'op',
});
} else {
jQuery('#ver_resultados_btn').addClass('webform-dialog-size');
}
And this is the result:
The first button is the default poll view results button, and the second one is my custom button to open the results into a dialog.
Postponed: needs info
1.0
Documentation
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
We could look into implementing this with a recent core feature. Not that much logic needed for this.