Chris@14: dialogOptions['modal'] = FALSE; Chris@14: $this->dialogOptions['autoResize'] = FALSE; Chris@14: $this->dialogOptions['resizable'] = 'w'; Chris@14: $this->dialogOptions['draggable'] = FALSE; Chris@14: $this->dialogOptions['drupalAutoButtons'] = FALSE; Chris@17: $this->dialogOptions['drupalOffCanvasPosition'] = $position; Chris@14: // @todo drupal.ajax.js does not respect drupalAutoButtons properly, pass an Chris@14: // empty set of buttons until https://www.drupal.org/node/2793343 is in. Chris@14: $this->dialogOptions['buttons'] = []; Chris@14: if (empty($dialog_options['dialogClass'])) { Chris@17: $this->dialogOptions['dialogClass'] = "ui-dialog-off-canvas ui-dialog-position-$position"; Chris@14: } Chris@14: // If no width option is provided then use the default width to avoid the Chris@14: // dialog staying at the width of the previous instance when opened Chris@14: // more than once, with different widths, on a single page. Chris@14: if (!isset($this->dialogOptions['width'])) { Chris@14: $this->dialogOptions['width'] = static::DEFAULT_DIALOG_WIDTH; Chris@14: } Chris@14: } Chris@14: Chris@14: /** Chris@14: * {@inheritdoc} Chris@14: */ Chris@14: public function render() { Chris@14: $build = parent::render(); Chris@14: $build['effect'] = 'fade'; Chris@14: $build['speed'] = 1000; Chris@14: return $build; Chris@14: } Chris@14: Chris@14: }