add board creates stubbed board
parent
1dcbc43525
commit
4994981a94
|
|
@ -2049,14 +2049,26 @@
|
|||
openBoard(board.id);
|
||||
}
|
||||
|
||||
function basicBoard()
|
||||
{
|
||||
var blob = '{"format":20190412,"id":1617021290844,"revision":12,"title":"Board","lists":[{"title":"Blocked","notes":[],"min":true},{"title":"To Do","notes":[],"min":false},{"title":"In Progress","notes":[],"min":false},{"title":"Done","notes":[],"min":false}]}';
|
||||
var board = parseBoard(blob);
|
||||
board.id = +new Date();
|
||||
board.title = new Date(board.id).toISOString();
|
||||
board.revision = 1;
|
||||
board.history = [ 1 ];
|
||||
return board;
|
||||
}
|
||||
|
||||
//
|
||||
function createDemoBoard()
|
||||
{
|
||||
var blob;
|
||||
if (_getUsername())
|
||||
blob = '{"format":20190412,"id":1617021290844,"revision":12,"title":"Board","lists":[{"title":"Blocked","notes":[],"min":true},{"title":"To Do","notes":[],"min":false},{"title":"In Progress","notes":[],"min":false},{"title":"Done","notes":[],"min":false}]}';
|
||||
else
|
||||
blob =
|
||||
var demo;
|
||||
if (_getUsername()) {
|
||||
demo = basicBoard()
|
||||
}
|
||||
else {
|
||||
var blob =
|
||||
'{"format":20190412,"id":1555071015420,"revision":581,"title":"Welcome to Nullboard","lists":[{"title":"The Use' +
|
||||
'r Manual","notes":[{"text":"This is a note.\\nA column of notes is a list.\\nA set of lists is a board.","raw"' +
|
||||
':false,"min":false},{"text":"All data is saved locally.\\nThe whole thing works completely offline.","raw":fal' +
|
||||
|
|
@ -2086,8 +2098,8 @@
|
|||
'.","raw":false,"min":false},{"text":"\u2022 Try deleting a board. Unlike deleting a\\n list this _canno' +
|
||||
't_ be undone.","raw":false,"min":false},{"text":"\u2022 Export the board (save to a file, as json)\\n' +
|
||||
'\u2022 Import the board (load from a save)","raw":false,"min":false}]}]}';
|
||||
|
||||
var demo = parseBoard(blob);
|
||||
demo = parseBoard(blob);
|
||||
}
|
||||
|
||||
if (! demo)
|
||||
return false;
|
||||
|
|
@ -2329,7 +2341,7 @@
|
|||
//
|
||||
function addBoard()
|
||||
{
|
||||
document.board = new Board('');
|
||||
document.board = basicBoard();
|
||||
document.board.history = [ 0 ];
|
||||
|
||||
globalStorage.set('nullboard.last_board', document.board_id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue