Revision: 46265
Author:   malafaya
Date:     2009-01-26 16:09:01 +0000 (Mon, 26 Jan 2009)

Log Message:
-----------
RTL goodies

Modified Paths:
--------------
    trunk/extensions/Wikidata/App.php
    trunk/extensions/Wikidata/OmegaWiki/forms.php

Added Paths:
-----------
    trunk/extensions/Wikidata/OmegaWiki/suggest-rtl.css
    trunk/extensions/Wikidata/OmegaWiki/tables-rtl.css

Modified: trunk/extensions/Wikidata/App.php
===================================================================
--- trunk/extensions/Wikidata/App.php   2009-01-26 16:07:23 UTC (rev 46264)
+++ trunk/extensions/Wikidata/App.php   2009-01-26 16:09:01 UTC (rev 46265)
@@ -103,8 +103,18 @@
        global $wgOut,$wgScriptPath;
        $dc=wdGetDataSetContext();
        $wgOut->addScript("<script type='text/javascript' 
src='{$wgScriptPath}/extensions/Wikidata/OmegaWiki/suggest.js'></script>");
-       
$wgOut->addLink(array('rel'=>'stylesheet','type'=>'text/css','media'=>'screen, 
projection','href'=>"{$wgScriptPath}/extensions/Wikidata/OmegaWiki/suggest.css"));
-       
$wgOut->addLink(array('rel'=>'stylesheet','type'=>'text/css','media'=>'screen, 
projection','href'=>"{$wgScriptPath}/extensions/Wikidata/OmegaWiki/tables.css"));
                                                                                
                                                                                
    
+       
+       global $wgLang;
+       if ($wgLang->isRTL())
+       {
+               
$wgOut->addLink(array('rel'=>'stylesheet','type'=>'text/css','media'=>'screen, 
projection','href'=>"{$wgScriptPath}/extensions/Wikidata/OmegaWiki/suggest-rtl.css"));
+               
$wgOut->addLink(array('rel'=>'stylesheet','type'=>'text/css','media'=>'screen, 
projection','href'=>"{$wgScriptPath}/extensions/Wikidata/OmegaWiki/tables-rtl.css"));
+       }
+       else
+       {
+               
$wgOut->addLink(array('rel'=>'stylesheet','type'=>'text/css','media'=>'screen, 
projection','href'=>"{$wgScriptPath}/extensions/Wikidata/OmegaWiki/suggest.css"));
+               
$wgOut->addLink(array('rel'=>'stylesheet','type'=>'text/css','media'=>'screen, 
projection','href'=>"{$wgScriptPath}/extensions/Wikidata/OmegaWiki/tables.css"));
+       }                                                                       
                                                                                
        
        return true;
 }
 

Modified: trunk/extensions/Wikidata/OmegaWiki/forms.php
===================================================================
--- trunk/extensions/Wikidata/OmegaWiki/forms.php       2009-01-26 16:07:23 UTC 
(rev 46264)
+++ trunk/extensions/Wikidata/OmegaWiki/forms.php       2009-01-26 16:09:01 UTC 
(rev 46265)
@@ -81,7 +81,7 @@
 */
 function getSuggest($name, $query, $parameters = array(), $value=0, $label='', 
$displayLabelColumns = array(0), DataSet $dc=null) {
        global
-               $wgScriptPath;
+               $wgScriptPath, $wgLang;
 
        if(is_null($dc)) {
                $dc=wdGetDataSetContext();
@@ -103,7 +103,24 @@
 
        $result .=              
                        '<a id="'. $name .'-suggest-link" class="suggest-link" 
onclick="suggestLinkClicked(event, this);" title="' . wfMsgSc("SuggestHint") . 
'">' . $label . '</a>' .
-               '</span>'.
+               '</span>';
+       
+       if ($wgLang->isRTL())
+               $result .=
+        '<div class="suggest-drop-down" style="position: relative"><div id="'. 
$name .'-suggest-div" style="position: absolute; right: 0px; top: 0px; border: 
1px solid #000000; display: none; background-color: white; padding: 4px">' .
+               '<div><table>' .
+                       '<tr>' .
+                               '<td><input type="text" id="'. $name 
.'-suggest-text" autocomplete="off" onkeyup="suggestTextChanged(this)" 
style="width: 300px"></input></td>' .
+                               '<td><a id="'. $name .'-suggest-clear" 
href="javascript:void(0)" onclick="suggestClearClicked(event, this)">' . 
wfMsg('ow_suggest_clear') . '</a></td>' .
+                               '<td style="white-space: nowrap"><a id="'. 
$name .'-suggest-previous" href="javascript:void(0)" class="suggest-previous" 
onclick="suggestPreviousClicked(event, this)"><img 
src="'.$wgScriptPath.'/extensions/Wikidata/Images/ArrowRight.png" alt="' . 
wfMsg('ow_suggest_previous') . '"/> ' . wfMsg('ow_suggest_previous') . 
'</a></td>'.
+                               '<td style="white-space: nowrap"><a id="'. 
$name .'-suggest-next" href="javascript:void(0)" class="suggest-next" 
onclick="suggestNextClicked(event, this)">' . wfMsg('ow_suggest_next') . ' <img 
src="'.$wgScriptPath.'/extensions/Wikidata/Images/ArrowLeft.png" alt="' . 
wfMsg('ow_suggest_next') . '"/></a></td>'.
+                               '<td><a id="'. $name .'-suggest-close" 
href="javascript:void(0)" onclick="suggestCloseClicked(event, 
this)">[X]</a></td>' .
+                       '</tr>' .
+               '</table></div>' .
+               '<div><table id="'. $name 
.'-suggest-table"><tr><td></td></tr></table></div>'.
+        '</div></div>';
+       else
+               $result .=
         '<div class="suggest-drop-down" style="position: relative"><div id="'. 
$name .'-suggest-div" style="position: absolute; left: 0px; top: 0px; border: 
1px solid #000000; display: none; background-color: white; padding: 4px">' .
                '<div><table>' .
                        '<tr>' .

Added: trunk/extensions/Wikidata/OmegaWiki/suggest-rtl.css
===================================================================
--- trunk/extensions/Wikidata/OmegaWiki/suggest-rtl.css                         
(rev 0)
+++ trunk/extensions/Wikidata/OmegaWiki/suggest-rtl.css 2009-01-26 16:09:01 UTC 
(rev 46265)
@@ -0,0 +1,105 @@
+/*
+      Copy 
+          @import url("../../extensions/Wikidata/WiktionaryZ/tmp/suggest.css");
+          
+      into the appropriate stylesheets like 
+          skins/monobook/main.css
+          skins/common/common.css
+*/
+
+
+/* Suggestion control */
+
+.suggest-link {
+       dir: rtl;
+       padding-left: 22px;
+       padding-right: 2px;
+       cursor: pointer;
+       border-width: 1px;
+       border-style: solid;
+       border-color: #7F9DB9;
+               
+       background-image: url("../Images/ArrowButtonDown1px.png");
+       background-repeat: no-repeat;
+       background-position: center left;
+}
+
+.wiki-data-table td .suggest-link, .option-panel td .suggest-link {
+       dir: rtl;
+       display: block;
+       zoom: 1;
+       right: 0px;
+       left: 1px;
+       top: 1px;
+       bottom: 0px;
+       background-color: #FFFFFF;
+}
+
+/* Internet Explorer hack */
+* html .suggest-link {
+       background-image: url("../Images/ArrowButtonDown2px.png");
+}
+
+/* Internet Explorer hack */
+* html .wiki-data-table td .suggest-link {
+       background-image: url("../../Images/ArrowButtonDown1px.png");
+}
+
+.suggest-drop-down {
+       /*font-size: 1em;*/
+       dir: rtl;
+       font-size: 13px;
+}      
+
+.suggest-link, .suggest-link:hover, .suggest-link:active, 
.suggest-link:visited {
+       dir: rtl;
+       color: #000000;
+       text-decoration: none;
+       white-space: nowrap;
+}
+
+td .suggest-link, td .suggest-link:hover, td .suggest-link:active, td 
.suggest-link:visited {
+       dir: rtl;
+       white-space: normal;
+}
+
+.suggestion-row {
+       dir: rtl;
+       padding: 0px;
+       margin: 0px;
+}
+
+.suggestion-row.active td.column-even, .suggestion-row.active td.column-odd {
+       /*background-color: #DDDDDD;*/
+       dir: rtl;
+       background-color: #CECCF7;
+       cursor: pointer;
+}
+
+.suggestion-row td {
+       dir: rtl;
+       padding-top: 0px;
+       padding-bottom: 0px;
+       padding-left: 4px;
+       padding-right: 4px;
+       margin-top: 0px;
+       margin-bottom: 0px;
+       white-space: nowrap;
+}
+
+.suggest-loading {
+       dir: rtl;
+       background-color: #DDDDDD;
+}
+
+.suggest-next {
+       dir: rtl;
+       margin-right: 2px;
+       margin-left: 8px;
+}
+
+.suggest-previous {
+       dir: rtl;
+       margin-right: 8px;
+       margin-left: 2px;
+}
\ No newline at end of file


Property changes on: trunk/extensions/Wikidata/OmegaWiki/suggest-rtl.css
___________________________________________________________________
Added: svn:eol-style
   + native

Added: trunk/extensions/Wikidata/OmegaWiki/tables-rtl.css
===================================================================
--- trunk/extensions/Wikidata/OmegaWiki/tables-rtl.css                          
(rev 0)
+++ trunk/extensions/Wikidata/OmegaWiki/tables-rtl.css  2009-01-26 16:09:01 UTC 
(rev 46265)
@@ -0,0 +1,191 @@
+/*
+      Copy 
+          @import url("../../extensions/Wikidata/WiktionaryZ/tmp/tables.css");
+          
+      into the appropriate stylesheets like 
+          skins/monobook/main.css
+          skins/common/common.css
+*/
+
+/* Wikidata tables */
+
+.wiki-data-table td, .wiki-data-table th {
+       padding-top: 0px;
+       padding-bottom: 0px;
+       padding-left: 2px;
+       padding-right: 2px;
+       margin: 0px;
+       border: none;
+}
+
+.wiki-data-table th {
+       background-color: #EEEEEE;
+       text-align: right;
+       vertical-align: bottom;
+       white-space: nowrap;
+}
+
+.wiki-data-table th.sortable {
+       cursor: pointer;
+}
+
+.wiki-data-table th.sortedUp {
+       padding-left: 15px;
+       background-image: url('../../../skins/common/images/sort_up.gif');
+       background-repeat: no-repeat;
+       background-position: bottom left;
+}
+
+.wiki-data-table th.sortedDown {
+       padding-left: 15px;
+       
+       background-image: url('../../../skins/common/images/sort_down.gif');
+       background-repeat: no-repeat;
+       background-position: bottom left;
+}
+
+.wiki-data-table td.column-odd {
+       background-color: #F6F6F6;
+}
+
+.wiki-data-table td.column-even {
+       background-color: #FFFFFF;
+}
+.boolean {
+       text-align: center;
+}
+
+.integer {
+       text-align: left;
+}
+
+.language, .text, .short-text {
+       text-align: right;
+}
+
+/*.wiki-data-table td.language {
+       font-style: italic;
+}*/
+
+.wiki-data-table td.text {
+       padding-bottom: 4px;
+}
+
+.wiki-data-table td {
+       vertical-align: top;
+}
+
+.wiki-data-table td.remove {
+       text-align: center;
+       background-color: #EEEEEE;
+}
+
+.wiki-data-table tr.to-be-removed td.column-odd, .wiki-data-table 
tr.to-be-removed td.remove {
+       background: #FFD8C0;
+}
+
+.wiki-data-table tr.to-be-removed td.column-even {
+       background: #FFE8D0;
+}
+
+.wiki-data-table tr.to-be-removed th {
+       background: #FFD0B2;
+}
+
+.wiki-data-table th.remove, .wiki-data-table th.input-rows {
+       font-weight: normal;
+       padding-left: 4px;
+       padding-right: 4px;
+}
+
+.wiki-data-table td .wiki-data-table td textarea, li .wiki-data-table td 
textarea {
+       width: auto;
+}
+
+td.add {
+       text-align: center;
+}
+
+/* Toggle */
+
+.toggle {
+       cursor: pointer;
+       text-indent: 0px;
+       margin: 0px;
+       /*color: #000000;
+       border-width: 1px;
+       border-color: #AAAAAA;
+       border-style: dotted;
+       padding-left: 0px;
+       font-size: 80%;*/
+}
+
+/* Attribute list */
+
+ul.collapsable-items {
+       list-style: none;
+       list-style-image: none;
+       list-style-type: none;
+}
+
+.collapsable-items .toggle {
+       margin-right: 0px;
+       text-indent: 0px;
+}
+
+/* Option panel */
+
+.option-panel {
+       margin: 8px 4px 4px 4px;
+       padding: 8px;
+       border-style: solid;
+       border-width: 1px;
+       border-color: #AAAAAA;
+}
+
+.option-panel, .option-panel th, .option-panel td {
+       background-color: #F5F5F5;
+}
+
+.option-panel th {
+       padding-left: 8px;
+       white-space: nowrap;
+       text-align: right;
+}
+
+.option-panel table {
+       width: 100%;
+}
+
+.option-panel td.option-field {
+       width: 100%;
+       padding-top: 1px;
+       padding-bottom: 1px;
+}
+
+.dataset-panel {
+       float:left;
+       margin-right:0.5em;
+}
+
+.dataset-panel-heading {
+       vertical-align: top;
+       font-size:100%;
+}
+
+.dataset-panel-active {
+       background:#f0f0f0;
+       text-align:center;
+       border-style:solid;
+       border-width:1px;
+       font-size:110%;
+       font-weight:bold;
+}
+
+.dataset-panel-inactive {
+       background:white;
+       text-align:center;
+       border-style:solid;
+       border-width:1px;
+       font-size:110%;
+}
\ No newline at end of file


Property changes on: trunk/extensions/Wikidata/OmegaWiki/tables-rtl.css
___________________________________________________________________
Added: svn:eol-style
   + native



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to