Use new based theme on bootstrap
This commit is contained in:
+143
-80
@@ -1,71 +1,106 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block content %}
|
||||
|
||||
<div class="accordion" id="accordion2">
|
||||
|
||||
{% if backup_list['rsync_ssh_list']|count != 0 %}
|
||||
<h2 class="title">Rsync+ssh</h2>
|
||||
<table id="table-design">
|
||||
<thead>
|
||||
<th>Server</th>
|
||||
<th>Backup</th>
|
||||
<th>Directory</th>
|
||||
</thead>
|
||||
</tbody>
|
||||
{% for entry in backup_list['rsync_ssh_list'] %}
|
||||
<tr>
|
||||
<td>{{ entry[0] }}</td>
|
||||
<td>{{ entry[1] }}</td>
|
||||
<td>{{ entry[3] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse1"><h2 >Type: rsync+ssh</h2></a>
|
||||
</div>
|
||||
<div id="collapse1" class="accordion-body collapse in">
|
||||
<div class="accordion-inner">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<th>Server</th>
|
||||
<th>Backup</th>
|
||||
<th>Directory</th>
|
||||
</thead>
|
||||
</tbody>
|
||||
{% for entry in backup_list['rsync_ssh_list'] %}
|
||||
<tr>
|
||||
<td>{{ entry[0] }}</td>
|
||||
<td>{{ entry[1] }}</td>
|
||||
<td>{{ entry[3] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if backup_list['rsync_btrfs_list']|count != 0 %}
|
||||
<h2 class="title">rsync+btrfs+ssh</h2>
|
||||
<table id="table-design">
|
||||
<thead>
|
||||
<th>Server</th>
|
||||
<th>Backup</th>
|
||||
<th>Directory</th>
|
||||
</thead>
|
||||
</tbody>
|
||||
{% for entry in backup_list['rsync_btrfs_list'] %}
|
||||
<tr>
|
||||
<td>{{ entry[0] }}</td>
|
||||
<td>{{ entry[1] }}</td>
|
||||
<td>{{ entry[3] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse2"><h2 >Type: rsync+btrfs+ssh</h2></a>
|
||||
</div>
|
||||
<div id="collapse2" class="accordion-body collapse ">
|
||||
<div class="accordion-inner">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<th>Server</th>
|
||||
<th>Backup</th>
|
||||
<th>Directory</th>
|
||||
</thead>
|
||||
</tbody>
|
||||
{% for entry in backup_list['rsync_btrfs_list'] %}
|
||||
<tr>
|
||||
<td>{{ entry[0] }}</td>
|
||||
<td>{{ entry[1] }}</td>
|
||||
<td>{{ entry[3] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if backup_list['rsync_list']|count != 0 %}
|
||||
<h2 class="title">Rsync</h2>
|
||||
<table id="table-design">
|
||||
<thead>
|
||||
<th>Server</th>
|
||||
<th>Backup</th>
|
||||
<th>Directory</th>
|
||||
</thead>
|
||||
</tbody>
|
||||
{% for entry in backup_list['rsync_list'] %}
|
||||
<tr>
|
||||
<td>{{ entry[0] }}</td>
|
||||
<td>{{ entry[1] }}</td>
|
||||
<td>{{ entry[3] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse3"><h2>Type: rsync</h2></a>
|
||||
</div>
|
||||
<div id="collapse3" class="accordion-body collapse ">
|
||||
<div class="accordion-inner">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<th>Server</th>
|
||||
<th>Backup</th>
|
||||
<th>Directory</th>
|
||||
</thead>
|
||||
</tbody>
|
||||
{% for entry in backup_list['rsync_list'] %}
|
||||
<tr>
|
||||
<td>{{ entry[0] }}</td>
|
||||
<td>{{ entry[1] }}</td>
|
||||
<td>{{ entry[3] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if backup_list['pgsql_list']|count != 0 %}
|
||||
<h2 class="title">pgSQL</h2>
|
||||
<table id="table-design">
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse4"><h2>Type: pgsql</h2></a>
|
||||
</div>
|
||||
<div id="collapse4" class="accordion-body collapse ">
|
||||
<div class="accordion-inner">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<th>Server</th>
|
||||
<th>Backup</th>
|
||||
@@ -81,12 +116,20 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if backup_list['mysql_list']|count != 0 %}
|
||||
<h2 class="title">SQL Server</h2>
|
||||
<table id="table-design">
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse5"><h2>Type: mysql</h2></a>
|
||||
</div>
|
||||
<div id="collapse5" class="accordion-body collapse ">
|
||||
<div class="accordion-inner">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<th>Server</th>
|
||||
<th>Backup</th>
|
||||
@@ -102,11 +145,19 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if backup_list['sqlserver_list']|count != 0 %}
|
||||
<h2 class="title">SQL Server</h2>
|
||||
<table id="table-design">
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse6"><h2>Type: SQLserver</h2></a>
|
||||
</div>
|
||||
<div id="collapse6" class="accordion-body collapse ">
|
||||
<div class="accordion-inner">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<th>Server</th>
|
||||
<th>Backup</th>
|
||||
@@ -122,11 +173,19 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if backup_list['xva_list']|count != 0 %}
|
||||
<h2 class="title">XVA</h2>
|
||||
<table id="table-design">
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse7"><h2>Type: Exports XVA</h2></a>
|
||||
</div>
|
||||
<div id="collapse7" class="accordion-body collapse ">
|
||||
<div class="accordion-inner">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<th>Server</th>
|
||||
<th>Backup</th>
|
||||
@@ -140,11 +199,19 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if backup_list['metadata_list']|count != 0 %}
|
||||
<h2 class="title">XCP Metadata</h2>
|
||||
<table id="table-design">
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse8"><h2>Type: XCP Metadata</h2></a>
|
||||
</div>
|
||||
<div id="collapse8" class="accordion-body collapse ">
|
||||
<div class="accordion-inner">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<th>Server</th>
|
||||
<th>Backup</th>
|
||||
@@ -158,11 +225,19 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if backup_list['switch_list']|count != 0 %}
|
||||
<h2 class="title">Switchs</h2>
|
||||
<table id="table-design">
|
||||
<div class="accordion-group">
|
||||
<div class="accordion-heading">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapse9"><h2>Type: Switchs</h2></a>
|
||||
</div>
|
||||
<div id="collapse9" class="accordion-body collapse ">
|
||||
<div class="accordion-inner">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<th>Server</th>
|
||||
<th>Backup</th>
|
||||
@@ -176,24 +251,12 @@
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if backup_list['null_list']|count != 0 %}
|
||||
<h2 class="title">Null</h2>
|
||||
<table id="table-design">
|
||||
<thead>
|
||||
<th>Server</th>
|
||||
<th>Backup</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entry in backup_list['null_list'] %}
|
||||
<tr>
|
||||
<td>{{ entry[0] }}</td>
|
||||
<td>{{ entry[1] }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -42,6 +42,12 @@
|
||||
<p> Select backups to save : <br/> <br/>
|
||||
Select all <input type="checkbox" id="selectall" checked="true"><br /><br/>
|
||||
{% for entry in sections|sort %}
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<div class="form-group">
|
||||
<div class="checkbox"><label><input type="checkbox" class="checkbox1" value="{{entry}}" checked>{{entry}}</label></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<input type="checkbox" name="sections" class="checkbox1" value="{{entry}}" checked="true">{{entry}} <br />
|
||||
{% endfor %}
|
||||
<p>
|
||||
|
||||
+36
-28
@@ -1,5 +1,7 @@
|
||||
{% extends "layout.html" %}
|
||||
{% block content %}
|
||||
<link rel="stylesheet" type="text/css" href="/static/styles/jquery.dataTables.css">
|
||||
<script type=text/javascript src="/static/js/jquery.dataTables.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(document).ready(function() {
|
||||
var oTable = $('#table-design').dataTable( {
|
||||
@@ -59,7 +61,6 @@
|
||||
{ "mData":"TYPE" , "bVisible": false }
|
||||
],
|
||||
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
|
||||
//humanFileSize(aaData[1]['written_bytes'], true)
|
||||
var total_bytes = 0;
|
||||
var total_time = 0;
|
||||
for (var i = iStart; i < iEnd; i++) {
|
||||
@@ -158,7 +159,7 @@
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<table style='text-align: center;' cellpadding="0" cellspacing="0" border="0" class="display" id="table-design">
|
||||
<table style='text-align: center;' cellpadding="0" cellspacing="0" border="0" class="display" id="table-design">
|
||||
<thead style='text-align: center;'>
|
||||
<tr>
|
||||
<th>Backup start</th>
|
||||
@@ -191,33 +192,40 @@
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<br / >
|
||||
<p>Nomber of rows per page : <input id="inputDatabaseName" value=25 size=4 style="text-align:center" ></p>
|
||||
<p>
|
||||
Backup start<input type="checkbox" onclick="fnShowHide( 0 );"/>
|
||||
Backup end<input type="checkbox" onclick="fnShowHide( 1 );"/>
|
||||
Server name<input type="checkbox" onclick="fnShowHide( 2 );"/>
|
||||
Backup name<input type="checkbox" onclick="fnShowHide( 3 );"/>
|
||||
Backup duration<input type="checkbox" onclick="fnShowHide( 4 );"/>
|
||||
Status<input type="checkbox" onclick="fnShowHide( 5 );"/>
|
||||
<br />
|
||||
Written bytes<input type="checkbox" onclick="fnShowHide( 6 );"/>
|
||||
Written files count<input type="checkbox" onclick="fnShowHide( 7 );"/>
|
||||
Total files count<input type="checkbox" onclick="fnShowHide( 8 );"/>
|
||||
Total bytes <input type="checkbox" onclick="fnShowHide( 9 );"/>
|
||||
<br />
|
||||
Backup location<input type="checkbox" onclick="fnShowHide( 10 );"/>
|
||||
Description<input type="checkbox" onclick="fnShowHide( 11 );"/>
|
||||
Log<input type="checkbox" onclick="fnShowHide( 12 );"/>
|
||||
Type<input type="checkbox" onclick="fnShowHide( 13 );"/>
|
||||
<form class="form-horizontal">
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<div class="form-group">
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 0 );" checked> Backup start</label></div>
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 1 );"/> Backup end</label></div>
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 2 );" checked> Server name</label></div>
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 3 );" checked> Backup name</label></div>
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 4 );" checked> Backup duration</label></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<div class="form-group">
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 6 );"checked> Written bytes</label></div>
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 7 );"/> Written files count</label></div>
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 8 );"/> Total files count</label></div>
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 9 );"/> Total bytes</label></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-6 col-md-4">
|
||||
<div class="form-group">
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 10 );"> Backup location</label></div>
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 11);">Description </label></div>
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 12);"> Log</label></div>
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 13 );">Type </label></div>
|
||||
<div class="checkbox"><label><input type="checkbox" onclick="fnShowHide( 5 );"checked> Status</label></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</p>
|
||||
<script>
|
||||
$('input:checkbox').attr('checked', false);
|
||||
$('input:checkbox:eq(0)').attr('checked', true);
|
||||
$('input:checkbox:eq(2)').attr('checked', true);
|
||||
$('input:checkbox:eq(3)').attr('checked', true);
|
||||
$('input:checkbox:eq(4)').attr('checked', true);
|
||||
$('input:checkbox:eq(5)').attr('checked', true);
|
||||
$('input:checkbox:eq(6)').attr('checked', true);
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
+94
-95
@@ -1,103 +1,102 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<!--
|
||||
Design by Free CSS Templates
|
||||
http://www.freecsstemplates.org
|
||||
Released for free under a Creative Commons Attribution 2.5 License
|
||||
<!DOCTYPE html>
|
||||
<html lang="en"><head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="icon" href="/static/images/favicon.ico">
|
||||
|
||||
Name : Indication
|
||||
Description: A two-column, fixed-width design with dark color scheme.
|
||||
Version : 1.0
|
||||
Released : 20090910
|
||||
|
||||
-->
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>Tisbackup GUI</title>
|
||||
|
||||
<!-- Styles -->
|
||||
<link rel="stylesheet" type="text/css" href="/static/styles/jquery.dataTables.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/styles/style.css">
|
||||
<link rel="stylesheet" type="text/css" href="/static/styles/bootstrap.min.css">
|
||||
|
||||
<!-- Scripts -->
|
||||
<script type=text/javascript src="/static/js/jquery.min.js"></script>
|
||||
<script type=text/javascript src="/static/js/jquery.dataTables.js"></script>
|
||||
<script type=text/javascript src="/static/js/bootbox.js"></script>
|
||||
<script type=text/javascript src="/static/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body background='/static/images/bg_body.gif'>
|
||||
<div id="wrapper">
|
||||
<div id="header">
|
||||
<div id="logo">
|
||||
<h1><a href="/">TIS Backup GUI</a></h1>
|
||||
<p> design by Hübert</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end #header -->
|
||||
<div id="menu">
|
||||
|
||||
<ul>
|
||||
<li><a href="/">Backups</a></li>
|
||||
<li><a href="/export_backup">Export Backup</a></li>
|
||||
<li><a href="/last_backups">Last Backups</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- end #menu -->
|
||||
<div id="page">
|
||||
<div id="page-bgtop">
|
||||
<div id="page-bgbtm">
|
||||
<div id="choix_conf" style="float:right;margin-top:5px;">
|
||||
Choix du fichier de configuration :
|
||||
<select id="config">
|
||||
</select> </div>
|
||||
<div id="content">
|
||||
<div class="post">
|
||||
{% block content %}
|
||||
<div id="mouter">
|
||||
<div id="minner">
|
||||
<p>Hello World</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="/static/styles/bootstrap.css" rel="stylesheet">
|
||||
|
||||
<div style="clear: both;"> </div>
|
||||
</div>
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="/static/styles/offcanvas.css" rel="stylesheet">
|
||||
<script src="/static/js/jquery.js"></script>
|
||||
<script src="/static/js/bootstrap.js"></script>
|
||||
|
||||
<div style="clear: both;"> </div>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<!--<a class="navbar-brand" href="#">TIS Backup GUI</a>-->
|
||||
<a class="navbar-brand" href="#"><img style=" margin-top:-13px;"
|
||||
src="/static/images/tisbackup.png"></a>
|
||||
</div>
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li {% if request.path == "/" %}class="active"{% endif %} ><a href="/">Backups</a></li>
|
||||
<li {% if request.path == "/export_backup" %}class="active"{% endif %}><a href="/export_backup">Export Backups</a></li>
|
||||
<li {% if request.path == "/last_backups" %}class="active"{% endif %}><a href="/last_backups">Last backups</a></li>
|
||||
<li ><select class="form-control hidden" id="choix_conf" style=" margin-top:8px;">
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- /.nav-collapse -->
|
||||
</div><!-- /.container -->
|
||||
</nav><!-- /.navbar -->
|
||||
|
||||
<!-- end #page -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- end #footer -->
|
||||
</div>
|
||||
<div id="footer">
|
||||
<p>Copyright (c) 2012 Tranquil IT Systems. All rights reserved. Design by <a href="http://www.tranquil-it-systems.fr/">TIS</a>.</p>
|
||||
</div>
|
||||
<script>
|
||||
function configs(){
|
||||
$.getJSON("/config_number/", function(data) {
|
||||
if ( data.configs.length == 1){
|
||||
$("#choix_conf").hide();
|
||||
return 0;
|
||||
}
|
||||
$.each(data.configs, function(key,val){
|
||||
if (key == data.config_number)
|
||||
$('#config').append('<option vaulue="'+key+'" selected>'+val+'</option>');
|
||||
else
|
||||
$('#config').append('<option vaulue="'+key+'">'+val+'</option>');
|
||||
});
|
||||
});
|
||||
$( "#config" ).change(function() {
|
||||
$.get( "/config_number/"+this.selectedIndex, function( data ) {location.reload();});
|
||||
});
|
||||
};
|
||||
configs();
|
||||
</script>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</div><!--/row-->
|
||||
|
||||
<hr>
|
||||
|
||||
<footer>
|
||||
<p>Copyright (c) 2015 Tranquil IT Systems. All rights reserved. Design by TIS.</p>
|
||||
</footer>
|
||||
|
||||
</div><!--/.container-->
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<!-- <script src="/static/js/jquery.js"></script> -->
|
||||
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<script src="/static/js/ie10-viewport-bug-workaround.js"></script>
|
||||
|
||||
<script src="/static/js/offcanvas.js"></script>
|
||||
<script>
|
||||
function configs(){
|
||||
$.getJSON("/config_number/", function(data) {
|
||||
if ( data.configs.length > 1){
|
||||
$('#choix_conf').removeClass('hidden');
|
||||
$("#choix_conf").show();
|
||||
|
||||
$.each(data.configs, function(key,val){
|
||||
if (key == data.config_number)
|
||||
$('#choix_conf').append('<option vaulue="'+key+'" selected>'+val+'</option>');
|
||||
else
|
||||
$('#choix_conf').append('<option vaulue="'+key+'">'+val+'</option>');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$( "#choix_conf" ).change(function() {
|
||||
$.get( "/config_number/"+this.selectedIndex, function( data ) {location.reload();});
|
||||
});
|
||||
};
|
||||
configs();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
Reference in New Issue
Block a user