diff --git a/src/content/themes/default/print.css b/src/content/themes/default/print.css
index a373781..6e917aa 100644
--- a/src/content/themes/default/print.css
+++ b/src/content/themes/default/print.css
@@ -14,7 +14,6 @@ h3 { border-bottom:2px solid #777777; }
.mtt-tab a span { text-align:left; padding:0; max-width:none; font-size:1.3rem; color:#000; }
.mtt-tabs-add-button { display:none; }
-#list_all { display:none; }
#tabs_buttons { display:none; }
#taskview { padding-left:0; font-weight:normal; }
#taskview .arrdown { display:none; }
diff --git a/src/content/themes/default/style.css b/src/content/themes/default/style.css
index 2af8d7d..48a1282 100644
--- a/src/content/themes/default/style.css
+++ b/src/content/themes/default/style.css
@@ -54,8 +54,7 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
.tabs-n-button { flex-grow:1; display:flex; align-items:flex-start; }
.tab-height-wrapper { box-sizing:border-box; height:2.2rem; display:flex; align-items:center; }
.mtt-tabs { list-style:none; padding:0; margin:0; display:flex; justify-content:flex-start; flex-wrap:wrap; }
-.mtt-tabs li { margin:1px 3px 0 0; }
-.mtt-tab { background-color:#fbfbfb; border:1px solid #ededed; border-bottom:none; border-top-right-radius:8px; transition:background-color 0.1s ease-in; }
+.mtt-tab { margin:1px 3px 0 0; background-color:#fbfbfb; border:1px solid #ededed; border-bottom:none; border-top-right-radius:8px; transition:background-color 0.1s ease-in; }
.mtt-tab a {
margin:0; text-decoration:none; white-space:nowrap; color:#333333; display:inline-block; outline:none;
box-sizing:border-box; height:2.2rem; padding:1px 0.3rem 0 0.3rem; display:flex; align-items:center;
@@ -68,10 +67,7 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
.mtt-tab:hover { background-color:#ddd; }
.mtt-tab.mtt-tabs-selected:hover { background-color:#ededed; }
.mtt-tabs-hidden { display:none; }
-.mtt-tabs .mtt-list-sort-placeholder { background-color:#ddd; border:1px solid #aaa; }
-
-.mtt-tabs-alltasks { margin:1px 3px 0 3px; }
-.mtt-tabs-alltasks.mtt-tab { border-top-right-radius:0px; border-top-left-radius:8px; }
+.mtt-tab-sort-placeholder { background-color:#ddd; border-color:#aaa; }
#tabs_buttons {
padding-left:2px; padding-right:2px;
diff --git a/src/includes/mytinytodo.js b/src/includes/mytinytodo.js
index 06b40cc..e6524d5 100644
--- a/src/includes/mytinytodo.js
+++ b/src/includes/mytinytodo.js
@@ -477,20 +477,22 @@ var mytinytodo = window.mytinytodo = _mtt = {
}
$("#tasklist").sortable({
- items: '> :not(.task-completed)',
- cancel: 'span,input,a,textarea',
- delay: 150,
- start: tasklistSortStart,
- update: tasklistSortUpdated,
- placeholder: 'mtt-task-placeholder',
- cursor: 'grabbing'
+ items: '> :not(.task-completed)',
+ cancel: 'span,input,a,textarea',
+ delay: 150,
+ start: tasklistSortStart,
+ update: tasklistSortUpdated,
+ placeholder: 'mtt-task-placeholder',
+ cursor: 'grabbing'
});
$("#lists ul").sortable({
- delay:150,
- update:listOrderChanged,
- placeholder: 'mtt-list-sort-placeholder',
+ delay: 150,
+ update: listOrderChanged,
+ items: '> :not(.mtt-tabs-alltasks)',
+ forcePlaceholderSize : true,
+ placeholder: 'mtt-tab mtt-tab-sort-placeholder',
cursor: 'grabbing'
});
@@ -673,11 +675,18 @@ var mytinytodo = window.mytinytodo = _mtt = {
// or open first if all list are hidden
if(!openListId) openListId = res.list[0].id;
- $.each(res.list, function(i,item){
- tabLists.add(item);
- ti += '
'+
- ''+item.name+''+
- '';
+ $.each(res.list, function(i,item) {
+ if ( item.id == -1) {
+ ti += '
'+
+ ''+item.name+''+
+ '';
+ }
+ else {
+ tabLists.add(item);
+ ti += '
'+
+ ''+item.name+''+
+ '';
+ }
});
}
@@ -1292,12 +1301,13 @@ function toggleAllNotes(show)
function tabSelect(elementOrId)
{
var id;
- if(typeof elementOrId == 'number') id = elementOrId;
+ if (typeof elementOrId == 'number') id = elementOrId;
else if(typeof elementOrId == 'string') id = parseInt(elementOrId);
else {
id = $(elementOrId).attr('id');
- if(!id) return;
- id = parseInt(id.split('_', 2)[1]);
+ if (!id ) return;
+ id = id.split('_', 2)[1];
+ if (id === 'all') id = -1;
}
if ( !tabLists.exists(id) ) {
// TODO: handle unknown list