1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-01 10:50:37 +02:00

Menu Plugin: general js refactoring

This commit is contained in:
Awilum
2012-11-12 22:34:41 +02:00
parent 506d2ea1e2
commit d3e6ce2104
4 changed files with 30 additions and 24 deletions

View File

@@ -61,7 +61,7 @@
<li><?php echo (!empty($page['parent'])) ? Html::nbsp().Html::arrow('right').Html::nbsp(2) : '' ; ?><a href="javascript:;" onclick="selectPage('<?php echo (empty($page['parent'])) ? $page['slug'] : $page['parent'].'/'.$page['slug'] ; ?>', '<?php echo $page['title']; ?>');"><?php echo $page['title']; ?></a></li>
<?php } ?>
<?php if (count($components_list) > 0) foreach($components_list as $component) { ?>
<li><a href="javascript:;" onclick="selectPage('<?php echo Text::lowercase($component); ?>', '<?php echo __($component); ?>');"><?php echo __($component); ?></a></li>
<li><a href="javascript:;" onclick="$.monstra.menu.selectPage('<?php echo Text::lowercase($component); ?>', '<?php echo __($component); ?>');"><?php echo __($component); ?></a></li>
<?php } ?>
</ul>
</p>
@@ -78,7 +78,7 @@
<p>
<ul class="unstyled">
<?php if (count($categories) > 0) foreach($categories as $category) { ?>
<li><a href="javascript:;" onclick="selectCategory('<?php echo $category; ?>');"><?php echo $category; ?></a></li>
<li><a href="javascript:;" onclick="$.monstra.menu.selectCategory('<?php echo $category; ?>');"><?php echo $category; ?></a></li>
<?php } ?>
</ul>
</p>