Jump to content

Setwidgetbutton Full_Screen


Blesta Addons

Recommended Posts

It can be used for any widget in the admin interface, assuming the widget is within a "<section>", which it should be by default.

$this->Widget->clear();
$this->Widget->setWidgetButton("full_screen");
$this->Widget->create("My Widget", array(), $this->Html->ifSet($render_section, null));
Link to comment
Share on other sites

Ah, yes, there is one more thing you will need to do since that UI event is not bound by default.

 

The widget should have an ID set (e.g. "<section id='my_widget'>") then you add the JS to bind the GUI events, e.g.:

<?php
$this->Widget->clear();
$this->Widget->setWidgetButton("full_screen");
$this->Widget->create("My Widget", array('id' => "my_widget"), $this->Html->ifSet($render_section, null));
...
$this->Widget->end();
?>
<script>
$(document).ready(function() {
    $("#my_widget").blestaBindGuiEvents();
});
</script>

Then the full screen button should work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...