90 lines
2.6 KiB
HTML
90 lines
2.6 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
|
|
<title> TechREC </title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="css/style.css">
|
|
|
|
<script src="js/jquery-1.9.1.min.js"></script>
|
|
<script type="text/javascript" src="js/reclibrary.js"></script>
|
|
|
|
<script>
|
|
/*
|
|
TODO:
|
|
prendere lo stato !!!
|
|
*/
|
|
$(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();
|
|
recDelete(val.recid, rs_trxarea(key) );
|
|
|
|
}
|
|
); // End of delete link handler
|
|
|
|
});
|
|
});
|
|
});
|
|
$("#searchform").submit();
|
|
});
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="pagecontainer">
|
|
|
|
<h1> techr*c </h1>
|
|
|
|
<h2> <a href="index.html"> Nuova registrazione</a> </h2>
|
|
|
|
<div id="buttonscontainer">
|
|
<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" />
|
|
</form>
|
|
</div>
|
|
|
|
<div id="searchresult">
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
techbl*c
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|