2013-09-15 16:33:38 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
|
|
|
|
<title> TechREC </title>
|
|
|
|
|
2013-11-26 12:04:43 +01:00
|
|
|
<link rel="stylesheet" type="text/css" href="/static/css/style.css">
|
2013-09-15 16:33:38 +02:00
|
|
|
|
2013-11-26 12:04:43 +01:00
|
|
|
<script src="/static/js/jquery-1.9.1.min.js"></script>
|
|
|
|
<script type="text/javascript" src="/static/js/reclibrary.js"></script>
|
2013-09-15 16:33:38 +02:00
|
|
|
|
|
|
|
<script>
|
2013-11-26 12:04:43 +01:00
|
|
|
/*
|
2013-09-15 16:33:38 +02:00
|
|
|
TODO:
|
2013-11-26 12:04:43 +01:00
|
|
|
prendere lo stato !!!
|
2013-09-15 16:33:38 +02:00
|
|
|
*/
|
|
|
|
$(document).ready(function(){
|
2013-11-19 23:16:03 +01:00
|
|
|
|
2013-11-26 12:04:43 +01:00
|
|
|
$("#searchform").submit(
|
2013-11-19 23:16:03 +01:00
|
|
|
function (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
dataString = $(this).serialize();
|
2013-11-24 23:43:56 +01:00
|
|
|
var request = RecAjax("search", dataString);
|
2013-11-19 23:16:03 +01:00
|
|
|
|
|
|
|
$("#searchresult").html(" ");
|
|
|
|
request.done( function(data) {
|
2013-11-24 23:43:56 +01:00
|
|
|
|
2013-11-19 23:16:03 +01:00
|
|
|
$.each(data, function(key, val) {
|
|
|
|
console.log("Extract " + key );
|
2013-11-26 12:04:43 +01:00
|
|
|
|
2013-11-24 23:43:56 +01:00
|
|
|
var divstring = "<div class=\"searchresult\" id=\""+ rs_trxarea(key) +"\"> </div>";
|
2013-11-19 23:16:03 +01:00
|
|
|
|
|
|
|
$("#searchresult").append( divstring );
|
|
|
|
// var str = newformstr( key ); // new form
|
|
|
|
|
2013-11-24 23:43:56 +01:00
|
|
|
var str = "";
|
2013-11-26 12:04:43 +01:00
|
|
|
str += "<div class=\"namevalues\">"+val.name+" - <a href=\"\">Scarica</a> <a href=\"\" id=\"delete-"+val.id+"\">Cancella</a></div>";
|
|
|
|
str += "<div class=\"namevalues\">RECID: "+val.recid+" ID: "+ val.id + " Active " + val.active + "</div>";
|
2013-11-24 23:43:56 +01:00
|
|
|
str += "<div class=\"timevalues\">["+val.starttime+" >>> "+val.endtime+"]</div>"
|
|
|
|
|
|
|
|
$("#"+rs_trxarea(key)).html(str);
|
|
|
|
$("#delete-"+val.id).click(function(evt) {
|
|
|
|
evt.preventDefault();
|
2013-11-25 00:29:24 +01:00
|
|
|
recDelete(val.recid, rs_trxarea(key) );
|
2013-11-26 12:04:43 +01:00
|
|
|
|
2013-11-24 23:43:56 +01:00
|
|
|
}
|
2013-11-26 12:04:43 +01:00
|
|
|
); // End of delete link handler
|
|
|
|
|
2013-11-19 23:16:03 +01:00
|
|
|
});
|
|
|
|
});
|
2013-09-15 16:33:38 +02:00
|
|
|
});
|
2013-11-26 12:04:43 +01:00
|
|
|
$("#searchform").submit();
|
2013-09-15 16:33:38 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div id="pagecontainer">
|
2013-11-26 12:04:43 +01:00
|
|
|
|
2013-09-15 16:33:38 +02:00
|
|
|
<h1> techr*c </h1>
|
2013-11-26 12:04:43 +01:00
|
|
|
|
2013-09-15 16:33:38 +02:00
|
|
|
<h2> <a href="index.html"> Nuova registrazione</a> </h2>
|
2013-11-26 12:04:43 +01:00
|
|
|
|
|
|
|
<div id="buttonscontainer">
|
2013-09-15 16:33:38 +02:00
|
|
|
<form action="#" method="POST" id="searchform">
|
2013-11-24 23:43:56 +01:00
|
|
|
<input type="text" id="recid" name="recid" placeholder="Codice Registrazione" /> <br />
|
|
|
|
<input type="text" id="name" name="name" placeholder="name" /> <br />
|
|
|
|
<input type="text" id="starttime" name="starttime" placeholder="Start: 2012/11/24 22:37:361" />(timepicker http://puna.net.nz/timepicker.htm#) <br />
|
|
|
|
<input type="text" id="endtime" name="endtime" placeholder="End: 2012/11/24 22:37:36" /> <br />
|
2013-11-19 23:16:03 +01:00
|
|
|
<input type="submit" value="Cerca" />
|
2013-09-15 16:33:38 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2013-11-26 12:04:43 +01:00
|
|
|
<div id="searchresult">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2013-09-15 16:33:38 +02:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="footer">
|
|
|
|
techbl*c
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|