diff --git a/oml/setup.py b/oml/setup.py index 1581e83..e676292 100644 --- a/oml/setup.py +++ b/oml/setup.py @@ -47,7 +47,7 @@ CREATE TABLE user ( CHECK (peered IN (0, 1)), CHECK (online IN (0, 1)) ); -CREATE INDEX ix_user_nichname ON user (nichname); +CREATE INDEX ix_user_nickname ON user (nickname); CREATE TABLE metadata ( created DATETIME, modified DATETIME, diff --git a/static/js/exportAnnotationsDialog.js b/static/js/exportAnnotationsDialog.js index 6078e19..867c46d 100644 --- a/static/js/exportAnnotationsDialog.js +++ b/static/js/exportAnnotationsDialog.js @@ -45,7 +45,10 @@ oml.ui.exportAnnotationsDialog = function(data) { function getAnnotationsText() { var annotations = oml.$ui.viewer.getAnnotations() - var text = 'Annotations for ' + data.title + ' (' + data.author.join(', ') + ')\n\n\n\n' + var text = 'Annotations for ' + data.title + ( + data.author ?' (' + data.author.join(', ') + ')' + : '' + ) + '\n\n\n\n' text += annotations.map(function(annotation) { var page = annotation.pageLabel || annotation.page var text = 'Quote' + (page ? ' Page ' + page : '' )+ ':\n\n' + annotation.text diff --git a/static/js/folders.js b/static/js/folders.js index 9e8718e..8a00703 100644 --- a/static/js/folders.js +++ b/static/js/folders.js @@ -68,7 +68,7 @@ oml.ui.folders = function() { function selectList(gainFocus) { var split = ui._list.split(':'), - index = userIndex[split[0]], + index = userIndex ? userIndex[split[0]] : 0, list = split[1], $selectedList = !ui._list ? oml.$ui.librariesList : !list ? oml.$ui[