Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bfcee26

Browse files
committed
clear compilation for async platforms
1 parent cbfe118 commit bfcee26

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

‎Ajax/JsUtils.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,18 @@ public function compile(&$view = NULL, $view_var = 'script_foot', $script_tags =
358358
*
359359
* @return void
360360
*/
361-
public function clear_compile() {
362-
$this->jquery_code_for_compile = $this->jquery_code_for_compile_at_last = [];
363-
}
361+
public function clear_compile() {
362+
$this->jquery_code_for_compile = $this->jquery_code_for_compile_at_last = [];
363+
if($this->_bootstrap!==null){
364+
$this->_bootstrap->clearComponents();
365+
}
366+
if($this->_semantic!==null){
367+
$this->_semantic->clearComponents();
368+
}
369+
if($this->_ui!==null){
370+
$this->_ui->clearComponents();
371+
}
372+
}
364373

365374
public function getScript($offset = 0) {
366375
$code = \array_merge($this->jquery_code_for_compile, $this->jquery_code_for_compile_at_last);

‎Ajax/common/BaseGui.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,8 @@ public function matchHtmlComponents($callback) {
9393
public function getHtmlComponent($identifier){
9494
return $this->htmlComponents[$identifier]??'';
9595
}
96+
public function clearComponents(){
97+
$this->components=[];
98+
$this->htmlComponents=[];
99+
}
96100
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /