Commit e11f88aa authored by Leigh B Stoller's avatar Leigh B Stoller

Add cheesy newUIUD() method. For book keeping between server and client.

We never actually use it when adding to the database, we generate one we
parent 7e3631c9
......@@ -470,10 +470,23 @@ function ConfirmModal(args)
return display;
function newUUID()
var dt = new Date().getTime();
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = (dt + Math.random()*16)%16 | 0;
dt = Math.floor(dt/16);
return (c=='x' ? r :(r&0x3|0x8)).toString(16);
return uuid;
// Exports from this module for use elsewhere
return {
ParseURN: ParseURN,
newUUID: newUUID,
ShowModal: ShowModal,
HideModal: HideModal,
ShowWaitWait: ShowWaitWait,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment