Skip to content

Commit

Permalink
Dev: fixed issues with TextDisplayWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Mar 15, 2018
1 parent 086883f commit 5213972
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion application/core/LS_Twig_Extension.php
Expand Up @@ -312,11 +312,12 @@ public static function getTextDisplayWidget($sInString, $name) {
templatereplace(flattenText($sInString));
$fullInString = LimeExpressionManager::GetLastPrettyPrintExpression();

return $this->widget('ext.admin.TextDisplaySwitch.TextDisplaySwitch', array(
$widget = App()->getController()->widget('ext.admin.TextDisplaySwitch.TextDisplaySwitch', array(
'widgetsJsName' => $name,
'textToDisplay' => $fullInString,
'returnHtml' => true
));
return $widget->run();
}


Expand Down
Expand Up @@ -13,7 +13,12 @@ public function run() {

$this->registerScripts();
$outView = (strlen($this->textToDisplay) > $this->abbreviationSize) ? 'default' : 'short';
$this->render($outView, null, $returnHtml);

if( $this->returnHtml ){
return $this->render($outView, null, true);
}

$this->render($outView);

}

Expand Down

0 comments on commit 5213972

Please sign in to comment.