mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-31 18:30:20 +02:00
Blocks Plugin: general js refactoring
This commit is contained in:
@@ -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();
|
||||
});
|
Reference in New Issue
Block a user