23 $this->ui_factory = $a_ui_factory;
24 $this->ui_renderer = $a_ui_renderer;
28 $document = $this->
repository->getMountInstructionsByLanguage($this->lng->getUserLanguage());
29 $title = $document->getTitle();
31 $title = $this->lng->txt(
'webfolder_instructions_titletext');
34 $content_div =
'<div id="' . self::MOUNT_INSTRUCTIONS_CONTENT_ID .
'"></div>';
35 $page = $this->ui_factory->modal()->lightboxTextPage($content_div, $title);
36 $this->
modal = $this->ui_factory->modal()->lightbox($page);
44 return $this->ui_renderer->render($this->
modal);
52 return $this->
modal->getShowSignal()->getId();
66 if (!self::$modal_already_rendered) {
67 if (self::$instance == null) {
72 self::$modal_already_rendered =
true;
73 $js_function =
'<script>function triggerWebDAVModal(api_url){ $.ajax(api_url).done(function(data){ $(document).trigger("' . self::$instance->
getModalShowSignalId() .
'", "{}"); $("#' . self::MOUNT_INSTRUCTIONS_CONTENT_ID .
'").html(data);}) }</script>';
75 $webdav_modal_html = self::$instance->getRenderedModal() . $js_function;
77 $tpl = $DIC->ui()->mainTemplate();
78 $tpl->setVariable(
'WEBDAV_MODAL', $webdav_modal_html);
static $modal_already_rendered
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static maybeRenderWebDAVModalInGlobalTpl()
This is kind of a singleton pattern.
Class ChatMainBarProvider .
const MOUNT_INSTRUCTIONS_CONTENT_ID
ID of the -element, which contains the mount instructions.
__construct(ILIAS\UI\Factory $a_ui_factory, ILIAS\UI\Renderer $a_ui_renderer, ilLanguage $a_lng)
ilWebDAVMountInstructionsModalGUI constructor.
Class ilWebDAVMountInstructionsModalGUI.
modal()
This second example shows a scenario in which the Close Button is used in an overlay as indicated in ...