1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-05 20:57:49 +02:00

Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Awilum
2012-11-12 21:25:40 +02:00
2 changed files with 19 additions and 6 deletions

View File

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

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' => '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.embedCodes("'.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(),