Merge branch 'master' into v1.6.x

This commit is contained in:
Max Pozdeev 2021-04-19 20:55:01 +03:00 committed by GitHub
commit ae8cc12e2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 358 additions and 1148 deletions

View file

@ -7,6 +7,7 @@ root = true
charset = utf-8
end_of_line = lf
indent_style = tab
tab_width = 4
trim_trailing_whitespace = true
insert_final_newline = true
@ -17,5 +18,9 @@ insert_final_newline = false
trim_trailing_whitespace = false
insert_final_newline = false
[*.css]
indent_style = space
indent_size = 2
[/version.txt]
insert_final_newline = false

View file

@ -51,10 +51,6 @@ rename('db/config.php.default', 'db/config.php');
$fh = fopen("./content/themes/default/index.php", 'a') or die("cant write index.php\n");
fwrite($fh, "\n<!-- $rev -->");
fclose($fh);
$fh = fopen("./content/themes/ie8/index.php", 'a') or die("cant write ie8/index.php\n");
fwrite($fh, "\n<!-- $rev -->");
fclose($fh);
*/
#replace @VERSION
@ -76,13 +72,6 @@ closedir($dh);
*/
# pack ie8 theme
chdir('content/themes');
`zip -9 -r ie8.zip ie8`; #OS dep.!!!
deleteTreeIfDir('ie8');
chdir('../..');
chdir('..'); # to the root of repo
rename('src', 'mytinytodo') or die("Cant rename 'src'\n");

View file

@ -18,7 +18,8 @@ if(isset($_GET['loadLists']))
if (!is_logged()) $sqlWhere = 'WHERE published=1';
else $sqlWhere = '';
$t = array();
$t['total'] = 0;
$t['list'][] = prepareAllTasksList();
$t['total'] = 1;
$q = $db->dq("SELECT * FROM {$db->prefix}lists $sqlWhere ORDER BY ow ASC, id ASC");
while($r = $q->fetch_assoc($q))
{
@ -226,7 +227,7 @@ elseif(isset($_GET['editNote']))
$db->dq("UPDATE {$db->prefix}todolist SET note=?,d_edited=? WHERE id=$id", array($note, time()) );
$t = array();
$t['total'] = 1;
$t['list'][] = array('id'=>$id, 'note'=>nl2br(escapeTags($note)), 'noteText'=>(string)$note);
$t['list'][] = array('id'=>$id, 'note'=>mttMarkup_v1($note), 'noteText'=>(string)$note);
jsonExit($t);
}
elseif(isset($_GET['editTask']))
@ -530,7 +531,7 @@ function prepareTaskRow($r)
return array(
'id' => $r['id'],
'title' => escapeTags($r['title']),
'title' => htmlspecialchars( $r['title'] ),
'listId' => $r['list_id'],
'date' => htmlarray($dCreated),
'dateInt' => (int)$r['d_created'],
@ -542,7 +543,7 @@ function prepareTaskRow($r)
'dateCompletedInlineTitle' => htmlarray(sprintf($lang->get('taskdate_inline_completed'), $dCompleted)),
'compl' => (int)$r['compl'],
'prio' => $r['prio'],
'note' => nl2br(escapeTags($r['note'])),
'note' => mttMarkup_v1($r['note']),
'noteText' => (string)$r['note'],
'ow' => (int)$r['ow'],
'tags' => htmlarray($r['tags']),
@ -664,16 +665,33 @@ function addTaskTags($taskId, $tagIds, $listId)
function parse_smartsyntax($title)
{
$a = array();
if(!preg_match("|^(/([+-]{0,1}\d+)?/)?(.*?)(\s+/([^/]*)/$)?$|", $title, $m)) return false;
$a['prio'] = isset($m[2]) ? (int)$m[2] : 0;
$a['title'] = isset($m[3]) ? trim($m[3]) : '';
$a['tags'] = isset($m[5]) ? trim($m[5]) : '';
if($a['prio'] < -1) $a['prio'] = -1;
elseif($a['prio'] > 2) $a['prio'] = 2;
$a = [
'prio' => 0,
'title' => $title,
'tags' => ''
];
if ( preg_match("|^([-+]{1}\d+)(.+)|", $a['title'], $m) ) {
$a['prio'] = (int) $m[1];
if ( $a['prio'] < -1 ) $a['prio'] = -1;
elseif ( $a['prio'] > 2 ) $a['prio'] = 2;
$a['title'] = trim($m[2]);
}
$tags = [];
$a['title'] = trim( preg_replace_callback(
"/(?:^|\s+)#([^#\s]+)/",
function ($matches) use (&$tags) {
$tags[] = $matches[1];
return '';
},
$a['title']
) );
if (count($tags) > 0) {
$a['tags'] = implode( ',' , $tags );
}
return $a;
}
function tag_size($qmin, $q, $step)
{
if($step == 0) return 1;
@ -862,6 +880,19 @@ function prepareList($row)
);
}
function prepareAllTasksList()
{
return array(
'id' => -1,
'name' => htmlarray(__('alltasks')),
'sort' => 3,
'published' => 0,
'showCompl' => 1,
'showNotes' => 0,
'hidden' => 1,
);
}
function getUserListsSimple()
{
$db = DBConnection::instance();

View file

@ -8,8 +8,6 @@
"author_url": "http://www.mytinytodo.net"
},
"My Tiny Todolist": "My Tiny Todolist",
"desktop_version": "Desktop version",
"mobile_version": "Mobile version",
"powered_by": "Powered by",
"htab_newtask": "New task",
"htab_search": "Search",
@ -127,7 +125,11 @@
"feed_title": "%s",
"feed_completed_tasks": "Completed tasks",
"feed_modified_tasks": "Modified tasks",
"feed_new_tasks": "New tasks",
"feed_new_tasks": "New tasks",
"feed_tasks": "Tasks",
"feed_status_new": "New",
"feed_status_updated": "Updated",
"feed_status_completed": "Completed",
"alltasks": "All tasks",
"set_header": "Settings",
"set_title": "Title",

View file

@ -8,8 +8,6 @@
"author_url": "http://www.mytinytodo.net"
},
"My Tiny Todolist": "My Tiny Todolist",
"desktop_version": "Версия для компьютера",
"mobile_version": "Мобильная версия",
"powered_by": "Работает на",
"htab_newtask": "Новая задача",
"htab_search": "Поиск",
@ -127,7 +125,11 @@
"feed_title": "%s",
"feed_completed_tasks": "Завершенные задачи",
"feed_modified_tasks": "Изменившиеся задачи",
"feed_new_tasks": "Новые задачи",
"feed_new_tasks": "Новые задачи",
"feed_status_new": "Задача создана",
"feed_status_updated": "Задача обновлена",
"feed_status_completed": "Задача завершена",
"feed_tasks": "Задачи",
"alltasks": "Все задачи",
"set_header": "Настройки",
"set_title": "Заголовок страницы",

View file

@ -1,29 +1,25 @@
<?php header("Content-type: text/html; charset=utf-8"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php mttinfo('title'); ?></title>
<link rel="stylesheet" type="text/css" href="<?php mttinfo('template_url'); ?>style.css?v=<?php mttinfo('version'); ?>" media="all" />
<link rel="stylesheet" type="text/css" href="<?php mttinfo('template_url'); ?>print.css?v=<?php mttinfo('version'); ?>" media="print" />
<?php if(Config::get('rtl')): ?>
<link rel="stylesheet" type="text/css" href="<?php mttinfo('template_url'); ?>style_rtl.css?v=<?php mttinfo('version'); ?>" media="all" />
<?php endif; ?>
<?php if(Config::get('mobile')): ?>
<meta name="viewport" id="viewport" content="width=device-width" />
<link rel="stylesheet" type="text/css" href="<?php mttinfo('template_url'); ?>mobile.css?v=<?php mttinfo('version'); ?>" media="all" />
<?php endif; ?>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php mttinfo('title'); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="<?php mttinfo('template_url'); ?>style.css?v=<?php mttinfo('version'); ?>" media="all" />
<link rel="stylesheet" type="text/css" href="<?php mttinfo('template_url'); ?>print.css?v=<?php mttinfo('version'); ?>" media="print" />
<?php if(Config::get('rtl')): ?>
<link rel="stylesheet" type="text/css" href="<?php mttinfo('template_url'); ?>style_rtl.css?v=<?php mttinfo('version'); ?>" media="all" />
<?php endif; ?>
</head>
<body <?php if (Lang::instance()->rtl()) echo 'dir="rtl"'; ?>>
<script type="text/javascript" src="<?php mttinfo('includes_url'); ?>jquery/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="<?php mttinfo('includes_url'); ?>jquery/jquery-ui-1.12.1.min.js"></script>
<script type="text/javascript" src="<?php mttinfo('includes_url'); ?>jquery/jquery.ui.touch-punch.js"></script>
<script type="text/javascript" src="<?php mttinfo('includes_url'); ?>mytinytodo.js?v=<?php mttinfo('version'); ?>"></script>
<script type="text/javascript" src="<?php mttinfo('includes_url'); ?>mytinytodo_ajax_storage.js?v=<?php mttinfo('version'); ?>"></script>
<?php if(Config::get('mobile')): ?>
<script type="text/javascript" src="<?php mttinfo('includes_url'); ?>jquery/jquery.ui.touch-punch.js"></script>
<?php endif; ?>
<script type="text/javascript">
$().ready(function(){
@ -35,13 +31,11 @@ $().ready(function(){
db: mytinytodoStorageAjax,
needAuth: <?php echo need_auth() ? "true" : "false"; ?>,
isLogged: <?php echo is_logged() ? "true" : "false"; ?>,
showdate: <?php echo (Config::get('showdate') && !Config::get('mobile')) ? "true" : "false"; ?>,
singletab: <?php echo (isset($_GET['singletab']) || Config::get('mobile')) ? "true" : "false"; ?>,
showdate: <?php echo Config::get('showdate') ? "true" : "false"; ?>,
duedatepickerformat: "<?php echo htmlspecialchars(Config::get('dateformat2')); ?>",
firstdayofweek: <?php echo (int) Config::get('firstdayofweek'); ?>,
calendarIcon: '<?php mttinfo('template_url'); ?>images/calendar.svg',
autotag: <?php echo Config::get('autotag') ? "true" : "false"; ?>
<?php if(Config::get('mobile')) echo ", touchDevice: true"; ?>
}).run();
});
</script>
@ -82,9 +76,7 @@ $().ready(function(){
<ul class="mtt-tabs"></ul>
<div class="mtt-tabs-add-button" title="<?php _e('list_new'); ?>"><div class="tab-height-wrapper"><span></span></div></div>
</div>
<div id="list_all" class="mtt-tab mtt-tabs-alltasks mtt-tabs-hidden">
<a href="#alltasks" title="<?php _e('alltasks'); ?>"><span><?php _e('alltasks'); ?></span><div class="list-action"></div></a>
</div>
<div id="tabs_buttons">
<div class="tab-height-wrapper">
<div class="mtt-tabs-select-button mtt-img-button" title="<?php _e('list_select'); ?>"><span></span></div>
@ -134,9 +126,7 @@ $().ready(function(){
<span id="tagcloudbtn" class="mtt-menu-button"><?php _e('tagcloud');?> <span class="arrdown2"></span></span>
</h3>
<div id="taskcontainer">
<ol id="tasklist" class="sortable"></ol>
</div>
<ol id="tasklist" class="sortable"></ol>
</div>
<!-- End of page_tasks -->
@ -224,8 +214,8 @@ $().ready(function(){
<li class="mtt-need-list mtt-need-real-list" id="btnDeleteList"><?php _e('list_delete');?></li>
<li class="mtt-need-list mtt-need-real-list" id="btnClearCompleted"><?php _e('list_clearcompleted');?></li>
<li class="mtt-need-list mtt-need-real-list mtt-menu-indicator" submenu="listexportmenucontainer"><div class="submenu-icon"></div><?php _e('list_export'); ?></li>
<li class="mtt-need-list mtt-need-real-list" id="btnHideList"><?php _e('list_hide');?></li>
<li class="mtt-menu-delimiter mtt-need-real-list"></li>
<li class="mtt-need-list" id="btnHideList"><?php _e('list_hide');?></li>
<li class="mtt-menu-delimiter"></li>
<li class="mtt-need-list mtt-need-real-list" id="btnPublish"><div class="menu-icon"></div><?php _e('list_publish');?></li>
<li class="mtt-need-list mtt-need-real-list" id="btnRssFeed"><div class="menu-icon"></div><a href="#"><?php _e('list_rssfeed');?></a></li>
<li class="mtt-menu-delimiter mtt-need-real-list"></li>
@ -285,11 +275,6 @@ $().ready(function(){
<div id="footer">
<div id="footer_content">
<span><?php _e('powered_by');?> <a href="http://www.mytinytodo.net/" class="powered-by-link">myTinyTodo</a>&nbsp;<?php mttinfo('version'); ?></span>
<span id="mobileordesktop">
<?php if(Config::get('mobile')): ?><a href="<?php echo getDesktopUrl(); ?>"><?php _e('desktop_version');?></a>
<?php else: ?><a href="<?php mttinfo('mobile_url'); ?>"><?php _e('mobile_version');?></a>
<?php endif; ?>
</span>
</div>
</div>

View file

@ -1,66 +0,0 @@
/*
This file is a part of myTinyTodo.
Copyright 2009-2010,2020 Max Pozdeev <maxpozdeev@gmail.com>
*/
html { font-size:100%; }
body { margin:0px; font-size:100%; }
h2 { margin:0; margin-bottom:2px; font-size:1rem; }
#body { margin-left:1px; margin-right:1px; padding:1px; padding-bottom:12px;}
#bar_login, #bar_logout { padding-right:1px; }
.mtt-img-button { padding:4px; }
.mtt-menu-button { padding:4px; }
#tabs ul { margin-top:0px; }
#tabs ul li { width:70px; margin-right: 1px; }
.mtt-tabs-add-button { padding-left:0.4rem; padding-right:0.4rem; }
#task { padding:5px; padding-right:18px; margin-left:-22px; }
#task_placeholder span { padding:6px; }
.searchbox-c { width:30%; max-width:190px; }
#toolbar.mtt-intask .searchbox-c { display:none; }
#toolbar.mtt-insearch .taskbox-c { display:none; }
#toolbar.mtt-insearch .searchbox-c { width:100%; max-width:100%; }
#search { padding:5px 20px; border-radius:15px; }
#tasklist li { padding:0px 3px; }
.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; }
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.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.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; }
#tasklist .ui-sortable-helper { box-shadow:0px 0px 3px #333; }
#page_taskedit { max-width:99.5%; border:none; position:static; padding:0; }
#page_taskedit .form-table { width:100%; }
#page_taskedit .form-row .in500 { color:#444444; }
#page_taskedit .form-row textarea { height: 70px; }
#loading { padding:0px; padding-top:1px; padding-right:1px; height:16px; overflow:hidden; }
#tagcloud { max-width:100%; margin:0px 5px 5px 5px; }
.mtt-settings-table .in350 { min-width:50px; }
.mtt-notes-showhide { display:none; }
#footer_content { padding:0.7rem 0.35rem; }
.mtt-menu-container li { padding-top:0.3rem; padding-bottom:0.3rem; }
#slmenucontainer { max-width:100vw; }
#slmenucontainer a { overflow:hidden; text-overflow:ellipsis; }
#cmenulistscontainer { max-width:100vw; }
#cmenulistscontainer li { overflow:hidden; text-overflow:ellipsis; }

View file

@ -14,7 +14,6 @@ h3 { border-bottom:2px solid #777777; }
.mtt-tab a span { text-align:left; padding:0; max-width:none; font-size:1.3rem; color:#000; }
.mtt-tabs-add-button { display:none; }
#list_all { display:none; }
#tabs_buttons { display:none; }
#taskview { padding-left:0; font-weight:normal; }
#taskview .arrdown { display:none; }
@ -34,7 +33,6 @@ li.task-completed { opacity:1; }
#footer_content { border-top:1px solid #777777; background:none; }
#footer_content a { text-decoration:none; color:#000000; }
#mobileordesktop { display: none; }
#tagcloudbtn { display:none; }
.mtt-notes-showhide { display:none; }

View file

@ -54,8 +54,7 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
.tabs-n-button { flex-grow:1; display:flex; align-items:flex-start; }
.tab-height-wrapper { box-sizing:border-box; height:2.2rem; display:flex; align-items:center; }
.mtt-tabs { list-style:none; padding:0; margin:0; display:flex; justify-content:flex-start; flex-wrap:wrap; }
.mtt-tabs li { margin:1px 3px 0 0; }
.mtt-tab { background-color:#fbfbfb; border:1px solid #ededed; border-bottom:none; border-top-right-radius:8px; transition:background-color 0.1s ease-in; }
.mtt-tab { margin:1px 3px 0 0; background-color:#fbfbfb; border:1px solid #ededed; border-bottom:none; border-top-right-radius:8px; transition:background-color 0.1s ease-in; }
.mtt-tab a {
margin:0; text-decoration:none; white-space:nowrap; color:#333333; display:inline-block; outline:none;
box-sizing:border-box; height:2.2rem; padding:1px 0.3rem 0 0.3rem; display:flex; align-items:center;
@ -67,13 +66,8 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
.mtt-tab.mtt-tabs-selected { border-color:transparent; background-color:#ededed; }
.mtt-tab:hover { background-color:#ddd; }
.mtt-tab.mtt-tabs-selected:hover { background-color:#ededed; }
.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 .mtt-list-sort-placeholder { background-color:#ddd; border:1px solid #aaa; }
.mtt-tabs-alltasks { margin:1px 3px 0 3px; }
.mtt-tabs-alltasks.mtt-tab { border-top-right-radius:0px; border-top-left-radius:8px; }
.mtt-tab-sort-placeholder { background-color:#ddd; border-color:#aaa; }
#tabs_buttons {
padding-left:2px; padding-right:2px;
@ -232,8 +226,8 @@ li.task-completed .task-note-block .task-note { text-decoration:line-through; }
.invisible { visibility:hidden; }
.in500 { width:500px; color:#444444; }
.in100 { width:100px; color:#444444; }
.task-note span a { color:#777777; }
.task-note span a:hover { color:#af0000; }
.task-note a { color:#777777; }
.task-note a:hover { color:#af0000; }
.task-prio { padding-left:2px; padding-right:2px; margin-left:0px; margin-right:5px; cursor:default; }
.prio-neg { background-color:#3377ff; color:#ffffff; }
@ -331,7 +325,9 @@ a.mtt-back-button { font-size:1rem; }
}
.mtt-menu-container {
overflow:hidden; z-index:100;
overflow:hidden;
max-width:100vw;
z-index:100;
background-color:#f9f9f9; border:1px solid #cccccc; padding:2px 0px;
box-shadow:1px 2px 5px rgba(0,0,0,0.5);
border-radius:5px;
@ -341,12 +337,27 @@ a.mtt-back-button { font-size:1rem; }
.mtt-menu-container.mtt-right-adjusted { margin-right:5px; }
.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 {
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;
overflow:hidden; text-overflow:ellipsis;
}
.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; }
.mtt-menu-container a { display:block; cursor:default; text-decoration:none; outline:none; color:#000; }
.mtt-menu-container a {
display:block;
cursor:default;
text-decoration:none;
outline:none;
color:#000;
overflow:hidden; text-overflow:ellipsis;
}
.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; }
.mtt-menu-container .menu-icon { width:16px; height:16px; position:absolute; left:6px; top:50%; margin-top:-8px; }
@ -378,3 +389,72 @@ li.mtt-item-hidden { display:none; }
.mtt-settings-table select { padding:2px; border:1px solid #ccc; border-radius:2px; }
.mtt-settings-table .form-bottom-buttons input { padding:4px; border:1px solid #ccc; border-radius:3px; background-color:#efefef; margin:2px; }
.mtt-settings-table input:focus, .mtt-settings-table select:focus { outline:none; border-color:#5a8df0; box-shadow:0 0 0 2px rgba(90,141,240,0.7); }
/* font for small screens */
@media only screen and (max-width: 600px), only screen and (max-height: 600px) {
html {
font-size: 16px;
-webkit-text-size-adjust: 100%; /* Dont increase font-size in horizontal orientation on ios */
}
}
/* narrow screens */
@media only screen and (max-width: 600px) {
h2 { font-size:1rem; }
#bar_login, #bar_logout { padding-right:1px; }
.mtt-img-button { padding:4px; }
.mtt-menu-button { padding:4px; }
.mtt-tabs-add-button { padding-left:0.4rem; padding-right:0.4rem; } /* make thiсker */
/* singletab */
.mtt-tabs li { display:none; }
.mtt-tabs li.mtt-tabs-selected { display:block; }
#task { padding:5px; padding-right:18px; margin-left:-22px; }
#task_placeholder span { padding:6px; }
.searchbox-c { width:30%; max-width:190px; }
#toolbar.mtt-intask .searchbox-c { display:none; }
#toolbar.mtt-insearch .taskbox-c { display:none; }
#toolbar.mtt-insearch .searchbox-c { width:100%; max-width:100%; }
#search { padding:5px 20px; border-radius:15px; }
#tasklist li { padding:0px 3px; }
.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; }
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.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.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; }
#tasklist .ui-sortable-helper { box-shadow:0px 0px 3px #333; }
#page_taskedit { max-width:99.5%; border:none; position:static; padding:0; }
#page_taskedit .form-table { width:100%; }
#page_taskedit .form-row .in500 { color:#444444; }
#page_taskedit .form-row textarea { height: 70px; }
#loading { padding:0px; padding-top:1px; padding-right:1px; height:16px; overflow:hidden; }
#tagcloud { max-width:100%; margin:0px 5px 5px 5px; }
.mtt-settings-table .in350 { min-width:50px; }
.mtt-notes-showhide { display:none; }
.mtt-menu-container li { padding-top:0.3rem; padding-bottom:0.3rem; }
} /* end of @media min 600px */

View file

@ -1,6 +0,0 @@
This is a theme for old browsers without full support of SVG and Flexbox like Internet Explorer 8, Opera 12
To enable it just change the template option in config.php like below:
$config['template'] = 'ie8';
Or you can copy file index_ie8.php to the root directory and use it as start page.

View file

@ -1,13 +0,0 @@
Image files page_white_text.png and calendar.png and some icons in buttons.png
are (or based on) icons from Silk Icons set by Mark James (http://www.famfamfam.com/lab/icons/silk/),
licensed under the Creative Commons Attribution 2.5 License (http://creativecommons.org/licenses/by/2.5/).
Some icons in buttons.png are based on "Silk Companion 1" icons set by Damien Guard
(http://damieng.com/creative/icons/silk-companion-1-icons), licensed under the
Creative Commons Attribution 2.5 License (http://creativecommons.org/licenses/by/2.5/).
Icons in mzl.png are (or based on) icons from Mozilla Source Code,
(http://www.mozilla.org/MPL/#source-code), licensed under the terms
of tri-license (MPL 1.1/GPL 2.0/LGPL 2.1).
Other images in this directory were made by Max Pozdeev and licensed under the terms of GNU GPL v2+.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 330 B

View file

@ -1 +0,0 @@
Place for Images

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

View file

@ -1,279 +0,0 @@
<?php header("Content-type: text/html; charset=utf-8"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><!-- ie8 theme -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php mttinfo('title'); ?></title>
<link rel="stylesheet" type="text/css" href="<?php mttinfo('template_url'); ?>style.css?v=<?php mttinfo('version'); ?>" media="all" />
<?php if(Config::get('rtl')): ?>
<link rel="stylesheet" type="text/css" href="<?php mttinfo('template_url'); ?>style_rtl.css?v=<?php mttinfo('version'); ?>" media="all" />
<?php endif; ?>
<?php if(Config::get('mobile')): ?>
<meta name="viewport" id="viewport" content="width=device-width" />
<link rel="stylesheet" type="text/css" href="<?php mttinfo('template_url'); ?>pda.css?v=<?php mttinfo('version'); ?>" media="all" />
<?php else: ?>
<link rel="stylesheet" type="text/css" href="<?php mttinfo('template_url'); ?>print.css?v=<?php mttinfo('version'); ?>" media="print" />
<?php endif; ?>
</head>
<body>
<script type="text/javascript" src="<?php mttinfo('template_url'); ?>jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="<?php mttinfo('includes_url'); ?>jquery/jquery-ui-1.12.1.min.js"></script>
<script type="text/javascript" src="<?php mttinfo('includes_url'); ?>mytinytodo.js?v=<?php mttinfo('version'); ?>"></script>
<script type="text/javascript" src="<?php mttinfo('includes_url'); ?>mytinytodo_ajax_storage.js?v=<?php mttinfo('version'); ?>"></script>
<script type="text/javascript" src="<?php mttinfo('template_url'); ?>mtt.js?v=<?php mttinfo('version'); ?>"></script>
<script type="text/javascript">
$().ready(function(){
mytinytodo.init({
title: "<?php mttinfo('title', false); ?>",
lang: <?php echo Lang::instance()->makeJS() ?>,
mttUrl: "<?php mttinfo('mtt_url'); ?>",
homeUrl: "<?php mttinfo('url'); ?>",
db: mytinytodoStorageAjax,
needAuth: <?php echo need_auth() ? "true" : "false"; ?>,
isLogged: <?php echo is_logged() ? "true" : "false"; ?>,
showdate: <?php echo (Config::get('showdate') && !Config::get('mobile')) ? "true" : "false"; ?>,
singletab: <?php echo (isset($_GET['singletab']) || Config::get('mobile')) ? "true" : "false"; ?>,
duedatepickerformat: "<?php echo htmlspecialchars(Config::get('dateformat2')); ?>",
firstdayofweek: <?php echo (int) Config::get('firstdayofweek'); ?>,
calendarIcon: '<?php mttinfo('template_url'); ?>images/calendar.png',
autotag: <?php echo Config::get('autotag') ? "true" : "false"; ?>
<?php if(Config::get('mobile')) echo ", touchDevice: true"; ?>
}).run();
});
</script>
<div id="wrapper">
<div id="container">
<div id="mtt_body">
<h2><?php mttinfo('title'); ?></h2>
<div id="loading"></div>
<div id="bar">
<div id="msg"><span class="msg-text"></span><div class="msg-details"></div></div>
<div class="bar-menu">
<span class="need-owner">
<a href="#settings" id="settings"><?php _e('a_settings');?></a>
</span>
<span id="bar_auth">
<span class="need-owner"> | </span>
<span id="bar_public" style="display:none"><?php _e('public_tasks');?> |</span>
<a href="#login" id="bar_login" class="nodecor"><u><?php _e('a_login');?></u> <span class="arrdown"></span></a>
<a href="#logout" id="bar_logout"><?php _e('a_logout');?></a>
</span>
</div>
</div>
<br clear="all" />
<div id="page_tasks" style="display:none">
<div id="lists">
<ul class="mtt-tabs"></ul>
<div class="mtt-tabs-add-button" title="<?php _e('list_new'); ?>"><span></span></div>
<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-tab mtt-tabs-alltasks mtt-tabs-hidden"><a href="#alltasks"><span><?php _e('alltasks'); ?></span><div class="list-action"></div></a></div>
</div>
<div id="toolbar" class="mtt-htabs">
<div id="htab_search">
<table class="mtt-searchbox"><tr><td>
<div class="mtt-searchbox-c">
<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>
</td></tr></table>
</div>
<div id="htab_newtask">
<table class="mtt-taskbox"><tr><td class="mtt-tb-cell">
<div class="mtt-tb-c">
<form id="newtask_form" method="post">
<label id="task_placeholder" class="placeholding" for="task">
<input type="text" name="task" value="" maxlength="250" id="task" autocomplete="off" />
<span><?php _e('htab_newtask');?></span>
</label>
<div id="newtask_submit" class="mtt-taskbox-icon mtt-icon-submittask" title="<?php _e('btn_add');?>"></div>
</form>
</div>
</td>
<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>
</div>
<h3>
<span id="taskview" class="mtt-menu-button"><span class="btnstr"><?php _e('tasks');?></span> (<span id="total">0</span>) <span class="arrdown"></span></span>
<span class="mtt-notes-showhide"><?php _e('notes');?> <a href="#" id="mtt-notes-show"><?php _e('notes_show');?></a> / <a href="#" id="mtt-notes-hide"><?php _e('notes_hide');?></a></span>
<span id="mtt-tag-filters"></span>
<span id="tagcloudbtn" class="mtt-menu-button"><?php _e('tagcloud');?> <span class="arrdown2"></span></span>
</h3>
<div id="taskcontainer">
<ol id="tasklist" class="sortable"></ol>
</div>
</div> <!-- end of page_tasks -->
<div id="page_taskedit" style="display:none">
<div><a href="#" class="mtt-back-button"><?php _e('go_back');?></a></div>
<h3 class="mtt-inadd"><?php _e('add_task');?></h3>
<h3 class="mtt-inedit"><?php _e('edit_task');?>
<div id="taskedit-date" class="mtt-inedit">
(<span class="date-created" title="<?php _e('taskdate_created');?>"><span></span></span><span class="date-completed" title="<?php _e('taskdate_completed');?>"> &mdash; <span></span></span>)
</div>
</h3>
<form id="taskedit_form" name="edittask" method="post">
<input type="hidden" name="isadd" value="0" />
<input type="hidden" name="id" value="" />
<div class="form-row form-row-short">
<span class="h"><?php _e('priority');?></span>
<select name="prio">
<option value="2">+2</option><option value="1">+1</option><option value="0" selected="selected">&plusmn;0</option><option value="-1">&minus;1</option>
</select>
</div>
<div class="form-row form-row-short">
<span class="h"><?php _e('due');?> </span>
<input name="duedate" id="duedate" value="" class="in100" title="Y-M-D, M/D/Y, D.M.Y, M/D, D.M" autocomplete="off" />
</div>
<div class="form-row-short-end"></div>
<div class="form-row"><div class="h"><?php _e('task');?></div> <input type="text" name="task" value="" class="in500" maxlength="250" /></div>
<div class="form-row"><div class="h"><?php _e('note');?></div> <textarea name="note" class="in500"></textarea></div>
<div class="form-row"><div class="h"><?php _e('tags');?></div>
<table cellspacing="0" cellpadding="0" width="100%"><tr>
<td><input type="text" name="tags" id="edittags" value="" class="in500" maxlength="250" /></td>
<td class="alltags-cell">
<a href="#" id="alltags_show"><?php _e('alltags_show');?></a>
<a href="#" id="alltags_hide" style="display:none"><?php _e('alltags_hide');?></a></td>
</tr></table>
</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="button" id="mtt_edit_cancel" class="mtt-back-button" value="<?php _e('cancel');?>" />
</div>
</form>
</div> <!-- end of page_taskedit -->
<div id="authform" style="display:none">
<form id="login_form">
<div class="h"><?php _e('password');?></div>
<div><input type="password" name="password" id="password" /></div>
<div><input type="submit" value="<?php _e('btn_login');?>" /></div>
</form>
</div>
<div id="priopopup" style="display:none">
<span class="prio-neg prio-neg-1">&minus;1</span>
<span class="prio-zero">&plusmn;0</span>
<span class="prio-pos prio-pos-1">+1</span>
<span class="prio-pos prio-pos-2">+2</span>
</div>
<div id="taskviewcontainer" class="mtt-menu-container" style="display:none">
<ul>
<li id="view_tasks"><?php _e('tasks');?> (<span id="cnt_total">0</span>)</li>
<li id="view_past"><?php _e('f_past');?> (<span id="cnt_past">0</span>)</li>
<li id="view_today"><?php _e('f_today');?> (<span id="cnt_today">0</span>)</li>
<li id="view_soon"><?php _e('f_soon');?> (<span id="cnt_soon">0</span>)</li>
</ul>
</div>
<div id="tagcloud" style="display:none">
<a id="tagcloudcancel" class="mtt-img-button"><span></span></a>
<div id="tagcloudload"></div>
<div id="tagcloudcontent"></div>
</div>
<div id="listmenucontainer" class="mtt-menu-container" style="display:none">
<ul>
<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 mtt-menu-indicator" submenu="listexportmenucontainer"><div class="submenu-icon"></div><?php _e('list_export'); ?></li>
<li class="mtt-menu-delimiter mtt-need-real-list"></li>
<li class="mtt-need-list mtt-need-real-list" id="btnPublish"><div class="menu-icon"></div><?php _e('list_publish');?></li>
<li class="mtt-need-list mtt-need-real-list" id="btnRssFeed"><div class="menu-icon"></div><a href="#"><?php _e('list_rssfeed');?></a></li>
<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>
<li class="mtt-need-list sort-item" id="sortByDateModified"><div class="menu-icon"></div><?php _e('sortByDateModified');?> <span class="mtt-sort-direction"></span></li>
<li class="mtt-menu-delimiter"></li>
<li class="mtt-need-list" id="btnShowCompleted"><div class="menu-icon"></div><?php _e('list_showcompleted');?></li>
</ul>
</div>
<div id="listexportmenucontainer" class="mtt-menu-container" style="display:none">
<ul>
<li class="mtt-need-list mtt-need-real-list" id="btnExportCSV"><a href="#"><?php _e('list_export_csv');?></a></li>
<li class="mtt-need-list mtt-need-real-list" id="btnExportICAL"><a href="#"><?php _e('list_export_ical');?></a></li>
</ul>
</div>
<div id="taskcontextcontainer" class="mtt-menu-container" style="display:none">
<ul>
<li id="cmenu_edit"><b><?php _e('action_edit');?></b></li>
<li id="cmenu_note"><?php _e('action_note');?></li>
<li id="cmenu_prio" class="mtt-menu-indicator" submenu="cmenupriocontainer"><div class="submenu-icon"></div><?php _e('action_priority');?></li>
<li id="cmenu_move" class="mtt-menu-indicator" submenu="cmenulistscontainer"><div class="submenu-icon"></div><?php _e('action_move');?></li>
<li id="cmenu_delete"><?php _e('action_delete');?></li>
</ul>
</div>
<div id="cmenupriocontainer" class="mtt-menu-container" style="display:none">
<ul>
<li id="cmenu_prio:2"><div class="menu-icon"></div>+2</li>
<li id="cmenu_prio:1"><div class="menu-icon"></div>+1</li>
<li id="cmenu_prio:0"><div class="menu-icon"></div>&plusmn;0</li>
<li id="cmenu_prio:-1"><div class="menu-icon"></div>&minus;1</li>
</ul>
</div>
<div id="cmenulistscontainer" class="mtt-menu-container" style="display:none">
<ul>
</ul>
</div>
<div id="slmenucontainer" class="mtt-menu-container" style="display:none">
<ul>
<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>
<div id="page_ajax" style="display:none"></div>
</div>
<div id="space"></div>
</div>
<div id="footer"><div id="footer_content">Powered by <strong><a href="http://www.mytinytodo.net/">myTinyTodo</a></strong> <?php mttinfo('version'); ?> </div></div>
</div>
</body>
</html>

View file

@ -1,12 +0,0 @@
<?php
require_once('./init.php');
Config::set('template', 'ie8');
$url = url_dir( get_unsafe_mttinfo('url'), 0 ) . "index_ie8.php";
Config::set('url', $url);
reset_mttinfo('url');
require('./index.php');

File diff suppressed because one or more lines are too long

View file

@ -1,54 +0,0 @@
if (window !== undefined && window.mytinytodo !== undefined)
{
mytinytodo.options.history = false;
mytinytodo.prepareTaskStr = function(item, noteExp) {
// &mdash; = &#8212; = —
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) + '">' +
'<div class="task-actions"><a href="#" class="taskactionbtn"></a></div>'+"\n"+
'<div class="task-left"><div class="task-toggle"></div>'+
'<input type="checkbox" '+(this.flag.readOnly?'disabled="disabled"':'')+(item.compl?'checked="checked"':'')+'/></div>'+"\n"+
'<div class="task-middle"><div class="task-through-right">'+prepareDuedate(item)+
'<span class="task-date-completed"><span title="'+item.dateInlineTitle+'">'+item.dateInline+'</span>&#8212;'+
'<span title="'+item.dateCompletedInlineTitle+'">'+item.dateCompletedInline+'</span></span></div>'+"\n"+
'<div class="task-through">'+preparePrio(prio,id)+'<span class="task-title">'+prepareHtml(item.title)+'</span> '+
(this.curList.id == -1 ? '<span class="task-listname">'+ tabLists.get(item.listId).name +'</span>' : '') + "\n" +
this.prepareTagsStr(item)+'<span class="task-date">'+item.dateInlineTitle+'</span></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>'+
'<span class="task-note-actions"><a href="#" class="mtt-action-note-save">'+this.lang.get('actionNoteSave')+
'</a> | <a href="#" class="mtt-action-note-cancel">'+this.lang.get('actionNoteCancel')+'</a></span></div>'+
'</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>';
}
}
function prepareHtml(s)
{
// make URLs clickable
s = s.replace(/(^|\s|>)(www\.([\w\#$%&~\/.\-\+;:=,\?\[\]@]+?))(,|\.|:|)?(?=\s|&quot;|&lt;|&gt;|\"|<|>|$)/gi, '$1<a href="http://$2" target="_blank">$2</a>$4');
return s.replace(/(^|\s|>)((?:http|https|ftp):\/\/([\w\#$%&~\/.\-\+;:=,\?\[\]@]+?))(,|\.|:|)?(?=\s|&quot;|&lt;|&gt;|\"|<|>|$)/ig, '$1<a href="$2" target="_blank">$2</a>$4');
};
function preparePrio(prio,id)
{
var cl =''; var v = '';
if(prio < 0) { cl = 'prio-neg prio-neg-'+Math.abs(prio); v = '&#8722;'+Math.abs(prio); } // &#8722; = &minus; =
else if(prio > 0) { cl = 'prio-pos prio-pos-'+prio; v = '+'+prio; }
else { cl = 'prio-zero'; v = '&#177;0'; } // &#177; = &plusmn; = ±
return '<span class="task-prio '+cl+'">'+v+'</span>';
};
function prepareDuedate(item)
{
if(!item.duedate) return '';
return '<span class="duedate" title="'+item.dueTitle+'"><span class="duedate-arrow">→</span> '+item.dueStr+'</span>';
};

View file

@ -1,50 +0,0 @@
body { margin:0px; font-size:100%; }
h2 { margin:0; margin-bottom:2px; font-size:1em; }
h3 { margin-bottom:4px; padding:4px 0; }
#body { margin-left:1px; margin-right:1px; padding:1px; padding-bottom:12px;}
#bar_login, #bar_logout { padding-right:1px; }
#tabs ul { margin-top:0px; }
#tabs ul li { width:70px; margin-right: 1px; }
.tab-content { padding:4px; }
#htab_search { width:40%; max-width:190px; }
.mtt-searchbox { float:right; }
.mtt-searchbox td { width:40%; }
#toolbar.mtt-intask #htab_search { display:none; }
#toolbar.mtt-insearch #htab_newtask { display:none; }
#toolbar.mtt-insearch #htab_search { width:100%; }
#toolbar.mtt-insearch .mtt-searchbox td { width:40%; }
#tasklist li { padding:0.5em 3px; overflow:hidden; }
.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-area textarea { width:95%; }
.task-middle { margin-right:0px; }
#tasklist li .task-through { white-space:nowrap; overflow:hidden; }
#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; }
.task-middle { margin-left:25px; }
#page_taskedit { max-width:99.5%; border:none; position:static; padding:0; }
#page_taskedit .form-table { width:100%; }
#page_taskedit .form-row .in500 { color:#444444; }
#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%; }
.mtt-settings-table .in350 { min-width:50px; }
.mtt-notes-showhide { display:none; }

View file

@ -1,31 +0,0 @@
html { height:0; }
body { height:0; min-height:0; margin:0; }
h2{ display: none; }
h3 { border-bottom:2px solid #777777; }
#lists { display: none; }
#toolbar { display: none; }
.small-bar { display:none; }
.task-actions { display:none; }
#bar { display:none; }
#taskviewcontainer { border:none; }
#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; }
.task-middle { margin-left:0px; margin-right:3px; }
.task-left { display:none; }
.task-date { white-space:nowrap; margin-left:10px; }
#tasklist li.today, #tasklist li.past { background-color:#ffffff; border-color:#dedede; }
.task-prio { font-weight:bold; }
li.task-completed { opacity:1; }
#footer_content { border-top:1px solid #777777; background:none; }
#footer_content a { text-decoration:none; color:#000000; }
#tagcloudbtn { display:none; }
.mtt-notes-showhide { display:none; }
#taskview img { display:none; }

View file

@ -1,355 +0,0 @@
/*
This file is a part of myTinyTodo.
Copyright 2009-2010 Max Pozdeev <maxpozdeev@gmail.com>
*/
/* default style */
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%; }
#mtt_body { padding:8px; padding-bottom:16px; }
td, th, input, textarea, select { font-family:arial; font-size:1em; }
form { display: inline; }
h2,h3 { margin:0; }
h2 { font-size:1.5em; float:left; padding-right:10px; background-color:#ffffff; }
h3 { border-bottom:2px solid #B5D5FF; margin-bottom:10px; padding:6px 0; font-size:1.1em; }
#page_tasks h3 { padding-left:4px; padding-right:4px; }
a { color:#0000ff; cursor:pointer; text-decoration:underline; }
#space { height:30px; }
#footer { height:30px; margin-top:-30px; }
#footer_content { background-color:#b5d5ff; padding:5px; font-size:0.8em; }
#footer_content a { color:#000000; }
#bar { border-bottom:1px solid #b5d5ff; padding-bottom:5px; height:15px; }
#mtt_body.readonly .need-owner { display:none; }
.bar-menu { float:right; }
.nodecor { text-decoration:none; }
#bar_logout { display:none; }
#mtt_body.no-need-auth #bar_auth { display:none; }
#authform { overflow: hidden; z-index:100; background-color:#f9f9f9; border:1px solid #cccccc; padding:5px; width:160px; }
#authform div { padding:2px 0px; }
#authform div.h { font-weight:bold; }
#loading { float:left; padding-top:5px; background-color:#ffffff; display:none; padding-right:6px; width:16px; height:16px; background:url(images/loading1.gif) no-repeat; }
#msg { float:left; }
#msg .msg-text { padding:1px 4px; font-weight:bold; cursor:pointer; }
#msg .msg-details { padding:1px 4px; background-color:#fff; display:none; max-width:700px; }
#msg.mtt-error .msg-text { background-color:#ff3333; }
#msg.mtt-error .msg-details { border:1px solid #ff3333; }
#msg.mtt-info .msg-text { background-color:#EFC300; }
#msg.mtt-info .msg-details { border:1px solid #EFC300;}
.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-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; }
.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; }
#tabs_buttons {
float:right;
padding-top:4px;
padding-bottom:2px;
padding-left:2px;
padding-right:2px;
border:1px solid #ededed;
border-bottom:none;
margin-top:1px;
-moz-border-radius-topright:5px; -webkit-border-top-right-radius:5px; border-top-right-radius:5px;
}
.mtt-tabs-button {
float:left;
font-size:0.9em;
padding:1px; /* makes button bigger */
border:1px solid transparent; /* preallocate space for :hover border */
}
.mtt-tabs-button span {
display:block;
width:16px;
height:16px;
}
.mtt-tabs-button:hover, .mtt-tabs-button.mtt-menu-button-active {
border:1px solid #ccc; -moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px;
}
.mtt-tabs-add-button { float:left; margin-top:1px; padding:6px 2px 0px 2px; font-size:0.9em; height:21px; border-left:1px solid #ededed; background:#fbfbfb url(images/tab_hover.gif) no-repeat top right; }
.mtt-tabs-add-button:hover { cursor:pointer; }
.mtt-tabs-add-button>span { display:block; width:16px; height:16px; background:url(images/buttons.png) 0 0 no-repeat; }
.mtt-tabs-add-button:hover>span { background-position:-16px 0; }
#mtt_body.readonly .mtt-tabs-add-button { display:none; }
.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; }
.mtt-img-button:hover { border:1px solid #ccc; -moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; }
.mtt-img-button span { display:inline-block; width:16px; height:16px; }
.arrdown { display:inline-block; height:7px; width:9px; background:url(images/arrdown.gif); }
.arrdown2 { display:inline-block; height:7px; width:7px; background:url(images/arrdown2.gif); }
/* Quick Task Add */
.mtt-taskbox td.mtt-tb-cell { padding:0px; width:450px; }
.mtt-tb-c { position:relative; padding-left:22px; /*input padding+border*/ }
#task { color:#444444; background:#fff; height:1.35em; padding:2px; padding-right:18px; border:1px inset #F0F0F0; width:100%; margin-left:-22px; }
#task_placeholder span { display:none; color:#ccc; position:absolute; left:0; top:0; height:1.35em; line-height:1.35em; padding:3px; /*input top and left padding+border*/ }
#task_placeholder.placeholding span { display:inline-block; }
.mtt-taskbox-icon { width:16px; height:16px; position:absolute; top:50%; margin-top:-8px; }
.mtt-taskbox-icon.mtt-icon-submittask { background:url(images/mzl.png) 0px -32px no-repeat; right:4px; }
#newtask_adv span { background:url(images/buttons.png) 0 -48px no-repeat; }
#newtask_adv:hover span { background-position:-16px -48px; }
#mtt_body.show-all-tasks #htab_newtask, #mtt_body.readonly #htab_newtask { display:none; }
/* Live Search */
#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;
}
#search_close { display:none; }
.mtt-searchbox td { padding:0px; width:180px; }
.mtt-searchbox-c { position:relative; padding-left:38px; /*input padding+border*/ }
.mtt-searchbox-icon { width:16px; height:16px; position:absolute; top:50%; margin-top:-8px; }
.mtt-searchbox-icon.mtt-icon-search { background:url(images/mzl.png) 0px -16px no-repeat; left:4px; }
.mtt-searchbox-icon.mtt-icon-cancelsearch { background:url(images/mzl.png) 0px 0px no-repeat; right:4px; }
#searchbar { font-size:1em; font-weight:normal; display:none; margin-top:5px; }
#searchbarkeyword { font-weight:bold; }
/* */
#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; }
#mtt-tag-filters { font-size:0.8em; font-weight:normal; }
.tag-filter { margin-left:3px; margin-right:3px; }
.tag-filter-exclude { text-decoration:line-through; }
.mtt-filter-header { font-weight:bold; margin-right:.33em; }
.mtt-filter-close { cursor:pointer; position:relative; top:2px; margin-left:3px; display:inline-block; width:10px; height:10px; background:url(images/closetag.gif) 0 0 no-repeat; }
.task-left { float:left; }
.task-toggle { visibility:hidden; margin-top:2px; cursor:pointer; width:15px; height:15px; float:left; background:url(images/icons.gif) -64px -16px no-repeat; }
li.task-has-note .task-toggle { visibility:visible; }
li.task-expanded .task-toggle { background-position:-80px -16px; }
.task-middle { margin-left:40px; margin-right:20px; }
#tasklist { list-style-type: none; margin: 0; padding: 0;}
#tasklist li { padding:6px 2px 6px 6px; border-bottom:1px solid #DEDEDE; min-height:18px; margin-bottom:1px; background-color:#fff; }
#tasklist li:hover { background-color:#f6f6f6; }
.task-actions { float:right; width:20px; text-align:right; }
.task-date { color:#999999; font-size:0.8em; margin-left:4px; display:none; }
.task-date-completed { color:#999999; display:none; margin-left:5px; }
.show-inline-date .task-date { display:inline; }
.show-inline-date li.task-completed .task-date-completed { display:inline; }
.show-inline-date li.task-completed .task-date { display:none; }
.task-through { overflow:hidden; }
.task-through-right { float:right; }
.task-title a { color:#000000; }
.task-title a:hover { color:#af0000; }
#mtt_body.readonly #tasklist li .task-actions { display:none; }
.task-listname { background-color:#eee; color:#555; padding:0px 3px; }
.task-tags { padding:0px 2px; }
.task-tags .tag { font-size:0.8em; font-weight:bold; color:#333333; text-decoration:underline; }
.task-tags .tag:hover { }
.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; }
li.task-completed .task-middle { color:#777777;}
li.task-completed .task-through { text-decoration:line-through; }
li.task-completed .task-title a { color:#777777; }
#tasklist li.task-completed { opacity:0.6; filter:alpha(opacity=60); }
#tasklist li.task-completed:hover { opacity:1.0; filter:alpha(opacity=100); }
#tasklist li.not-in-tagpreview { opacity:0.1; filter: alpha(opacity=10); }
#tasklist li.mtt-task-placeholder {
min-height:0px; padding:0px; height:18px; line-height:18px;
background-color:#ddd; border:1px solid #aaa;
-moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;
}
a.taskactionbtn { display:block; float:right; height:15px; width:15px; text-decoration:none; background:url(images/icons.gif) 0 0 no-repeat; display:none; }
li:hover a.taskactionbtn, a.taskactionbtn.mtt-menu-button-active { background-position:-16px 0; display:block;}
#tasklist.filter-past li, #tasklist.filter-today li, #tasklist.filter-soon li { display:none; }
#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;
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; }
.task-note-area { display:none; margin-bottom:5px; }
.task-note-area textarea { color:#999999; width:100%; display:block; height:65px; }
.task-note-actions { font-size:0.8em; }
.hidden { display:none; }
.invisible { visibility:hidden; }
.in500 { width:500px; color:#444444; }
.in100 { width:100px; color:#444444; }
.task-note span a { color:#777777; }
.task-note span a:hover { color:#af0000; }
.task-prio { padding-left:2px; padding-right:2px; margin-left:0px; margin-right:5px; cursor:default; }
.prio-neg { background-color:#3377ff; color:#ffffff; }
.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; }
.form-row { margin-top:8px; }
.form-row .h { font-weight:bold; color:#333333; }
.form-row-short-end { clear:both; }
#page_taskedit .form-row .in500 { width:99%; }
#page_taskedit .form-row textarea.in500 { height:200px; /*resize:none;*/ }
#page_taskedit .form-row-short { float:left; margin-right:12px; }
#page_taskedit .form-bottom-buttons { text-align:center; }
#alltags .tag { font-weight:bold; color:#333333; }
#alltags .tag:hover { background-color:#999988; color:white; }
.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-date { font-size:1em; font-weight:normal; display:inline; color:#777; margin-left:8px; }
a.mtt-back-button { font-size:0.8em; }
/* autocomplete */
.ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
.ui-autocomplete { position: absolute; padding:0px; border:1px solid #cccccc; background-color:#f9f9f9; overflow:hidden; z-index:99999; box-shadow:1px 2px 5px rgba(0,0,0,0.5); }
.ui-autocomplete .ui-menu-item { margin: 0px; cursor:default; overflow: hidden; }
.ui-autocomplete .ui-menu-item-wrapper { position: relative; padding:0.3em 4px; }
.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 span { cursor:pointer; border:1px solid #f9f9f9; }
#priopopup .prio-zero:hover { border-color:#dedede; }
#priopopup .prio-neg:hover { border-color:#3377ff; }
#priopopup .prio-pos:hover { border-color:#ff3333; }
#priopopup .prio-pos-1:hover { border-color:#ff7700; }
#tagcloudbtn { margin-right:2px; font-size:0.8em; font-weight:normal; padding:2px; float:right; }
#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;
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%; }
#tagcloud .w1 { font-size:90%; }
#tagcloud .w2 { font-size:100%; }
#tagcloud .w3 { font-size:110%; }
#tagcloud .w4 { font-size:120%; }
#tagcloud .w5 { font-size:130%; }
#tagcloud .w6 { font-size:140%; }
#tagcloud .w7 { font-size:150%; }
#tagcloud .w8 { font-size:160%; }
#tagcloud .w9 { font-size:170%; }
#tagcloudcancel { float:right; }
#tagcloudcancel span { background:url(images/buttons.png) 0 -32px no-repeat; }
#tagcloudcancel span:hover { background-position:-16px -32px; }
#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);
-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-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; }
.ui-datepicker-calendar td a { display:block; text-decoration:none; color:#444444; border:1px solid #cccccc; background-color:#f9f9f9; color:#111; padding:1px; }
.ui-datepicker-calendar td.ui-datepicker-current-day a { background-color:#EAF5FF; color:#222222; border-color:#5980FF; }
.ui-datepicker-calendar td.ui-datepicker-today a { color:#fff; background-color:#ccc; }
.ui-datepicker-calendar td a:hover { border-color:#5980FF; }
.ui-datepicker-header { padding:3px 0px; }
.ui-datepicker-prev { position:absolute; left:2px; height:20px; text-decoration:none; }
.ui-datepicker-next { position:absolute; right:2px; height:20px; text-decoration:none; }
.ui-datepicker-title { text-align:center; line-height:20px; }
.ui-icon { width:16px; height:16px; text-indent:-99999px; overflow:hidden; }
.ui-datepicker .ui-icon-circle-triangle-w { display:block; position:absolute; top:50%; margin-top:-8px; left:50%; background:url(images/icons.gif) -48px -16px no-repeat; }
.ui-datepicker .ui-icon-circle-triangle-e { display:block; position:absolute; top:50%; margin-top:-8px; right:50%; background:url(images/icons.gif) -32px -16px no-repeat; }
.mtt-menu-button {
-moz-user-select:none; -webkit-user-select: none;
cursor:pointer;
border:1px solid transparent;
}
.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 {
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-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 {
background-color:#316AC5;
color:white;
background:-moz-linear-gradient(#5373fc, #3157f4);
background:-webkit-gradient(linear, left top, left bottom, from(#5373fc), to(#3157f4));
}
.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; }
.mtt-menu-container .menu-icon { width:16px; height:16px; position:absolute; left:4px; top:50%; margin-top:-8px; }
li.mtt-item-checked .menu-icon { background:url(images/icons.gif) -16px -16px; }
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; }
#slmenucontainer li.mtt-list-hidden a { font-style:italic; }
#cmenulistscontainer li.mtt-list-hidden { font-style:italic; }
#btnRssFeed .menu-icon { background:url(images/buttons.png) -16px -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; }
.mtt-settings-table .form-buttons { border-bottom:none; text-align:center; }
.mtt-settings-table th { text-align:left; width:210px; padding-left:8px; }
.mtt-settings-table .descr { font-size:0.8em; font-weight:normal; color:#222; }
.mtt-settings-table .in350 { min-width:350px; }

View file

@ -1,33 +0,0 @@
body { direction:rtl; }
h2 { float:right; padding-left:10px; padding-right:0px; }
.bar-menu { float:left; }
#loading { float:right; }
#lists .mtt-tabs { float:right; }
.mtt-tabs li { float:right; margin:1px 0 0 3px; border-left:none; border-right:1px solid #ededed; background:#fbfbfb url(images/tab_hover.gif) no-repeat top left; }
.mtt-tabs li.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:left; }
.mtt-tabs-button { float:right; }
#tagcloudbtn { float:left; }
#htab_search { float:left; }
#task { padding: 2px 2px 2px 18px; }
#task_placeholder span { right:0px; left:auto; }
.mtt-taskbox-icon.mtt-icon-submittask { left:4px; right:auto; }
.mtt-searchbox-icon.mtt-icon-search { right:4px; left:auto; }
.mtt-searchbox-icon.mtt-icon-cancelsearch { left:4px; right:auto; }
.task-actions { float:left; text-align:left; width:15px; }
.task-left { float:right; }
.task-toggle { float:right; }
.task-middle { margin-right:40px; margin-left:25px; }
.task-date { margin-right:4px; }
.duedate { float:left; margin-left:0; margin-right:5px; }
.duedate-arrow { display:none; }
.duedate:before { content:'\2190'; }
.task-through-right { float:left; }
#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; }

View file

@ -10,7 +10,7 @@ $config['db'] = '';
$config['mysql.host'] = "localhost";
$config['mysql.db'] = "mytinytodo";
$config['mysql.user'] = "user";
$config['mysql.password'] = "";
$config['mysql.password'] = "";
# Tables prefix
$config['prefix'] = "mtt_";
@ -19,7 +19,7 @@ $config['prefix'] = "mtt_";
# 'url' - URL where index.php is called from (ex.: http://site.com/todo.php)
# 'mtt_url' - directory URL where mytinytodo is installed (with trailing slash) (ex.: http://site.com/lib/mytinytodo/)
$config['url'] = '';
$config['mtt_url'] = '';
$config['mtt_url'] = '';
# Language pack
$config['lang'] = "en";
@ -54,7 +54,4 @@ $config['dateformatshort'] = 'j M';
# Show task date in list
$config['showdate'] = 0;
# Autodetect mobile devices and switch theme
$config['detectmobile'] = 1;
?>
?>

View file

@ -18,75 +18,120 @@ if (need_auth() && (!$listData || !$listData['published'])) {
die("Access denied!<br> List is not published.");
}
if(!$listData) {
die("No such list");
die("No list found");
}
$data = array();
$feedType = _get('feed');
$sqlWhere = '';
if($feedType == 'completed') {
$listData['_uid_field'] = 'd_completed';
$listData['_feed_descr'] = $lang->get('feed_completed_tasks');
$sqlWhere = 'AND compl=1';
fillData( $data, $listId, 'd_completed', 'AND compl=1' );
}
elseif($feedType == 'modified') {
$listData['_uid_field'] = 'd_edited';
$listData['_feed_descr'] = $lang->get('feed_modified_tasks');
$listData['_feed_descr'] = $lang->get('feed_modified_tasks');
fillData( $data, $listId, 'd_edited', '' );
}
elseif($feedType == 'current') {
$listData['_uid_field'] = 'd_created';
$listData['_feed_descr'] = $lang->get('feed_new_tasks');
$sqlWhere = 'AND compl=0';
fillData( $data, $listId, 'd_created', 'AND compl=0' );
}
elseif($feedType == 'status') {
$listData['_feed_descr'] = $lang->get('feed_tasks');
fillData( $data, $listId, 'd_created', '' );
fillData( $data, $listId, 'd_edited', 'AND compl=0 AND d_edited > d_created' );
fillData( $data, $listId, 'd_completed', 'AND compl=1' );
}
else {
$listData['_uid_field'] = 'd_created';
$listData['_feed_descr'] = $lang->get('feed_new_tasks');
$listData['_feed_descr'] = $lang->get('feed_new_tasks');
$feedType = 'tasks';
fillData( $data, $listId, 'd_created', '' );
}
$listData['_feed_title'] = sprintf($lang->get('feed_title'), $listData['name']) . ' - '. $listData['_feed_descr'];
$listData['_feed_link'] = get_mttinfo('mtt_url'). "feed.php?list=". (int)$listData['id'] . ($feedType != '' ? "&feed=". $feedType : '');
$listData['_feed_type'] = $feedType;
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))
printRss($data, $listData);
function fillData(&$data, $listId, $field, $sqlWhere )
{
if($r['prio'] > 0) $r['prio'] = '+'.$r['prio'];
$a = array();
if($r['prio']) $a[] = $lang->get('priority'). ": $r[prio]";
if($r['duedate'] != '') {
$ad = explode('-', $r['duedate']);
$a[] = $lang->get('due'). ": ".formatDate3(Config::get('dateformat'), (int)$ad[0], (int)$ad[1], (int)$ad[2], $lang);
$lang = Lang::instance();
$db = DBConnection::instance();
$q = $db->dq("SELECT * FROM {$db->prefix}todolist WHERE list_id=$listId $sqlWhere ORDER BY $field DESC LIMIT 100");
while ($r = $q->fetch_assoc($q))
{
if ($r['prio'] > 0) {
$r['prio'] = '+'.$r['prio'];
}
$a = array();
$a[] = $lang->get('task'). ": ". $r['title'];
if ($r['prio']) {
$a[] = $lang->get('priority'). ": $r[prio]";
}
if ($r['duedate'] != '') {
$ad = explode('-', $r['duedate']);
$a[] = $lang->get('due'). ": ".formatDate3(Config::get('dateformat'), (int)$ad[0], (int)$ad[1], (int)$ad[2], $lang);
}
if ($r['tags'] != '') {
$a[] = $lang->get('tags'). ": ". str_replace(',', ', ', $r['tags']);
}
if ($r['compl']) {
$a[] = $lang->get('taskdate_completed'). ": ". timestampToDatetime($r['d_completed']);
}
$r['title'] = htmlspecialchars( $r['title'] );
$r['note'] = mttMarkup_v1($r['note']);
$r['_descr'] = implode("<br/>", htmlarray($a)). "<br/><br/>". $r['note'];
$r['_title'] = "#". (int)$r['id']. ": ". $r['title'];
$r['_d'] = gmdate('r', $r[$field]);
$r['_field'] = $field;
$data[] = $r;
}
if($r['tags'] != '') $a[] = $lang->get('tags'). ": ". str_replace(',', ', ', $r['tags']);
if($r['compl']) $a[] = $lang->get('taskdate_completed'). ": ". timestampToDatetime($r['d_completed']);
$r['title'] = strip_tags($r['title']);
$r['note'] = escapeTags($r['note']);
$r['_descr'] = nl2br($r['note']). ($a && $r['note']!='' ? "<br/><br/>" : ""). implode("<br/>", htmlarray($a));
$data[] = $r;
}
printRss($listData, $data);
function printRss($listData, $data)
function printRss($data, $listData)
{
$lang = Lang::instance();
$link = get_mttinfo('url'). "?list=". (int)$listData['id'];
$buildDate = gmdate('r');
$s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\n<channel>\n".
"<title>$listData[_feed_title]</title>\n<link>$link</link>\n<description>$listData[_feed_descr]</description>\n".
$s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n".
"<rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n".
"<channel>\n".
"<title>$listData[_feed_title]</title>\n".
"<link>$link</link>\n".
"<atom:link href=\"${listData['_feed_link']}\" rel=\"self\" type=\"application/rss+xml\"/>\n".
"<description>$listData[_feed_descr]</description>\n".
"<lastBuildDate>$buildDate</lastBuildDate>\n\n";
foreach($data as $v)
{
$d = gmdate('r', $v[$listData['_uid_field']]);
$guid = $listData['id'].'-'.$v['id'].'-'.$v[$listData['_uid_field']];
$guid = $listData['_feed_type']. '-'. $listData['id']. '-'. $v['id']. '-'. $v[$v['_field']];
$itemLink = $link. "&amp;task=". (int)$v['id'];
$s .= "<item>\n<title><![CDATA[". str_replace("]]>", "]]]]><![CDATA[>", $v['title']). "]]></title>\n".
"<link>$link</link>\n".
"<pubDate>$d</pubDate>\n".
$status = '';
if ( $listData['_feed_type'] == 'status' ) {
if ( $v['_field'] == 'd_created' ) {
$status = $lang->get('feed_status_new');
}
elseif ( $v['_field'] == 'd_edited' ) {
$status = $lang->get('feed_status_updated');
}
elseif ( $v['_field'] == 'd_completed' ) {
$status = $lang->get('feed_status_completed');
}
}
if ( $status !='' ) $status = "[$status] ";
$s .= "<item>\n".
"<title>". $status. $v['title']. "</title>\n".
"<link>". $itemLink. "</link>\n".
"<pubDate>". $v['_d']. "</pubDate>\n".
"<description><![CDATA[". $v['_descr']. "]]></description>\n".
"<guid isPermaLink=\"false\">$guid</guid>\n".
"</item>\n";
"</item>\n\n";
}
$s .= "</channel>\n</rss>";

View file

@ -115,7 +115,6 @@ class Config
'dateformatshort' => array('default'=>'j M', 'type'=>'s'),
'template' => array('default'=>'default', 'type'=>'s'),
'showdate' => array('default'=>0, 'type'=>'i'),
'detectmobile' => array('default'=>1, 'type'=>'i')
);
public static $config;
@ -216,15 +215,26 @@ function url_dir($url, $onlyPath = 1)
return '/';
}
function escapeTags($s)
// Convert note's raw text to html with allowed elements (b,i,u,s and raw urls)
function mttMarkup_v1($s)
{
//hide allowed elements from escaping
$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("~<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));
$s = htmlspecialchars($s); //escape all elements, except above
$s = str_replace( [$c1, $c2], ['<','>'], $s ); //unhide
$s = nl2br($s);
// make links from text starting with 'www.'
$s = preg_replace( "/(^|\s|>)(www\.([\w\#$%&~\/.\-\+;:=,\?\[\]@]+?))(,|\.|:|)?(?=\s|&quot;|&lt;|&gt;|\"|<|>|$)/i" , '$1<a href="http://$2" target="_blank">$2</a>$4' , $s );
// make link from text starting with protocol like 'http://'
$s = preg_replace( "/(^|\s|>)([a-z]+:\/\/([\w\#$%&~\/.\-\+;:=,\?\[\]@]+?))(,|\.|:|)?(?=\s|&quot;|&lt;|&gt;|\"|<|>|$)/i" , '$1<a href="$2" target="_blank">$2</a>$4' , $s);
return $s;
}

View file

@ -53,7 +53,6 @@ var mytinytodo = window.mytinytodo = _mtt = {
options: {
title: '',
openList: 0,
singletab: false,
autotag: false,
instantSearch: true,
tagPreview: true,
@ -130,6 +129,9 @@ var mytinytodo = window.mytinytodo = _mtt = {
else {
this.homeUrl = this.mttUrl;
}
if ( ! options.hasOwnProperty('touchDevice') ) {
this.options.touchDevice = ('ontouchend' in document);
}
jQuery.extend(this.options, options);
@ -137,7 +139,6 @@ var mytinytodo = window.mytinytodo = _mtt = {
flag.isLogged = options.isLogged ? true : false;
if(this.options.showdate) $('#page_tasks').addClass('show-inline-date');
if(this.options.singletab) $('#lists .mtt-tabs').addClass('mtt-tabs-only-one');
// handlers
$('.mtt-tabs-add-button').click(function(){
@ -145,12 +146,9 @@ var mytinytodo = window.mytinytodo = _mtt = {
});
$('.mtt-tabs-select-button').click(function(event){
if(event.metaKey || event.ctrlKey) {
// toggle singetab interface
_mtt.applySingletab(!_mtt.options.singletab);
return false;
if (!_mtt.menus.selectlist) {
_mtt.menus.selectlist = new mttMenu( 'slmenucontainer', { onclick:slmenuSelect, alignRight: true } );
}
if(!_mtt.menus.selectlist) _mtt.menus.selectlist = new mttMenu('slmenucontainer', {onclick:slmenuSelect, adjustWidth:true, alignRight:true});
_mtt.menus.selectlist.show(this);
});
@ -241,7 +239,8 @@ var mytinytodo = window.mytinytodo = _mtt = {
$('#tagcloudload').show();
loadTags(curList.id, function(){$('#tagcloudload').hide();});
}
}, adjustWidth:true, alignRight:true
},
alignRight:true
});
_mtt.menus.tagcloud.show(this);
});
@ -277,24 +276,15 @@ var mytinytodo = window.mytinytodo = _mtt = {
// Tabs
$('#lists').on('click', 'li.mtt-tab', function(event){
$('#lists').on('click', 'li.mtt-tab', function(event) {
var listId = this.id.split('_', 2)[1];
if (listId === 'all') listId = -1;
if(event.metaKey || event.ctrlKey) {
// hide the tab
var listId = parseInt(this.id.split('_', 2)[1]);
hideList(listId);
return false;
}
tabSelect(this);
return false;
});
$('#list_all').click(function(event){
if(event.metaKey || event.ctrlKey) {
// hide the tab
hideList(-1);
return false;
}
tabSelect(-1);
tabSelect(listId);
return false;
});
@ -303,11 +293,6 @@ var mytinytodo = window.mytinytodo = _mtt = {
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(){
prioClick(-1,this);
@ -481,16 +466,27 @@ var mytinytodo = window.mytinytodo = _mtt = {
}
$("#tasklist").sortable({
items: '> :not(.task-completed)',
cancel: 'span,input,a,textarea',
delay: 150,
start: tasklistSortStart,
update: tasklistSortUpdated,
placeholder: 'mtt-task-placeholder',
cursor: 'grabbing'
items: '> :not(.task-completed)',
cancel: 'span,input,a,textarea',
delay: 150,
start: tasklistSortStart,
update: tasklistSortUpdated,
placeholder: 'mtt-task-placeholder',
cursor: 'grabbing'
});
if (options.touchDevice) {
$("#lists ul").sortable({
delay: 150,
update: listOrderChanged,
items: '> :not(.mtt-tabs-alltasks)',
forcePlaceholderSize : true,
placeholder: 'mtt-tab mtt-tab-sort-placeholder',
cursor: 'grabbing'
});
if (this.options.touchDevice) {
$("#tasklist").disableSelection();
$("#tasklist").sortable('option', {
axis: 'y',
@ -499,17 +495,9 @@ var mytinytodo = window.mytinytodo = _mtt = {
distance: 0
});
$('#cmenu_note').hide();
$("#lists ul").sortable('disable');
}
$("#lists ul").sortable({
delay:150,
update:listOrderChanged,
placeholder: 'mtt-list-sort-placeholder',
cursor: 'grabbing'
});
this.applySingletab();
// AJAX Errors
$(document).ajaxSend(function(r,s){
@ -676,11 +664,18 @@ var mytinytodo = window.mytinytodo = _mtt = {
// or open first if all list are hidden
if(!openListId) openListId = res.list[0].id;
$.each(res.list, function(i,item){
tabLists.add(item);
ti += '<li id="list_'+item.id+'" class="mtt-tab'+(item.hidden?' mtt-tabs-hidden':'')+'">'+
'<a href="'+_mtt.urlForList(item)+'" title="'+item.name+'"><span>'+item.name+'</span>'+
'<div class="list-action"></div></a></li>';
$.each(res.list, function(i,item) {
if ( item.id == -1) {
ti += '<li id="list_all" class="mtt-tab mtt-tabs-alltasks'+(item.hidden?' mtt-tabs-hidden':'')+'">'+
'<a href="'+_mtt.urlForList(item)+'" title="'+item.name+'"><span>'+item.name+'</span>'+
'<div class="list-action"></div></a></li>';
}
else {
tabLists.add(item);
ti += '<li id="list_'+item.id+'" class="mtt-tab'+(item.hidden?' mtt-tabs-hidden':'')+'">'+
'<a href="'+_mtt.urlForList(item)+'" title="'+item.name+'"><span>'+item.name+'</span>'+
'<div class="list-action"></div></a></li>';
}
});
}
@ -757,20 +752,6 @@ var mytinytodo = window.mytinytodo = _mtt = {
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');
}
else {
$('#lists .mtt-tabs').removeClass('mtt-tabs-only-one');
$("#lists ul").sortable('enable');
}
},
filter: {
_filters: [],
@ -975,7 +956,7 @@ function loadTasks(opts)
function prepareTaskStr(item, noteExp)
{
return '<li id="taskrow_'+item.id+'" class="task-row ' + (item.compl?'task-completed ':'') + item.dueClass + (item.note!=''?' task-has-note':'') +
((curList.showNotes && item.note != '') || noteExp ? ' task-expanded' : '') + prepareTagsClass(item.tags_ids) + '"><div class="task-container">' +
((curList.showNotes && item.note != '') || noteExp ? ' task-expanded' : '') + prepareDomClassOfTags(item.tags_ids) + '"><div class="task-container">' +
prepareTaskBlocks(item) + "</div></li>\n";
};
_mtt.prepareTaskStr = prepareTaskStr;
@ -994,7 +975,7 @@ function prepareTaskBlocks(item)
'<div class="task-middle-top">' +
'<div class="task-through">' +
preparePrio(item.prio,id) +
'<span class="task-title">' + prepareHtml(item.title) + '</span> ' +
'<span class="task-title">' + prepareTaskTitleInlineHtml(item.title) + '</span> ' +
(curList.id == -1 ? '<span class="task-listname">'+ tabLists.get(item.listId).name +'</span>' : '') +
prepareTagsStr(item) +
'<span class="task-date">'+item.dateInlineTitle+'</span>' +
@ -1003,7 +984,7 @@ function prepareTaskBlocks(item)
'</div>' +
'<div class="task-note-block">' +
'<div id="tasknote'+id+'" class="task-note"><span>'+prepareHtml(item.note)+'</span></div>' +
'<div id="tasknote' + id + '" class="task-note">' + prepareTaskNoteInlineHtml(item.note) + '</div>' +
'<div id="tasknotearea'+id+'" class="task-note-area"><textarea id="notetext'+id+'"></textarea>'+
'<span class="task-note-actions"><a href="#" class="mtt-action-note-save">'+_mtt.lang.get('actionNoteSave') +
'</a> | <a href="#" class="mtt-action-note-cancel">'+_mtt.lang.get('actionNoteCancel')+'</a></span>' +
@ -1015,13 +996,19 @@ function prepareTaskBlocks(item)
};
_mtt.prepareTaskBlocks = prepareTaskBlocks;
function prepareHtml(s)
function prepareTaskTitleInlineHtml(s)
{
// make URLs clickable
s = s.replace(/(^|\s|>)(www\.([\w\#$%&~\/.\-\+;:=,\?\[\]@]+?))(,|\.|:|)?(?=\s|&quot;|&lt;|&gt;|\"|<|>|$)/gi, '$1<a href="http://$2" target="_blank">$2</a>$4');
return s.replace(/(^|\s|>)((?:http|https|ftp):\/\/([\w\#$%&~\/.\-\+;:=,\?\[\]@]+?))(,|\.|:|)?(?=\s|&quot;|&lt;|&gt;|\"|<|>|$)/ig, '$1<a href="$2" target="_blank">$2</a>$4');
// Task title is already escaped on php back-end
return s;
}
_mtt.prepareTaskTitleInlineHtml = prepareTaskTitleInlineHtml;
function prepareTaskNoteInlineHtml(s)
{
// Task note is already escaped on php back-end
return s;
};
_mtt.prepareHtml = prepareHtml;
_mtt.prepareTaskNoteInlineHtml = prepareTaskNoteInlineHtml;
function preparePrio(prio,id)
{
@ -1046,7 +1033,7 @@ function prepareTagsStr(item)
};
_mtt.prepareTagsStr = prepareTagsStr;
function prepareTagsClass(ids)
function prepareDomClassOfTags(ids)
{
if(!ids || ids == '') return '';
var a = ids.split(',');
@ -1056,7 +1043,7 @@ function prepareTagsClass(ids)
}
return ' '+a.join(' ');
};
_mtt.prepareTagsClass = prepareTagsClass;
_mtt.prepareDomClassOfTags = prepareDomClassOfTags;
function prepareDueDate(item)
{
@ -1309,12 +1296,13 @@ function toggleAllNotes(show)
function tabSelect(elementOrId)
{
var id;
if(typeof elementOrId == 'number') id = elementOrId;
if (typeof elementOrId == 'number') id = elementOrId;
else if(typeof elementOrId == 'string') id = parseInt(elementOrId);
else {
id = $(elementOrId).attr('id');
if(!id) return;
id = parseInt(id.split('_', 2)[1]);
if (!id ) return;
id = id.split('_', 2)[1];
if (id === 'all') id = -1;
}
if ( !tabLists.exists(id) ) {
// TODO: handle unknown list
@ -1327,7 +1315,6 @@ function tabSelect(elementOrId)
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');
@ -1475,7 +1462,7 @@ function saveTaskNote(id)
var item = json.list[0];
taskList[id].note = item.note;
taskList[id].noteText = item.noteText;
$('#tasknote'+id+'>span').html(prepareHtml(item.note));
$('#tasknote'+id).html(prepareTaskNoteInlineHtml(item.note));
if(item.note == '') $('#taskrow_'+id).removeClass('task-has-note task-expanded');
else $('#taskrow_'+id).addClass('task-has-note task-expanded');
cancelTaskNote(id);
@ -1855,7 +1842,8 @@ function mttMenu(container, options)
}
this.hide();
$(this.caller).removeClass('mtt-menu-button-active');
$(document).unbind('mousedown.mttmenuclose');
$(document).off('mousedown.mttmenu');
$(document).off('keydown.mttmenu');
// onClose trigger
if(this.options.onClose && this.options.onClose.call) {
@ -1870,7 +1858,12 @@ function mttMenu(container, options)
this.close();
if(this.caller && this.caller == caller) return;
}
$(document).triggerHandler('mousedown.mttmenuclose'); //close any other open menu
$(document).triggerHandler('mousedown.mttmenu'); //close any other open menu
$(document).on('keydown.mttmenu', function(event) {
if (event.keyCode == 27) {
menu.close(); //close the menu on Esc pressed
}
});
this.caller = caller;
var $caller = $(caller);
@ -1880,11 +1873,15 @@ function mttMenu(container, options)
}
// adjust width
this.$container.removeClass('mtt-left-adjusted mtt-right-adjusted');
if ( this.options.adjustWidth && this.$container.outerWidth(true) > $(window).width() ) {
this.$container.addClass('mtt-left-adjusted mtt-right-adjusted');
this.$container.width( $(window).width() - (this.$container.outerWidth(true) - this.$container.width()) );
if (this.options.adjustWidth) {
this.$container.width('');
this.$container.removeClass('mtt-left-adjusted mtt-right-adjusted');
if ( this.$container.outerWidth(true) > $(window).width() ) {
this.$container.addClass('mtt-left-adjusted mtt-right-adjusted');
this.$container.width( $(window).width() - (this.$container.outerWidth(true) - this.$container.width()) );
}
}
//round the width to avoid overflow issues
this.$container.width( Math.ceil(this.$container.width()) );
@ -1911,18 +1908,25 @@ function mttMenu(container, options)
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) });
$(document).on('mousedown.mttmenu', function(e) { menu.close(e) });
this.isOpen = true;
};
this.showSub = function()
{
// adjust width
this.$container.removeClass('mtt-left-adjusted mtt-right-adjusted');
if ( this.options.adjustWidth && this.$container.outerWidth(true) > $(window).width() ) {
this.$container.addClass('mtt-left-adjusted mtt-right-adjusted');
this.$container.width( $(window).width() - (this.$container.outerWidth(true) - this.$container.width()) );
if (this.options.adjustWidth) {
this.$container.width('');
this.$container.removeClass('mtt-left-adjusted mtt-right-adjusted');
if ( this.$container.outerWidth(true) > $(window).width() ) {
this.$container.addClass('mtt-left-adjusted mtt-right-adjusted');
this.$container.width( $(window).width() - (this.$container.outerWidth(true) - this.$container.width()) );
}
}
//round the width to avoid overflow issues
this.$container.width( Math.ceil(this.$container.width()) );
this.$caller.addClass('mtt-menu-item-active');
var offset = this.$caller.offset();
var containerWidth = this.$container.outerWidth(true);

View file

@ -29,19 +29,6 @@ if (!is_int(Config::get('firstdayofweek')) || Config::get('firstdayofweek')<0 ||
Config::set('firstdayofweek', 1);
}
if ( !isset($_GET['mobile']) && !isset($_GET['pda']) && !isset($_GET['desktop']) && Config::get('detectmobile') ) {
if (is_mobile()) {
Config::set('mobile', 1);
}
}
//TODO: if we have a desktop or mobile theme request we have to save it in cookies and redirect (if auto-detect mobiles is on)
else if ( isset($_GET['desktop']) ) { //more priority than mobile
Config::set('mobile', 0);
}
else if ( isset($_GET['mobile']) || isset($_GET['pda']) ) {
Config::set('mobile', 1);
}
define('TEMPLATEPATH', MTTTHEMES. Config::get('template'). '/');
require(TEMPLATEPATH. 'index.php');
@ -60,17 +47,3 @@ function redirectWithHashRoute(array $q, array $hash)
header("Location: ". $url);
exit;
}
function is_mobile()
{ //basic detection
if (preg_match("/(iphone|ipad|android)/i", _server('HTTP_USER_AGENT'))) {
return true;
}
return false;
}
function getDesktopUrl($escape = true)
{
$url = (Config::get('detectmobile') && is_mobile()) ? get_unsafe_mttinfo('desktop_url') : get_unsafe_mttinfo('url');
return $escape ? htmlspecialchars($url) : $url;
}

View file

@ -175,15 +175,6 @@ function get_unsafe_mttinfo($v)
$_mttinfo['url'] = ($is_https ? 'https://' : 'http://'). $_SERVER['HTTP_HOST']. url_dir(getRequestUri());
}
return $_mttinfo['url'];
case 'mobile_url':
$_mttinfo['mobile_url'] = Config::getUrl('mobile_url');
if ($_mttinfo['mobile_url'] == '') {
$_mttinfo['mobile_url'] = get_unsafe_mttinfo('url'). '?mobile';
}
return $_mttinfo['mobile_url'];
case 'desktop_url':
$_mttinfo['desktop_url'] = get_unsafe_mttinfo('url'). '?desktop';
return $_mttinfo['desktop_url'];
case 'mtt_url':
/* Directory with ajax.php. No need to set if you use default directory structure. */
$_mttinfo['mtt_url'] = Config::getUrl('mtt_url'); // need to have a trailing slash

View file

@ -1 +1 @@
1.6.4
1.7