Skip to content
Snippets Groups Projects

imp: add open off canvas form ajax command

Merged simon requested to merge imp-add-open-off-canvas-form-ajax-command into master
Compare and
3 files
+ 60
0
Preferences
File browser
Compare changes
js/druplan.js 0 → 100644
+ 22
0
/**
* @file
* Fullcalendar View plugin JavaScript file.
*/
// Jquery wrapper for drupal to avoid conflicts between libraries.
(function ($, Drupal) {
Drupal.AjaxCommands.prototype.openOffCanvasForm = function (ajax, response, status) {
let modal_settings = {
// url: viewSettings['response.url'] + "?start=" + slotDate + "&destination=" + window.location.pathname,
url: response.url,
dialogType: 'dialog',
dialogRenderer: 'off_canvas',
dialog: {
width: 'fit-content', classes: {'ui-dialog': 'druplan-dialog druplan-dialog-off-canvas'}
},
};
Drupal.ajax(modal_settings).execute();
}
})(jQuery, Drupal);