mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
+ tab menu for all tasks tab
This commit is contained in:
parent
cf22e6d092
commit
b8e27503a9
3 changed files with 56 additions and 49 deletions
|
|
@ -257,6 +257,11 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
listMenu(this);
|
||||
return false; //stop bubble to tab click
|
||||
});
|
||||
|
||||
$('#list_all .list-action').click(function(event){
|
||||
listMenu(this);
|
||||
return false; //stop bubble to tab click
|
||||
});
|
||||
|
||||
//Priority popup
|
||||
$('#priopopup .prio-neg-1').click(function(){
|
||||
|
|
@ -523,12 +528,8 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
'<div class="list-action"></div></a></li>';
|
||||
});
|
||||
|
||||
//TODO: replace 'chilren', with 'addClass'!
|
||||
if(!curList) {
|
||||
$('#toolbar').children().removeClass('invisible');
|
||||
$('#page_tasks h3').children().removeClass('invisible');
|
||||
$('#mylistscontainer .mtt-need-list').removeClass('mtt-disabled');
|
||||
}
|
||||
$('#mtt_body').removeClass('no-lists');
|
||||
$('.mtt-need-list').removeClass('mtt-item-disabled');
|
||||
|
||||
curList = tabLists.get(openId);
|
||||
loadTasks();
|
||||
|
|
@ -536,9 +537,8 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
else
|
||||
{
|
||||
curList = 0;
|
||||
$('#toolbar').children().addClass('invisible');
|
||||
$('#page_tasks h3').children().addClass('invisible');
|
||||
$('#mylistscontainer .mtt-need-list').addClass('mtt-disabled');
|
||||
$('#mtt_body').addClass('no-lists');
|
||||
$('.mtt-need-list').addClass('mtt-item-disabled');
|
||||
$('#tasklist').html('');
|
||||
}
|
||||
|
||||
|
|
@ -737,11 +737,11 @@ function publishCurList()
|
|||
curList.published = curList.published?0:1;
|
||||
if(curList.published) {
|
||||
$('#btnPublish').addClass('mtt-item-checked');
|
||||
$('#btnRssFeed').removeClass('mtt-disabled');
|
||||
$('#btnRssFeed').removeClass('mtt-item-disabled');
|
||||
}
|
||||
else {
|
||||
$('#btnPublish').removeClass('mtt-item-checked');
|
||||
$('#btnRssFeed').addClass('mtt-disabled');
|
||||
$('#btnRssFeed').addClass('mtt-item-disabled');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -998,7 +998,7 @@ function setTaskPrio(id, prio)
|
|||
|
||||
function setSort(v, init)
|
||||
{
|
||||
$('#mylistscontainer .sort-item').removeClass('mtt-item-checked').children('.mtt-sort-direction').text('');
|
||||
$('#listmenucontainer .sort-item').removeClass('mtt-item-checked').children('.mtt-sort-direction').text('');
|
||||
if(v == 0) $('#sortByHand').addClass('mtt-item-checked');
|
||||
else if(v==1 || v==101) $('#sortByPrio').addClass('mtt-item-checked').children('.mtt-sort-direction').text(v==1 ? '↑' : '↓');
|
||||
else if(v==2 || v==102) $('#sortByDueDate').addClass('mtt-item-checked').children('.mtt-sort-direction').text(v==2 ? '↑' : '↓');
|
||||
|
|
@ -1101,15 +1101,17 @@ function tabSelected(elementOrId)
|
|||
|
||||
if(id == -1) {
|
||||
$('#list_all').addClass('mtt-tabs-selected').removeClass('mtt-tabs-hidden');
|
||||
$('#listmenucontainer .mtt-need-real-list').addClass('mtt-item-hidden');
|
||||
}
|
||||
else {
|
||||
$('#list_'+id).addClass('mtt-tabs-selected').removeClass('mtt-tabs-hidden');
|
||||
$('#listmenucontainer .mtt-need-real-list').removeClass('mtt-item-hidden');
|
||||
}
|
||||
|
||||
if(curList.id != id)
|
||||
{
|
||||
if(id == -1) $('#page_tasks').addClass('show-all-tasks');
|
||||
else $('#page_tasks').removeClass('show-all-tasks');
|
||||
if(id == -1) $('#mtt_body').addClass('show-all-tasks');
|
||||
else $('#mtt_body').removeClass('show-all-tasks');
|
||||
if(filter.search != '') liveSearchToggle(0, 1);
|
||||
mytinytodo.doAction('listSelected', tabLists.get(id));
|
||||
}
|
||||
|
|
@ -1124,7 +1126,7 @@ function tabSelected(elementOrId)
|
|||
|
||||
function listMenu(el)
|
||||
{
|
||||
if(!mytinytodo.menus.listMenu) mytinytodo.menus.listMenu = new mttMenu('mylistscontainer', {onclick:listMenuClick});
|
||||
if(!mytinytodo.menus.listMenu) mytinytodo.menus.listMenu = new mttMenu('listmenucontainer', {onclick:listMenuClick});
|
||||
mytinytodo.menus.listMenu.show(el);
|
||||
};
|
||||
|
||||
|
|
@ -1562,7 +1564,7 @@ function mttMenu(container, options)
|
|||
|
||||
this.onclick = function(item, fromMenu)
|
||||
{
|
||||
if($(item).is('.mtt-disabled,.mtt-menu-indicator')) return;
|
||||
if($(item).is('.mtt-item-disabled,.mtt-menu-indicator,.mtt-item-hidden')) return;
|
||||
menu.close();
|
||||
if(this.options.onclick) this.options.onclick(item, fromMenu);
|
||||
};
|
||||
|
|
@ -1745,14 +1747,14 @@ function cmenuOnListRenamed(list)
|
|||
|
||||
function cmenuOnListSelected(list)
|
||||
{
|
||||
$('#cmenulistscontainer li').removeClass('mtt-disabled');
|
||||
$('#cmenu_list\\:'+list.id).addClass('mtt-disabled');
|
||||
$('#cmenulistscontainer li').removeClass('mtt-item-disabled');
|
||||
$('#cmenu_list\\:'+list.id).addClass('mtt-item-disabled');
|
||||
};
|
||||
|
||||
function cmenuOnListOrderChanged()
|
||||
{
|
||||
cmenuOnListsLoaded();
|
||||
$('#cmenu_list\\:'+curList.id).addClass('mtt-disabled');
|
||||
$('#cmenu_list\\:'+curList.id).addClass('mtt-item-disabled');
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -1760,11 +1762,11 @@ function tabmenuOnListSelected(list)
|
|||
{
|
||||
if(list.published) {
|
||||
$('#btnPublish').addClass('mtt-item-checked');
|
||||
$('#btnRssFeed').removeClass('mtt-disabled');
|
||||
$('#btnRssFeed').removeClass('mtt-item-disabled');
|
||||
}
|
||||
else {
|
||||
$('#btnPublish').removeClass('mtt-item-checked');
|
||||
$('#btnRssFeed').addClass('mtt-disabled');
|
||||
$('#btnRssFeed').addClass('mtt-item-disabled');
|
||||
}
|
||||
if(list.showCompl) $('#btnShowCompleted').addClass('mtt-item-checked');
|
||||
else $('#btnShowCompleted').removeClass('mtt-item-checked');
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ $().ready(function(){
|
|||
|
||||
<div id="wrapper">
|
||||
<div id="container">
|
||||
<div id="body">
|
||||
<div id="mtt_body">
|
||||
|
||||
<h2><?php mttinfo('title'); ?></h2>
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ $().ready(function(){
|
|||
<div id="tabs_buttons">
|
||||
<div class="mtt-tabs-select-button mtt-tabs-button" title="<?php _e('list_select'); ?>"><span></span></div>
|
||||
</div>
|
||||
<div id="list_all" class="mtt-tabs-alltasks mtt-tabs-hidden"><a href="#alltasks"><span><?php _e('alltasks'); ?><span></a></div>
|
||||
<div id="list_all" class="mtt-tab mtt-tabs-alltasks mtt-tabs-hidden"><a href="#alltasks"><span><?php _e('alltasks'); ?></span><div class="list-action"></div></a></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
@ -215,17 +215,17 @@ $().ready(function(){
|
|||
</div>
|
||||
|
||||
|
||||
<div id="mylistscontainer" class="mtt-menu-container" style="display:none">
|
||||
<div id="listmenucontainer" class="mtt-menu-container" style="display:none">
|
||||
<ul>
|
||||
<li class="mtt-need-list" id="btnRenameList"><?php _e('list_rename');?></li>
|
||||
<li class="mtt-need-list" id="btnDeleteList"><?php _e('list_delete');?></li>
|
||||
<li class="mtt-need-list" id="btnClearCompleted"><?php _e('list_clearcompleted');?></li>
|
||||
<li class="mtt-need-list" id="btnExportCSV"><?php _e('list_exportcsv');?></li>
|
||||
<li class="mtt-menu-delimiter"></li>
|
||||
<li class="mtt-need-list" id="btnPublish"><div class="menu-icon"></div><?php _e('list_publish');?></li>
|
||||
<li class="mtt-need-list" id="btnRssFeed"><div class="menu-icon"></div><?php _e('list_rssfeed');?></li>
|
||||
<li class="mtt-menu-delimiter"></li>
|
||||
<li class="mtt-need-list sort-item" id="sortByHand"><div class="menu-icon"></div><?php _e('sortByHand');?> <span class="mtt-sort-direction"></span></li>
|
||||
<li class="mtt-need-list mtt-need-real-list" id="btnRenameList"><?php _e('list_rename');?></li>
|
||||
<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" id="btnExportCSV"><?php _e('list_exportcsv');?></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><?php _e('list_rssfeed');?></li>
|
||||
<li class="mtt-menu-delimiter mtt-need-real-list"></li>
|
||||
<li class="mtt-need-list mtt-need-real-list sort-item" id="sortByHand"><div class="menu-icon"></div><?php _e('sortByHand');?> <span class="mtt-sort-direction"></span></li>
|
||||
<li class="mtt-need-list sort-item" id="sortByDateCreated"><div class="menu-icon"></div><?php _e('sortByDateCreated');?> <span class="mtt-sort-direction"></span></li>
|
||||
<li class="mtt-need-list sort-item" id="sortByPrio"><div class="menu-icon"></div><?php _e('sortByPriority');?> <span class="mtt-sort-direction"></span></li>
|
||||
<li class="mtt-need-list sort-item" id="sortByDueDate"><div class="menu-icon"></div><?php _e('sortByDueDate');?> <span class="mtt-sort-direction"></span></li>
|
||||
|
|
@ -261,8 +261,8 @@ $().ready(function(){
|
|||
|
||||
<div id="slmenucontainer" class="mtt-menu-container" style="display:none">
|
||||
<ul>
|
||||
<li id="slmenu_list:-1" class="list-id--1" <?php if(is_readonly()) echo 'style="display:none"' ?>><div class="menu-icon"></div><a href="#alltasks"><?php _e('alltasks'); ?></a></li>
|
||||
<li class="mtt-menu-delimiter slmenu-lists-begin" <?php if(is_readonly()) echo 'style="display:none"' ?>></li>
|
||||
<li id="slmenu_list:-1" class="list-id--1 mtt-need-list" <?php if(is_readonly()) echo 'style="display:none"' ?>><div class="menu-icon"></div><a href="#alltasks"><?php _e('alltasks'); ?></a></li>
|
||||
<li class="mtt-menu-delimiter slmenu-lists-begin mtt-need-list" <?php if(is_readonly()) echo 'style="display:none"' ?>></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ html { height:100%; overflow-y:scroll; }
|
|||
body { margin:0px; padding:0px; height:100%; min-height:100%; background-color:#fff; font-family:arial; font-size:10pt; }
|
||||
#wrapper { margin:0px auto; max-width:950px; height:100%; }
|
||||
#container { height:auto !important;height:100%;min-height:100%; }
|
||||
#body { padding:8px; padding-bottom:16px; }
|
||||
#mtt_body { padding:8px; padding-bottom:16px; }
|
||||
|
||||
|
||||
td, th, input, textarea, select { font-family:arial; font-size:1em; }
|
||||
|
|
@ -45,13 +45,13 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
|
|||
|
||||
.mtt-tabs { list-style:none; padding:0; margin:0; }
|
||||
.mtt-tabs li { margin:1px 3px 0 0; float:left; border-left:1px solid #ededed; background:#fbfbfb url(images/tab_hover.gif) no-repeat top right; }
|
||||
.mtt-tabs a { position:relative; margin:0; font-size:0.9em; font-weight:bold; text-decoration:none; text-align:center; white-space:nowrap; color:#444444; display:block; height:21px; padding:6px 6px 0px 2px; outline:none; vertical-align:top; }
|
||||
.mtt-tabs a span { display:inline-block; min-width:75px; max-width:195px; cursor:pointer; padding:0; overflow:hidden; }
|
||||
.mtt-tabs .list-action { display:none; float:left; position:absolute; top:6px; right:5px; width:15px; height:15px; background:transparent url(images/icons.gif) 0 0 no-repeat; cursor:pointer; }
|
||||
.mtt-tabs .list-action:hover, .mtt-tabs .list-action.mtt-menu-button-active { background-position:-16px 0; }
|
||||
.mtt-tabs li.mtt-tabs-selected span { margin-right:16px; }
|
||||
.mtt-tabs li.mtt-tabs-selected .list-action { display:block; }
|
||||
.mtt-tabs li.mtt-tabs-selected { background:#ededed url(images/corner_right.gif) no-repeat top right; border-left:1px solid #ededed; }
|
||||
.mtt-tab a { position:relative; margin:0; font-size:0.9em; font-weight:bold; text-decoration:none; text-align:center; white-space:nowrap; color:#444444; display:block; height:21px; padding:6px 6px 0px 2px; outline:none; vertical-align:top; }
|
||||
.mtt-tab a span { display:inline-block; min-width:75px; max-width:195px; cursor:pointer; padding:0; overflow:hidden; }
|
||||
.mtt-tab .list-action { display:none; float:left; position:absolute; top:6px; right:5px; width:15px; height:15px; background:transparent url(images/icons.gif) 0 0 no-repeat; cursor:pointer; }
|
||||
.mtt-tab .list-action:hover, .mtt-tab .list-action.mtt-menu-button-active { background-position:-16px 0; }
|
||||
.mtt-tab.mtt-tabs-selected span { margin-right:16px; }
|
||||
.mtt-tab.mtt-tabs-selected .list-action { display:block; }
|
||||
.mtt-tab.mtt-tabs-selected { background:#ededed url(images/corner_right.gif) no-repeat top right; border-left:1px solid #ededed; }
|
||||
.mtt-tabs li:hover a { color: #888888; }
|
||||
.mtt-tabs.mtt-tabs-only-one li { display:none; }
|
||||
.mtt-tabs.mtt-tabs-only-one li.mtt-tabs-selected { display:block; }
|
||||
|
|
@ -59,8 +59,9 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
|
|||
.mtt-tabs-hidden { display:none; }
|
||||
|
||||
.mtt-tabs-alltasks { margin:1px 3px 0 3px; float:right; border-right:1px solid #ededed; background:#fbfbfb url(images/tab_hover.gif) no-repeat top left; }
|
||||
.mtt-tabs-alltasks a { position:relative; margin:0; font-size:0.9em; font-weight:bold; text-decoration:none; text-align:center; white-space:nowrap; color:#444444; display:block; height:21px; padding:6px 2px 0px 6px; outline:none; vertical-align:top; }
|
||||
.mtt-tabs-alltasks.mtt-tabs-selected { border-left:none; border-right:1px solid #ededed; background:#ededed url(images/corner_left.gif) no-repeat top left; }
|
||||
.mtt-tabs-alltasks.mtt-tab a { padding:6px 2px 0px 6px; }
|
||||
.mtt-tabs-alltasks.mtt-tab.mtt-tabs-selected { border-left:none; border-right:1px solid #ededed; background:#ededed url(images/corner_left.gif) no-repeat top left; }
|
||||
|
||||
|
||||
#tabs_buttons {
|
||||
float:right;
|
||||
|
|
@ -100,6 +101,8 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
|
|||
.mtt-tabs-select-button>span { background:url(images/icons.gif) -64px 0 no-repeat; }
|
||||
.mtt-tabs-select-button:hover>span, .mtt-tabs-select-button.mtt-menu-button-active>span { background-position:-80px 0; }
|
||||
|
||||
|
||||
#mtt_body.no-lists #toolbar > * { visibility:hidden; }
|
||||
.mtt-htabs { clear:both; padding:8px; border-bottom:2px solid #DEDEDE; background:#ededed; }
|
||||
|
||||
.mtt-img-button { width:16px; height:16px; padding:2px; border:1px solid transparent; display:inline-block; }
|
||||
|
|
@ -123,7 +126,7 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
|
|||
|
||||
#newtask_adv span { background:url(images/buttons.png) 0 -48px no-repeat; }
|
||||
#newtask_adv:hover span { background-position:-16px -48px; }
|
||||
#page_tasks.show-all-tasks #htab_newtask, #page_tasks.readonly #htab_newtask { display:none; }
|
||||
#mtt_body.show-all-tasks #htab_newtask, #mtt_body.readonly #htab_newtask { display:none; }
|
||||
|
||||
|
||||
/* Live Search */
|
||||
|
|
@ -146,6 +149,7 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
|
|||
|
||||
|
||||
/* */
|
||||
#mtt_body.no-lists #page_tasks h3 > * { visibility:hidden; }
|
||||
.mtt-notes-showhide { font-size:0.8em; font-weight:normal; margin-left:2px; margin-right:2px; }
|
||||
.mtt-notes-showhide a { text-decoration:none; border-bottom:1px dotted; }
|
||||
|
||||
|
|
@ -252,7 +256,7 @@ a.mtt-back-button { font-size:0.8em; }
|
|||
#priopopup .prio-pos-1:hover { border-color:#ff7700; }
|
||||
|
||||
#tagcloudbtn { margin-right:2px; font-size:0.8em; font-weight:normal; padding:2px; float:right; }
|
||||
#page_tasks.show-all-tasks #tagcloudbtn { display:none; }
|
||||
#mtt_body.show-all-tasks #tagcloudbtn { display:none; }
|
||||
#tagcloudload { display:none; height:24px; background:url(images/loading1_24.gif) center no-repeat; }
|
||||
#tagcloud {
|
||||
overflow: hidden; z-index:100; background-color:#f9f9f9; border:1px solid #cccccc; padding:5px;
|
||||
|
|
@ -322,7 +326,7 @@ a.mtt-back-button { font-size:0.8em; }
|
|||
background:-moz-linear-gradient(#5373fc, #3157f4);
|
||||
background:-webkit-gradient(linear, left top, left bottom, from(#5373fc), to(#3157f4));
|
||||
}
|
||||
.mtt-menu-container li.mtt-disabled { color:#ACA899; }
|
||||
.mtt-menu-container li.mtt-item-disabled, .mtt-menu-container li.mtt-item-disabled a { color:#ACA899; }
|
||||
.mtt-menu-container a { display:block; cursor:default; text-decoration:none; outline:none; color:#000; }
|
||||
.mtt-menu-container li:hover a { color:white; }
|
||||
.mtt-menu-container li.mtt-menu-delimiter { height:0px; line-height:0; border-bottom:1px solid #cccccc; margin:2px -1px; padding:0px; font-size:0px; }
|
||||
|
|
@ -332,9 +336,10 @@ li.mtt-menu-indicator .submenu-icon {
|
|||
position:absolute; right:2px; top:50%; margin-top:-8px;
|
||||
width:16px; height:16px; background:url(images/icons.gif) -32px -16px no-repeat;
|
||||
}
|
||||
li.mtt-item-hidden { display:none; }
|
||||
|
||||
#btnRssFeed .menu-icon { background:url(images/buttons.png) -16px -64px no-repeat; }
|
||||
#btnRssFeed.mtt-disabled .menu-icon { background:url(images/buttons.png) 0px -64px no-repeat; }
|
||||
#btnRssFeed.mtt-item-disabled .menu-icon { background:url(images/buttons.png) 0px -64px no-repeat; }
|
||||
|
||||
.mtt-settings-table { width:100%; border-collapse:collapse; }
|
||||
.mtt-settings-table th, .mtt-settings-table td { border-bottom:1px solid #dedede; padding:8px; vertical-align:top; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue