ification);. find («. address»). text (row. address);. find («. delete»). click (function (e) {clickedEntry=$ (this). parent (); clickedEntryId=clickedEntry. data («entryId»); (clickedEntryId);. slideUp ();. stopPropagation ();
});. click (entryClickHandler);
}
},
);
}
);
} entryClickHandler (e) {. entryId=$ (this). data («entryId»);. transaction ((transaction) {. executeSql (
«SELECT * FROM entries WHERE id =?; »,
[sessionStorage. entryId], (transaction, result) {row=result. rows. item (0); specification=row. specification; address=row. address; latitude=row. latitude; longitude=row. longitude;
$ («# inspectEntry input [name =« specification »]»). val (specification);
$ («# inspectEntry input [name =« address »]»). val (address);
$ («# inspectEntry input [name =« latitude »]»). val (latitude);
$ («# inspectEntry input [name =« longitude »]»). val (longitude);
$ («# mapLocation»). click (function () {. location=«#« justify" >});. goTo (»# inspectEntry«, »slideup ');
},
);
}
);
} dupeEntryById (entryId) {(entryId == undefined) {(«Alert!");
} else {. transaction ((transaction) {. executeSql (
«INSERT INTO entries (date, specification, address, latitude, longitude)» +
«SELECT date, specification, address, latitude, longitude» +
«FROM entries WHERE id =?; »,
[entryId], () {();
},
);
}
);
} ();
}
$ («# date»). bind («pageAnimationEnd», function (e, info) {(info. direction == «in») {();
}
});
$ («# date»). bind («pageAnimationStart», function (e, info) {(info. direction == «out») {();
}
});
$ («# date»). bind («pageAnimationEnd», function (e, info) {(info. direction == «in») {();
} else {();
}
}); startWatchingShake () {lastReading=null; threshold=10; success=function (coords) {current=coords. x + coords. y + coords. z; (lastReading!=null) {(Math. abs (current - lastReading)> threshold) {entryId=$ («# date ul li: last»). data («entryId»); (); (entryId);
}
}=current;
}; error=function () {}; options={};. frequency=250;. watchId =. accelerometer. watchAcceleration (success, error, options);
} stopWatchingShake () {. accelerometer. clearWatch (sessionStorage. watchId);
}