1
0
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:
Awilum
2012-11-17 19:25:24 +02:00
parent 1bad311aa5
commit 02f9f7f01a
3 changed files with 54 additions and 8 deletions

View 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();
});