diff --git a/plugins/box/blocks/js/blocks.js b/plugins/box/blocks/js/blocks.js index a85cf37..cbf64d0 100644 --- a/plugins/box/blocks/js/blocks.js +++ b/plugins/box/blocks/js/blocks.js @@ -1,5 +1,18 @@ -function embedCodes(name) { - $('#shortcode').html('{block get="'+name+'"}'); - $('#phpcode').html('<?php echo Block::get("'+name+'"); ?>'); - $('#embedCodes').modal(); -} \ No newline at end of file +if (typeof $.monstra == 'undefined') $.monstra = {}; + +$.monstra.blocks = { + + init: function() { }, + + embedCodes: function(name) { + $('#shortcode').html('{block get="'+name+'"}'); + $('#phpcode').html('<?php echo Block::get("'+name+'"); ?>'); + $('#embedCodes').modal(); + } + +}; + + +$(document).ready(function(){ + $.monstra.blocks.init(); +}); \ No newline at end of file