1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-07-31 02:10:37 +02:00

Blocks Plugin: general js refactoring

This commit is contained in:
Sergey Romanenko
2012-11-12 15:44:37 +02:00
parent 042075c89a
commit 45168998eb

View File

@@ -1,5 +1,18 @@
function embedCodes(name) {
$('#shortcode').html('{block get="'+name+'"}');
$('#phpcode').html('<?php echo Block::get("'+name+'"); ?>');
$('#embedCodes').modal();
}
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();
});