mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
apply editorconfig (line endings and final empty line)
This commit is contained in:
parent
fddfb9e1cf
commit
78b02537f8
26 changed files with 1020 additions and 1023 deletions
|
|
@ -1,3 +1,3 @@
|
|||
myTinyTodo
|
||||
|
||||
Original website - http://www.mytinytodo.net/
|
||||
Original website - http://www.mytinytodo.net/
|
||||
|
|
|
|||
|
|
@ -41,4 +41,4 @@ Url: https://github.com/furf/jquery-ui-touch-punch
|
|||
Copyright: Copyright 2011–2014, Dave Furfero
|
||||
License: Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
||||
This software contains images by 3d-parties. See files content/themes/default/images/COPYRIGHT and content/themes/ie8/images/COPYRIGHT for details.
|
||||
This software contains images by 3d-parties. See files content/themes/default/images/COPYRIGHT and content/themes/ie8/images/COPYRIGHT for details.
|
||||
|
|
|
|||
16
src/ajax.php
16
src/ajax.php
|
|
@ -4,7 +4,7 @@
|
|||
This file is part of myTinyTodo.
|
||||
(C) Copyright 2009-2010 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL v2 license. See file COPYRIGHT for details.
|
||||
*/
|
||||
*/
|
||||
|
||||
set_error_handler('myErrorHandler');
|
||||
set_exception_handler('myExceptionHandler');
|
||||
|
|
@ -46,7 +46,7 @@ elseif(isset($_GET['loadTasks']))
|
|||
if (_get('compl') == 0) {
|
||||
$sqlWhere .= ' AND compl=0';
|
||||
}
|
||||
|
||||
|
||||
$tag = trim(_get('t'));
|
||||
if($tag != '')
|
||||
{
|
||||
|
|
@ -87,7 +87,7 @@ elseif(isset($_GET['loadTasks']))
|
|||
if (preg_match("|^#(\d+)$|", $s, $m)) $sqlWhere .= " AND {$db->prefix}todolist.id = ". (int)$m[1];
|
||||
else $sqlWhere .= " AND (title LIKE ". $db->quoteForLike("%%%s%%",$s). " OR note LIKE ". $db->quoteForLike("%%%s%%",$s). ")";
|
||||
}
|
||||
|
||||
|
||||
$sort = (int)_get('sort');
|
||||
$sqlSort = "ORDER BY compl ASC, ";
|
||||
if($sort == 1) $sqlSort .= "prio DESC, ddn ASC, duedate ASC, ow ASC"; // byPrio
|
||||
|
|
@ -524,7 +524,7 @@ elseif(isset($_GET['setHideList']))
|
|||
$flag = (int)_post('hide');
|
||||
$bitwise = ($flag == 0) ? 'taskview & ~4' : 'taskview | 4';
|
||||
$db->dq("UPDATE {$db->prefix}lists SET taskview=$bitwise WHERE id=$listId");
|
||||
jsonExit(array('total'=>1));
|
||||
jsonExit(array('total'=>1));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -718,9 +718,9 @@ function parse_duedate($s)
|
|||
$d = (int)$ma[1]; $m = (int)$ma[2]; $y = (int)$ma[3];
|
||||
}
|
||||
elseif(preg_match("|^(\d+)\.(\d+)\b|", $s, $ma)) {
|
||||
$d = (int)$ma[1]; $m = (int)$ma[2];
|
||||
$d = (int)$ma[1]; $m = (int)$ma[2];
|
||||
$a = explode(',', date('Y,m,d'));
|
||||
if( $m<(int)$a[1] || ($m==(int)$a[1] && $d<(int)$a[2]) ) $y = (int)$a[0]+1;
|
||||
if( $m<(int)$a[1] || ($m==(int)$a[1] && $d<(int)$a[2]) ) $y = (int)$a[0]+1;
|
||||
else $y = (int)$a[0];
|
||||
}
|
||||
elseif(preg_match("|^(\d+)\/(\d+)\b|", $s, $ma))
|
||||
|
|
@ -731,7 +731,7 @@ function parse_duedate($s)
|
|||
$m = (int)$ma[1]; $d = (int)$ma[2];
|
||||
}
|
||||
$a = explode(',', date('Y,m,d'));
|
||||
if( $m<(int)$a[1] || ($m==(int)$a[1] && $d<(int)$a[2]) ) $y = (int)$a[0]+1;
|
||||
if( $m<(int)$a[1] || ($m==(int)$a[1] && $d<(int)$a[2]) ) $y = (int)$a[0]+1;
|
||||
else $y = (int)$a[0];
|
||||
}
|
||||
else return null;
|
||||
|
|
@ -853,7 +853,7 @@ function moveTask($id, $listId)
|
|||
return false;
|
||||
|
||||
$ow = 1 + (int)$db->sq("SELECT MAX(ow) FROM {$db->prefix}todolist WHERE list_id=? AND compl=?", array($listId, $r['compl']?1:0));
|
||||
|
||||
|
||||
$db->ex("BEGIN");
|
||||
$db->ex("UPDATE {$db->prefix}tag2task SET list_id=? WHERE task_id=?", array($listId, $id));
|
||||
$db->dq("UPDATE {$db->prefix}todolist SET list_id=?, ow=?, d_edited=? WHERE id=?", array($listId, $ow, time(), $id));
|
||||
|
|
|
|||
|
|
@ -103,18 +103,18 @@ $().ready(function(){
|
|||
<input type="text" name="task" value="" maxlength="250" id="task" autocomplete="off" placeholder="<?php _e('htab_newtask');?>"/>
|
||||
<div id="newtask_submit" class="mtt-taskbox-icon" title="<?php _e('btn_add');?>"></div>
|
||||
</form>
|
||||
</div>
|
||||
<a href="#" id="newtask_adv" class="mtt-img-button" title="<?php _e('advanced_add');?>"><span></span></a>
|
||||
</div>
|
||||
<a href="#" id="newtask_adv" class="mtt-img-button" title="<?php _e('advanced_add');?>"><span></span></a>
|
||||
</div>
|
||||
<div class="searchbox-c">
|
||||
<div class="mtt-searchbox">
|
||||
<input type="text" name="search" value="" maxlength="250" id="search" autocomplete="off" />
|
||||
<div class="mtt-searchbox-icon mtt-icon-search"></div>
|
||||
<div id="search_close" class="mtt-searchbox-icon mtt-icon-cancelsearch"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="searchbar" style="display:none"><?php _e('searching');?> <span id="searchbarkeyword"></span></div>
|
||||
|
||||
<div id="mtt-tag-toolbar" style="display:none">
|
||||
|
|
@ -179,7 +179,7 @@ $().ready(function(){
|
|||
</div>
|
||||
<div class="form-row" id="alltags" style="display:none;"><?php _e('alltags');?> <span class="tags-list"></span></div>
|
||||
<div class="form-row form-bottom-buttons">
|
||||
<input type="submit" value="<?php _e('save');?>" class="form-input-button" />
|
||||
<input type="submit" value="<?php _e('save');?>" class="form-input-button" />
|
||||
<input type="button" id="mtt_edit_cancel" class="mtt-back-button form-input-button" value="<?php _e('cancel');?>" />
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -282,7 +282,7 @@ $().ready(function(){
|
|||
</div><!-- end of #container -->
|
||||
|
||||
<div id="footer">
|
||||
<div id="footer_content">
|
||||
<div id="footer_content">
|
||||
<span><?php _e('powered_by');?> <a href="http://www.mytinytodo.net/" class="powered-by-link">myTinyTodo</a> <?php mttinfo('version'); ?></span>
|
||||
<span id="mobileordesktop">
|
||||
<?php if(Config::get('mobile')): ?><a href="<?php echo getDesktopUrl(); ?>"><?php _e('desktop_version');?></a>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
This file is a part of myTinyTodo.
|
||||
Copyright 2009-2010,2020 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
*/
|
||||
|
||||
|
|
@ -30,19 +30,17 @@ h2 { margin:0; margin-bottom:2px; font-size:1rem; }
|
|||
.task-actions { display:none; }
|
||||
.task-date { display:none; }
|
||||
.task-note-actions { display:block; padding-top:8px; }
|
||||
.task-note-block { margin-left:0px; border-left:1px solid #777777; background:none; padding-left:4px; display:none; }
|
||||
.task-note-block { margin-left:0px; border-left:1px solid #777777; background:none; padding-left:4px; display:none; }
|
||||
body[dir="rtl"] .task-note-block { border-left:none; border-right:1px solid #777777; padding-left:0; padding-right:4px; }
|
||||
.task-note-area textarea { width:95%; }
|
||||
|
||||
#tasklist li .task-through { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
||||
#tasklist li:hover { background-color:#ffffff; }
|
||||
#tasklist li.task-expanded .task-note-block { display:none; }
|
||||
/*#tasklist li.task-expanded .task-toggle { background-position:-32px 0; }*/
|
||||
#tasklist li.clicked { background-color:#f6f6f6; }
|
||||
#tasklist li.clicked .task-actions { display:block; }
|
||||
#tasklist li.clicked .task-through { white-space:normal; display:inline; }
|
||||
#tasklist li.clicked.task-has-note .task-note-block { display:block; }
|
||||
/*#tasklist li.clicked.task-has-note .task-toggle { background-position:-48px 0; } */
|
||||
#tasklist li.clicked.doubleclicked.task-has-note .task-note-block { display:none; }
|
||||
.task-toggle { display:none; }
|
||||
#tasklist .mtt-task-placeholder { line-height:1rem; padding-top:0.6rem; padding-bottom:0.6rem; }
|
||||
|
|
@ -54,7 +52,6 @@ body[dir="rtl"] .task-note-block { border-left:none; border-right:1px solid #777
|
|||
#page_taskedit .form-row textarea { height: 70px; }
|
||||
|
||||
#loading { padding:0px; padding-top:1px; padding-right:1px; height:16px; overflow:hidden; }
|
||||
#loading img { /*width:8px; height:8px;*/ }
|
||||
|
||||
#tagcloud { max-width:100%; margin:0px 5px 5px 5px; }
|
||||
.mtt-settings-table .in350 { min-width:50px; }
|
||||
|
|
@ -66,4 +63,4 @@ body[dir="rtl"] .task-note-block { border-left:none; border-right:1px solid #777
|
|||
#slmenucontainer { max-width:100vw; }
|
||||
#slmenucontainer a { overflow:hidden; text-overflow:ellipsis; }
|
||||
#cmenulistscontainer { max-width:100vw; }
|
||||
#cmenulistscontainer li { overflow:hidden; text-overflow:ellipsis; }
|
||||
#cmenulistscontainer li { overflow:hidden; text-overflow:ellipsis; }
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
html { height:0; }
|
||||
body { height:0; min-height:0; margin:0; }
|
||||
h2{ display: none; }
|
||||
h3 { border-bottom:2px solid #777777; }
|
||||
h3 { border-bottom:2px solid #777777; }
|
||||
#toolbar { display: none; }
|
||||
|
||||
.topblock { display:none; }
|
||||
|
|
@ -22,7 +22,7 @@ h3 { border-bottom:2px solid #777777; }
|
|||
#tasklist { list-style-type: decimal; list-style-position: outside; }
|
||||
#tasklist li { border-bottom:none; margin-left:2.5rem; /*border-bottom:1px solid #f0f0f0;*/ }
|
||||
|
||||
div.task-note-block { border-left:1px solid #777777; background:none; padding-left:5px; margin-top:5px; padding-top:0px; font-size:9pt; color:#333333; }
|
||||
div.task-note-block { border-left:1px solid #777777; background:none; padding-left:5px; margin-top:5px; padding-top:0px; font-size:9pt; color:#333333; }
|
||||
.task-middle { margin-left:0px; margin-right:3px; }
|
||||
.task-left { display:none; }
|
||||
.task-actions { display:none; }
|
||||
|
|
@ -40,4 +40,4 @@ li.task-completed { opacity:1; }
|
|||
.mtt-notes-showhide { display:none; }
|
||||
#taskview img { display:none; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
This file is a part of myTinyTodo.
|
||||
Copyright 2009-2010,2020 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
*/
|
||||
|
||||
|
|
@ -58,11 +58,11 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
|
|||
.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 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;
|
||||
box-sizing:border-box; height:2.2rem; padding:1px 0.3rem 0 0.3rem; display:flex; align-items:center;
|
||||
}
|
||||
.mtt-tab a span { display:inline-block; text-align:center; min-width:75px; max-width:195px; cursor:pointer; padding:0; overflow:hidden; padding-left:0.3rem; padding-right:0.3rem;}
|
||||
.mtt-tab .list-action { display:none; width:16px; height:16px; background:transparent url(images/arrdown.svg) no-repeat; cursor:pointer; }
|
||||
.mtt-tab .list-action:hover, .mtt-tab .list-action.mtt-menu-button-active { background-image:url(images/arrdown-hover.svg); }
|
||||
.mtt-tab .list-action:hover, .mtt-tab .list-action.mtt-menu-button-active { background-image:url(images/arrdown-hover.svg); }
|
||||
.mtt-tab.mtt-tabs-selected .list-action { display:block; }
|
||||
.mtt-tab.mtt-tabs-selected { border-color:transparent; background-color:#ededed; }
|
||||
.mtt-tab:hover { background-color:#ddd; }
|
||||
|
|
@ -70,7 +70,7 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
|
|||
.mtt-tabs.mtt-tabs-only-one li { display:none; }
|
||||
.mtt-tabs.mtt-tabs-only-one li.mtt-tabs-selected { display:block; }
|
||||
.mtt-tabs-hidden { display:none; }
|
||||
|
||||
|
||||
.mtt-tabs-alltasks { margin:1px 3px 0 3px; }
|
||||
.mtt-tabs-alltasks.mtt-tab { border-top-right-radius:0px; border-top-left-radius:8px; }
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
|
|||
/* Live Search */
|
||||
#search {
|
||||
color:#444444; background:#fff; height:1.35rem; padding:2px 20px; width:100%; margin-left:-42px; /*padding+border*/
|
||||
border:1px solid #ccc; border-radius:10px;
|
||||
border:1px solid #ccc; border-radius:10px;
|
||||
}
|
||||
#search_close { display:none; }
|
||||
|
||||
|
|
@ -196,8 +196,8 @@ li.task-expanded .task-toggle { transform:rotate(90deg); }
|
|||
.duedate:before { content:'\2192\20'; }
|
||||
li.task-completed .duedate { /*font-size:0.8rem;*/ display:none; }
|
||||
#tasklist li.soon .duedate { color:#008000; }
|
||||
#tasklist li.today .duedate { color:#FF0000; }
|
||||
#tasklist li.past .duedate { color:#A52A2A; }
|
||||
#tasklist li.today .duedate { color:#FF0000; }
|
||||
#tasklist li.past .duedate { color:#A52A2A; }
|
||||
li.task-completed .task-middle { color:#777777;}
|
||||
li.task-completed .task-through { text-decoration:line-through; }
|
||||
li.task-completed .task-title a { color:#777777; }
|
||||
|
|
@ -213,7 +213,7 @@ li.task-completed .task-title a { color:#777777; }
|
|||
.taskactionbtn { height:1rem; width:1rem; background:url(images/task-menu2.svg) center no-repeat; background-size:1rem; visibility:hidden; /* allocate space */
|
||||
opacity:0.45; transition:opacity .1s ease-in; }
|
||||
.taskactionbtn::after { content:'0'; color:transparent; } /* for baseline */
|
||||
li:hover .taskactionbtn { visibility:visible; }
|
||||
li:hover .taskactionbtn { visibility:visible; }
|
||||
.taskactionbtn:hover, .taskactionbtn.mtt-menu-button-active { opacity:0.7; cursor:pointer; visibility:visible; }
|
||||
|
||||
#tasklist.filter-past li, #tasklist.filter-today li, #tasklist.filter-soon li { display:none; }
|
||||
|
|
@ -239,7 +239,7 @@ li.task-completed .task-note-block .task-note { text-decoration:line-through; }
|
|||
.prio-pos { background-color:#ff3333; color:#ffffff; }
|
||||
.prio-pos-1 { background-color:#ff7700; color:#ffffff; }
|
||||
.prio-zero { /*background-color:#dedede;*/ }
|
||||
.task-prio.prio-zero { display:none; }
|
||||
.task-prio.prio-zero { display:none; }
|
||||
|
||||
.form-row { margin-top:0.6rem; }
|
||||
.form-row .h { font-weight:bold; color:#333333; }
|
||||
|
|
@ -268,7 +268,7 @@ a.mtt-back-button { font-size:1rem; }
|
|||
.ui-autocomplete .ui-menu-item-wrapper { position: relative; padding:0.3rem 4px; }
|
||||
.ui-autocomplete .ui-menu-item-wrapper.ui-state-active { background-color:#5a8df0; color:white; }
|
||||
|
||||
#priopopup { overflow: hidden; z-index:100; background-color:#f9f9f9; border:1px solid #cccccc; padding:5px; }
|
||||
#priopopup { overflow: hidden; z-index:100; background-color:#f9f9f9; border:1px solid #cccccc; padding:5px; }
|
||||
#priopopup span { cursor:pointer; border:1px solid #f9f9f9; padding:1px; }
|
||||
#priopopup .prio-zero:hover { border-color:#dedede; }
|
||||
#priopopup .prio-neg:hover { border-color:#3377ff; }
|
||||
|
|
@ -303,7 +303,7 @@ a.mtt-back-button { font-size:1rem; }
|
|||
#tagcloudcancel span { background:url(images/close.svg) no-repeat; }
|
||||
|
||||
.ui-datepicker { width:220px; z-index:202; border: 1px solid #cccccc; background: #ffffff; display:none; padding:2px; box-shadow:1px 2px 5px rgba(0,0,0,0.5); border-radius:5px; }
|
||||
.ui-datepicker-trigger { cursor:pointer; vertical-align:text-bottom; margin-left:4px; margin-right:4px; width:16px; height:16px; }
|
||||
.ui-datepicker-trigger { cursor:pointer; vertical-align:text-bottom; margin-left:4px; margin-right:4px; width:16px; height:16px; }
|
||||
.ui-datepicker-calendar { width:100%; border-collapse:collapse; }
|
||||
.ui-datepicker-calendar thead th { text-align:center; padding:0px; font-size:0.9rem; }
|
||||
.ui-datepicker-calendar tbody td { text-align:right; padding:1px; }
|
||||
|
|
@ -325,14 +325,14 @@ a.mtt-back-button { font-size:1rem; }
|
|||
padding:4px;
|
||||
transition:background-color 0.1s ease-in;
|
||||
}
|
||||
.mtt-menu-button:hover, .mtt-menu-button.mtt-menu-button-active {
|
||||
.mtt-menu-button:hover, .mtt-menu-button.mtt-menu-button-active {
|
||||
background-color:#efefef; border-radius:4px;
|
||||
}
|
||||
|
||||
.mtt-menu-container {
|
||||
.mtt-menu-container {
|
||||
overflow:hidden; z-index:100;
|
||||
background-color:#f9f9f9; border:1px solid #cccccc; padding:2px 0px;
|
||||
box-shadow:1px 2px 5px rgba(0,0,0,0.5);
|
||||
box-shadow:1px 2px 5px rgba(0,0,0,0.5);
|
||||
border-radius:5px;
|
||||
user-select:none;
|
||||
}
|
||||
|
|
@ -341,7 +341,7 @@ a.mtt-back-button { font-size:1rem; }
|
|||
.mtt-menu-container.mtt-right-adjusted.mtt-left-adjusted { margin-bottom:5px; }
|
||||
.mtt-menu-container ul { list-style: none; padding:0; margin:0; }
|
||||
.mtt-menu-container li { margin:1px 0px; cursor:default; color:#000; white-space:nowrap; padding-top:0.20rem; padding-bottom:0.20rem; padding-left:28px; padding-right:28px; position:relative; }
|
||||
.mtt-menu-container li:hover, .mtt-menu-container li.mtt-menu-item-active {
|
||||
.mtt-menu-container li:hover, .mtt-menu-container li.mtt-menu-item-active {
|
||||
background-color:#5a8df0; color:white;
|
||||
}
|
||||
.mtt-menu-container li.mtt-item-disabled, .mtt-menu-container li.mtt-item-disabled a { color:#ACA899; }
|
||||
|
|
|
|||
|
|
@ -37,4 +37,4 @@ h2 { padding-left:10px; padding-right:0px; }
|
|||
|
||||
.mtt-menu-container { box-shadow:-1px 2px 5px rgba(0,0,0,0.5); }
|
||||
.mtt-menu-container .menu-icon { left:auto; right:6px; }
|
||||
li.mtt-menu-indicator .submenu-icon { left:6px; right:auto; transform:rotate(180deg); }
|
||||
li.mtt-menu-indicator .submenu-icon { left:6px; right:auto; transform:rotate(180deg); }
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ $().ready(function(){
|
|||
<input type="text" name="search" value="" maxlength="250" id="search" autocomplete="off" />
|
||||
<div class="mtt-searchbox-icon mtt-icon-search"></div>
|
||||
<div id="search_close" class="mtt-searchbox-icon mtt-icon-cancelsearch"></div>
|
||||
</div>
|
||||
</div>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ $().ready(function(){
|
|||
<td><a href="#" id="newtask_adv" class="mtt-img-button" title="<?php _e('advanced_add');?>"><span></span></a></td>
|
||||
</tr></table>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="searchbar" style="display:none"><?php _e('searching');?> <span id="searchbarkeyword"></span></div>
|
||||
|
||||
<div style="clear:both"></div>
|
||||
|
|
@ -169,7 +169,7 @@ $().ready(function(){
|
|||
</div>
|
||||
<div class="form-row" id="alltags" style="display:none;"><?php _e('alltags');?> <span class="tags-list"></span></div>
|
||||
<div class="form-row form-bottom-buttons">
|
||||
<input type="submit" value="<?php _e('save');?>" />
|
||||
<input type="submit" value="<?php _e('save');?>" />
|
||||
<input type="button" id="mtt_edit_cancel" class="mtt-back-button" value="<?php _e('cancel');?>" />
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ if (window !== undefined && window.mytinytodo !== undefined)
|
|||
|
||||
mytinytodo.prepareTaskStr = function(item, noteExp) {
|
||||
// — = — = —
|
||||
var id = item.id;
|
||||
var id = item.id;
|
||||
var prio = item.prio;
|
||||
return '<li id="taskrow_'+id+'" class="' + (item.compl?'task-completed ':'') + item.dueClass + (item.note!=''?' task-has-note':'') +
|
||||
((this.curList.showNotes && item.note != '') || noteExp ? ' task-expanded' : '') + this.prepareTagsClass(item.tags_ids) + '">' +
|
||||
|
|
@ -25,7 +25,7 @@ if (window !== undefined && window.mytinytodo !== undefined)
|
|||
'</div>'+
|
||||
"</div></li>\n";
|
||||
};
|
||||
|
||||
|
||||
mytinytodo.filter.prepareTagHtml = function(tagId, tag, classes) {
|
||||
return '<span class="' + classes.join(' ') + '">' + tag + '<span class="mtt-filter-close" tagid="' + tagId + '"></span></span>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ h3 { margin-bottom:4px; padding:4px 0; }
|
|||
.task-actions { display:none; }
|
||||
.task-date { display:none; }
|
||||
.task-note-actions { display:block; padding-top:8px; }
|
||||
.task-note-block { margin-left:0px; border-left:1px solid #777777; background:none; padding-left:4px; margin-top:1px; padding-top:0px; display:none; }
|
||||
.task-note-block { margin-left:0px; border-left:1px solid #777777; background:none; padding-left:4px; margin-top:1px; padding-top:0px; display:none; }
|
||||
.task-note-area textarea { width:95%; }
|
||||
.task-middle { margin-right:0px; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
html { height:0; }
|
||||
body { height:0; min-height:0; margin:0; }
|
||||
h2{ display: none; }
|
||||
h3 { border-bottom:2px solid #777777; }
|
||||
h3 { border-bottom:2px solid #777777; }
|
||||
#lists { display: none; }
|
||||
#toolbar { display: none; }
|
||||
.small-bar { display:none; }
|
||||
|
|
@ -12,8 +12,8 @@ h3 { border-bottom:2px solid #777777; }
|
|||
#taskviewcontainer img { display:none; }
|
||||
|
||||
#tasklist { list-style-type: decimal; list-style-position: outside; }
|
||||
#tasklist li { padding-left:0px; margin-left:30px; border-bottom:none; padding-bottom: 8px; }
|
||||
div.task-note-block { border-left:1px solid #777777; background:none; padding-left:5px; margin-top:5px; padding-top:0px; font-size:9pt; color:#333333; }
|
||||
#tasklist li { padding-left:0px; margin-left:30px; border-bottom:none; padding-bottom: 8px; }
|
||||
div.task-note-block { border-left:1px solid #777777; background:none; padding-left:5px; margin-top:5px; padding-top:0px; font-size:9pt; color:#333333; }
|
||||
.task-middle { margin-left:0px; margin-right:3px; }
|
||||
.task-left { display:none; }
|
||||
|
||||
|
|
@ -28,4 +28,4 @@ li.task-completed { opacity:1; }
|
|||
|
||||
#tagcloudbtn { display:none; }
|
||||
.mtt-notes-showhide { display:none; }
|
||||
#taskview img { display:none; }
|
||||
#taskview img { display:none; }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
This file is a part of myTinyTodo.
|
||||
Copyright 2009-2010 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
*/
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
|
|||
.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 .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; }
|
||||
|
|
@ -57,7 +57,7 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
|
|||
.mtt-tabs.mtt-tabs-only-one li { display:none; }
|
||||
.mtt-tabs.mtt-tabs-only-one li.mtt-tabs-selected { display:block; }
|
||||
.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.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; }
|
||||
|
|
@ -66,7 +66,7 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
|
|||
#tabs_buttons {
|
||||
float:right;
|
||||
padding-top:4px;
|
||||
padding-bottom:2px;
|
||||
padding-bottom:2px;
|
||||
padding-left:2px;
|
||||
padding-right:2px;
|
||||
border:1px solid #ededed;
|
||||
|
|
@ -133,7 +133,7 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
|
|||
#htab_search { float:right; }
|
||||
#search {
|
||||
color:#444444; background:#fff; height:1.35em; padding:2px 18px; width:100%; margin-left:-38px; /*padding+border*/
|
||||
border:1px inset #F0F0F0; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px;
|
||||
border:1px inset #F0F0F0; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px;
|
||||
}
|
||||
#search_close { display:none; }
|
||||
|
||||
|
|
@ -185,8 +185,8 @@ li.task-expanded .task-toggle { background-position:-80px -16px; }
|
|||
.duedate { color:#333333; padding:0px; padding-left:1px; margin-left:5px; }
|
||||
li.task-completed .duedate { /*font-size:0.8em;*/ display:none; }
|
||||
#tasklist li.soon .duedate { color:#008000; }
|
||||
#tasklist li.today .duedate { color:#FF0000; }
|
||||
#tasklist li.past .duedate { color:#A52A2A; }
|
||||
#tasklist li.today .duedate { color:#FF0000; }
|
||||
#tasklist li.past .duedate { color:#A52A2A; }
|
||||
li.task-completed .task-middle { color:#777777;}
|
||||
li.task-completed .task-through { text-decoration:line-through; }
|
||||
li.task-completed .task-title a { color:#777777; }
|
||||
|
|
@ -206,7 +206,7 @@ li:hover a.taskactionbtn, a.taskactionbtn.mtt-menu-button-active { background-po
|
|||
#tasklist.filter-past li.past, #tasklist.filter-today li.today, #tasklist.filter-soon li.soon { display:block; }
|
||||
#tasklist.filter-past li.task-completed, #tasklist.filter-today li.task-completed, #tasklist.filter-soon li.task-completed { display:none; }
|
||||
|
||||
.task-note-block { margin-left:2px; color:#777777; background:url(images/page_white_text.png) left 2px no-repeat;
|
||||
.task-note-block { margin-left:2px; color:#777777; background:url(images/page_white_text.png) left 2px no-repeat;
|
||||
padding-left:19px; padding-top:2px; min-height:16px; margin-top:2px; display:none; word-wrap:break-word; white-space:noraml; }
|
||||
li.task-expanded .task-note-block { display:block; }
|
||||
li.task-completed .task-note-block .task-note { text-decoration:line-through; }
|
||||
|
|
@ -225,7 +225,7 @@ li.task-completed .task-note-block .task-note { text-decoration:line-through; }
|
|||
.prio-pos { background-color:#ff3333; color:#ffffff; }
|
||||
.prio-pos-1 { background-color:#ff7700; color:#ffffff; }
|
||||
.prio-zero { /*background-color:#dedede;*/ }
|
||||
.task-prio.prio-zero { display:none; }
|
||||
.task-prio.prio-zero { display:none; }
|
||||
|
||||
.form-row { margin-top:8px; }
|
||||
.form-row .h { font-weight:bold; color:#333333; }
|
||||
|
|
@ -251,7 +251,7 @@ a.mtt-back-button { font-size:0.8em; }
|
|||
.ui-autocomplete .ui-menu-item-wrapper.ui-state-active { background-color:#5373fc; background:linear-gradient(#5373fc, #3157f4); color:white; }
|
||||
|
||||
|
||||
#priopopup { overflow: hidden; z-index:100; background-color:#f9f9f9; border:1px solid #cccccc; padding:5px; }
|
||||
#priopopup { overflow: hidden; z-index:100; background-color:#f9f9f9; border:1px solid #cccccc; padding:5px; }
|
||||
#priopopup span { cursor:pointer; border:1px solid #f9f9f9; }
|
||||
#priopopup .prio-zero:hover { border-color:#dedede; }
|
||||
#priopopup .prio-neg:hover { border-color:#3377ff; }
|
||||
|
|
@ -265,7 +265,7 @@ a.mtt-back-button { font-size:0.8em; }
|
|||
overflow: hidden; z-index:100; background-color:#f9f9f9; border:1px solid #cccccc; padding:5px;
|
||||
width:100%; max-width:450px; margin:0px 7px 7px 7px; text-align:center;
|
||||
-moz-box-shadow:1px 2px 5px rgba(0,0,0,0.5); -webkit-box-shadow:1px 2px 5px rgba(0,0,0,0.5);
|
||||
}
|
||||
}
|
||||
#tagcloud .tag { margin:1px 0px; padding:2px; line-height:140%; color:black; }
|
||||
#tagcloud .tag:hover { background-color:#999988; color:white; }
|
||||
#tagcloud .w0 { font-size:80%; }
|
||||
|
|
@ -285,11 +285,11 @@ a.mtt-back-button { font-size:0.8em; }
|
|||
|
||||
#taskview { padding:2px; }
|
||||
|
||||
.ui-datepicker { width:190px; z-index:202; border: 1px solid #cccccc; background: #ffffff; display:none; padding:2px;
|
||||
-moz-box-shadow:1px 2px 5px rgba(0,0,0,0.5); -webkit-box-shadow:1px 2px 5px rgba(0,0,0,0.5); box-shadow:1px 2px 5px rgba(0,0,0,0.5);
|
||||
.ui-datepicker { width:190px; z-index:202; border: 1px solid #cccccc; background: #ffffff; display:none; padding:2px;
|
||||
-moz-box-shadow:1px 2px 5px rgba(0,0,0,0.5); -webkit-box-shadow:1px 2px 5px rgba(0,0,0,0.5); box-shadow:1px 2px 5px rgba(0,0,0,0.5);
|
||||
-moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;
|
||||
}
|
||||
.ui-datepicker-trigger { cursor:pointer; vertical-align:text-bottom; margin-left:1px; }
|
||||
.ui-datepicker-trigger { cursor:pointer; vertical-align:text-bottom; margin-left:1px; }
|
||||
.ui-datepicker-calendar { width:100%; border-collapse:collapse; }
|
||||
.ui-datepicker-calendar thead th { text-align:center; padding:0px; font-size:0.9em; }
|
||||
.ui-datepicker-calendar tbody td { text-align:right; padding:1px; }
|
||||
|
|
@ -310,22 +310,22 @@ a.mtt-back-button { font-size:0.8em; }
|
|||
cursor:pointer;
|
||||
border:1px solid transparent;
|
||||
}
|
||||
.mtt-menu-button:hover, .mtt-menu-button.mtt-menu-button-active {
|
||||
.mtt-menu-button:hover, .mtt-menu-button.mtt-menu-button-active {
|
||||
border:1px solid #ccc; -moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px;
|
||||
}
|
||||
|
||||
.mtt-menu-container {
|
||||
.mtt-menu-container {
|
||||
overflow:hidden; z-index:100;
|
||||
background-color:#f9f9f9; border:1px solid #cccccc; padding:2px 0px;
|
||||
-moz-box-shadow:1px 2px 5px rgba(0,0,0,0.5); -webkit-box-shadow:1px 2px 5px rgba(0,0,0,0.5); box-shadow:1px 2px 5px rgba(0,0,0,0.5);
|
||||
-moz-box-shadow:1px 2px 5px rgba(0,0,0,0.5); -webkit-box-shadow:1px 2px 5px rgba(0,0,0,0.5); box-shadow:1px 2px 5px rgba(0,0,0,0.5);
|
||||
-moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;
|
||||
margin:0px 7px 7px 0px; /* for shadows */
|
||||
}
|
||||
}
|
||||
.mtt-menu-container ul { list-style: none; padding:0; margin:0; }
|
||||
.mtt-menu-container li { margin:1px 0px; cursor:default; color:#000; white-space:nowrap; padding:0.15em 0px; padding-left:24px; padding-right:18px; position:relative; }
|
||||
.mtt-menu-container li:hover, .mtt-menu-container li.mtt-menu-item-active {
|
||||
.mtt-menu-container li:hover, .mtt-menu-container li.mtt-menu-item-active {
|
||||
background-color:#316AC5;
|
||||
color:white;
|
||||
color:white;
|
||||
background:-moz-linear-gradient(#5373fc, #3157f4);
|
||||
background:-webkit-gradient(linear, left top, left bottom, from(#5373fc), to(#3157f4));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,4 +30,4 @@ h2 { float:right; padding-left:10px; padding-right:0px; }
|
|||
#taskedit-date { float:left; }
|
||||
#page_taskedit .form-row-short { float:right; margin-left:12px; margin-right:0; }
|
||||
.task-prio { float:right; margin-left:4px; margin-right:0; }
|
||||
.alltags-cell { padding-left:0; padding-right:5px; }
|
||||
.alltags-cell { padding-left:0; padding-right:5px; }
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ else $sqlSort .= "ow ASC";
|
|||
|
||||
$data = array();
|
||||
$q = $db->dq("SELECT *, duedate IS NULL AS ddn FROM {$db->prefix}todolist WHERE list_id=$listId $sqlSort");
|
||||
while($r = $q->fetch_assoc($q))
|
||||
while($r = $q->fetch_assoc($q))
|
||||
{
|
||||
$data[] = $r;
|
||||
$data[] = $r;
|
||||
}
|
||||
|
||||
$format = _get('format');
|
||||
|
||||
|
||||
if($format == 'ical') printICal($listData, $data);
|
||||
else printCSV($listData, $data);
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ function printICal($listData, $data)
|
|||
# Apple's iCal priorities: low-9, medium-5, high-1
|
||||
if($r['prio'] > 0 && isset($mttToIcalPrio[$r['prio']])) $a[] = "PRIORITY:". $mttToIcalPrio[$r['prio']];
|
||||
$a[] = "X-MTT-PRIORITY:". $r['prio'];
|
||||
|
||||
|
||||
$descr = array();
|
||||
if($r['tags'] != '') $descr[] = Lang::instance()->get('tags'). ": ". str_replace(',', ', ', $r['tags']);
|
||||
if($r['note'] != '') $descr[] = Lang::instance()->get('note'). ": ". $r['note'];
|
||||
|
|
@ -112,7 +112,7 @@ function printICal($listData, $data)
|
|||
# events
|
||||
foreach($data as $r)
|
||||
{
|
||||
if(!$r['duedate'] || $r['compl']) continue; # skip tasks completed and without duedate
|
||||
if(!$r['duedate'] || $r['compl']) continue; # skip tasks completed and without duedate
|
||||
$a = array();
|
||||
$a[] = "BEGIN:VEVENT";
|
||||
$a[] = "UID:_". $r['uuid']; # do not duplicate VTODO UID
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ htmlarray_ref($listData);
|
|||
|
||||
$data = array();
|
||||
$q = $db->dq("SELECT * FROM {$db->prefix}todolist WHERE list_id=$listId $sqlWhere ORDER BY ". $listData['_uid_field'] ." DESC LIMIT 100");
|
||||
while($r = $q->fetch_assoc($q))
|
||||
while($r = $q->fetch_assoc($q))
|
||||
{
|
||||
if($r['prio'] > 0) $r['prio'] = '+'.$r['prio'];
|
||||
$a = array();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
/*
|
||||
(C) Copyright 2009,2019 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL v2 license. See file COPYRIGHT for details.
|
||||
*/
|
||||
*/
|
||||
|
||||
// ---------------------------------------------------------------------------- //
|
||||
class DatabaseResult_Mysql
|
||||
|
|
@ -82,8 +82,8 @@ class Database_Mysql
|
|||
function last_insert_id()
|
||||
{
|
||||
return mysqli_insert_id($this->dbh);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function error()
|
||||
{
|
||||
return mysqli_error($this->dbh);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ class DatabaseResult_Sqlite3
|
|||
$r = $this->parent->dbh->exec($query);
|
||||
if($r === false) {
|
||||
$ei = $this->parent->dbh->errorInfo();
|
||||
throw new Exception("SQLSTATE[$ei[0]] [$ei[1]] $ei[2]");
|
||||
throw new Exception("SQLSTATE[$ei[0]] [$ei[1]] $ei[2]");
|
||||
}
|
||||
$this->parent->affected = $r;
|
||||
}
|
||||
|
|
@ -91,13 +91,13 @@ class Database_Sqlite3
|
|||
if(sizeof($res) > 1) return $res;
|
||||
else return $res[0];
|
||||
}
|
||||
|
||||
|
||||
function dq($query, $p = NULL)
|
||||
{
|
||||
return $this->_dq($query, $p);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
for resultless queries like INSERT,UPDATE
|
||||
*/
|
||||
function ex($query, $p = NULL)
|
||||
|
|
|
|||
|
|
@ -11,20 +11,20 @@ class Lang
|
|||
protected $code = 'en';
|
||||
protected $default = 'en';
|
||||
protected $strings;
|
||||
|
||||
|
||||
public static function instance()
|
||||
{
|
||||
if (!isset(self::$instance)) {
|
||||
$c = __CLASS__;
|
||||
self::$instance = new $c;
|
||||
}
|
||||
return self::$instance;
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
|
||||
public static function loadLangOrDie($code, $die = 1)
|
||||
{
|
||||
$lang = self::instance();
|
||||
|
||||
|
||||
//check if json file exists
|
||||
if ( self::langExists($code) ) {
|
||||
$jsonString = file_get_contents( self::$langDir. "{$code}.json" );
|
||||
|
|
@ -39,22 +39,22 @@ class Lang
|
|||
die("Language file not found ($code.json)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static function loadLang($code)
|
||||
{
|
||||
self::loadLangOrDie($code, 0);
|
||||
}
|
||||
|
||||
|
||||
public static function langExists($code)
|
||||
{
|
||||
return file_exists(self::$langDir. $code. '.json');
|
||||
}
|
||||
|
||||
|
||||
function loadJsonString($code, $jsonString)
|
||||
{
|
||||
$this->code = $code;
|
||||
$json = json_decode($jsonString, true);
|
||||
|
||||
|
||||
//load default language
|
||||
if ( $code != $this->default ) {
|
||||
$this->loadDefaultStrings();
|
||||
|
|
@ -64,7 +64,7 @@ class Lang
|
|||
$this->strings = $json;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function loadDefaultStrings()
|
||||
{
|
||||
if ( ! self::langExists($this->default) ) {
|
||||
|
|
@ -73,7 +73,7 @@ class Lang
|
|||
$defStr = file_get_contents($this->langDir(). "{$this->default}.json");
|
||||
$this->strings = json_decode($defStr, true);
|
||||
}
|
||||
|
||||
|
||||
function get($key)
|
||||
{
|
||||
if ( isset($this->strings[$key]) ) {
|
||||
|
|
@ -81,7 +81,7 @@ class Lang
|
|||
}
|
||||
return $key;
|
||||
}
|
||||
|
||||
|
||||
function rtl()
|
||||
{
|
||||
if ( isset($this->strings['_rtl']) ) {
|
||||
|
|
@ -89,7 +89,7 @@ class Lang
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
function makeJS($pretty = 0)
|
||||
{
|
||||
$a = array();
|
||||
|
|
@ -97,7 +97,7 @@ class Lang
|
|||
$a['daysLong'] = $this->get('days_long');
|
||||
$a['monthsShort'] = $this->get('months_short');
|
||||
$a['monthsLong'] = $this->get('months_long');
|
||||
|
||||
|
||||
$this->fillWithValues($a, [
|
||||
'confirmDelete',
|
||||
'confirmLeave',
|
||||
|
|
@ -120,26 +120,26 @@ class Lang
|
|||
'alltasks'
|
||||
]);
|
||||
$a['_rtl'] = $this->rtl() ? 1 : 0;
|
||||
|
||||
|
||||
$opts = JSON_UNESCAPED_UNICODE;
|
||||
if ($pretty) {
|
||||
$opts |= JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES;
|
||||
}
|
||||
return json_encode($a, $opts);
|
||||
}
|
||||
|
||||
|
||||
protected function fillWithValues(array &$a, array $keys)
|
||||
{
|
||||
foreach ( $keys as $key ) {
|
||||
$a[$key] = $this->get($key);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function langDir()
|
||||
{
|
||||
return self::$langDir;
|
||||
}
|
||||
|
||||
|
||||
function langCode()
|
||||
{
|
||||
return $this->code;
|
||||
|
|
|
|||
|
|
@ -35,14 +35,14 @@ function stop_gpc(&$arr)
|
|||
if (!is_array($arr)) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// Since PHP v5.4.0 magic quotes feature was removed from PHP
|
||||
// In PHP v7.4 get_magic_quotes_gpc is deprecated
|
||||
// TODO: do not use get_magic_quotes_gpc() and stop_gpc()
|
||||
if (!@get_magic_quotes_gpc()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
reset($arr);
|
||||
foreach ($arr as $k=>$v)
|
||||
{
|
||||
|
|
@ -74,7 +74,7 @@ function _get($param,$defvalue = '')
|
|||
else {
|
||||
return $_GET[$param];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _server($param, $defvalue = '')
|
||||
{
|
||||
|
|
@ -128,7 +128,7 @@ class Config
|
|||
elseif(isset(self::$params[$key])) return self::$params[$key]['default'];
|
||||
else return null;
|
||||
}
|
||||
|
||||
|
||||
public static function getUrl($key)
|
||||
{
|
||||
$url = '';
|
||||
|
|
@ -162,7 +162,7 @@ class Config
|
|||
if($f === false) throw new Exception("Error while saving config file");
|
||||
fwrite($f, "<?php\n\$config = array();\n$s?>");
|
||||
fclose($f);
|
||||
/*
|
||||
/*
|
||||
//Reset Zend OPcache
|
||||
//opcache_get_status() sometimes crashes
|
||||
//TODO: save config in database!
|
||||
|
|
@ -218,7 +218,7 @@ function escapeTags($s)
|
|||
$c1 = chr(1);
|
||||
$c2 = chr(2);
|
||||
$s = preg_replace("~<b>([\s\S]*?)</b>~i", "${c1}b${c2}\$1${c1}/b${c2}", $s);
|
||||
$s = preg_replace("~<i>([\s\S]*?)</i>~i", "${c1}i${c2}\$1${c1}/i${c2}", $s);
|
||||
$s = preg_replace("~<i>([\s\S]*?)</i>~i", "${c1}i${c2}\$1${c1}/i${c2}", $s);
|
||||
$s = preg_replace("~<u>([\s\S]*?)</u>~i", "${c1}u${c2}\$1${c1}/u${c2}", $s);
|
||||
$s = preg_replace("~<s>([\s\S]*?)</s>~i", "${c1}s${c2}\$1${c1}/s${c2}", $s);
|
||||
$s = str_replace(array($c1, $c2), array('<','>'), htmlspecialchars($s));
|
||||
|
|
@ -253,7 +253,7 @@ class DBConnection
|
|||
$c = 'DBConnection';
|
||||
self::$instance = new $c;
|
||||
}
|
||||
return self::$instance;
|
||||
return self::$instance;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
(function(){
|
||||
|
||||
|
||||
"use strict";
|
||||
|
||||
var taskList = new Array(), taskOrder = new Array();
|
||||
|
|
@ -23,7 +23,7 @@ var tabLists = {
|
|||
_alltasks: {},
|
||||
clear: function(){
|
||||
this._lists = {}; this._length = 0; this._order = [];
|
||||
this._alltasks = { id:-1, showCompl:0, sort:3, name:_mtt.lang.get('alltasks') };
|
||||
this._alltasks = { id:-1, showCompl:0, sort:3, name:_mtt.lang.get('alltasks') };
|
||||
},
|
||||
length: function(){ return this._length; },
|
||||
exists: function(id){ if(this._lists[id] || id==-1) return true; else return false; },
|
||||
|
|
@ -81,7 +81,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
if(this.__lang[v]) return this.__lang[v];
|
||||
else return v;
|
||||
},
|
||||
|
||||
|
||||
init: function(lang)
|
||||
{
|
||||
this.__lang = lang;
|
||||
|
|
@ -90,21 +90,21 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
this.monthsShort = this.__lang.monthsShort;
|
||||
this.monthsLong = this.__lang.monthsLong;
|
||||
},
|
||||
|
||||
|
||||
isRTL: function() {
|
||||
return this.get('_rtl') > 0 ? true : false;
|
||||
}
|
||||
},
|
||||
|
||||
pages: {
|
||||
pages: {
|
||||
current: { page:'tasks', pageClass:'' },
|
||||
prev: []
|
||||
},
|
||||
|
||||
|
||||
curList: function(){
|
||||
return curList;
|
||||
},
|
||||
|
||||
|
||||
flag: flag,
|
||||
|
||||
// procs
|
||||
|
|
@ -130,7 +130,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
else {
|
||||
this.homeUrl = this.mttUrl;
|
||||
}
|
||||
|
||||
|
||||
jQuery.extend(this.options, options);
|
||||
|
||||
flag.needAuth = options.needAuth ? true : false;
|
||||
|
|
@ -159,7 +159,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
submitNewTask(this);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$('#newtask_submit').mousedown(function(e){
|
||||
e.preventDefault(); //keep the focus in #task
|
||||
$('#newtask_form').submit();
|
||||
|
|
@ -169,7 +169,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
showEditForm(1);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$('#task').keydown(function(event){
|
||||
if(event.keyCode == 27) {
|
||||
$(this).val('');
|
||||
|
|
@ -228,7 +228,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
$('#mtt-tag-filters').on('click', '.mtt-filter-close', function(){
|
||||
cancelTagFilter($(this).attr('tagid'));
|
||||
});
|
||||
|
||||
|
||||
$('#mtt-tag-toolbar-close').click(function(){
|
||||
cancelTagFilter(0);
|
||||
});
|
||||
|
|
@ -254,7 +254,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
addFilterTag( $(this).attr('tag'), $(this).attr('tagid'), (event.metaKey || event.ctrlKey ? true : false) );
|
||||
if(_mtt.menus.tagcloud) _mtt.menus.tagcloud.close();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
$('#mtt-notes-show').click(function(){
|
||||
toggleAllNotes(1);
|
||||
|
|
@ -275,7 +275,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
else if(this.id == 'view_soon') setTaskview('soon');
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Tabs
|
||||
$('#lists').on('click', 'li.mtt-tab', function(event){
|
||||
if(event.metaKey || event.ctrlKey) {
|
||||
|
|
@ -286,7 +286,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
tabSelect(this);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$('#list_all').click(function(event){
|
||||
if(event.metaKey || event.ctrlKey) {
|
||||
// hide the tab
|
||||
|
|
@ -301,7 +301,7 @@ 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
|
||||
|
|
@ -348,7 +348,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
addEditTag($(this).attr('tag'));
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$("#duedate").datepicker({
|
||||
dateFormat: _mtt.duedatepickerformat(),
|
||||
firstDay: _mtt.options.firstdayofweek,
|
||||
|
|
@ -363,7 +363,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
monthNames:_mtt.lang.monthsLong,
|
||||
isRTL: _mtt.lang.isRTL()
|
||||
});
|
||||
|
||||
|
||||
function ac_split( val ) {
|
||||
return val.split( /,\s*/ );
|
||||
}
|
||||
|
|
@ -406,12 +406,12 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
|
||||
// tasklist handlers
|
||||
$("#tasklist").bind("click", tasklistClick);
|
||||
|
||||
|
||||
$('#tasklist').on('dblclick', 'li', function(){
|
||||
//clear selection
|
||||
if(document.selection && document.selection.empty && document.selection.createRange().text) document.selection.empty();
|
||||
else if(window.getSelection) window.getSelection().removeAllRanges();
|
||||
|
||||
|
||||
var li = findParentNode(this, 'LI');
|
||||
if(li && li.id) {
|
||||
var id = li.id.split('_',2)[1];
|
||||
|
|
@ -484,14 +484,14 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
cancel: 'span,input,a,textarea',
|
||||
delay: 150,
|
||||
start: tasklistSortStart,
|
||||
update: tasklistSortUpdated,
|
||||
update: tasklistSortUpdated,
|
||||
placeholder: 'mtt-task-placeholder',
|
||||
cursor: 'grabbing'
|
||||
});
|
||||
|
||||
|
||||
if (options.touchDevice) {
|
||||
$("#tasklist").disableSelection();
|
||||
$("#tasklist").sortable('option', {
|
||||
$("#tasklist").sortable('option', {
|
||||
axis: 'y',
|
||||
delay: 0,
|
||||
cancel: 'input',
|
||||
|
|
@ -500,7 +500,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
$('#cmenu_note').hide();
|
||||
}
|
||||
|
||||
$("#lists ul").sortable({delay:150, update:listOrderChanged});
|
||||
$("#lists ul").sortable({delay:150, update:listOrderChanged});
|
||||
this.applySingletab();
|
||||
|
||||
|
||||
|
|
@ -519,8 +519,8 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
if(request.status == 0) errtxt = 'Bad connection';
|
||||
else if(request.status != 200) errtxt = 'HTTP: '+request.status+'/'+request.statusText;
|
||||
else errtxt = request.responseText;
|
||||
flashError(_mtt.lang.get('error'), errtxt);
|
||||
});
|
||||
flashError(_mtt.lang.get('error'), errtxt);
|
||||
});
|
||||
|
||||
|
||||
// Error Message details
|
||||
|
|
@ -552,7 +552,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
saveSettings(this);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', '.mtt-back-button', function(){ _mtt.pageBack(); this.blur(); return false; } );
|
||||
|
||||
$(window).bind('beforeunload', function() {
|
||||
|
|
@ -579,13 +579,13 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
this.addAction('listAdded', slmenuOnListAdded);
|
||||
this.addAction('listSelected', slmenuOnListSelected);
|
||||
this.addAction('listHidden', slmenuOnListHidden);
|
||||
|
||||
|
||||
//History
|
||||
if (this.options.history) {
|
||||
window.onpopstate = historyOnPopState;
|
||||
this.addAction('listSelected', historyListSelected);
|
||||
}
|
||||
|
||||
|
||||
this.doAction( 'init' );
|
||||
|
||||
return this;
|
||||
|
|
@ -613,15 +613,15 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
setOptions: function(opts) {
|
||||
jQuery.extend(this.options, opts);
|
||||
},
|
||||
|
||||
|
||||
run: function()
|
||||
{
|
||||
var path = this.parseAnchor();
|
||||
|
||||
|
||||
if (flag.firstLoad) {
|
||||
updateAccessStatus();
|
||||
}
|
||||
|
||||
|
||||
if (path.settings) {
|
||||
this.pages.current.onBack = function(){ this.loadLists(); }
|
||||
showSettings();
|
||||
|
|
@ -640,9 +640,9 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
}
|
||||
$('#page_tasks').hide();
|
||||
$('#tasklist').html('');
|
||||
|
||||
|
||||
tabLists.clear();
|
||||
|
||||
|
||||
this.db.loadLists(null, function(res)
|
||||
{
|
||||
var ti = '';
|
||||
|
|
@ -662,13 +662,13 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// open all tasks tab
|
||||
if(_mtt.options.openList == -1) openListId = -1;
|
||||
|
||||
|
||||
// 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 += '<li id="list_'+item.id+'" class="mtt-tab'+(item.hidden?' mtt-tabs-hidden':'')+'">'+
|
||||
|
|
@ -676,7 +676,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
'<div class="list-action"></div></a></li>';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if(openListId) {
|
||||
$('#mtt_body').removeClass('no-lists');
|
||||
$('.mtt-need-list').removeClass('mtt-item-disabled');
|
||||
|
|
@ -686,7 +686,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
$('#mtt_body').addClass('no-lists');
|
||||
$('.mtt-need-list').addClass('mtt-item-disabled');
|
||||
}
|
||||
|
||||
|
||||
if (_mtt.options.openList && openListId != _mtt.options.openList) {
|
||||
//TODO: handle unknown list
|
||||
}
|
||||
|
|
@ -706,7 +706,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
duedatepickerformat: function()
|
||||
{
|
||||
if(!this.options.duedatepickerformat) return 'yy-mm-dd';
|
||||
|
||||
|
||||
var s = this.options.duedatepickerformat.replace(/(.)/g, function(t,s) {
|
||||
switch(t) {
|
||||
case 'Y': return 'yy';
|
||||
|
|
@ -730,7 +730,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
{
|
||||
flashError(this.lang.get('denied'));
|
||||
},
|
||||
|
||||
|
||||
pageSet: function(page, pageClass)
|
||||
{
|
||||
var prev = this.pages.current;
|
||||
|
|
@ -739,7 +739,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
this.pages.current = {page:page, pageClass:pageClass};
|
||||
showhide($('#page_'+ this.pages.current.page).addClass('mtt-page-'+ this.pages.current.pageClass), $('#page_'+ prev.page));
|
||||
},
|
||||
|
||||
|
||||
pageBack: function()
|
||||
{
|
||||
if(this.pages.current.page == 'tasks') return false;
|
||||
|
|
@ -749,12 +749,12 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
$(window).scrollTop(this.pages.current.lastScrollTop);
|
||||
if (this.pages.current.onBack) this.pages.current.onBack.call(this);
|
||||
},
|
||||
|
||||
|
||||
applySingletab: function(yesno)
|
||||
{
|
||||
if(yesno == null) yesno = this.options.singletab;
|
||||
else this.options.singletab = yesno;
|
||||
|
||||
|
||||
if(yesno) {
|
||||
$('#lists .mtt-tabs').addClass('mtt-tabs-only-one');
|
||||
$("#lists ul").sortable('disable');
|
||||
|
|
@ -764,7 +764,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
$("#lists ul").sortable('enable');
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
filter: {
|
||||
_filters: [],
|
||||
clear: function() {
|
||||
|
|
@ -813,7 +813,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
return '<span class="' + classes.join(' ') + ' mtt-filter-close" tagid="' + tagId + '">' + tag + '<span class="tag-filter-btn"></span></span>';
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
parseAnchor: function()
|
||||
{
|
||||
if(location.hash == '') return false;
|
||||
|
|
@ -821,7 +821,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
var a = h.split("/");
|
||||
var p = {};
|
||||
var s = '';
|
||||
|
||||
|
||||
for(var i=0; i<a.length; i++)
|
||||
{
|
||||
s = a[i];
|
||||
|
|
@ -833,10 +833,10 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
}
|
||||
|
||||
if(p.list) this.options.openList = p.list;
|
||||
|
||||
|
||||
return p;
|
||||
},
|
||||
|
||||
|
||||
urlForList: function(list)
|
||||
{
|
||||
var l = list || curList;
|
||||
|
|
@ -844,7 +844,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
|
|||
if (l.id == -1) return '#alltasks';
|
||||
return '#list/' + l.id;
|
||||
},
|
||||
|
||||
|
||||
urlForExport: function(format, list)
|
||||
{
|
||||
var l = list || curList;
|
||||
|
|
@ -891,7 +891,7 @@ function renameCurList()
|
|||
if (!parseInt(json.total)) return;
|
||||
var item = json.list[0];
|
||||
curList = item;
|
||||
tabLists.replace(item);
|
||||
tabLists.replace(item);
|
||||
$('#lists ul>.mtt-tabs-selected>a').attr('title', item.name).find('span').html(item.name);
|
||||
mytinytodo.doAction('listRenamed', item);
|
||||
});
|
||||
|
|
@ -901,7 +901,7 @@ function renameCurList()
|
|||
function deleteCurList()
|
||||
{
|
||||
if (!curList) return false;
|
||||
mttConfirm( _mtt.lang.get('deleteList'), function()
|
||||
mttConfirm( _mtt.lang.get('deleteList'), function()
|
||||
{
|
||||
_mtt.db.request('deleteList', {list:curList.id}, function(json){
|
||||
if (!parseInt(json.total)) return;
|
||||
|
|
@ -977,24 +977,24 @@ function prepareTaskBlocks(item)
|
|||
{
|
||||
var id = item.id;
|
||||
return ''+
|
||||
'<div class="task-left">' +
|
||||
'<div class="task-left">' +
|
||||
'<div class="task-toggle"></div>' +
|
||||
'<label><input type="checkbox" '+(flag.readOnly?'disabled="disabled"':'')+(item.compl?'checked="checked"':'')+'/></label>' +
|
||||
'<label><input type="checkbox" '+(flag.readOnly?'disabled="disabled"':'')+(item.compl?'checked="checked"':'')+'/></label>' +
|
||||
"</div>\n" +
|
||||
|
||||
'<div class="task-middle">' +
|
||||
|
||||
|
||||
'<div class="task-middle">' +
|
||||
|
||||
'<div class="task-middle-top">' +
|
||||
'<div class="task-through">' +
|
||||
preparePrio(item.prio,id) +
|
||||
'<div class="task-through">' +
|
||||
preparePrio(item.prio,id) +
|
||||
'<span class="task-title">' + prepareHtml(item.title) + '</span> ' +
|
||||
(curList.id == -1 ? '<span class="task-listname">'+ tabLists.get(item.listId).name +'</span>' : '') +
|
||||
prepareTagsStr(item) +
|
||||
prepareTagsStr(item) +
|
||||
'<span class="task-date">'+item.dateInlineTitle+'</span>' +
|
||||
'</div>' +
|
||||
'<div class="task-through-right">' + prepareDueDate(item) + prepareCompletedDate(item) + "</div>" +
|
||||
'</div>' +
|
||||
|
||||
'</div>' +
|
||||
|
||||
'<div class="task-note-block">' +
|
||||
'<div id="tasknote'+id+'" class="task-note"><span>'+prepareHtml(item.note)+'</span></div>' +
|
||||
'<div id="tasknotearea'+id+'" class="task-note-area"><textarea id="notetext'+id+'"></textarea>'+
|
||||
|
|
@ -1061,7 +1061,7 @@ _mtt.prepareDueDate = prepareDueDate;
|
|||
function prepareCompletedDate(item)
|
||||
{
|
||||
// — = — = —
|
||||
return '<span class="task-date-completed">' +
|
||||
return '<span class="task-date-completed">' +
|
||||
'<span title="' + item.dateInlineTitle + '">' + item.dateInline + '</span>—' +
|
||||
'<span title="' + item.dateCompletedInlineTitle + '">' + item.dateCompletedInline + '</span>' +
|
||||
'</span>';
|
||||
|
|
@ -1084,7 +1084,7 @@ function submitNewTask(form)
|
|||
changeTaskOrder(item.id);
|
||||
$('#taskrow_'+item.id).effect("highlight", {color:_mtt.theme.newTaskFlashColor}, 2000);
|
||||
refreshTaskCnt();
|
||||
});
|
||||
});
|
||||
flag.tagsChanged = true;
|
||||
return false;
|
||||
};
|
||||
|
|
@ -1096,7 +1096,7 @@ function changeTaskOrder(id)
|
|||
if(taskOrder.length < 2) return;
|
||||
var oldOrder = taskOrder.slice();
|
||||
// sortByHand
|
||||
if(curList.sort == 0) taskOrder.sort( function(a,b){
|
||||
if(curList.sort == 0) taskOrder.sort( function(a,b){
|
||||
if(taskList[a].compl != taskList[b].compl) return taskList[a].compl-taskList[b].compl;
|
||||
return taskList[a].ow-taskList[b].ow
|
||||
});
|
||||
|
|
@ -1105,57 +1105,57 @@ function changeTaskOrder(id)
|
|||
if(taskList[a].compl != taskList[b].compl) return taskList[a].compl-taskList[b].compl;
|
||||
if(taskList[a].prio != taskList[b].prio) return taskList[b].prio-taskList[a].prio;
|
||||
if(taskList[a].dueInt != taskList[b].dueInt) return taskList[a].dueInt-taskList[b].dueInt;
|
||||
return taskList[a].ow-taskList[b].ow;
|
||||
return taskList[a].ow-taskList[b].ow;
|
||||
});
|
||||
// sortByPrio (reverse)
|
||||
else if(curList.sort == 101) taskOrder.sort( function(a,b){
|
||||
if(taskList[a].compl != taskList[b].compl) return taskList[a].compl-taskList[b].compl;
|
||||
if(taskList[a].prio != taskList[b].prio) return taskList[a].prio-taskList[b].prio;
|
||||
if(taskList[a].dueInt != taskList[b].dueInt) return taskList[b].dueInt-taskList[a].dueInt;
|
||||
return taskList[b].ow-taskList[a].ow;
|
||||
});
|
||||
return taskList[b].ow-taskList[a].ow;
|
||||
});
|
||||
// sortByDueDate
|
||||
else if(curList.sort == 2) taskOrder.sort( function(a,b){
|
||||
if(taskList[a].compl != taskList[b].compl) return taskList[a].compl-taskList[b].compl;
|
||||
if(taskList[a].dueInt != taskList[b].dueInt) return taskList[a].dueInt-taskList[b].dueInt;
|
||||
if(taskList[a].prio != taskList[b].prio) return taskList[b].prio-taskList[a].prio;
|
||||
return taskList[a].ow-taskList[b].ow;
|
||||
return taskList[a].ow-taskList[b].ow;
|
||||
});
|
||||
// sortByDueDate (reverse)
|
||||
else if(curList.sort == 102) taskOrder.sort( function(a,b){
|
||||
if(taskList[a].compl != taskList[b].compl) return taskList[a].compl-taskList[b].compl;
|
||||
if(taskList[a].dueInt != taskList[b].dueInt) return taskList[b].dueInt-taskList[a].dueInt;
|
||||
if(taskList[a].prio != taskList[b].prio) return taskList[a].prio-taskList[b].prio;
|
||||
return taskList[b].ow-taskList[a].ow;
|
||||
});
|
||||
return taskList[b].ow-taskList[a].ow;
|
||||
});
|
||||
// sortByDateCreated
|
||||
else if(curList.sort == 3) taskOrder.sort( function(a,b){
|
||||
if(taskList[a].compl != taskList[b].compl) return taskList[a].compl-taskList[b].compl;
|
||||
if(taskList[a].dateInt != taskList[b].dateInt) return taskList[a].dateInt-taskList[b].dateInt;
|
||||
if(taskList[a].prio != taskList[b].prio) return taskList[b].prio-taskList[a].prio;
|
||||
return taskList[a].ow-taskList[b].ow;
|
||||
return taskList[a].ow-taskList[b].ow;
|
||||
});
|
||||
// sortByDateCreated (reverse)
|
||||
else if(curList.sort == 103) taskOrder.sort( function(a,b){
|
||||
if(taskList[a].compl != taskList[b].compl) return taskList[a].compl-taskList[b].compl;
|
||||
if(taskList[a].dateInt != taskList[b].dateInt) return taskList[b].dateInt-taskList[a].dateInt;
|
||||
if(taskList[a].prio != taskList[b].prio) return taskList[a].prio-taskList[b].prio;
|
||||
return taskList[b].ow-taskList[a].ow;
|
||||
return taskList[b].ow-taskList[a].ow;
|
||||
});
|
||||
// sortByDateModified
|
||||
else if(curList.sort == 4) taskOrder.sort( function(a,b){
|
||||
if(taskList[a].compl != taskList[b].compl) return taskList[a].compl-taskList[b].compl;
|
||||
if(taskList[a].dateEditedInt != taskList[b].dateEditedInt) return taskList[a].dateEditedInt-taskList[b].dateEditedInt;
|
||||
if(taskList[a].prio != taskList[b].prio) return taskList[b].prio-taskList[a].prio;
|
||||
return taskList[a].ow-taskList[b].ow;
|
||||
return taskList[a].ow-taskList[b].ow;
|
||||
});
|
||||
// sortByDateModified (reverse)
|
||||
else if(curList.sort == 104) taskOrder.sort( function(a,b){
|
||||
if(taskList[a].compl != taskList[b].compl) return taskList[a].compl-taskList[b].compl;
|
||||
if(taskList[a].dateEditedInt != taskList[b].dateEditedInt) return taskList[b].dateEditedInt-taskList[a].dateEditedInt;
|
||||
if(taskList[a].prio != taskList[b].prio) return taskList[a].prio-taskList[b].prio;
|
||||
return taskList[b].ow-taskList[a].ow;
|
||||
});
|
||||
return taskList[b].ow-taskList[a].ow;
|
||||
});
|
||||
else return;
|
||||
if(oldOrder.toString() == taskOrder.toString()) return;
|
||||
if(id && taskList[id])
|
||||
|
|
@ -1222,7 +1222,7 @@ function setSort(v, init)
|
|||
curList.sort = v;
|
||||
if(v == 0 && !flag.readOnly) $("#tasklist").sortable('enable');
|
||||
else $("#tasklist").sortable('disable');
|
||||
|
||||
|
||||
if(!init)
|
||||
{
|
||||
changeTaskOrder();
|
||||
|
|
@ -1314,14 +1314,14 @@ function tabSelect(elementOrId)
|
|||
flashError(_mtt.lang.get('denied'), id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var prevList = curList;
|
||||
curList = tabLists.get(id);
|
||||
document.title = curList.name + ' - ' + _mtt.options.title;
|
||||
|
||||
|
||||
$('#lists .mtt-tabs-selected').removeClass('mtt-tabs-selected');
|
||||
$('#list_all').removeClass('mtt-tabs-selected');
|
||||
|
||||
|
||||
if(id == -1) {
|
||||
$('#list_all').addClass('mtt-tabs-selected').removeClass('mtt-tabs-hidden');
|
||||
$('#listmenucontainer .mtt-need-real-list').addClass('mtt-item-hidden');
|
||||
|
|
@ -1330,7 +1330,7 @@ function tabSelect(elementOrId)
|
|||
$('#list_'+id).addClass('mtt-tabs-selected').removeClass('mtt-tabs-hidden');
|
||||
$('#listmenucontainer .mtt-need-real-list').removeClass('mtt-item-hidden');
|
||||
}
|
||||
|
||||
|
||||
if(prevList.id != id)
|
||||
{
|
||||
if(id == -1) $('#mtt_body').addClass('show-all-tasks');
|
||||
|
|
@ -1338,7 +1338,7 @@ function tabSelect(elementOrId)
|
|||
if(filter.search != '') liveSearchToggle(0, 1);
|
||||
mytinytodo.doAction('listSelected', tabLists.get(id));
|
||||
}
|
||||
|
||||
|
||||
if(curList.hidden) {
|
||||
curList.hidden = false;
|
||||
if(curList.id > 0) _mtt.db.request('setHideList', {list:curList.id, hide:0});
|
||||
|
|
@ -1426,8 +1426,8 @@ function completeTask(id, ch)
|
|||
}
|
||||
else if(curList.showCompl) {
|
||||
$('#taskrow_'+item.id).replaceWith(_mtt.prepareTaskStr(taskList[id]));
|
||||
$('#taskrow_'+id).fadeOut('fast', function(){
|
||||
changeTaskOrder(id);
|
||||
$('#taskrow_'+id).fadeOut('fast', function(){
|
||||
changeTaskOrder(id);
|
||||
$(this).effect("highlight", {color:_mtt.theme.editTaskFlashColor}, 'normal', function(){$(this).css('display','')});
|
||||
});
|
||||
}
|
||||
|
|
@ -1582,7 +1582,7 @@ function toggleEditAllTags(show)
|
|||
function fillEditAllTags()
|
||||
{
|
||||
var a = [];
|
||||
for(var i=tagsList.length-1; i>=0; i--) {
|
||||
for(var i=tagsList.length-1; i>=0; i--) {
|
||||
a.push('<a href="#" class="tag" tag="'+tagsList[i].tag+'">'+tagsList[i].tag+'</a>');
|
||||
}
|
||||
$('#alltags .tags-list').html(a.join(', '));
|
||||
|
|
@ -1592,7 +1592,7 @@ function fillEditAllTags()
|
|||
function addEditTag(tag)
|
||||
{
|
||||
var v = $('#edittags').val();
|
||||
if(v == '') {
|
||||
if(v == '') {
|
||||
$('#edittags').val(tag);
|
||||
return;
|
||||
}
|
||||
|
|
@ -1644,7 +1644,7 @@ function liveSearchToggle(toSearch, dontLoad)
|
|||
$('#search_close').hide();
|
||||
if(!dontLoad) loadTasks();
|
||||
}
|
||||
|
||||
|
||||
$('#search').blur();
|
||||
}
|
||||
};
|
||||
|
|
@ -1748,7 +1748,7 @@ function mttMenu(container, options)
|
|||
this.showTimer = null;
|
||||
this.ts = (new Date).getTime();
|
||||
this.container.mttmenu = this.ts;
|
||||
|
||||
|
||||
if (!this.options.hasOwnProperty('isRTL')) {
|
||||
this.options.isRTL = ($('body').css('direction') == 'rtl') ? true : false;
|
||||
}
|
||||
|
|
@ -1757,7 +1757,7 @@ function mttMenu(container, options)
|
|||
}
|
||||
if (!this.options.hasOwnProperty('adjustWidth')) {
|
||||
this.options.adjustWidth = true;
|
||||
}
|
||||
}
|
||||
|
||||
this.$container.find('li').click(function(){
|
||||
var r = menu.onclick(this, menu);
|
||||
|
|
@ -1802,7 +1802,7 @@ function mttMenu(container, options)
|
|||
|
||||
if(!submenu || menu.curSubmenu == submenu && menu.curSubmenu.isOpen)
|
||||
return;
|
||||
|
||||
|
||||
menu.showTimer = setTimeout(function(){
|
||||
menu.curSubmenu = submenu;
|
||||
submenu.showSub();
|
||||
|
|
@ -1848,7 +1848,7 @@ function mttMenu(container, options)
|
|||
this.hide();
|
||||
$(this.caller).removeClass('mtt-menu-button-active');
|
||||
$(document).unbind('mousedown.mttmenuclose');
|
||||
|
||||
|
||||
// onClose trigger
|
||||
if(this.options.onClose && this.options.onClose.call) {
|
||||
this.options.onClose.call(this);
|
||||
|
|
@ -1865,7 +1865,7 @@ function mttMenu(container, options)
|
|||
$(document).triggerHandler('mousedown.mttmenuclose'); //close any other open menu
|
||||
this.caller = caller;
|
||||
var $caller = $(caller);
|
||||
|
||||
|
||||
// beforeShow trigger
|
||||
if(this.options.beforeShow && this.options.beforeShow.call) {
|
||||
this.options.beforeShow.call(this);
|
||||
|
|
@ -1891,16 +1891,16 @@ function mttMenu(container, options)
|
|||
if (x > x2) {
|
||||
x = x2; //move left if container overflows right edge
|
||||
this.$container.addClass('mtt-right-adjusted');
|
||||
}
|
||||
}
|
||||
if (x < 0) {
|
||||
x = 0; //do not cross left edge
|
||||
this.$container.addClass('mtt-left-adjusted');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var y = offset.top + caller.offsetHeight - 1;
|
||||
if(y + this.$container.outerHeight(true) > $(window).height() + $(document).scrollTop()) y = offset.top - this.$container.outerHeight();
|
||||
if(y<0) y=0;
|
||||
|
||||
|
||||
this.$container.css({ position: 'absolute', top: y, left: x, width:this.$container.width() /*, 'min-width': $caller.width()*/ }).show();
|
||||
var menu = this;
|
||||
$(document).bind('mousedown.mttmenuclose', function(e){ menu.close(e) });
|
||||
|
|
@ -1936,15 +1936,15 @@ function mttMenu(container, options)
|
|||
x = offset.left - containerWidth - 1;
|
||||
}
|
||||
if (x < 0) {
|
||||
x = 0;
|
||||
x = 0;
|
||||
this.$container.addClass('mtt-left-adjusted');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var y = offset.top + this.parent.$container.offset().top-this.parent.$container.find('li:first').offset().top;
|
||||
if(y + this.$container.outerHeight(true) > $(window).height() + $(document).scrollTop()) y = $(window).height() + $(document).scrollTop()- this.$container.outerHeight(true) - 1;
|
||||
if(y<0) y=0;
|
||||
|
||||
|
||||
this.$container.css({ position: 'absolute', top: y, left: x, width:this.$container.width() /*, 'min-width': this.$caller.outerWidth()*/ }).show();
|
||||
this.isOpen = true;
|
||||
};
|
||||
|
|
@ -2113,7 +2113,7 @@ function showCompletedToggle()
|
|||
function clearCompleted()
|
||||
{
|
||||
if (!curList) return false;
|
||||
mttConfirm( _mtt.lang.get('clearCompleted'), function()
|
||||
mttConfirm( _mtt.lang.get('clearCompleted'), function()
|
||||
{
|
||||
_mtt.db.request('clearCompletedInList', {list:curList.id}, function(json){
|
||||
if(!parseInt(json.total)) return;
|
||||
|
|
@ -2240,7 +2240,7 @@ function hideTab(listId)
|
|||
if(!id) return;
|
||||
listId = parseInt(id.split('_', 2)[1]);
|
||||
}
|
||||
|
||||
|
||||
if(!tabLists.get(listId)) return false;
|
||||
|
||||
// if we hide current tab
|
||||
|
|
@ -2263,14 +2263,14 @@ function hideTab(listId)
|
|||
else {
|
||||
$('#list_'+listId).addClass('mtt-tabs-hidden').removeClass('mtt-tabs-selected');
|
||||
}
|
||||
|
||||
|
||||
tabLists.get(listId).hidden = true;
|
||||
|
||||
|
||||
if(listId > 0) {
|
||||
_mtt.db.request('setHideList', {list:listId, hide:1});
|
||||
_mtt.doAction('listHidden', tabLists.get(listId));
|
||||
}
|
||||
|
||||
|
||||
if(listIdToSelect) {
|
||||
tabSelect(listIdToSelect);
|
||||
}
|
||||
|
|
@ -2385,7 +2385,7 @@ function logout()
|
|||
window.location.reload();
|
||||
}, 'json');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -2395,7 +2395,7 @@ function logout()
|
|||
function showSettings()
|
||||
{
|
||||
if(_mtt.pages.current.page == 'ajax' && _mtt.pages.current.pageClass == 'settings') return false;
|
||||
$('#page_ajax').load(_mtt.mttUrl+'settings.php?ajax=yes',null,function(){
|
||||
$('#page_ajax').load(_mtt.mttUrl+'settings.php?ajax=yes',null,function(){
|
||||
//showhide($('#page_ajax').addClass('mtt-page-settings'), $('#page_tasks'));
|
||||
_mtt.pageSet('ajax','settings');
|
||||
})
|
||||
|
|
@ -2406,7 +2406,7 @@ function saveSettings(frm)
|
|||
{
|
||||
if(!frm) return false;
|
||||
var params = { save:'ajax' };
|
||||
$(frm).find("input:text,input:password,input:checked,select").filter(":enabled").each(function() { params[this.name || '__'] = this.value; });
|
||||
$(frm).find("input:text,input:password,input:checked,select").filter(":enabled").each(function() { params[this.name || '__'] = this.value; });
|
||||
$(frm).find(":submit").attr('disabled','disabled').blur();
|
||||
$.post(_mtt.mttUrl+'settings.php', params, function(json){
|
||||
if(json.saved) {
|
||||
|
|
@ -2416,7 +2416,7 @@ function saveSettings(frm)
|
|||
}, 1000);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -2427,7 +2427,7 @@ function mttConfirm(msg, callbackOk, callbackCancel)
|
|||
{
|
||||
var r = confirm(msg);
|
||||
if (r) {
|
||||
if (typeof callbackOk === 'function')
|
||||
if (typeof callbackOk === 'function')
|
||||
callbackOk();
|
||||
}
|
||||
else {
|
||||
|
|
@ -2440,7 +2440,7 @@ function mttPrompt(msg, defaultValue, callbackOk, callbackCancel)
|
|||
{
|
||||
var r = prompt(msg, defaultValue);
|
||||
if (r !== null) {
|
||||
if (typeof callbackOk === 'function')
|
||||
if (typeof callbackOk === 'function')
|
||||
callbackOk(r);
|
||||
}
|
||||
else {
|
||||
|
|
@ -2459,7 +2459,7 @@ function historyListSelected(list)
|
|||
flag.historySkip = false;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (flag.firstLoad) {
|
||||
history.replaceState( { list:list.id }, document.title, _mtt.urlForList(list))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,19 +7,19 @@
|
|||
// AJAX myTinyTodo Storage
|
||||
|
||||
(function(){
|
||||
|
||||
|
||||
"use strict";
|
||||
|
||||
var mtt;
|
||||
|
||||
function mytinytodoStorageAjax(amtt)
|
||||
function mytinytodoStorageAjax(amtt)
|
||||
{
|
||||
this.mtt = mtt = amtt;
|
||||
}
|
||||
|
||||
window.mytinytodoStorageAjax = mytinytodoStorageAjax;
|
||||
|
||||
mytinytodoStorageAjax.prototype =
|
||||
mytinytodoStorageAjax.prototype =
|
||||
{
|
||||
/* required method */
|
||||
request:function(action, params, callback)
|
||||
|
|
@ -61,7 +61,7 @@ mytinytodoStorageAjax.prototype =
|
|||
$.post(this.mtt.mttUrl+'ajax.php?newTask',
|
||||
{ list:params.list, title: params.title, tag:params.tag }, callback, 'json');
|
||||
},
|
||||
|
||||
|
||||
|
||||
fullNewTask: function(params, callback)
|
||||
{
|
||||
|
|
@ -102,7 +102,7 @@ mytinytodoStorageAjax.prototype =
|
|||
$.getJSON(this.mtt.mttUrl+'ajax.php?setPrio='+params.id+'&prio='+params.prio+'&rnd='+Math.random(), callback);
|
||||
},
|
||||
|
||||
|
||||
|
||||
setSort: function(params, callback)
|
||||
{
|
||||
$.post(this.mtt.mttUrl+'ajax.php?setSort', { list:params.list, sort:params.sort }, callback, 'json');
|
||||
|
|
@ -116,7 +116,7 @@ mytinytodoStorageAjax.prototype =
|
|||
}
|
||||
$.post(this.mtt.mttUrl+'ajax.php?changeOrder', { order:order }, callback, 'json');
|
||||
},
|
||||
|
||||
|
||||
suggestTags: function(params, callback)
|
||||
{
|
||||
$.getJSON(this.mtt.mttUrl+'ajax.php?suggestTags', {list:params.list, q:params.q, rnd:Math.random()}, callback);
|
||||
|
|
@ -136,12 +136,12 @@ mytinytodoStorageAjax.prototype =
|
|||
{
|
||||
$.post(this.mtt.mttUrl+'ajax.php?parseTaskStr', { list:params.list, title:params.title, tag:params.tag }, callback, 'json');
|
||||
},
|
||||
|
||||
|
||||
|
||||
// Lists
|
||||
addList: function(params, callback)
|
||||
{
|
||||
$.post(this.mtt.mttUrl+'ajax.php?addList', { name:params.name }, callback, 'json');
|
||||
$.post(this.mtt.mttUrl+'ajax.php?addList', { name:params.name }, callback, 'json');
|
||||
|
||||
},
|
||||
|
||||
|
|
@ -159,12 +159,12 @@ mytinytodoStorageAjax.prototype =
|
|||
{
|
||||
$.post(this.mtt.mttUrl+'ajax.php?publishList', { list:params.list, publish:params.publish }, callback, 'json');
|
||||
},
|
||||
|
||||
|
||||
setShowNotesInList: function(params, callback)
|
||||
{
|
||||
$.post(this.mtt.mttUrl+'ajax.php?setShowNotesInList', { list:params.list, shownotes:params.shownotes }, callback, 'json');
|
||||
},
|
||||
|
||||
|
||||
setHideList: function(params, callback)
|
||||
{
|
||||
$.post(this.mtt.mttUrl+'ajax.php?setHideList', { list:params.list, hide:params.hide }, callback, 'json');
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ class DefaultLang
|
|||
'list_select' => "Select list",
|
||||
'list_export' => "Export",
|
||||
'list_export_csv' => "CSV",
|
||||
'list_export_ical' => "iCalendar",
|
||||
'list_export_ical' => "iCalendar",
|
||||
'list_rssfeed' => "RSS Feed",
|
||||
'alltags' => "All tags:",
|
||||
'alltags_show' => "Show all",
|
||||
|
|
@ -219,29 +219,29 @@ class DefaultLang
|
|||
$c = 'Lang';
|
||||
self::$instance = new $c;
|
||||
}
|
||||
return self::$instance;
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
|
||||
public function json($langFile = '', $pretty = 0)
|
||||
{
|
||||
$a = array();
|
||||
|
||||
|
||||
if ($langFile != '') {
|
||||
$ah = $this->loadLangHeader($langFile);
|
||||
$a['_header'] = $ah;
|
||||
}
|
||||
|
||||
|
||||
if ($this->rtl()) {
|
||||
$a['_rtl'] = $this->rtl();
|
||||
}
|
||||
|
||||
|
||||
foreach ( $this->default_inc as $k=>$v ) {
|
||||
if ( isset($this->inc[$k]) ) {
|
||||
$v = $this->inc[$k];
|
||||
}
|
||||
$a[$k] = $v;
|
||||
}
|
||||
|
||||
|
||||
foreach ( $this->default_js as $k=>$v ) {
|
||||
if ( isset($this->js[$k]) ) {
|
||||
$v = $this->js[$k];
|
||||
|
|
@ -249,14 +249,14 @@ class DefaultLang
|
|||
$v = str_replace("\\n", "\n", $v);
|
||||
$a[$k] = $v;
|
||||
}
|
||||
|
||||
|
||||
$encOptions = JSON_UNESCAPED_UNICODE;;
|
||||
if ($pretty) {
|
||||
$encOptions |= JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES;
|
||||
}
|
||||
return json_encode($a, $encOptions);
|
||||
}
|
||||
|
||||
|
||||
function loadLangHeader($langFile)
|
||||
{
|
||||
if (!file_exists($langFile)) {
|
||||
|
|
@ -265,7 +265,7 @@ class DefaultLang
|
|||
$contents = file_get_contents($langFile);
|
||||
|
||||
$a = array();
|
||||
|
||||
|
||||
# parse head comment
|
||||
if(preg_match("|/\\*\s*myTinyTodo language pack([\s\S]+?)\\*/|", $contents, $m))
|
||||
{
|
||||
|
|
@ -296,6 +296,6 @@ class DefaultLang
|
|||
}
|
||||
}
|
||||
|
||||
return $a;
|
||||
return $a;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,14 +22,14 @@ if(isset($_POST['save']))
|
|||
$langs = getLangs();
|
||||
Config::$params['lang']['options'] = array_keys($langs);
|
||||
Config::set('lang', _post('lang'));
|
||||
|
||||
|
||||
// in Demo mode we can set only language by cookies
|
||||
if(defined('MTTDEMO')) {
|
||||
setcookie('lang', Config::get('lang'), 0, url_dir(Config::get('url')=='' ? getRequestUri() : Config::getUrl('url')));
|
||||
$t['saved'] = 1;
|
||||
jsonExit($t);
|
||||
}
|
||||
|
||||
|
||||
if(isset($_POST['password']) && $_POST['password'] != '') Config::set('password', $_POST['password']);
|
||||
elseif(!_post('allowpassword')) Config::set('password', '');
|
||||
Config::set('smartsyntax', (int)_post('smartsyntax'));
|
||||
|
|
@ -191,12 +191,12 @@ header('Content-type:text/html; charset=utf-8');
|
|||
|
||||
<tr>
|
||||
<th><?php _e('set_language');?>:</th>
|
||||
<td>
|
||||
<select name="lang"><?php echo selectOptionsA(getLangs(), _c('lang')); ?></select>
|
||||
<td>
|
||||
<select name="lang"><?php echo selectOptionsA(getLangs(), _c('lang')); ?></select>
|
||||
<?php if ($oldLangs) { ?>
|
||||
<br><br>
|
||||
<b>Notice!</b> You can use old language files after downloading in the new format and copying to the <i>/content/lang/</i> folder.<br>
|
||||
<select id="mtt_old_langs"><?php echo selectOptionsA( $oldLangs, _c('lang'), 'en'); ?></select>
|
||||
<select id="mtt_old_langs"><?php echo selectOptionsA( $oldLangs, _c('lang'), 'en'); ?></select>
|
||||
<a id="mtt_old_langs_link" href="<?php mttinfo('mtt_url')?>mytinytodo_lang.php?jsonfile">Download json file</a>
|
||||
<script type="text/javascript">
|
||||
$('#mtt_old_langs').on('change', function(){
|
||||
|
|
|
|||
1554
src/setup.php
1554
src/setup.php
File diff suppressed because it is too large
Load diff
|
|
@ -1 +1 @@
|
|||
deny from all
|
||||
deny from all
|
||||
|
|
|
|||
Loading…
Reference in a new issue