summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorSimon Rettberg2015-02-19 18:06:09 +0100
committerSimon Rettberg2015-02-19 18:06:09 +0100
commit8b0c163527d1500f3dc219f021d07e5a604b4d16 (patch)
tree1a3c95387189d3b9cee2aa1c4c50602f5d664439 /templates
parentUpdate translations (diff)
downloadslx-admin-8b0c163527d1500f3dc219f021d07e5a604b4d16.tar.gz
slx-admin-8b0c163527d1500f3dc219f021d07e5a604b4d16.tar.xz
slx-admin-8b0c163527d1500f3dc219f021d07e5a604b4d16.zip
MiniLinux download with version selection
Diffstat (limited to 'templates')
-rw-r--r--templates/minilinux/filelist.html17
-rw-r--r--templates/page-minilinux.html23
2 files changed, 27 insertions, 13 deletions
diff --git a/templates/minilinux/filelist.html b/templates/minilinux/filelist.html
index 39ed0b43..ca94f4d0 100644
--- a/templates/minilinux/filelist.html
+++ b/templates/minilinux/filelist.html
@@ -4,6 +4,19 @@
<h4>{{title}}</h4>
</div>
<div class="panel-body" id="download-{{id}}">
+ <div class="input-group pull-right" style="max-width: 400px">
+ <span class="input-group-addon slx-ga">{{lang_desiredVersion}}</span>
+ <select id="versionbox" class="form-control" onchange="loadSystemList($('#versionbox').val())">
+ {{#versions}}
+ {{#selected}}
+ <option value="{{version}}" selected>{{version}}</option>
+ {{/selected}}
+ {{^selected}}
+ <option value="{{version}}">{{version}}</option>
+ {{/selected}}
+ {{/versions}}
+ </select>
+ </div>
{{#systemChanged}}
<p>
{{lang_canUpdate1}} <b>{{title}}</b> {{lang_canUpdate2}}
@@ -13,6 +26,8 @@
{{^systemChanged}}
<p>{{lang_systemUpdated}}</p>
{{/systemChanged}}
+ <hr>
+ <p><b>{{lang_filesInVersion}} {{version}}</b></p>
<ul class="list-group">
{{#files}}
<li class="list-group-item" id="{{uid}}">
@@ -43,7 +58,7 @@ function slxUpdate(uid, id, name)
{
$('#' + uid).html('');
$('#' + uid).load('?do=MiniLinux',
- { action : "download", token : TOKEN, id : id, name : name },
+ { action : "download", token : TOKEN, id : id, name : name, version : $('#versionbox').val() },
function(response, status, xhr) {
if (status === "error") {
var msg = "Fehler beim Abruf: ";
diff --git a/templates/page-minilinux.html b/templates/page-minilinux.html
index df245ef0..dc13e6b0 100644
--- a/templates/page-minilinux.html
+++ b/templates/page-minilinux.html
@@ -1,15 +1,14 @@
<div id="systemlist">
<div class="panel panel-default">{{lang_listObtained}}</div>
- <script type="text/javascript">
- var slx_check = setInterval(function() {
- if (typeof $ === 'undefined') return;
- clearInterval(slx_check);
- $('#systemlist').load('{{{listurl}}}', function( response, status, xhr ) {
- if ( status === "error" ) {
- var msg = "{{lang_errorGetting}}";
- $( "#systemlist" ).html( msg + xhr.status + " " + xhr.statusText );
- }
- })
- }, 100);
- </script>
</div>
+
+<script type="text/javascript"><!--
+ function loadSystemList(version) {
+ $('#systemlist').load('{{{listurl}}}', { token: TOKEN, version: version }, function( response, status, xhr ) {
+ if ( status === "error" ) {
+ var msg = "{{lang_errorGetting}}";
+ $( "#systemlist" ).html( msg + xhr.status + " " + xhr.statusText );
+ }
+ });
+ }
+// --></script> \ No newline at end of file