Skip to content

Commit

Permalink
refs #3813 clean solution to make popovers work in widgetize mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Apr 12, 2013
1 parent 30416f5 commit ae2c2fd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
3 changes: 3 additions & 0 deletions plugins/CoreHome/templates/broadcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ var broadcast = {
* Update the part after the second hash
*/
propagateNewPopoverParameter: function (handlerName, value) {
// init broadcast if not already done (it is required to make popovers work in widgetize mode)
broadcast.init();

var hash = broadcast.getHashFromUrl(window.location.href);

var popover = '';
Expand Down
9 changes: 1 addition & 8 deletions plugins/Widgetize/templates/empty.tpl
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
{$content}
<script type="text/javascript">
{literal}
$(document).ready(function () {
broadcast.init();
});
{/literal}
</script>
{$content}
8 changes: 0 additions & 8 deletions plugins/Widgetize/templates/iframe.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,5 @@
{$content}
</div>

<script type="text/javascript">
{literal}
$(document).ready(function () {
broadcast.init();
});
{/literal}
</script>
</body>
</html>

0 comments on commit ae2c2fd

Please sign in to comment.