Writes launch site cookie table
rodzic
618093fb7e
commit
327e8dff0f
|
@ -139,7 +139,8 @@ var hlTimeout = 5000; // high latency
|
|||
|
||||
<!-- cookie save location -->
|
||||
<div id="location_save_local" class="box ui-corner-all">
|
||||
<b>Saved Locations</b><br />
|
||||
<b>Saved Locations</b><br />
|
||||
<span id="locations_table">?</span>
|
||||
</div>
|
||||
|
||||
<!-- the about window -->
|
||||
|
|
|
@ -619,7 +619,7 @@ function setupEventHandlers() {
|
|||
var idx = $.Jookie.Get(cookie_name, "idx");
|
||||
}
|
||||
|
||||
if ( $.Jookie.Get(cookie_name, "idx") > 20 ) {
|
||||
if ( $.Jookie.Get(cookie_name, "idx") > 5 ) {
|
||||
throwError("Too many saved locations");
|
||||
} else {
|
||||
idx++;
|
||||
|
@ -701,6 +701,26 @@ function setupEventHandlers() {
|
|||
});
|
||||
}
|
||||
|
||||
function constructCookieLocationsTable(cookie_name) {
|
||||
var t = "";
|
||||
t += "<table border='0'>";
|
||||
|
||||
$.Jookie.Initialise(cookie_name, 99999999);
|
||||
if ( !$.Jookie.Get(cookie_name, "idx") || $.Jookie.Get(cookie_name, "idx") == 0 ) {
|
||||
throwError("Tried to write from an empty cookie");
|
||||
} else {
|
||||
idx = $.Jookie.Get(cookie_name, "idx");
|
||||
t += "<td>Index</td><td>Name</td><td>Delete</td>";
|
||||
for (i=1; i<=idx; i++) {
|
||||
t += "<tr>";
|
||||
t += "<td>"+i+"</td><td>"+$.Jookie.Get(cookie_name, i+"_name")+"</td><td>Delete</td>";
|
||||
t += "</tr>";
|
||||
}
|
||||
t += "</table>";
|
||||
$("#locations_table").html(t);
|
||||
}
|
||||
}
|
||||
|
||||
function POSIXtoHM(timestamp, format) {
|
||||
// using JS port of PHP's date()
|
||||
var ts = new Date();
|
||||
|
|
Ładowanie…
Reference in New Issue