Skip to content

Commit

Permalink
Fixed issue #17148: Publication & access control settings - Start Dat…
Browse files Browse the repository at this point in the history
…e / Expiry Date Picker inaccessible in resized browser window (#1984)

Co-authored-by: encuestabizdevgit <devgit@encuesta.biz>
  • Loading branch information
gabrieljenik and encuestabizdevgit committed Jul 29, 2021
1 parent b163c25 commit 90c2aa5
Show file tree
Hide file tree
Showing 6 changed files with 512 additions and 477 deletions.
Expand Up @@ -125,6 +125,11 @@ public function registerClientScript()

$this->getApi()->registerPlugin('datetimepicker', $selector, $this->pluginOptions, LSYii_ClientScript::POS_POSTSCRIPT);

$showEventScript = $this->getShowEventScript($selector);
$cs->registerScript("datetimepicker_show_handler_" . $this->getId(true), $showEventScript, CClientScript::POS_BEGIN);
$hideEventScript = $this->getHideEventScript($selector);
$cs->registerScript("datetimepicker_hide_handler_" . $this->getId(true), $hideEventScript, CClientScript::POS_BEGIN);

if($this->events)
{
$this->getApi()->registerEvents($selector, $this->events);
Expand All @@ -140,5 +145,23 @@ protected function getEscapedId()
$id = str_replace('[', '\\\\[',$this->getId());
$id = str_replace(']', '\\\\]',$id);
return $id;
}
}

protected function getShowEventScript($selector)
{
$script = '$(document).on("dp.show", "' . $selector . '", function () {
$("#pjax-content").addClass("overflow-visible");
$("#in_survey_common").addClass("overflow-visible");
});';
return $script;
}

protected function getHideEventScript($selector)
{
$script = '$(document).on("dp.hide", "' . $selector . '", function () {
$("#pjax-content").removeClass("overflow-visible");
$("#in_survey_common").removeClass("overflow-visible");
});';
return $script;
}
}

0 comments on commit 90c2aa5

Please sign in to comment.