diff options
| author | Simon | 2011-04-15 14:02:19 +0200 |
|---|---|---|
| committer | Simon | 2011-04-15 14:02:19 +0200 |
| commit | fdfd52073ab48324e0c734faef7b862e7f7172f4 (patch) | |
| tree | adc88e2dab97e72c4cca7880683c81b114753f27 /application/modules/fbgui/views/scripts/index | |
| parent | Content-Length in KCL korrigiert (diff) | |
| download | pbs2-fdfd52073ab48324e0c734faef7b862e7f7172f4.tar.gz pbs2-fdfd52073ab48324e0c734faef7b862e7f7172f4.tar.xz pbs2-fdfd52073ab48324e0c734faef7b862e7f7172f4.zip | |
Ticket #210 - FBgui mit Tastatur bedienbar, inklusive Login
Diffstat (limited to 'application/modules/fbgui/views/scripts/index')
| -rw-r--r-- | application/modules/fbgui/views/scripts/index/index.phtml | 43 | ||||
| -rw-r--r-- | application/modules/fbgui/views/scripts/index/start.phtml | 1 |
2 files changed, 29 insertions, 15 deletions
diff --git a/application/modules/fbgui/views/scripts/index/index.phtml b/application/modules/fbgui/views/scripts/index/index.phtml index d5fc8f6..45448dd 100644 --- a/application/modules/fbgui/views/scripts/index/index.phtml +++ b/application/modules/fbgui/views/scripts/index/index.phtml @@ -1,18 +1,25 @@ <?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(){ - $('.menu').click(function(){ - $('.menu').removeClass('selected'); + $('.selectswitch').click(function(){ + $('.selectswitch').removeClass('selected'); $(this).addClass('selected'); $("#selectedBootOs").val($(this).find('.id').val()); $("#startball").attr('src','/media/img/button-green.png'); }); - $('.menu').eq(activeElement).click(); + $('.bootmenu .selectswitch').eq(activeElement).click(); $('#startbutton').focus(); - $('.menu').dblclick(function(){ - $('.menu').removeClass('selected'); + $('.selectswitch').dblclick(function(){ + $('.selectswitch').removeClass('selected'); $(this).addClass('selected'); $("#selectedBootOs").val($(this).find('.id').val()); $("#startball").attr('src','/media/img/button-green.png'); @@ -25,12 +32,12 @@ // up if(activeElement >=1) activeElement = activeElement-1; - $('.menu').eq(activeElement).click(); + $('.selectswitch').eq(activeElement).click(); } else if (event.keyCode == 40) { // Down - if(activeElement < $('.menu').length-1 ) + if(activeElement < $('.selectswitch').length-1 ) activeElement = activeElement+1; - $('.menu').eq(activeElement).click(); + $('.selectswitch').eq(activeElement).click(); } }); }); @@ -38,7 +45,11 @@ }); function start(){ if($('#selectedBootOs').val() != ''){ - window.location='/fbgui/index/start/bme/'+$('#selectedBootOs').val()+'/a/<?php echo $this->alphasessionID;?>'; + if($('#selectedBootOs').val() == 'login'){ + window.location='/fbgui/auth/login/a/<?php echo $this->alphasessionID;?>' + } else{ + window.location='/fbgui/index/start/bme/'+$('#selectedBootOs').val()+'/a/<?php echo $this->alphasessionID;?>'; + } } else{ alert('You have to select a BootOs'); @@ -46,15 +57,16 @@ } </script> <h1><?php echo $this->title;?></h1> - <?php $first = true; ?> - <?php foreach($this->entries as $entry):?> + <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()); - + $bootos = $bootosMapper->find($entry->getBootosID()); ?> - <div id="menu_item_1" class="menu" class="flexbox"> + <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> @@ -62,8 +74,11 @@ <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;?> diff --git a/application/modules/fbgui/views/scripts/index/start.phtml b/application/modules/fbgui/views/scripts/index/start.phtml index 6737fc5..e946530 100644 --- a/application/modules/fbgui/views/scripts/index/start.phtml +++ b/application/modules/fbgui/views/scripts/index/start.phtml @@ -109,7 +109,6 @@ function updateProgress(p, s, u){ <div class="bar7"></div> <div class="bar8"></div> </div> -<a href='/fbgui'>back</a> <div id="progressbar" style="height: 15px;"></div> <h1>Downloading</h1> |
