7. View State
Extending the Message Widget
<?
register event @ToggleCollapseState
@Collapsed := @Collapsed ? false
?>
<div class="message <?attr @Style ?> <?attr if @Collapsed then "collapsed" else "expanded" ?>" onclick="<?attr @ToggleCollapseState ?>">
<span class="box ellipses">
<span class="glyphicon glyphicon-comment"></span>
...
</span>
<span class="box text">
<span class="glyphicon glyphicon-heart-empty"></span>
<?= @Text ?>
</span>
</div>Creating the View State Field
Creating the Toggle Event
Updating the Less Style
Last updated
Was this helpful?