mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
rename html id #mtt_body to #mtt
This commit is contained in:
parent
2f2c6f2b79
commit
5adf485f68
3 changed files with 52 additions and 45 deletions
|
|
@ -167,7 +167,9 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
flag.needAuth = options.needAuth ? true : false;
|
||||
flag.isLogged = options.isLogged ? true : false;
|
||||
|
||||
if(this.options.showdate) $('#page_tasks').addClass('show-inline-date');
|
||||
if (this.options.showdate) {
|
||||
$('#mtt').addClass('show-inline-date');
|
||||
}
|
||||
|
||||
// handlers
|
||||
$('.mtt-tabs-new-button').click(function(){
|
||||
|
|
@ -536,7 +538,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
});
|
||||
/*$('#cmenu_note').hide();*/
|
||||
$("#lists ul").sortable('disable');
|
||||
$("#mtt_body").addClass("touch-device");
|
||||
$("#mtt").addClass("touch-device");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -544,12 +546,14 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
$(document).ajaxSend(function(r,s){
|
||||
$("#msg").hide().removeClass('mtt-error mtt-info').find('.msg-details').hide();
|
||||
clearTimeout(_mtt.timers.ajaxAnimation);
|
||||
_mtt.timers.ajaxAnimation = setTimeout(function(){ $("#mtt_body").addClass("ajax-loading"); }, _mtt.options.ajaxAnimationDelay);
|
||||
_mtt.timers.ajaxAnimation = setTimeout( function(){
|
||||
$("#mtt").addClass("ajax-loading");
|
||||
}, _mtt.options.ajaxAnimationDelay );
|
||||
});
|
||||
|
||||
$(document).ajaxStop(function(r,s){
|
||||
clearTimeout(_mtt.timers.ajaxAnimation);
|
||||
$("#mtt_body").removeClass("ajax-loading");
|
||||
$("#mtt").removeClass("ajax-loading");
|
||||
});
|
||||
|
||||
$(document).ajaxError(function(event, request, settings){
|
||||
|
|
@ -738,14 +742,14 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
}
|
||||
|
||||
if (_mtt.options.markdown == true) {
|
||||
$('#mtt_body').addClass('markdown-enabled');
|
||||
$('#mtt').addClass('markdown-enabled');
|
||||
}
|
||||
|
||||
if (tabLists.length() > 0) {
|
||||
$('#mtt_body').removeClass('no-lists');
|
||||
$('#mtt').removeClass('no-lists');
|
||||
}
|
||||
else {
|
||||
$('#mtt_body').addClass('no-lists');
|
||||
$('#mtt').addClass('no-lists');
|
||||
}
|
||||
|
||||
if (_mtt.options.openList != 0 && openListId == 0) {
|
||||
|
|
@ -761,7 +765,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
|
||||
_mtt.options.openList = 0;
|
||||
$('#lists .mtt-tab-selected').removeClass('mtt-tab-selected');
|
||||
$('#mtt_body').addClass('no-list-selected');
|
||||
$('#mtt').addClass('no-list-selected');
|
||||
$('#lists ul').html(ti);
|
||||
$('#lists').show();
|
||||
_mtt.doAction('listsLoaded');
|
||||
|
|
@ -807,11 +811,11 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
var prev = this.pages.current;
|
||||
prev.lastScrollTop = $(window).scrollTop();
|
||||
this.pages.prev.push(this.pages.current);
|
||||
$('#mtt_body').removeClass('page-' + prev.page);
|
||||
$('#mtt').removeClass('page-' + prev.page);
|
||||
$('#page_'+ prev.page).removeClass('mtt-page-'+prev.page.pageClass).hide();
|
||||
}
|
||||
this.pages.current = { page:page, pageClass:pageClass };
|
||||
$('#mtt_body').addClass('page-' + page);
|
||||
$('#mtt').addClass('page-' + page);
|
||||
$('#page_'+ this.pages.current.page).show().addClass('mtt-page-'+ this.pages.current.pageClass);
|
||||
},
|
||||
|
||||
|
|
@ -829,13 +833,13 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
}
|
||||
if (this.pages.current) {
|
||||
var prev = this.pages.current;
|
||||
$('#mtt_body').removeClass('page-' + prev.page);
|
||||
$('#mtt').removeClass('page-' + prev.page);
|
||||
$('#page_'+ prev.page).removeClass('mtt-page-'+prev.page.pageClass);
|
||||
$('#page_'+ prev.page).hide();
|
||||
}
|
||||
var cur = this.pages.prev.pop();
|
||||
this.pages.current = cur ? cur : this.pageDefault;
|
||||
$('#mtt_body').addClass('page-' + this.pages.current.page);
|
||||
$('#mtt').addClass('page-' + this.pages.current.page);
|
||||
$('#page_'+ this.pages.current.page).addClass('mtt-page-'+ this.pages.current.pageClass).show();
|
||||
$(window).scrollTop(this.pages.current.lastScrollTop);
|
||||
if (!cur && this.pages.current.onOpen) {
|
||||
|
|
@ -1427,7 +1431,7 @@ function tabSelect(elementOrId)
|
|||
else {
|
||||
$('#tasks_info').hide();
|
||||
$('.mtt-need-list').removeClass('mtt-item-disabled');
|
||||
$('#mtt_body').removeClass('no-list-selected');
|
||||
$('#mtt').removeClass('no-list-selected');
|
||||
}
|
||||
|
||||
var prevList = curList;
|
||||
|
|
@ -1444,11 +1448,10 @@ function tabSelect(elementOrId)
|
|||
$('#listmenucontainer .mtt-need-real-list').removeClass('mtt-item-hidden');
|
||||
}
|
||||
|
||||
if(prevList.id != id)
|
||||
{
|
||||
if(id == -1) $('#mtt_body').addClass('show-all-tasks');
|
||||
else $('#mtt_body').removeClass('show-all-tasks');
|
||||
if(filter.search != '') liveSearchToggle(0, 1);
|
||||
if (prevList.id != id) {
|
||||
if (id == -1) $('#mtt').addClass('show-all-tasks');
|
||||
else $('#mtt').removeClass('show-all-tasks');
|
||||
if (filter.search != '') liveSearchToggle(0, 1);
|
||||
mytinytodo.doAction('listSelected', tabLists.get(id));
|
||||
}
|
||||
var newTitle = curList.name + ' - ' + _mtt.options.title;
|
||||
|
|
@ -2466,19 +2469,19 @@ function updateAccessStatus()
|
|||
}
|
||||
}
|
||||
else {
|
||||
$('#mtt_body').addClass('no-need-auth');
|
||||
$('#mtt').addClass('no-need-auth');
|
||||
}
|
||||
if(flag.needAuth && !flag.isLogged) {
|
||||
flag.readOnly = true;
|
||||
$("#bar_public").show();
|
||||
$('#mtt_body').addClass('readonly')
|
||||
$('#mtt').addClass('readonly')
|
||||
liveSearchToggle(1);
|
||||
// remove some tab menu items
|
||||
$('#btnRenameList,#btnDeleteList,#btnClearCompleted,#btnPublish').remove();
|
||||
}
|
||||
else {
|
||||
flag.readOnly = false;
|
||||
$('#mtt_body').removeClass('readonly')
|
||||
$('#mtt').removeClass('readonly')
|
||||
$("#bar_public").hide();
|
||||
liveSearchToggle(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ body, td, th, input, textarea, select {
|
|||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", /*Roboto,*/ Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
||||
font-size: 1rem;
|
||||
}
|
||||
#mtt_body {
|
||||
#mtt {
|
||||
flex: 1 0 auto;
|
||||
width:100%;
|
||||
max-width:1000px;
|
||||
|
|
@ -129,7 +129,7 @@ form { display: inline; }
|
|||
background: url(images/logo.gif) no-repeat top left;
|
||||
background-size: 24px 24px;
|
||||
}
|
||||
#mtt_body.ajax-loading .topblock h2 {
|
||||
#mtt.ajax-loading .topblock h2 {
|
||||
background-image: url(images/logo-loading.gif);
|
||||
}
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ a { color: var(--color-link); cursor:pointer; text-decoration:underline; }
|
|||
}
|
||||
|
||||
|
||||
#mtt_body.no-need-auth .mtt-need-auth-enabled { display:none; }
|
||||
#mtt.no-need-auth .mtt-need-auth-enabled { display:none; }
|
||||
|
||||
#page_login {
|
||||
max-width: 250px;
|
||||
|
|
@ -216,7 +216,7 @@ a { color: var(--color-link); cursor:pointer; text-decoration:underline; }
|
|||
#msg.mtt-info .msg-details { border:1px solid var(--color-info); }
|
||||
|
||||
#lists { font-size:0.95rem; display:flex; align-items:flex-start; justify-content:flex-end; }
|
||||
#mtt_body.readonly.no-lists #lists > * { visibility: hidden; }
|
||||
#mtt.readonly.no-lists #lists > * { visibility: hidden; }
|
||||
.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; }
|
||||
|
|
@ -276,7 +276,7 @@ a { color: var(--color-link); cursor:pointer; text-decoration:underline; }
|
|||
background-color: var(--color-tab-text);
|
||||
}
|
||||
.mtt-tabs-new-button:hover { cursor:pointer; background-color: var(--color-tab-hover); }
|
||||
#mtt_body.readonly .mtt-tabs-new-button { display:none; }
|
||||
#mtt.readonly .mtt-tabs-new-button { display:none; }
|
||||
|
||||
.mtt-tabs-select-button > span {
|
||||
mask: url(images/selectlist2.svg) no-repeat; -webkit-mask: url(images/selectlist2.svg) no-repeat;
|
||||
|
|
@ -296,9 +296,9 @@ a { color: var(--color-link); cursor:pointer; text-decoration:underline; }
|
|||
}
|
||||
.mtt-img-button span { display:block; width:16px; height:16px; }
|
||||
|
||||
#mtt_body.no-lists #toolbar > * { visibility:hidden; }
|
||||
#mtt_body.no-list-selected #toolbar > * { visibility:hidden; }
|
||||
#mtt_body.readonly.no-lists #toolbar { visibility: hidden; }
|
||||
#mtt.no-lists #toolbar > * { visibility:hidden; }
|
||||
#mtt.no-list-selected #toolbar > * { visibility:hidden; }
|
||||
#mtt.readonly.no-lists #toolbar { visibility: hidden; }
|
||||
#toolbar {
|
||||
padding:8px;
|
||||
border-bottom:1px solid var(--color-row-underlinig);
|
||||
|
|
@ -328,7 +328,7 @@ a { color: var(--color-link); cursor:pointer; text-decoration:underline; }
|
|||
background: var(--color-bg);
|
||||
height:1.35rem; padding:2px 4px; padding-right:20px; border:1px solid var(--color-border-default); border-radius:3px; width:100%; margin-left:-24px;
|
||||
}
|
||||
#mtt_body.show-all-tasks .taskbox-c, #mtt_body.readonly .taskbox-c { display:none; }
|
||||
#mtt.show-all-tasks .taskbox-c, #mtt.readonly .taskbox-c { display:none; }
|
||||
|
||||
.mtt-taskbox-icon {
|
||||
width:16px; height:16px;
|
||||
|
|
@ -383,8 +383,8 @@ a { color: var(--color-link); cursor:pointer; text-decoration:underline; }
|
|||
|
||||
/* */
|
||||
#page_tasks h3 { display:flex; align-items:baseline; }
|
||||
#mtt_body.no-lists #page_tasks h3 { visibility:hidden; }
|
||||
#mtt_body.no-list-selected #page_tasks h3 { visibility:hidden; }
|
||||
#mtt.no-lists #page_tasks h3 { visibility:hidden; }
|
||||
#mtt.no-list-selected #page_tasks h3 { visibility:hidden; }
|
||||
.mtt-notes-showhide { font-size:1rem; font-weight:normal; margin-left:5px; margin-right:5px; }
|
||||
.mtt-notes-showhide a { text-decoration:none; border-bottom:1px dotted; }
|
||||
|
||||
|
|
@ -492,13 +492,13 @@ li.task-row.task-expanded .task-toggle { transform:rotate(90deg); }
|
|||
.task-left label { min-width:18px; text-align:center; } /* Safari has small checkboxes */
|
||||
.task-date { color:var(--color-text-reduced3); font-size:0.8rem; margin-left:4px; display:none; }
|
||||
.task-date-completed { color:var(--color-text-reduced3); display:none; margin-left:5px; }
|
||||
.show-inline-date .task-date { display:inline; }
|
||||
.show-inline-date li.task-row.task-completed .task-date-completed { display:inline; }
|
||||
.show-inline-date li.task-row.task-completed .task-date { display:none; }
|
||||
#mtt.show-inline-date .task-date { display:inline; }
|
||||
#mtt.show-inline-date li.task-row.task-completed .task-date-completed { display:inline; }
|
||||
#mtt.show-inline-date li.task-row.task-completed .task-date { display:none; }
|
||||
.task-through { overflow:hidden; flex-grow:1; }
|
||||
.task-title a { color: var(--color-text-default); }
|
||||
.task-title a:hover { color: var(--color-tasklist-link-hover); }
|
||||
#mtt_body.readonly #tasklist li.task-row .task-actions { display:none; }
|
||||
#mtt.readonly #tasklist li.task-row .task-actions { display:none; }
|
||||
.task-listname {
|
||||
background-color:#eee;
|
||||
color:#555;
|
||||
|
|
@ -650,7 +650,11 @@ li.task-row.task-completed .task-note-block .task-note { text-decoration:line-th
|
|||
.alltags-cell { width:1%; white-space:nowrap; padding-left:5px; }
|
||||
#page_taskedit.mtt-inadd .mtt-inedit { display:none; }
|
||||
#page_taskedit.mtt-inedit .mtt-inadd { display:none; }
|
||||
#taskedit_id { color: var(--color-text-reduced2); font-weight: normal; }
|
||||
#taskedit_id {
|
||||
color: var(--color-text-reduced2);
|
||||
font-weight: normal;
|
||||
margin-left: 5px;
|
||||
}
|
||||
#taskedit_info { font-size:1rem; font-weight:normal; color:var(--color-text-reduced2); margin-bottom:6px; }
|
||||
#taskedit_info > div { margin-top:6px; }
|
||||
|
||||
|
|
@ -690,7 +694,7 @@ h3.page-title a.mtt-back-button {
|
|||
#priopopup .prio-pos-1:hover { border-color: var(--color-priority-high); }
|
||||
|
||||
#tagcloudbtn { font-size:1rem; font-weight:normal; margin-left:auto; }
|
||||
#mtt_body.show-all-tasks #tagcloudbtn { display:none; }
|
||||
#mtt.show-all-tasks #tagcloudbtn { display:none; }
|
||||
#tagcloudload { display:none; height:24px; background:url(images/loading48.gif) center no-repeat; background-size:24px 24px; }
|
||||
#tagcloud {
|
||||
overflow: hidden; z-index:100;
|
||||
|
|
@ -853,8 +857,8 @@ li.mtt-item-hidden { display:none; }
|
|||
|
||||
#slmenucontainer li.mtt-list-hidden a { font-style:italic; }
|
||||
#cmenulistscontainer li.mtt-list-hidden { font-style:italic; }
|
||||
#mtt_body.readonly .mtt-need-list { display:none; }
|
||||
#mtt_body.readonly .mtt-only-authorized { display:none; }
|
||||
#mtt.readonly .mtt-need-list { display:none; }
|
||||
#mtt.readonly .mtt-only-authorized { display:none; }
|
||||
|
||||
/**/
|
||||
|
||||
|
|
@ -919,9 +923,9 @@ li.mtt-item-hidden { display:none; }
|
|||
/* narrow screens */
|
||||
@media only screen and (max-width: 600px) {
|
||||
|
||||
#mtt_body { padding: 15px 8px 0px; }
|
||||
#mtt_body.page-ajax .topblock { display: none; } /* hide topmost block if settings pages is opened */
|
||||
#mtt_body.page-taskedit .topblock { display: none; } /* hide topmost block if edit/add task page is opened */
|
||||
#mtt { padding: 15px 8px 0px; }
|
||||
#mtt.page-ajax .topblock { display: none; } /* hide topmost block if settings pages is opened */
|
||||
#mtt.page-taskedit .topblock { display: none; } /* hide topmost block if edit/add task page is opened */
|
||||
|
||||
h2 { font-size:1rem; }
|
||||
.topblock h2 {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ $().ready(function(){
|
|||
});
|
||||
</script>
|
||||
|
||||
<div id="mtt_body">
|
||||
<div id="mtt">
|
||||
|
||||
<!-- Top block -->
|
||||
<div class="topblock">
|
||||
|
|
@ -274,7 +274,7 @@ $().ready(function(){
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
</div><!-- end of #mtt_body -->
|
||||
</div><!-- end of #mtt -->
|
||||
|
||||
<div id="footer">
|
||||
<div id="footer_content">
|
||||
|
|
|
|||
Loading…
Reference in a new issue