Implement prototype for project selection

This commit is contained in:
Eike Foken
2011-08-10 13:57:17 +02:00
parent d7999735ce
commit 667b5d0709
3 changed files with 19 additions and 1 deletions

View File

@@ -16,12 +16,17 @@
<script type="text/javascript"> <script type="text/javascript">
var SITE_URL = '<?=site_url()?>'; var SITE_URL = '<?=site_url()?>';
</script> </script>
</head> </head>
<body> <body>
<div id="header"> <div id="header">
<h1><?=anchor('', img('assets/images/logo.png'))?></h1> <h1><?=anchor('', img('assets/images/logo.png'))?></h1>
<div class="status">
<select name="activeProject">
<option value="<?=site_url('');?>">Beispielprojekt</option>
<option value="<?=site_url('projects');?>">Projekte verwalten</option>
</select>
</div>
<div class="menu">Hallo <a href="<?=site_url('');?>"><?=$this->user->profile()->firstname;?> <?=$this->user->profile()->lastname;?></a>! | <?=lang_select('assets/images');?> | <a href="#">Hilfe</a> | <?=anchor('settings', "Einstellungen");?> | <?=anchor('auth/logout', "Logout");?></div> <div class="menu">Hallo <a href="<?=site_url('');?>"><?=$this->user->profile()->firstname;?> <?=$this->user->profile()->lastname;?></a>! | <?=lang_select('assets/images');?> | <a href="#">Hilfe</a> | <?=anchor('settings', "Einstellungen");?> | <?=anchor('auth/logout', "Logout");?></div>
</div> </div>

View File

@@ -75,6 +75,12 @@ li { margin-left: 20px;}
text-decoration: none; text-decoration: none;
} }
#header .status {
float: left;
line-height: 45px;
padding: 12px 20px;
}
#header .menu { #header .menu {
float: right; float: right;
line-height: 45px; line-height: 45px;

View File

@@ -173,4 +173,11 @@ $(document).ready(function() {
}).mouseout(function() { }).mouseout(function() {
$(this).removeClass('editable'); $(this).removeClass('editable');
}); });
$('select[name="activeProject"]').bind('change', function () {
var url = $(this).val();
if (url) {
window.location = url;
}
});
}); });