Skip to content

Commit

Permalink
Fix NPE, and make hiding the wait message a bit more robust.
Browse files Browse the repository at this point in the history
  • Loading branch information
otrok7 committed Jan 21, 2024
1 parent 9f30132 commit 00110e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crouton.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public function tabbedUi($atts, $content = null)
if (isset($_GET['meeting-id'])) {
return do_shortcode($this->getDefaultMeetingDetailsPageContents());
}
return $this->waitMsg.sprintf('%s<div id="bmlt-tabs" class="bmlt-tabs hide">%s</div><script>document.getElementById("please-wait").style.display = "none";</script>', $this->sharedRender(), $this->renderTable($atts));
return $this->waitMsg.sprintf('%s<div id="bmlt-tabs" class="bmlt-tabs hide">%s</div>', $this->sharedRender(), $this->renderTable($atts));
}
public function bmltHandlebar($atts, $template = null)
{
Expand Down Expand Up @@ -374,7 +374,7 @@ private function getInitializeCroutonBlock($renderCmd, $config, $mapConfig)

private function renderTable($atts)
{
return $this->getInitializeCroutonBlock("crouton.render();", ...$this->getCroutonJsConfig($atts));
return $this->getInitializeCroutonBlock("crouton.render();document.getElementById('please-wait').style.display='none';", ...$this->getCroutonJsConfig($atts));
}

private function renderMap($atts, $croutonMap = true)
Expand Down
4 changes: 2 additions & 2 deletions croutonjs/meetingMap/js/osmDelegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,10 @@ function addControl(div,pos,cb) {
});
}
function modalOn() {
gMainMap.dragging.disable()
if (gMainMap) gMainMap.dragging.disable()
}
function modalOff() {
gMainMap.dragging.enable()
if (gMainMap) gMainMap.dragging.enable()
}
function returnTrue() {return true;}
this.createMap = createMap;
Expand Down

0 comments on commit 00110e0

Please sign in to comment.