From a153eb2c6e692839d8a77f0a65ff56814f9b71d7 Mon Sep 17 00:00:00 2001 From: Max Pozdeev Date: Wed, 6 Jan 2010 22:26:30 +0300 Subject: [PATCH] + added support of RTL languages translations (design not fully adapted) --- src/index.php | 17 +++++++++++------ src/lang/class.default.php | 6 ++++++ src/style.css | 13 ++++++++----- src/style_rtl.css | 17 +++++++++++++++++ 4 files changed, 42 insertions(+), 11 deletions(-) create mode 100644 src/style_rtl.css diff --git a/src/index.php b/src/index.php index f3f1ad9..d2c6b55 100644 --- a/src/index.php +++ b/src/index.php @@ -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) <?php echo $title; ?> + + + @@ -90,16 +95,16 @@ $().ajaxStop( function(r,s) {$("#loading").fadeOut();} );
-
-
+
+
- - + +
@@ -126,7 +131,7 @@ $().ajaxStop( function(r,s) {$("#loading").fadeOut();} );

- + (0)   / @@ -161,7 +166,7 @@ $().ajaxStop( function(r,s) {$("#loading").fadeOut();} );
-
+
diff --git a/src/lang/class.default.php b/src/lang/class.default.php index 6535c51..ee89680 100644 --- a/src/lang/class.default.php +++ b/src/lang/class.default.php @@ -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; + } } ?> \ No newline at end of file diff --git a/src/style.css b/src/style.css index 8ce7514..bb76ad0 100644 --- a/src/style.css +++ b/src/style.css @@ -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; } diff --git a/src/style_rtl.css b/src/style_rtl.css new file mode 100644 index 0000000..3a45af4 --- /dev/null +++ b/src/style_rtl.css @@ -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; } \ No newline at end of file