diff --git a/src/content/mytinytodo.js b/src/content/mytinytodo.js index c436174..5fef66d 100644 --- a/src/content/mytinytodo.js +++ b/src/content/mytinytodo.js @@ -1839,11 +1839,12 @@ function toggleEditAllTags(show) function fillEditAllTags() { - var a = []; + const a = []; tagsList.forEach( (item) => { - a.push('' + item.tag + ''); + a.push('' + item.tag + ''); }); - $('#alltags .tags-list').html(a.join(', ')); + const content = (a.length == 0) ? _mtt.lang.get('noTags') : a.join(', '); + $('#alltags').html(content); $('#alltags').show(); }; @@ -1864,11 +1865,14 @@ function loadTags(listId, callback) _mtt.db.request('tagCloud', {list:listId}, function(json){ if (!parseInt(json.total)) tagsList = []; else tagsList = json.items; - var cloud = ''; + let cloud = ''; tagsList.forEach( item => { // item.tag is escaped with htmlspecialchars() cloud += ' ' + item.tag + ''; }); + if (cloud == '') { + cloud = _mtt.lang.get('noTags'); + } $('#tagcloudcontent').html(cloud) flag.tagsChanged = false; callback(); diff --git a/src/content/theme/style.css b/src/content/theme/style.css index 328e62c..f96a4b2 100644 --- a/src/content/theme/style.css +++ b/src/content/theme/style.css @@ -711,7 +711,11 @@ li.task-row.task-completed .task-note-block .task-note { text-decoration:line-th padding: 5px; } #page_taskedit .form-row-short { float:left; margin-right:12px; } -#alltags .tag { font-weight:bold; color:var(--color-tasklist-tag); } +#alltags .tag { + color:var(--color-tasklist-tag); + text-decoration: underline; + cursor: pointer; +} #alltags .tag:hover { background-color:var(--color-taglist-text-hover-bg); color: var(--color-taglist-text-hover); diff --git a/src/includes/class.lang.php b/src/includes/class.lang.php index dcb0246..f43fc2e 100644 --- a/src/includes/class.lang.php +++ b/src/includes/class.lang.php @@ -126,6 +126,7 @@ class Lang 'denied', 'listNotFound', 'noPublicLists', + 'noTags', 'invalidpass', 'addList', 'addListDefault', diff --git a/src/includes/lang/en.json b/src/includes/lang/en.json index 3fd5e0a..9f774f0 100644 --- a/src/includes/lang/en.json +++ b/src/includes/lang/en.json @@ -194,6 +194,7 @@ "denied": "Access denied", "listNotFound": "List not found", "noPublicLists": "No public tasks", + "noTags": "No tags", "invalidpass": "Wrong password", "addList": "Create new list", "addListDefault": "Todo", diff --git a/src/includes/lang/ru.json b/src/includes/lang/ru.json index b195990..b44872c 100644 --- a/src/includes/lang/ru.json +++ b/src/includes/lang/ru.json @@ -194,6 +194,7 @@ "denied": "Доступ запрещен", "listNotFound": "Список не найден", "noPublicLists": "Нет опубликованных списков", + "noTags": "Нет тегов", "invalidpass": "Неверный пароль", "addList": "Новый список", "addListDefault": "Todo", diff --git a/src/includes/theme.php b/src/includes/theme.php index fdb4bbf..c348c5c 100644 --- a/src/includes/theme.php +++ b/src/includes/theme.php @@ -163,7 +163,7 @@ $().ready(function(){ -
+