added other os to selection list and old jquery for ie8

This commit is contained in:
root 2017-04-13 22:10:59 +02:00
parent c681286f43
commit 35082ac43c
3 changed files with 30 additions and 3 deletions

View file

@ -13,13 +13,14 @@
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
<![endif]--> <![endif]-->
</head> </head>
<body> <body>
<div id="content"> <div id="content">
<header> <header>
<img src="img/logo.png" id="logo" alt="Karihthy Címer" /> <img src="img/logo.png" id="logo" alt="Karinthy Címer" />
<h1>Karinthy Free WiFi - Útmutató</h1> <h1>Karinthy Free WiFi - Útmutató</h1>
</header> </header>
<section> <section>
@ -43,6 +44,7 @@
<option value="android">Android</option> <option value="android">Android</option>
<option value="mac">Mac OS X</option> <option value="mac">Mac OS X</option>
<option value="linux">Linux</option> <option value="linux">Linux</option>
<option value="other">Egyéb</option>
</select> </select>
<div id="os-specific"></div> <div id="os-specific"></div>
</section> </section>

5
js/jquery-1.12.4.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -24,9 +24,11 @@ function selectOs( osDiv ) {
detectedOs = 'other'; detectedOs = 'other';
} }
var osSelect = checkOsString(detectedOs);
$('#' + detectedOs).addClass('detectedOs'); $('#' + detectedOs).addClass('detectedOs');
$('' + osDiv).load('os/' + detectedOs + '/howto.html'); $('' + osDiv).load('os/' + detectedOs + '/howto.html');
$('#osSelector').val(detectedOs); $('#osSelector').val(osSelect);
$('#osSelector').change(function () { $('#osSelector').change(function () {
$('' + osDiv).load('os/' + $(this).val() + '/howto.html'); $('' + osDiv).load('os/' + $(this).val() + '/howto.html');
}) })
@ -40,6 +42,24 @@ function matches(osString, strings) {
return false; return false;
} }
function checkOsString(osString) {
var osSelect = osString;
switch(osString) {
case 'vista':
osSelect = 'win7';
break;
case 'win8':
osSelect = 'win10';
break;
case 'xp':
osSelect = 'other';
break;
default:
osSelect = osString;
}
return osSelect;
}
/* /*
'Windows 3.11' => 'Win16', 'Windows 3.11' => 'Win16',
'Windows 95' => '(Windows 95)|(Win95)|(Windows_95)', 'Windows 95' => '(Windows 95)|(Win95)|(Windows_95)',