sai langswitcher

This commit is contained in:
Ulf Gebhardt 2014-06-01 04:40:49 +02:00
parent 868f845102
commit edcd306719
9 changed files with 35 additions and 50 deletions

View File

@ -1,49 +0,0 @@
<div class="masthead">
<h3 class="muted">Design.Simple.Fast.Reliable.Innovative.</h3>
<h4 class="text-info">We write awesome code.</h4>
</div>
<br>
<div id="myCarousel" class="carousel slide">
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">
<img class="carousel-img" src="./sai/page/default_page/img/carousel/webseite.jpg" alt="">
<div class="carousel-caption">
<h4>TK Forschungspraktikum WS 2012/2013</h4>
<p>Das Team</p>
</div>
</div>
<div class="item">
<img class="carousel-img" src="./sai/page/default_page/img/carousel/verteidigung_immanuel.jpg" alt="">
<div class="carousel-caption">
<h4>Betreuer: "Hööööy sieee.." ;-D</h4>
<p>Verteidigung Immanuel (Dezember 2012)</p>
</div>
</div>
<div class="item">
<img class="carousel-img" src="./sai/page/default_page/img/carousel/webseite.jpg" alt="">
<div class="carousel-caption">
<h4>Noisemap 3.0 Release</h4>
<p>Die neue Noisemap Version 3.0 ist jetzt für Android und iOS verfügbar.</p>
</div>
</div>
<div class="item">
<img class="carousel-img" src="./sai/page/default_page/img/carousel/webseite.jpg" alt="">
<div class="carousel-caption">
<h4>da_sense</h4>
<p>Neues Webseiten Design. Nice.</p>
</div>
</div>
<div class="item">
<img class="carousel-img" src="./sai/page/default_page/img/carousel/webseite.jpg" alt="">
<div class="carousel-caption">
<h4>Presse: Echo Artikel</h4>
<p>Sogar die Presse hat Interesse ;-P</p>
</div>
</div>
</div>
<!-- Carousel nav -->
<a class="carousel-control left" href="#myCarousel" data-slide="prev">&lsaquo;</a>
<a class="carousel-control right" href="#myCarousel" data-slide="next">&rsaquo;</a>
</div>

View File

@ -44,6 +44,7 @@ class default_page extends \SYSTEM\PAGE\Page {
$result = '<script src="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/js/libs/jquery.min.js').'" type="text/javascript"></script>'.
'<script src="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/js/libs/bootstrap.min.js').'" type="text/javascript"></script>'.
'<script src="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/js/sai.js').'" type="text/javascript"></script>'.
'<script src="'.\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/js/lang_switcher.js').'" type="text/javascript"></script>'.
'<script src="https://www.google.com/jsapi" type="text/javascript"></script>'.
'<script src="https://maps.google.com/maps/api/js?v=3&sensor=false" type="text/javascript"></script>'.
'<script type="text/javascript">google.load("visualization", "1", {packages:["corechart"]});</script>'.
@ -64,6 +65,7 @@ class default_page extends \SYSTEM\PAGE\Page {
$vars['navimg'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_NAVIMG);
$vars['title'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_TITLE); //da_sense | Developer Center
$vars['copyright'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_COPYRIGHT); //&copy; <a href="http://www.da-sense.de" target="_blank">da_sense</a>, TU Darmstadt 2013
$vars['PATH_LOCAL_IMG'] = \SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'page/img/');
$vars = array_merge($vars,\SYSTEM\locale::getStrings(\SYSTEM\DBD\system_locale_string::VALUE_CATEGORY_SYSTEM_SAI));
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \SYSTEM\PSAI(),'page/sai.tpl'), $vars);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

BIN
sai/page/img/flag_usa.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

View File

@ -0,0 +1,30 @@
function switchLocale(locale){
reloadWithQueryStringVars({"_lang": locale});
}
function reloadWithQueryStringVars (queryStringVars) {
var existingQueryVars = location.search ? location.search.substring(1).split("&") : [],
currentUrl = location.search ? location.href.replace(location.search,"") : location.href,
newQueryVars = {},
newUrl = currentUrl.replace(/#/g, "") + "?";
if(existingQueryVars.length > 0) {
for (var i = 0; i < existingQueryVars.length; i++) {
var pair = existingQueryVars[i].split("=");
newQueryVars[pair[0]] = pair[1];
}
}
if(queryStringVars) {
for (var queryStringVar in queryStringVars) {
newQueryVars[queryStringVar] = queryStringVars[queryStringVar];
}
}
if(newQueryVars) {
for (var newQueryVar in newQueryVars) {
newUrl += newQueryVar + "=" + newQueryVars[newQueryVar] + "&";
}
newUrl = newUrl.substring(0, newUrl.length-1);
window.location.href = newUrl;
} else {
window.location.href = location.href;
}
}

View File

@ -15,10 +15,12 @@
<img src="${navimg}" height="24" width="24"/>
</div>
<a class="brand" href="#" style="width: 159px;">SAI</a>
<a href="javascript:switchLocale('deDE');"><img src="${PATH_LOCAL_IMG}flag_germany.png" alt="Deutsch"></a>
<a href="javascript:switchLocale('enUS');"><img src="${PATH_LOCAL_IMG}flag_usa.png" alt="English"></a>
<ul class="nav">
${menu_start}
${menu_sys}
</ul>
</ul>
</div>
</div>
<div id="project_navbar" style="width:224px; position: fixed; left: 0px; bottom: 0px; top: 38px;">