mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
+ add list menu item "Hide list"
This commit is contained in:
parent
d100b60e9d
commit
f6be2714d9
4 changed files with 18 additions and 12 deletions
|
|
@ -117,7 +117,8 @@
|
|||
"list_export": "Export",
|
||||
"list_export_csv": "CSV",
|
||||
"list_export_ical": "iCalendar",
|
||||
"list_rssfeed": "RSS Feed",
|
||||
"list_rssfeed": "RSS Feed",
|
||||
"list_hide": "Hide list",
|
||||
"alltags": "All tags:",
|
||||
"alltags_show": "Show all",
|
||||
"alltags_hide": "Hide all",
|
||||
|
|
@ -169,4 +170,4 @@
|
|||
"deleteList": "This will delete current list with all tasks in it.\nAre you sure?",
|
||||
"clearCompleted": "This will delete all completed tasks in the list.\nAre you sure?",
|
||||
"settingsSaved": "Settings saved. Reloading..."
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
"My Tiny Todolist": "My Tiny Todolist",
|
||||
"desktop_version": "Версия для компьютера",
|
||||
"mobile_version": "Мобильная версия",
|
||||
"powered_by": "Работает на",
|
||||
"powered_by": "Работает на",
|
||||
"htab_newtask": "Новая задача",
|
||||
"htab_search": "Поиск",
|
||||
"btn_add": "Добавить",
|
||||
|
|
@ -117,7 +117,8 @@
|
|||
"list_export": "Экспортировать",
|
||||
"list_export_csv": "CSV",
|
||||
"list_export_ical": "iCalendar",
|
||||
"list_rssfeed": "RSS-лента",
|
||||
"list_rssfeed": "RSS-лента",
|
||||
"list_hide": "Скрыть список",
|
||||
"alltags": "Все теги:",
|
||||
"alltags_show": "Показать все",
|
||||
"alltags_hide": "Скрыть все",
|
||||
|
|
@ -169,4 +170,4 @@
|
|||
"deleteList": "Вы действительно хотите удалить этот список со всеми задачами?",
|
||||
"clearCompleted": "Удалить все выполненные задачи из списка?",
|
||||
"settingsSaved": "Настройки сохранены. Перезагрузка..."
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ $().ready(function(){
|
|||
<li class="mtt-need-list mtt-need-real-list" id="btnDeleteList"><?php _e('list_delete');?></li>
|
||||
<li class="mtt-need-list mtt-need-real-list" id="btnClearCompleted"><?php _e('list_clearcompleted');?></li>
|
||||
<li class="mtt-need-list mtt-need-real-list mtt-menu-indicator" submenu="listexportmenucontainer"><div class="submenu-icon"></div><?php _e('list_export'); ?></li>
|
||||
<li class="mtt-need-list mtt-need-real-list" id="btnHideList"><?php _e('list_hide');?></li>
|
||||
<li class="mtt-menu-delimiter mtt-need-real-list"></li>
|
||||
<li class="mtt-need-list mtt-need-real-list" id="btnPublish"><div class="menu-icon"></div><?php _e('list_publish');?></li>
|
||||
<li class="mtt-need-list mtt-need-real-list" id="btnRssFeed"><div class="menu-icon"></div><a href="#"><?php _e('list_rssfeed');?></a></li>
|
||||
|
|
|
|||
|
|
@ -280,7 +280,8 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
$('#lists').on('click', 'li.mtt-tab', function(event){
|
||||
if(event.metaKey || event.ctrlKey) {
|
||||
// hide the tab
|
||||
hideTab(this);
|
||||
var listId = parseInt(this.id.split('_', 2)[1]);
|
||||
hideList(listId);
|
||||
return false;
|
||||
}
|
||||
tabSelect(this);
|
||||
|
|
@ -290,7 +291,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
$('#list_all').click(function(event){
|
||||
if(event.metaKey || event.ctrlKey) {
|
||||
// hide the tab
|
||||
hideTab(-1);
|
||||
hideList(-1);
|
||||
return false;
|
||||
}
|
||||
tabSelect(-1);
|
||||
|
|
@ -1371,6 +1372,7 @@ function listMenuClick(el, menu)
|
|||
case 'btnRenameList': renameCurList(); break;
|
||||
case 'btnDeleteList': deleteCurList(); break;
|
||||
case 'btnPublish': publishCurList(); break;
|
||||
case 'btnHideList': hideList(curList.id); break;
|
||||
case 'btnExportCSV': return true;
|
||||
case 'btnExportICAL': return true;
|
||||
case 'btnRssFeed': return true;
|
||||
|
|
@ -2239,12 +2241,13 @@ function slmenuSelect(el, menu)
|
|||
return false;
|
||||
};
|
||||
|
||||
function hideTab(listId)
|
||||
function hideList(listId)
|
||||
{
|
||||
if(typeof listId != 'number') {
|
||||
var id = $(listId).attr('id');
|
||||
if(!id) return;
|
||||
listId = parseInt(id.split('_', 2)[1]);
|
||||
if (typeof listId === 'string') {
|
||||
listId = parseInt(listId);
|
||||
}
|
||||
else if (typeof listId !== 'number') {
|
||||
return;
|
||||
}
|
||||
|
||||
if(!tabLists.get(listId)) return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue