interface taken from firefox extension

This commit is contained in:
Max Pozdeev 2010-06-12 15:48:18 +04:00
parent ae2788749f
commit 53adca8db8
9 changed files with 113 additions and 68 deletions

View file

@ -83,6 +83,7 @@ class DefaultLang
'list_publish' => "Publish list",
'list_showcompleted' => "Show completed tasks",
'list_clearcompleted' => "Clear completed tasks",
'list_select' => "Select list",
'alltags' => "All tags:",
'alltags_show' => "Show all",
'alltags_hide' => "Hide all",

View file

@ -85,6 +85,7 @@ class Lang extends DefaultLang
'list_publish' => "Publish list",
'list_showcompleted' => "Show completed tasks",
'list_clearcompleted' => "Clear completed tasks",
'list_select' => "Select list",
'alltags' => "All tags:",
'alltags_show' => "Show all",
'alltags_hide' => "Hide all",

View file

@ -12,7 +12,7 @@ var sortOrder; //save task order before dragging
var searchTimer;
var objPrio = {};
var selTask = 0;
var flag = { needAuth:false, isLogged:false, tagsChanged:true, windowTaskEditMoved:false, autoTag:true };
var flag = { needAuth:false, isLogged:false, tagsChanged:true, windowTaskEditMoved:false };
var taskCnt = { total:0, past: 0, today:0, soon:0 };
var tmp = {};
var cmenu;
@ -114,6 +114,7 @@ var mytinytodo = window.mytinytodo = _mtt = {
$('#search_close').click(function(){
addsearchToggle(0);
return false;
});
$('#search').keyup(timerSearch);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 550 B

View file

@ -1,21 +1,7 @@
<?php
function datepickerformat()
{
if(Config::get('duedateformat') == 2) $duedateformat = 'm/d/yy';
elseif(Config::get('duedateformat') == 3) $duedateformat = 'dd.mm.yy';
elseif(Config::get('duedateformat') == 4) $duedateformat = 'dd/mm/yy';
else $duedateformat = 'yy-mm-dd';
return $duedateformat;
}
header('Content-type: application/xhtml+xml');
echo '<?xml version="1.0" encoding="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>
<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=@VERSION" media="all" />
<?php if(Config::get('rtl')): ?>
@ -45,51 +31,15 @@ $().ready(function(){
mytinytodo.templateUrl = "<?php mttinfo('template_url'); ?>";
mytinytodo.db = new mytinytodoStorageAjax(mytinytodo);
mytinytodo.init({
needAuth: <?php echo $needAuth ? "true" : "false"; ?>,
isLogged: <?php echo ($needAuth && is_logged()) ? "true" : "false"; ?>,
showdate: <?php echo Config::get('showdate') ? "true" : "false"; ?>,
singletab: <?php echo isset($_GET['singletab']) ? "true" : "false"; ?>,
needAuth: <?php echo $needAuth ? "true" : "false"; ?>,
isLogged: <?php echo ($needAuth && is_logged()) ? "true" : "false"; ?>
duedateformat: <?php echo (int)Config::get('duedateformat'); ?>,
autotag: <?php echo Config::get('autotag') ? "true" : "false"; ?>
<?php if(isset($_GET['list'])) echo ",openList: ". (int)$_GET['list']; ?>
}, lang).loadLists(1);
});
/*
$().ready(function(){
mytinytodo.mttUrl = "<?php mttinfo('mtt_url'); ?>";
$("#tasklist").sortable({cancel:'span,input,a,textarea', delay: 150, update:orderChanged, start:sortStart, items:'> :not(.task-completed)'});
$("#tasklist").bind("click", tasklistClick);
$("#edittags").autocomplete('ajax.php?suggestTags', {scroll: false, multiple: true, selectFirst:false, max:8, extraParams:{list:function(){return curList.id}}});
$("#priopopup").mouseleave(function(){$(this).hide()});
<?php
if($needAuth)
{
echo "\tflag.needAuth = true;\n";
if(is_logged()) echo "\tflag.isLogged = true;\n";
}
if(Config::get('autotag')) echo "\tflag.autoTag = true;\n";
if(isset($_GET['list'])) echo "\tmytinytodo.setOptions({openList:". (int)$_GET['list']. "});\n";
echo "\tloadLists(1, 1);\n";
?>
$("#duedate").datepicker({dateFormat: '<?php echo datepickerformat(); ?>', firstDay: <?php echo Config::get('firstdayofweek'); ?>,
showOn: 'button', buttonImage: '<?php mttinfo('template_url'); ?>images/calendar.png', buttonImageOnly: true, changeMonth:true,
changeYear:true, constrainInput: false, duration:'', nextText:'&gt;', prevText:'&lt;', dayNamesMin:lang.daysMin,
dayNames:lang.daysLong, monthNamesShort:lang.monthsLong });
<?php if(!isset($_GET['pda'])): ?>
$("#page_taskedit").draggable({ handle:'h3', stop: function(e,ui){ flag.windowTaskEditMoved=true; tmp.editformpos=[$(this).css('left'),$(this).css('top')]; } });
$("#page_taskedit").resizable({ minWidth:$("#page_taskedit").width(), minHeight:220, start:function(ui,e){editFormResize(1)}, resize:function(ui,e){editFormResize(0,e)}, stop:function(ui,e){editFormResize(2,e)} });
<?php else: ?>
flag.pda = true;
<?php endif; ?>
<?php if(isset($_GET['singletab'])): ?>
mytinytodo.addAction('listsLoaded', tplSingleTabLoaded);
mytinytodo.addAction('listRenamed', tplSingleTabRenamed);
mytinytodo.addAction('listAdded', tplSingleTabAdded);
<?php endif; ?>
<?php if(!isset($_GET['singletab']) && !isset($_GET['pda'])): ?>
$("#lists ul").sortable({delay:150, update:listOrderChanged});
<?php endif; ?>
});
*/
</script>
<div id="wrapper">
@ -121,9 +71,50 @@ $().ready(function(){
<div id="lists">
<ul class="mtt-tabs"></ul>
<div class="mtt-tabs-add-button" title="<?php _e('list_new'); ?>"><span></span></div>
<!--<div class="mtt-tabs-add-button" title="<?php _e('list_new'); ?>"><span></span></div>-->
<div id="tabs_buttons">
<div class="mtt-tabs-add-button mtt-tabs-button" title="<?php _e('list_new'); ?>"><span></span></div>
<div class="mtt-tabs-search-button mtt-tabs-button" title="<?php _e('htab_search'); ?>"><span></span></div>
<div class="mtt-tabs-select-button mtt-tabs-button" title="<?php _e('list_select'); ?>"><span></span></div>
</div>
</div>
<div id="toolbar" class="mtt-htabs">
<span id="htab_newtask">
<form id="newtask_form" method="post">
<table cellspacing="0" cellpadding="0"><tr>
<td class="flex-cell"><input type="text" name="task" value="" maxlength="250" id="task" /></td>
<td class="flex-cell-companion">
<input type="submit" value="<?php _e('btn_add');?>" />
<a href="#" id="newtask_adv" class="mtt-img-button" title="<?php _e('advanced_add');?>"><span></span></a>
</td>
</tr></table>
</form>
</span>
<span id="htab_search" style="display:none">
<a href="#" id="search_close" class="mtt-img-button" title=""><span></span></a>
<form id="search_form" method="post">
<table cellspacing="0" cellpadding="0"><tr>
<td class="flex-cell"><input type="text" name="search" value="" maxlength="250" id="search" autocomplete="off" /></td>
<td class="flex-cell-companion">
<input type="submit" value="<?php _e('btn_search');?>" />
<!--<a href="#" id="search_close" class="mtt-img-button" title=""></a>-->
</td>
</tr></table>
</form>
<div id="searchbar"><?php _e('searching');?> <span id="searchbarkeyword"></span></div>
</span>
</div>
<!--
<div id="toolbar" class="mtt-htabs">
<span id="rss_icon"><a href="#" title="<?php _e('rss_feed');?>"><img src="<?php mttinfo('template_url'); ?>images/feed_bw.png" onmouseover="this.src='<?php mttinfo('template_url'); ?>images/feed.png'" onmouseout="this.src='<?php mttinfo('template_url'); ?>images/feed_bw.png'" /></a></span>
@ -139,6 +130,7 @@ $().ready(function(){
<div id="searchbar"><?php _e('searching');?> <span id="searchbarkeyword"></span></div>
</span>
</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>
@ -268,6 +260,11 @@ $().ready(function(){
</ul>
</div>
<div id="slmenucontainer" class="mtt-btnmenu-container mtt-menu-has-images" style="display:none">
<ul>
</ul>
</div>
<div id="page_ajax" style="display:none"></div>
</div>

View file

@ -33,6 +33,7 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
#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; }
@ -57,13 +58,44 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
#page_tasks.readonly .list-action { display:none; }
#page_tasks.readonly li.mtt-tabs-selected span { margin-right:0; }
.mtt-tabs-add-button { float:left; margin-top:1px; padding:6px 2px 0px 2px; font-size:9pt; width:16px; 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; height:21px; background:url(images/bullet_plus.png) 0 0 no-repeat; }
.mtt-tabs-add-button:hover span { background-position:-16px 0; }
#page_tasks.readonly .mtt-tabs-add-button { display:none; }
#tabs_buttons {
float:right;
padding-top:4px;
padding-bottom:3px;
padding-left:2px;
padding-right:2px;
border:1px solid #ededed;
border-bottom:none;
-moz-border-radius-topleft:5px; -webkit-border-radius-topleft:5px;
-moz-border-radius-topright:5px; -webkit-border-radius-topright:5px;
}
.mtt-htabs { clear:both; padding:8px; border-bottom:2px solid #DEDEDE; background:url(images/corner_right.gif) no-repeat top right #ededed; }
.mtt-tabs-button {
float:left;
font-size:9pt;
cursor:pointer;
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;
}
.mtt-tabs-add-button>span { background:url(images/buttons.png) 0 0 no-repeat; }
.mtt-tabs-add-button:hover>span { background-position:-16px 0; }
.mtt-tabs-search-button>span { background:url(images/buttons.png) 0 -16px no-repeat; }
.mtt-tabs-search-button:hover>span { background-position:-16px -16px; }
.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-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; }
.mtt-img-button:hover { border:1px solid #ccc; -moz-border-radius:3px; -webkit-border-radius:3px; }
@ -71,17 +103,27 @@ a { color:#0000ff; cursor:pointer; text-decoration:underline; }
#newtask_adv span { position:relative; top:3px; background:url(images/buttons.png) 0 -48px no-repeat; }
#newtask_adv:hover span { background-position:-16px -48px; }
#search_close { float:right; margin-left:2px; position:relative; top:1px;}
#search_close span { background:url(images/buttons.png) 0 -32px no-repeat; }
#search_close:hover span { background-position:-16px -32px; }
#rss_icon { float:right;margin-top:4px; }
#rss_icon img { border:none; }
.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); }
#page_tasks.readonly #htab_search a.htab-toggle { color:#444; }
#task { color:#444444; width:100%; max-width:350px; }
#newtask_form table { max-width:400px; }
#newtask_form .flex-cell-companion { padding-left:2px; }
#search_form table { max-width:350px; }
#search_form .flex-cell-companion { padding-left:2px; }
#htab_newtask a>img { border:none; vertical-align:text-top; }
#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; }
#task, #search { color:#444444; width:300px; }
#search { color:#444444; width:100%; max-width:300px;
background:#fff url(images/magnifier.png) no-repeat 2px 2px;
text-indent:18px;
border:1px inset #f0f0f0;
padding:2px;
}
.small-bar{ font-size:8pt; color:#999999; font-weight:normal;}
#searchbar { font-size:10pt; font-weight:normal; display:none; margin-top:5px; }
#searchbarkeyword { font-weight:bold; }
@ -259,6 +301,9 @@ li.mtt-menu-indicator .submenu-icon {
width:16px; height:16px; background:url(images/icons.gif) -32px -16px no-repeat;
}
.flex-cell { width:99%; /*padding-left:3px;*/ padding-right:6px; white-space:nowrap; }
.flex-cell-companion { width:1%; white-space:nowrap; }
.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; }