mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
+ added support of RTL languages translations (design not fully adapted)
This commit is contained in:
parent
291f11d928
commit
a153eb2c6e
4 changed files with 42 additions and 11 deletions
|
|
@ -12,6 +12,8 @@ require_once('./lang/'.Config::get('lang').'.php');
|
|||
|
||||
$lang = new Lang();
|
||||
|
||||
if($lang->rtl()) Config::set('rtl', 1);
|
||||
|
||||
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';
|
||||
|
|
@ -35,6 +37,9 @@ function _e($s)
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title><?php echo $title; ?></title>
|
||||
<link rel="stylesheet" type="text/css" href="style.css?v=@VERSION" media="all">
|
||||
<?php if(Config::get('rtl')): ?>
|
||||
<link rel="stylesheet" type="text/css" href="style_rtl.css?v=@VERSION" media="all">
|
||||
<?php endif; ?>
|
||||
<?php if(isset($_GET['pda'])): ?>
|
||||
<meta name="viewport" id="viewport" content="width=device-width">
|
||||
<link rel="stylesheet" type="text/css" href="pda.css?v=@VERSION" media="all">
|
||||
|
|
@ -90,16 +95,16 @@ $().ajaxStop( function(r,s) {$("#loading").fadeOut();} );
|
|||
<div id="loading"><img src="images/loading1.gif"></div>
|
||||
|
||||
<div id="bar">
|
||||
<div id="msg" style="float:left"><span class="msg-text" onClick="toggleMsgDetails()"></span><div class="msg-details"></div></div>
|
||||
<div align="right">
|
||||
<div id="msg"><span class="msg-text" onClick="toggleMsgDetails()"></span><div class="msg-details"></div></div>
|
||||
<div class="right">
|
||||
<span class="menu-owner">
|
||||
<a href="#settings" onClick="showSettings();return false;"><?php _e('a_settings');?></a>
|
||||
</span>
|
||||
<span class="bar-delim" style="display:none"> | </span>
|
||||
<span id="bar_auth">
|
||||
<span id="bar_public" style="display:none"><?php _e('public_tasks');?> |</span>
|
||||
<span id="bar_login"><a href="#" class="nodecor" onClick="showAuth(this);return false;"><u><?php _e('a_login');?></u> <img src="images/arrdown.gif" border=0></a></span>
|
||||
<a href="#" id="bar_logout" onClick="logout();return false"><?php _e('a_logout');?></a>
|
||||
<span id="bar_login"><a href="#login" class="nodecor" onClick="showAuth(this);return false;"><u><?php _e('a_login');?></u> <img src="images/arrdown.gif" border=0></a></span>
|
||||
<a href="#logout" id="bar_logout" onClick="logout();return false"><?php _e('a_logout');?></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -126,7 +131,7 @@ $().ajaxStop( function(r,s) {$("#loading").fadeOut();} );
|
|||
</div>
|
||||
|
||||
<h3>
|
||||
<span id="sort" onClick="btnMenu(this);return false;" style="float:right" class="mtt-btnmenu"><span class="btnstr"></span> <img src="images/arrdown.gif"></span>
|
||||
<span id="sort" onClick="btnMenu(this);return false;" class="mtt-btnmenu"><span class="btnstr"></span> <img src="images/arrdown.gif"></span>
|
||||
<span id="taskview" onClick="btnMenu(this);return false;" class="mtt-btnmenu"><span class="btnstr"><?php _e('tasks');?></span> (<span id="total">0</span>) <img src="images/arrdown.gif"></span>
|
||||
<span id="tagcloudbtn" onClick="showTagCloud(this);"><span class="btnstr"><?php _e('tags');?></span> <img src="images/arrdown.gif"></span>
|
||||
<span class="mtt-notes-showhide"><?php _e('notes');?> <a href="#" onClick="toggleAllNotes(1);this.blur();return false;"><?php _e('notes_show');?></a> / <a href="#" onClick="toggleAllNotes(0);this.blur();return false;"><?php _e('notes_hide');?></a></span>
|
||||
|
|
@ -161,7 +166,7 @@ $().ajaxStop( function(r,s) {$("#loading").fadeOut();} );
|
|||
<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 width="1%" style="white-space:nowrap; padding-left:5px; text-align:right;">
|
||||
<td class="alltags-cell">
|
||||
<a href="#" id="alltags_show" onClick="toggleEditAllTags(1);return false;"><?php _e('alltags_show');?></a>
|
||||
<a href="#" id="alltags_hide" onClick="toggleEditAllTags(0);return false;" style="display:none"><?php _e('alltags_hide');?></a></td>
|
||||
</tr></table>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
class DefaultLang
|
||||
{
|
||||
protected $rtl = 0;
|
||||
private $default_js = array
|
||||
(
|
||||
'confirmDelete' => "Are you sure you want to delete the task?",
|
||||
|
|
@ -151,6 +152,11 @@ class DefaultLang
|
|||
if(isset($this->default_inc[$key])) return $this->default_inc[$key];
|
||||
return $key;
|
||||
}
|
||||
|
||||
function rtl()
|
||||
{
|
||||
return $this->rtl ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -16,6 +16,7 @@ a { color:#0000ff; }
|
|||
#footer_content a { color:#000000; }
|
||||
|
||||
#bar { border-bottom:1px solid #b5d5ff; padding-bottom:5px; height:15px; }
|
||||
.right { float:right; }
|
||||
.nodecor { text-decoration:none; }
|
||||
#bar_logout { display:none; }
|
||||
#bar_auth { display:none; }
|
||||
|
|
@ -46,6 +47,7 @@ a { color:#0000ff; }
|
|||
#searchbar { font-size:10pt; font-weight:normal; display:none; margin-top:5px; }
|
||||
#searchbarkeyword { font-weight:bold; }
|
||||
|
||||
#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; }
|
||||
|
|
@ -53,10 +55,10 @@ a { color:#0000ff; }
|
|||
#msg.mtt-info .msg-text { background-color:#EFC300; }
|
||||
#msg.mtt-info .msg-details { border:1px solid #EFC300;}
|
||||
|
||||
#sort { margin-left:5px; font-size:8pt; font-weight:normal; }
|
||||
#sort { margin-left:5px; font-size:8pt; font-weight:normal; float:right; }
|
||||
#page_tasks.readonly #sort { display:none; }
|
||||
|
||||
.mtt-notes-showhide { font-size:8pt; font-weight:normal; margin-left:5px; }
|
||||
.mtt-notes-showhide { font-size:8pt; font-weight:normal; margin-left:2px; margin-right:2px; }
|
||||
#rss_icon { float:right;margin-top:4px; }
|
||||
|
||||
.task-left { float:left; }
|
||||
|
|
@ -122,15 +124,16 @@ li.task-completed .task-note-block .task-note { text-decoration:line-through; }
|
|||
.ui-icon-gripsmall-diagonal-se { background:url(images/icons.gif) 0 -16px; }
|
||||
#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:10pt; font-weight:normal; text-align:right; float:right; color:#777; }
|
||||
|
||||
/* autocomplete */
|
||||
.ac_results { padding: 0px; border: 1px solid #cccccc; background-color: #f0f0f0; overflow: hidden; z-index: 99999; }
|
||||
.ac_results { padding:0px; border:1px solid #cccccc; background-color:#f9f9f9; overflow:hidden; z-index:99999; -moz-box-shadow:1px 2px 5px rgba(0,0,0,0.5); -webkit-box-shadow:1px 2px 5px rgba(0,0,0,0.5); }
|
||||
.ac_results ul { width: 100%; list-style-position: outside; list-style: none; padding: 0; margin: 0; }
|
||||
.ac_results li { margin: 0px; padding: 2px 5px; cursor: default; display: block; line-height: 16px; overflow: hidden; }
|
||||
.ac_over { background-color: #bbbbbb; color: white; }
|
||||
.ac_over { background-color:#316AC5; color:white; }
|
||||
|
||||
#priopopup { overflow: hidden; z-index:100; background-color:#f9f9f9; border:1px solid #cccccc; padding:5px; }
|
||||
#priopopup .prio-o { display:inline; }
|
||||
|
|
@ -139,7 +142,7 @@ li.task-completed .task-note-block .task-note { text-decoration:line-through; }
|
|||
#priopopup .prio-neg:hover { border:1px solid #3377ff; }
|
||||
#priopopup .prio-pos:hover { border:1px solid #ff3030; }
|
||||
|
||||
#tagcloudbtn { margin-left:5px; font-size:8pt; font-weight:normal; border-bottom:1px dashed #ccc; padding:2px; cursor:pointer; -moz-user-select:none; -webkit-user-select: none; }
|
||||
#tagcloudbtn { margin-left:2px; margin-right:2px; font-size:8pt; font-weight:normal; border-bottom:1px dashed #ccc; padding:2px; cursor:pointer; -moz-user-select:none; -webkit-user-select: none; }
|
||||
#tagcloudbtn:hover { border-bottom:1px solid #bbb; }
|
||||
#tagcloudbtn .tag { font-weight:bold; }
|
||||
#tagcloudload { display:none; }
|
||||
|
|
|
|||
17
src/style_rtl.css
Normal file
17
src/style_rtl.css
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
body { direction:rtl; }
|
||||
h2 { float:right; }
|
||||
.right { float:left; }
|
||||
#loading { float:right; }
|
||||
#lists .mtt-tabs { float:right; }
|
||||
#rss_icon { float:left; }
|
||||
#sort { float:left; margin-left:0px; margin-right:5px; }
|
||||
|
||||
.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; }
|
||||
.duedate { float:left; margin-left:0; margin-right:5px; }
|
||||
#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; }
|
||||
Loading…
Reference in a new issue