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:
Awilum
2012-11-12 22:26:08 +02:00
parent 566694ad30
commit 506d2ea1e2
2 changed files with 2 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ $.monstra.blocks = {
init: function() { },
embedCodes: function(name) {
showEmbedCodes: function(name) {
$('#shortcode').html('{block get="'+name+'"}');
$('#phpcode').html('<?php echo Block::get("'+name+'"); ?>');
$('#embedCodes').modal();

View File

@@ -29,7 +29,7 @@
<?php echo Html::anchor(__('Edit', 'blocks'), 'index.php?id=blocks&action=edit_block&filename='.basename($block, '.block.html'), array('class' => 'btn btn-actions')); ?>
<a class="btn dropdown-toggle btn-actions" data-toggle="dropdown" href="#" style="font-family:arial;"><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><?php echo Html::anchor(__('View Embed Code', 'blocks'), 'javascript:;', array('title' => __('View Embed Code', 'blocks'), 'onclick' => '$.monstra.blocks.embedCodes("'.basename($block, '.block.html').'");')); ?></li>
<li><?php echo Html::anchor(__('View Embed Code', 'blocks'), 'javascript:;', array('title' => __('View Embed Code', 'blocks'), 'onclick' => '$.monstra.blocks.showEmbedCodes("'.basename($block, '.block.html').'");')); ?></li>
</ul>
<?php echo Html::anchor(__('Delete', 'blocks'),
'index.php?id=blocks&action=delete_block&filename='.basename($block, '.block.html').'&token='.Security::token(),