mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-09 15:46:24 +02:00
Snippets Plugin: view embed code feature added.
This commit is contained in:
18
plugins/box/snippets/js/snippets.js
Normal file
18
plugins/box/snippets/js/snippets.js
Normal file
@ -0,0 +1,18 @@
|
||||
if (typeof $.monstra == 'undefined') $.monstra = {};
|
||||
|
||||
$.monstra.snippets = {
|
||||
|
||||
init: function() { },
|
||||
|
||||
showEmbedCodes: function(name) {
|
||||
$('#shortcode').html('{snippet get="'+name+'"}');
|
||||
$('#phpcode').html('<?php echo Snippet::get("'+name+'"); ?>');
|
||||
$('#embedCodes').modal();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
$.monstra.snippets.init();
|
||||
});
|
Reference in New Issue
Block a user