summaryrefslogtreecommitdiffstats
path: root/application/modules/fbgui/views/scripts/index/index.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/fbgui/views/scripts/index/index.phtml')
-rw-r--r--application/modules/fbgui/views/scripts/index/index.phtml92
1 files changed, 80 insertions, 12 deletions
diff --git a/application/modules/fbgui/views/scripts/index/index.phtml b/application/modules/fbgui/views/scripts/index/index.phtml
index a141add..2454d45 100644
--- a/application/modules/fbgui/views/scripts/index/index.phtml
+++ b/application/modules/fbgui/views/scripts/index/index.phtml
@@ -1,12 +1,82 @@
<?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 if($this->nobootmenu === true):?>
+ <div class="fbguilogin selectswitch" style=''>
+ <div style='font-size:16px;font-weight:bold;margin-bottom:5px;'>Login</div>
+ <i>There is no BootMenu to show. Please login to get your BootMenu.</i>
+ <input type="hidden" class="id" value="login"/>
+ </div>
+ <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());
+ $("#startbutton").focus();
+ });
+ $('.selectswitch').click();
+ $('#startbutton').focus();
+ $('.selectswitch').dblclick(function(){
+ $('.selectswitch').removeClass('selected');
+ $(this).addClass('selected');
+ $("#selectedBootOs").val($(this).find('.id').val());
+ $("#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();
+ } else if (event.keyCode == 13) {
+ // Down
+ $('#startbutton').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>
+ <input style="display:none;" type='text' id="selectedBootOs" />
+ <button onClick="start();" id='startbutton' class="fbguistart" style='font-size:16px;font-weight:bold;margin-bottom:5px;'>
+ Login
+ </button>
+ <div class='clear'></div>
<?php endif; ?>
<?php if(isset($this->entries)):?>
+ <?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 else:?>
+ <div class="fbguilogin selectswitch" style=''>
+ <div style='font-size:16px;font-weight:bold;margin-bottom:5px;'>Logout</div>
+ <i>Select this to logout and get to the default BootMenu.</i>
+ <input type="hidden" class="id" value="logout"/>
+ </div>
+ <?php endif;?>
<script type="text/javascript">
var activeElement = 0;
$(document).ready(function(){
@@ -14,7 +84,7 @@
$('.selectswitch').removeClass('selected');
$(this).addClass('selected');
$("#selectedBootOs").val($(this).find('.id').val());
- $("#startbutton").focus();
+ $("#startbutton").focus();
});
$('.bootmenu .selectswitch').eq(activeElement).click();
$('#startbutton').focus();
@@ -50,6 +120,8 @@
if($('#selectedBootOs').val() != ''){
if($('#selectedBootOs').val() == 'login'){
window.location='/fbgui/auth/login/'
+ }else if($('#selectedBootOs').val() == 'logout'){
+ window.location='/fbgui/auth/logout/'
} else{
window.location='/fbgui/index/start/bme/'+$('#selectedBootOs').val();
}
@@ -82,9 +154,5 @@
<button onClick="start();" id='startbutton' class="fbguistart" style='font-size:16px;font-weight:bold;margin-bottom:5px;'>
Start System
</button>
- <div class='clear'></div>
- <?php if($this->notificationbot != ''){echo $this->notificationbot;} ?>
-
-
-
+ <div class='clear'></div>
<?php endif;?>