mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-04 04:07:59 +02:00
Blocks Plugin: general js refactoring
This commit is contained in:
@@ -1,5 +1,18 @@
|
|||||||
function embedCodes(name) {
|
if (typeof $.monstra == 'undefined') $.monstra = {};
|
||||||
$('#shortcode').html('{block get="'+name+'"}');
|
|
||||||
$('#phpcode').html('<?php echo Block::get("'+name+'"); ?>');
|
$.monstra.blocks = {
|
||||||
$('#embedCodes').modal();
|
|
||||||
}
|
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