jQuery menu
This commit is contained in:
parent
0599c11184
commit
f215b4fe43
5 changed files with 10 additions and 2 deletions
|
|
@ -62,7 +62,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
|
||||
$view->app = $this->getApplication()->getOption('app');
|
||||
|
||||
|
||||
// Add jQuery :)
|
||||
$view->headScript()->appendFile('http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');
|
||||
|
||||
Zend_Locale::setDefault('sv_SE');
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
<?=$this->headMeta() . "\n" /* Newline for pretty source :) */ ?>
|
||||
<link rel="stylesheet" type="text/css" href="<?=$this->baseUrl()?>/css/reset.css" media="screen" />
|
||||
<link rel="stylesheet" type="text/css" href="<?=$this->baseUrl()?>/css/default.css" media="screen" />
|
||||
<?=$this->headScript() ?>
|
||||
<script type="text/javascript" src="http://localhost/fiktivkod/js/menu.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wrapper" class="small">
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ class Fiktiv_View_Helper_AuthLink extends Zend_View_Helper_Abstract
|
|||
$auth = Zend_Auth::getInstance();
|
||||
|
||||
$options = array(
|
||||
'route' => 'default',
|
||||
'module' => 'default',
|
||||
'controller' => 'auth'
|
||||
);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class Fiktiv_View_Helper_RenderMenu extends Zend_View_Helper_Abstract
|
|||
$navigation = $this->view->navigation();
|
||||
$container = $navigation->getContainer();
|
||||
$active = $navigation->menu()->findActive($navigation->getContainer());
|
||||
|
||||
|
||||
if ($active && $active['page']->getParent()->hasPages()) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
3
public/js/menu.js
Normal file
3
public/js/menu.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
$(document).ready(function(){
|
||||
$(".subnav").hide().slideDown(500);
|
||||
});
|
||||
Reference in a new issue