diff --git a/www/contact.php b/www/contact.php index 3f554ec91e3ec4c8f7111474cd23f24d37d37e1c..f01c8f155ec506e83da935de055b4582f647ee63 100644 --- a/www/contact.php +++ b/www/contact.php @@ -1,4 +1,6 @@ <?php +$name = 'contact'; +$javascript = array('jquery','animated-menu'); include('include/header.php'); diff --git a/www/download.php b/www/download.php index f8e0e69620972077c0ce78bef7f67f130609d21b..074b8503064a41bc7c82cab35c487cd2fc9b65f2 100644 --- a/www/download.php +++ b/www/download.php @@ -1,4 +1,6 @@ <?php +$name = 'download'; +$javascript = array('jquery','animated-menu'); include_once('utils.php'); diff --git a/www/features.php b/www/features.php index 70dd4f6c80792c4023cd46c9ae5f1db6d0ac452d..0b00373b6823c6bcb724272f56ab9ff551ff611d 100644 --- a/www/features.php +++ b/www/features.php @@ -1,5 +1,6 @@ <?php - +$name = 'feature'; +$javascript = array('jquery','animated-menu'); include('include/header.php'); ?> @@ -15,12 +16,14 @@ include('include/header.php'); <p class="title alignLeft fntBleu"> Great User Experience </p> + <p> SFLphone now fully supports <a href="http://www.pulseaudio.org">PulseAudio</a> sound server so you could experience the great possibilities it offers (sound mixing, per application volume control, ...). <br/> The GTK+ graphical user interface provides you an intuitiv and easy way to phone, and, thanks to the integration of the GNOME desktop notification, you will never miss a call. <br/> + </p> </td> </tr> <tr> diff --git a/www/include/header.php b/www/include/header.php index 6aed0fca25041deb00010b1a623793de30fb569b..ba0adad5b4b77d229d11b68d14f151008a481e07 100644 --- a/www/include/header.php +++ b/www/include/header.php @@ -8,10 +8,17 @@ <link rel="stylesheet" type="text/css" href="css/s3Slider.css" media="screen"/> <!-- jquery --> - <script type="text/javascript" src="js/jquery.js"></script> - <script type="text/javascript" src="js/s3Slider.js"></script> - <script type="text/javascript" src="js/script.js"> </script> - <script type="text/javascript" src="js/animated-menu.js"></script> + <?php + //Inlucde javascript + $javascript = array_merge(array(),(array)$javascript); + foreach($javascript as $script){ + echo "<script type='text/javascript' src='js/$script.js'></script>"; + } + //<script type="text/javascript" src="js/jquery.js"></script> + //<script type="text/javascript" src="js/s3Slider.js"></script> + //<script type="text/javascript" src="js/script.js"> </script> + //<script type="text/javascript" src="js/animated-menu.js"></script> + ?> </head> <body> @@ -37,15 +44,14 @@ <div id="navigation"> <div class="dynamic-nav" style="background: #CDCDCD;" > </div> <ul> - <li><a href='contact.php'><span>Contact</span></a></li> - <li><a href='http://dev.savoirfairelinux.net/sflphone/'><span>Wiki</span></a></li> - <li class="active"><a href='download.php'><span>Download</span></a></li> - <li><a href='features.php'><span>Features</span></a></li> - <li><a href='index.php'><span>Home</span></a></li> + <li <?php echo ($name == 'contact')?'class="active"':"" ?>><a href='contact.php'><span>Contact</span></a></li> + <li <?php echo ($name == 'wiki')?'class="active"':"" ?>><a href='http://dev.savoirfairelinux.net/sflphone/'><span>Wiki</span></a></li> + <li <?php echo ($name == 'download')?'class="active"':"" ?>><a href='download.php'><span>Download</span></a></li> + <li <?php echo ($name == 'feature')?'class="active"':"" ?>><a href='features.php'><span>Features</span></a></li> + <li <?php echo ($name == 'home')?'class="active"':"" ?>><a href='index.php'><span>Home</span></a></li> </ul> </div> </td> </tr> </tbody> </table> - diff --git a/www/index.php b/www/index.php index a944cd3d8e490200800e3c77775ac1ba8e39df0f..765f2c356c8525e5b1f68bcfeef6a105b054cb43 100644 --- a/www/index.php +++ b/www/index.php @@ -1,5 +1,6 @@ <?php - +$name = 'home'; +$javascript = array('jquery','s3Slider','script','animated-menu'); include('include/header.php'); ?> diff --git a/www/js/animated-menu.js b/www/js/animated-menu.js index f826beaff9ee289d7df46f4687bd41bd9a17b2b3..714d12aa39bf847e2b544b0bfb4691410f339e83 100644 --- a/www/js/animated-menu.js +++ b/www/js/animated-menu.js @@ -11,10 +11,11 @@ $.fn.animatedMenu = function(){ var activePos; $(element).children('li.active:first').each( function(){ - activePos = { left: this.offsetLeft, top: this.offsetTop, width: this.offsetWidth, height: this.offsetHeight} + this.opacity = 0; + activePos = { left: this.offsetLeft, top: this.offsetTop, width: this.offsetWidth, height: this.offsetHeight, opacity: 0} } ); - $('div.dynamic-nav').hide(0,function(){$(this).animate(activePos,0);}); + $('div.dynamic-nav').hide(1,function(){$(this).animate(activePos,1);}); $(element).children('li').hover( function(){ @@ -22,10 +23,11 @@ $.fn.animatedMenu = function(){ left: this.offsetLeft, top: this.offsetTop, width: this.offsetWidth, - height: this.offsetHeight + height: this.offsetHeight, + opacity: 1 } - - $('div.dynamic-nav').show().animate(liPos,200); + + $('div.dynamic-nav').stop().show().animate(liPos,500); }, function(){ $('div.dynamic-nav').hide();