techrec/server/pages/tempo.html

91 lines
2.5 KiB
HTML
Raw Normal View History

2013-09-15 16:33:38 +02:00
<!DOCTYPE html>
<html>
<head>
<title> TechREC </title>
<link rel="stylesheet" type="text/css" href="/static/css/style.css">
2013-09-15 16:33:38 +02: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-09-15 16:33:38 +02:00
TODO:
prendere lo stato !!!
2013-09-15 16:33:38 +02:00
*/
$(document).ready(function(){
$("#searchform").submit(
function (event) {
event.preventDefault();
dataString = $(this).serialize();
var request = RecAjax("search", dataString);
$("#searchresult").html(" ");
request.done( function(data) {
$.each(data, function(key, val) {
console.log("Extract " + key );
var divstring = "<div class=\"searchresult\" id=\""+ rs_trxarea(key) +"\"> </div>";
$("#searchresult").append( divstring );
// var str = newformstr( key ); // new form
var str = "";
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>";
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) );
}
); // End of delete link handler
});
});
2013-09-15 16:33:38 +02:00
});
$("#searchform").submit();
2013-09-15 16:33:38 +02:00
});
</script>
</head>
<body>
<div id="pagecontainer">
2013-09-15 16:33:38 +02:00
<h1> techr*c </h1>
2013-09-15 16:33:38 +02:00
<h2> <a href="index.html"> Nuova registrazione</a> </h2>
<div id="buttonscontainer">
2013-09-15 16:33:38 +02:00
<form action="#" method="POST" id="searchform">
<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 />
<input type="submit" value="Cerca" />
2013-09-15 16:33:38 +02:00
</form>
</div>
<div id="searchresult">
</div>
2013-09-15 16:33:38 +02:00
</div>
<div id="footer">
techbl*c
</div>
</body>
</html>