summaryrefslogblamecommitdiffstats
path: root/application/modules/fbgui/views/scripts/index/index.phtml
blob: 02bd7d03d7e2cc6d2003012290f6e6df317e6eaf (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                                 






                                                                                   
                                  
                                       
                              
                                        

                                                                   
                                                                        
                                                                            
                                                                                  
                                                  
                   
                                                                       
                                          

                                                                   


                                                                                  
                                                  

                                


                                                            



                                                                                
                                                                                     

                                                                 
                                                                                                                                
                                                                                                                        
                                                                                     
                                 


                           
           
                                        
                                                     
                                                                  
                                                                    
                               
                                                                                                     
                         





                                                             
                                           



                                                      


                                                                             
                                                                                                
                  
                                                                                                 
                                                               
                                                                  

                                                                                    


                                                                                                
              
                                                                       
                                                                                                                                                                                                                       
                                 
                                                                               

        
              
<?php if($this->notification != ''){echo $this->notification;} ?>
<?php if($this->loginmenu):?>
<div class="fbguilogin selectswitch" style=''> 
	<div style='font-size:16px;font-weight:bold;margin-bottom:5px;'>Login</div>
	<i>This is not your Bootmenu. Select this to get your own Bootmenu.</i> 
	<input type="hidden" class="id" value="login"/> 
</div>
<?php endif; ?>
<?php if(isset($this->entries)):?>
	<script type="text/javascript">
	var activeElement = 0;
	$(document).ready(function(){	
		$('.selectswitch').click(function(){
			$('.selectswitch').removeClass('selected');
			$(this).addClass('selected');			
			$("#selectedBootOs").val($(this).find('.id').val());
			$("#startball").attr('src','/media/img/button-green.png');
			$("#startbutton").focus();
		});
		$('.bootmenu .selectswitch').eq(activeElement).click();
		$('#startbutton').focus();
		$('.selectswitch').dblclick(function(){
			$('.selectswitch').removeClass('selected');
			$(this).addClass('selected');			
			$("#selectedBootOs").val($(this).find('.id').val());
			$("#startball").attr('src','/media/img/button-green.png');
			$("#startbutton").focus();
			start();
		});
		
		$(function() {
			$(document).keyup(function (event) {
				if (event.keyCode == 38) {
					// up
					if(activeElement >=1)
						activeElement = activeElement-1;
					$('.selectswitch').eq(activeElement).click();
				} else if (event.keyCode == 40) {
					// Down
					if(activeElement < $('.selectswitch').length-1 )					
						activeElement = activeElement+1;					
					$('.selectswitch').eq(activeElement).click();
				}
			});
		});

	});
	function start(){		
		if($('#selectedBootOs').val() != ''){
			if($('#selectedBootOs').val() == 'login'){
				window.location='/fbgui/auth/login/'
			} else{
				window.location='/fbgui/index/start/bme/'+$('#selectedBootOs').val();
			}
		}
		else{
			alert('You have to select a BootOs');
		}
	}
	</script>
	<h1><?php echo $this->title;?></h1>
	<div class='bootmenu'>
	<?php $first = true; 	
	?>
	<?php foreach($this->entries as $k=>$entry):?>
		<?php
			$bootosMapper = new Application_Model_BootOsMapper();
			$bootos = new Application_Model_BootOs();
			$bootos = $bootosMapper->find($entry->getBootosID());			
		?>
		<div id="menu_item_<?php echo $k;?>" class="menu selectswitch"  class="flexbox"> 
			<img src="/media/img/os/ubuntu.png" /> 
			<h2><?php echo $entry->getTitle(); ?></h2>
			<i>BootOs-Name: <?php echo $bootos->getTitle();?></i> 
			<p>Description: <?php echo $bootos->getDescription();?></p> 
			<input type="hidden" class="id" value="<?php echo $entry->getID();?>"/> 
		</div> 
	<?php endforeach; ?>
	</div>
	<input style="display:none;" type='text' id="selectedBootOs" />
	<button style='cursor:pointer;float:right;margin-top:10px;' id='startbutton' onClick="start();"><img id='startball' src='/media/img/button-red.png'> <span style='font-size:14px;'>Start System</span></button>
	<div class='clear'></div>
	<?php if($this->notificationbot != ''){echo $this->notificationbot;} ?>
	
	
<?php endif;?>