r59318 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59317‎ | r59318 | r59319 >
Date:15:49, 21 November 2009
Author:catrope
Status:deferred
Tags:
Comment:
UsabilityInitiative: Misc RTL fixes
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleTabs/CollapsibleTabs.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Modules/SimpleSearch/SimpleSearch.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.min.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/wikiEditor.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/wikiEditor.toc.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/Vector/Modules/SimpleSearch/SimpleSearch.js
@@ -24,7 +24,7 @@
2525 'color': '#999999',
2626 'cursor': 'text'
2727 })
28 - .css( ( $j( 'body.rtl' ).size() > 0 ? 'right' : 'left' ), 0 )
 28+ .css( ( $j( 'body' ).is( '.rtl' ) ? 'right' : 'left' ), 0 )
2929 .click( function() {
3030 $j(this).parent().find( 'input#searchInput' ).focus();
3131 })
Index: trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleTabs/CollapsibleTabs.js
@@ -1,6 +1,6 @@
22 js2AddOnloadHook( function() {
33
4 - var rtl = $j( 'body.rtl' ).size() ? true : false;
 4+ var rtl = $j( 'body' ).is( '.rtl' ) ? true : false;
55
66 //Overloading the moveToCollapsed function to animate the transition
77 $j.collapsibleTabs.moveToCollapsed = function( ele ) {
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php
@@ -12,15 +12,15 @@
1313
1414 static $scripts = array(
1515 'raw' => array(
16 - array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 3 ),
 16+ array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 4 ),
1717 array( 'src' => 'Modules/EditWarning/EditWarning.js', 'version' => 1 ),
18 - array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 1 ),
 18+ array( 'src' => 'Modules/SimpleSearch/SimpleSearch.js', 'version' => 2 ),
1919 ),
2020 'combined' => array(
21 - array( 'src' => 'Vector.combined.js', 'version' => 3 ),
 21+ array( 'src' => 'Vector.combined.js', 'version' => 4 ),
2222 ),
2323 'minified' => array(
24 - array( 'src' => 'Vector.combined.min.js', 'version' => 3 ),
 24+ array( 'src' => 'Vector.combined.min.js', 'version' => 4 ),
2525 ),
2626 );
2727 static $modules = array(
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js
@@ -1,6 +1,6 @@
22 js2AddOnloadHook( function() {
33
4 - var rtl = $j( 'body.rtl' ).size() ? true : false;
 4+ var rtl = $j( 'body' ).is( '.rtl' ) ? true : false;
55
66 //Overloading the moveToCollapsed function to animate the transition
77 $j.collapsibleTabs.moveToCollapsed = function( ele ) {
@@ -144,7 +144,7 @@
145145 'color': '#999999',
146146 'cursor': 'text'
147147 })
148 - .css( ( $j( 'body.rtl' ).size() > 0 ? 'right' : 'left' ), 0 )
 148+ .css( ( $j( 'body' ).is( '.rtl' ) ? 'right' : 'left' ), 0 )
149149 .click( function() {
150150 $j(this).parent().find( 'input#searchInput' ).focus();
151151 })
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js
@@ -1,5 +1,5 @@
22
3 -js2AddOnloadHook(function(){var rtl=$j('body.rtl').size()?true:false;$j.collapsibleTabs.moveToCollapsed=function(ele){var $moving=$j(ele);$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=true;var data=$moving.data('collapsibleTabsSettings');var target=$moving.data('collapsibleTabsSettings').collapsedContainer;$moving.css("position","relative").css((rtl?'left':'right'),0).animate({width:'1px'},"normal",function(){$j(this).hide();$j('<span class="placeholder" style="display:none;"></span>').insertAfter(this);$j(this).remove().prependTo(target).data('collapsibleTabsSettings',data);$j(this).attr('style','display:list-item;');$j($j(ele).data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=false;$j.collapsibleTabs.handleResize();});};$j.collapsibleTabs.moveToExpanded=function(ele){var $moving=$j(ele);$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=true;var data=$moving.data('collapsibleTabsSettings');var $target=$j($moving.data('collapsibleTabsSettings').expandedContainer).find('span.placeholder:first');var expandedWidth=$moving.data('collapsibleTabsSettings').expandedWidth;$moving.css("position","relative").css((rtl?'right':'left'),0).css('width','1px');$target.replaceWith($moving.remove().css('width','1px').data('collapsibleTabsSettings',data).animate({width:expandedWidth+"px"},"normal",function(){$j(this).attr('style','display:block;');$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=false;$j.collapsibleTabs.handleResize();}));};$j('#p-views ul').bind("beforeTabCollapse",function(){if($j('#p-cactions').css('display')=='none')
 3+js2AddOnloadHook(function(){var rtl=$j('body').is('.rtl')?true:false;$j.collapsibleTabs.moveToCollapsed=function(ele){var $moving=$j(ele);$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=true;var data=$moving.data('collapsibleTabsSettings');var target=$moving.data('collapsibleTabsSettings').collapsedContainer;$moving.css("position","relative").css((rtl?'left':'right'),0).animate({width:'1px'},"normal",function(){$j(this).hide();$j('<span class="placeholder" style="display:none;"></span>').insertAfter(this);$j(this).remove().prependTo(target).data('collapsibleTabsSettings',data);$j(this).attr('style','display:list-item;');$j($j(ele).data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=false;$j.collapsibleTabs.handleResize();});};$j.collapsibleTabs.moveToExpanded=function(ele){var $moving=$j(ele);$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=true;var data=$moving.data('collapsibleTabsSettings');var $target=$j($moving.data('collapsibleTabsSettings').expandedContainer).find('span.placeholder:first');var expandedWidth=$moving.data('collapsibleTabsSettings').expandedWidth;$moving.css("position","relative").css((rtl?'right':'left'),0).css('width','1px');$target.replaceWith($moving.remove().css('width','1px').data('collapsibleTabsSettings',data).animate({width:expandedWidth+"px"},"normal",function(){$j(this).attr('style','display:block;');$j($moving.data('collapsibleTabsSettings').expandedContainer).data('collapsibleTabsSettings').shifting=false;$j.collapsibleTabs.handleResize();}));};$j('#p-views ul').bind("beforeTabCollapse",function(){if($j('#p-cactions').css('display')=='none')
44 $j("#p-cactions").addClass("filledPortlet").removeClass("emptyPortlet").find('h5').css('width','1px').animate({'width':'26px'},390);}).bind("beforeTabExpand",function(){if($j('#p-cactions li').length==1)
55 $j("#p-cactions h5").animate({'width':'1px'},370,function(){$j(this).attr('style','').parent().addClass("emptyPortlet").removeClass("filledPortlet");});}).collapsibleTabs({expandCondition:function(eleWidth){if(rtl){return($j('#right-navigation').position().left+$j('#right-navigation').width()+1)<($j('#left-navigation').position().left-eleWidth);}else{return($j('#left-navigation').position().left+$j('#left-navigation').width()+1)<($j('#right-navigation').position().left-eleWidth);}},collapseCondition:function(){if(rtl){return($j('#right-navigation').position().left+$j('#right-navigation').width())>$j('#left-navigation').position().left;}else{return($j('#left-navigation').position().left+$j('#left-navigation').width())>$j('#right-navigation').position().left;}}});});js2AddOnloadHook(function(){if(!wgVectorPreferences||!(wgVectorPreferences.editwarning&&wgVectorPreferences.editwarning.enable)){return true;}
66 $j('#wpTextbox1, #wpSummary').each(function(){$j(this).data('origtext',$j(this).val());});fallbackWindowOnBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){var fallbackResult=null;if(fallbackWindowOnBeforeUnload){fallbackResult=fallbackWindowOnBeforeUnload();}
@@ -7,4 +7,4 @@
88 if($j('#wpTextbox1').data('origtext')!=$j('#wpTextbox1').val()||$j('#wpSummary').data('origtext')!=$j('#wpSummary').val()||$j('#wikiPreview').is(':visible')){return gM('vector-editwarning-warning');}}
99 $j('form').submit(function(){window.onbeforeunload=fallbackWindowOnBeforeUnload;});});var fallbackWindowOnBeforeUnload=null;if(typeof os_autoload_inputs!=='undefined'&&os_autoload_forms!=='undefined'){os_autoload_inputs=[];os_autoload_forms=[];}
1010 js2AddOnloadHook(function(){if(skin!='vector'){return;}
11 -$j('div#simpleSearch > input#searchInput').each(function(){$j('<label></label>').text(gM('vector-simplesearch-search')).css({'display':'none','position':'absolute','bottom':0,'padding':'0.25em','color':'#999999','cursor':'text'}).css(($j('body.rtl').size()>0?'right':'left'),0).click(function(){$j(this).parent().find('input#searchInput').focus();}).appendTo($j(this).parent());if($j(this).val()==''){$j(this).parent().find('label').show();}}).focus(function(){$j(this).parent().find('label').hide();}).blur(function(){if($j(this).val()==''){$j(this).parent().find('label').show();}});$j('#searchInput, #searchInput2, #powerSearchText, #searchText').suggestions({fetch:function(query){var $this=$j(this);var request=$j.ajax({url:wgScriptPath+'/api.php',data:{'action':'opensearch','search':query,'namespace':0,'suggest':''},dataType:'json',success:function(data){$this.suggestions('suggestions',data[1]);}});$j(this).data('request',request);},cancel:function(){var request=$j(this).data('request');if(request&&typeof request.abort=='function'){request.abort();$j(this).removeData('request');}},result:{select:function($textbox){$textbox.closest('form').submit();}},delay:120});$j('#searchInput').suggestions({result:{select:function($textbox){$textbox.closest('form').submit();}},special:{render:function(query){var perfectMatch=false;$j(this).closest('.suggestions').find('.suggestions-results div').each(function(){if($j(this).data('text')==query){perfectMatch=true;}});if(perfectMatch){if($j(this).children().size()==0){$j(this).show();$label=$j('<div />').addClass('special-label').text(gM('vector-simplesearch-containing')).appendTo($j(this));$query=$j('<div />').addClass('special-query').text(query).appendTo($j(this));$query.autoEllipse();}else{$j(this).find('.special-query').empty().text(query).autoEllipse();}}else{$j(this).hide();$j(this).empty();}},select:function($textbox){$textbox.closest('form').append($j('<input />').attr({'type':'hidden','name':'fulltext','value':1}));$textbox.closest('form').submit();}},$region:$j('#simpleSearch')});});
\ No newline at end of file
 11+$j('div#simpleSearch > input#searchInput').each(function(){$j('<label></label>').text(gM('vector-simplesearch-search')).css({'display':'none','position':'absolute','bottom':0,'padding':'0.25em','color':'#999999','cursor':'text'}).css(($j('body').is('.rtl')?'right':'left'),0).click(function(){$j(this).parent().find('input#searchInput').focus();}).appendTo($j(this).parent());if($j(this).val()==''){$j(this).parent().find('label').show();}}).focus(function(){$j(this).parent().find('label').hide();}).blur(function(){if($j(this).val()==''){$j(this).parent().find('label').show();}});$j('#searchInput, #searchInput2, #powerSearchText, #searchText').suggestions({fetch:function(query){var $this=$j(this);var request=$j.ajax({url:wgScriptPath+'/api.php',data:{'action':'opensearch','search':query,'namespace':0,'suggest':''},dataType:'json',success:function(data){$this.suggestions('suggestions',data[1]);}});$j(this).data('request',request);},cancel:function(){var request=$j(this).data('request');if(request&&typeof request.abort=='function'){request.abort();$j(this).removeData('request');}},result:{select:function($textbox){$textbox.closest('form').submit();}},delay:120});$j('#searchInput').suggestions({result:{select:function($textbox){$textbox.closest('form').submit();}},special:{render:function(query){var perfectMatch=false;$j(this).closest('.suggestions').find('.suggestions-results div').each(function(){if($j(this).data('text')==query){perfectMatch=true;}});if(perfectMatch){if($j(this).children().size()==0){$j(this).show();$label=$j('<div />').addClass('special-label').text(gM('vector-simplesearch-containing')).appendTo($j(this));$query=$j('<div />').addClass('special-query').text(query).appendTo($j(this));$query.autoEllipse();}else{$j(this).find('.special-query').empty().text(query).autoEllipse();}}else{$j(this).hide();$j(this).empty();}},select:function($textbox){$textbox.closest('form').append($j('<input />').attr({'type':'hidden','name':'fulltext','value':1}));$textbox.closest('form').submit();}},$region:$j('#simpleSearch')});});
\ No newline at end of file
Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -22,16 +22,16 @@
2323 array( 'src' => 'css/wikiEditor.css', 'version' => 7 ),
2424 array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 7 ),
2525 array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 2 ),
26 - array( 'src' => 'css/wikiEditor.toc.css', 'version' => 20 ),
 26+ array( 'src' => 'css/wikiEditor.toc.css', 'version' => 21 ),
2727 array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ),
2828 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
2929 ),
3030 'combined' => array(
31 - array( 'src' => 'css/combined.css', 'version' => 27 ),
 31+ array( 'src' => 'css/combined.css', 'version' => 28 ),
3232 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3333 ),
3434 'minified' => array(
35 - array( 'src' => 'css/combined.min.css', 'version' => 27 ),
 35+ array( 'src' => 'css/combined.min.css', 'version' => 28 ),
3636 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3737 ),
3838 )
@@ -70,7 +70,7 @@
7171 array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ),
7272 array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 6 ),
7373 array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 20 ),
74 - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 17 ),
 74+ array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 18 ),
7575 array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 1 ),
7676 array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 32 ),
7777 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 9 ),
@@ -78,10 +78,10 @@
7979 array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 3 ),
8080 ),
8181 'combined' => array(
82 - array( 'src' => 'js/plugins.combined.js', 'version' => 84 ),
 82+ array( 'src' => 'js/plugins.combined.js', 'version' => 85 ),
8383 ),
8484 'minified' => array(
85 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 84 ),
 85+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 85 ),
8686 ),
8787 ),
8888 );
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.css
@@ -43,13 +43,19 @@
4444 }
4545 .wikiEditor-ui .wikiEditor-ui-left {
4646 float: left;
47 - width:100%;
 47+ width: 100%;
4848 }
 49+body.rtl .wikiEditor-ui .wikiEditor-ui-left {
 50+ float: right;
 51+}
4952 .wikiEditor-ui .wikiEditor-ui-right {
5053 float: right;
5154 background: #F3F3F3;
52 - overflow:hidden;
 55+ overflow: hidden;
5356 }
 57+body.rtl .wikiEditor-ui .wikiEditor-ui-right {
 58+ float: left;
 59+}
5460 .wikiEditor-wikitext {
5561 float: left;
5662 width: 100%;
@@ -59,7 +65,6 @@
6066 float: left;
6167 width: 50%;
6268 }
63 -*/
6469 .wikiEditor-buttons {
6570 float: right;
6671 width: 50%;
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.toc.css
@@ -48,6 +48,10 @@
4949 white-space: nowrap;
5050 overflow: hidden;
5151 }
 52+body.rtl .tab-toc {
 53+ background-position: right top;
 54+ padding-right: 1em;
 55+}
5256 .tab-toc a {
5357 outline: none;
5458 }
@@ -71,21 +75,39 @@
7276 cursor: pointer;
7377 color: #0645ad;
7478 }
 79+body.rtl .wikiEditor-ui-toc ul li div {
 80+ padding-right: 1em;
 81+}
7582 .wikiEditor-ui-toc ul ul li div {
7683 padding-left: 2em;
7784 }
 85+body.rtl .wikiEditor-ui-toc ul ul li div {
 86+ padding-right: 2em;
 87+}
7888 .wikiEditor-ui-toc ul ul ul li div {
7989 padding-left: 3em;
8090 }
 91+body.rtl .wikiEditor-ui-toc ul ul ul li div {
 92+ padding-right: 3em;
 93+}
8194 .wikiEditor-ui-toc ul ul ul ul li div {
8295 padding-left: 4em;
8396 }
 97+body.rtl .wikiEditor-ui-toc ul ul ul ul li div {
 98+ padding-right: 4em;
 99+}
84100 .wikiEditor-ui-toc ul ul ul ul ul li div {
85101 padding-left: 5em;
86102 }
 103+body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div {
 104+ padding-right: 5em;
 105+}
87106 .wikiEditor-ui-toc ul ul ul ul ul ul li div {
88107 padding-left: 6em;
89108 }
 109+body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div {
 110+ padding-right: 6em;
 111+}
90112 .wikiEditor-ui-toc ul li div.current {
91113 background-color: #FAFAFA;
92114 color: #333333;
@@ -174,6 +196,10 @@
175197 white-space: nowrap;
176198 overflow: hidden;
177199 }
 200+body.rtl .wikiEditor-ui-toc-expandControl {
 201+ left: 10px;
 202+ padding-left: 1em;
 203+}
178204 .wikiEditor-ui-text textarea {
179205 resize: none;
180206 }
Index: trunk/extensions/UsabilityInitiative/css/combined.css
@@ -93,13 +93,19 @@
9494 }
9595 .wikiEditor-ui .wikiEditor-ui-left {
9696 float: left;
97 - width:100%;
 97+ width: 100%;
9898 }
 99+body.rtl .wikiEditor-ui .wikiEditor-ui-left {
 100+ float: right;
 101+}
99102 .wikiEditor-ui .wikiEditor-ui-right {
100103 float: right;
101104 background: #F3F3F3;
102 - overflow:hidden;
 105+ overflow: hidden;
103106 }
 107+body.rtl .wikiEditor-ui .wikiEditor-ui-right {
 108+ float: left;
 109+}
104110 .wikiEditor-wikitext {
105111 float: left;
106112 width: 100%;
@@ -109,7 +115,6 @@
110116 float: left;
111117 width: 50%;
112118 }
113 -*/
114119 .wikiEditor-buttons {
115120 float: right;
116121 width: 50%;
@@ -178,6 +183,10 @@
179184 white-space: nowrap;
180185 overflow: hidden;
181186 }
 187+body.rtl .tab-toc {
 188+ background-position: right top;
 189+ padding-right: 1em;
 190+}
182191 .tab-toc a {
183192 outline: none;
184193 }
@@ -201,21 +210,39 @@
202211 cursor: pointer;
203212 color: #0645ad;
204213 }
 214+body.rtl .wikiEditor-ui-toc ul li div {
 215+ padding-right: 1em;
 216+}
205217 .wikiEditor-ui-toc ul ul li div {
206218 padding-left: 2em;
207219 }
 220+body.rtl .wikiEditor-ui-toc ul ul li div {
 221+ padding-right: 2em;
 222+}
208223 .wikiEditor-ui-toc ul ul ul li div {
209224 padding-left: 3em;
210225 }
 226+body.rtl .wikiEditor-ui-toc ul ul ul li div {
 227+ padding-right: 3em;
 228+}
211229 .wikiEditor-ui-toc ul ul ul ul li div {
212230 padding-left: 4em;
213231 }
 232+body.rtl .wikiEditor-ui-toc ul ul ul ul li div {
 233+ padding-right: 4em;
 234+}
214235 .wikiEditor-ui-toc ul ul ul ul ul li div {
215236 padding-left: 5em;
216237 }
 238+body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div {
 239+ padding-right: 5em;
 240+}
217241 .wikiEditor-ui-toc ul ul ul ul ul ul li div {
218242 padding-left: 6em;
219243 }
 244+body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div {
 245+ padding-right: 6em;
 246+}
220247 .wikiEditor-ui-toc ul li div.current {
221248 background-color: #FAFAFA;
222249 color: #333333;
@@ -304,6 +331,10 @@
305332 white-space: nowrap;
306333 overflow: hidden;
307334 }
 335+body.rtl .wikiEditor-ui-toc-expandControl {
 336+ left: 10px;
 337+ padding-left: 1em;
 338+}
308339 .wikiEditor-ui-text textarea {
309340 resize: none;
310341 }
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css
@@ -88,11 +88,17 @@
8989 float:left;
9090 width:100%;
9191 }
 92+body.rtl .wikiEditor-ui .wikiEditor-ui-left{
 93+float:right;
 94+}
9295 .wikiEditor-ui .wikiEditor-ui-right{
9396 float:right;
9497 background:#F3F3F3;
9598 overflow:hidden;
9699 }
 100+body.rtl .wikiEditor-ui .wikiEditor-ui-right{
 101+float:left;
 102+}
97103 .wikiEditor-wikitext{
98104 float:left;
99105 width:100%;
@@ -102,7 +108,6 @@
103109 float:left;
104110 width:50%;
105111 }
106 -*/
107112 .wikiEditor-buttons{
108113 float:right;
109114 width:50%;
@@ -163,6 +168,10 @@
164169 white-space:nowrap;
165170 overflow:hidden;
166171 }
 172+body.rtl .tab-toc{
 173+background-position:right top;
 174+padding-right:1em;
 175+}
167176 .tab-toc a{
168177 outline:none;
169178 }
@@ -186,21 +195,39 @@
187196 cursor:pointer;
188197 color:#0645ad;
189198 }
 199+body.rtl .wikiEditor-ui-toc ul li div{
 200+padding-right:1em;
 201+}
190202 .wikiEditor-ui-toc ul ul li div{
191203 padding-left:2em;
192204 }
 205+body.rtl .wikiEditor-ui-toc ul ul li div{
 206+padding-right:2em;
 207+}
193208 .wikiEditor-ui-toc ul ul ul li div{
194209 padding-left:3em;
195210 }
 211+body.rtl .wikiEditor-ui-toc ul ul ul li div{
 212+padding-right:3em;
 213+}
196214 .wikiEditor-ui-toc ul ul ul ul li div{
197215 padding-left:4em;
198216 }
 217+body.rtl .wikiEditor-ui-toc ul ul ul ul li div{
 218+padding-right:4em;
 219+}
199220 .wikiEditor-ui-toc ul ul ul ul ul li div{
200221 padding-left:5em;
201222 }
 223+body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div{
 224+padding-right:5em;
 225+}
202226 .wikiEditor-ui-toc ul ul ul ul ul ul li div{
203227 padding-left:6em;
204228 }
 229+body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div{
 230+padding-right:6em;
 231+}
205232 .wikiEditor-ui-toc ul li div.current{
206233 background-color:#FAFAFA;
207234 color:#333333;
@@ -281,6 +308,10 @@
282309 white-space:nowrap;
283310 overflow:hidden;
284311 }
 312+body.rtl .wikiEditor-ui-toc-expandControl{
 313+left:10px;
 314+padding-left:1em;
 315+}
285316 .wikiEditor-ui-text textarea{
286317 resize:none;
287318 }
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js
@@ -948,7 +948,7 @@
949949 'color': '#999999',
950950 'cursor': 'text'
951951 })
952 - .css( ( $j( 'body.rtl' ).size() > 0 ? 'right' : 'left' ), 0 )
 952+ .css( ( $j( 'body' ).is( '.rtl' ) ? 'right' : 'left' ), 0 )
953953 .click( function() {
954954 $j(this).parent().find( 'input' ).focus();
955955 });
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js
@@ -41,7 +41,7 @@
4242 cache[target]=status;updateWidget(status);}}));}
4343 $j(this).find('[rel]').each(function(){$j(this).text(gM($j(this).attr('rel')));});$j('#wikieditor-toolbar-link-int-target, #wikieditor-toolbar-link-int-text').focus(function(){$j(this).parent().find('label').hide();}).bind('blur change',function(){if($j(this).val()=='')
4444 $j(this).parent().find('label').show();else
45 -$j(this).parent().find('label').hide();}).parent().find('label').css({'display':'none','position':'absolute','bottom':0,'padding':'0.25em','color':'#999999','cursor':'text'}).css(($j('body.rtl').size()>0?'right':'left'),0).click(function(){$j(this).parent().find('input').focus();});$j('#wikieditor-toolbar-link-int-target').bind('change keydown paste cut',function(){setTimeout(function(){if(isExternalLink($j('#wikieditor-toolbar-link-int-target').val()))
 45+$j(this).parent().find('label').hide();}).parent().find('label').css({'display':'none','position':'absolute','bottom':0,'padding':'0.25em','color':'#999999','cursor':'text'}).css(($j('body').is('.rtl')?'right':'left'),0).click(function(){$j(this).parent().find('input').focus();});$j('#wikieditor-toolbar-link-int-target').bind('change keydown paste cut',function(){setTimeout(function(){if(isExternalLink($j('#wikieditor-toolbar-link-int-target').val()))
4646 $j('#wikieditor-toolbar-link-type-ext').attr('checked','checked');else
4747 $j('#wikieditor-toolbar-link-type-int').attr('checked','checked');if($j('#wikieditor-toolbar-link-int-text').data('untouched'))
4848 $j('#wikieditor-toolbar-link-int-text').val($j('#wikieditor-toolbar-link-int-target').val()).change();},0);});$j('#wikieditor-toolbar-link-int-text').bind('change keydown paste cut',function(){var oldVal=$j(this).val();var that=this;setTimeout(function(){if($j(that).val()!=oldVal)
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js
@@ -948,7 +948,7 @@
949949 'color': '#999999',
950950 'cursor': 'text'
951951 })
952 - .css( ( $j( 'body.rtl' ).size() > 0 ? 'right' : 'left' ), 0 )
 952+ .css( ( $j( 'body' ).is( '.rtl' ) ? 'right' : 'left' ), 0 )
953953 .click( function() {
954954 $j(this).parent().find( 'input' ).focus();
955955 });
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php
@@ -15,13 +15,13 @@
1616 array( 'src' => 'Modules/Highlight/Highlight.js', 'version' => 1 ),
1717 array( 'src' => 'Modules/Preview/Preview.js', 'version' => 1 ),
1818 array( 'src' => 'Modules/Toc/Toc.js', 'version' => 1 ),
19 - array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 7 ),
 19+ array( 'src' => 'Modules/Toolbar/Toolbar.js', 'version' => 8 ),
2020 ),
2121 'combined' => array(
22 - array( 'src' => 'WikiEditor.combined.js', 'version' => 5 ),
 22+ array( 'src' => 'WikiEditor.combined.js', 'version' => 6 ),
2323 ),
2424 'minified' => array(
25 - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 5 ),
 25+ array( 'src' => 'WikiEditor.combined.min.js', 'version' => 6 ),
2626 ),
2727 );
2828 static $modules = array(
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -1353,14 +1353,14 @@
13541354 */
13551355 'imgPath' : wgScriptPath + '/extensions/UsabilityInitiative/images/wikiEditor/',
13561356 'isSupportKnown': function() {
1357 - return $.browser.name in $.wikiEditor.browsers[$( 'body.rtl' ).size() ? 'rtl' : 'ltr'];
 1357+ return $.browser.name in $.wikiEditor.browsers[$( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'];
13581358 },
13591359 'isSupported': function() {
13601360 if ( !$.wikiEditor.isSupportKnown ) {
13611361 // Assume good faith :)
13621362 return true;
13631363 }
1364 - var browser = $.wikiEditor.browsers[$( 'body.rtl' ).size() ? 'rtl' : 'ltr'][$.browser.name];
 1364+ var browser = $.wikiEditor.browsers[$( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'][$.browser.name];
13651365 for ( condition in browser ) {
13661366 var op = browser[condition][0];
13671367 var val = browser[condition][1];
@@ -1600,6 +1600,8 @@
16011601 context.$iframe[0].contentWindow.document.designMode = 'on';
16021602 // Get a reference to the content area of the iframe
16031603 context.$content = context.$iframe.contents().find( 'body' );
 1604+ if ( $( 'body' ).is( '.rtl' ) )
 1605+ context.$content.addClass( 'rtl' ).attr( 'dir', 'rtl' );
16041606
16051607 /* Magic IFRAME Activation */
16061608
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -80,15 +80,16 @@
8181 this.scrollTop+=range.offsetTop;else if(options.force){range.move('character',-1);range.select();}}
8282 $(this).trigger('scrollToPosition');});}};switch(command){case'encapsulateSelection':options=$.extend({'pre':'','peri':'','post':'','ownline':false,'replace':false},options);break;case'getCaretPosition':options=$.extend({'startAndEnd':false,},options);break;case'setSelection':options=$.extend({'start':undefined,'end':undefined},options);if(options.end===undefined)
8383 options.end=options.start;break;case'scrollToCaretPosition':options=$.extend({'force':false},options);break;}
84 -var context=$(this).data('wikiEditor-context');var hasIframe=context!==undefined&&context.$iframe!==undefined;return(hasIframe?context.fn:fn)[command].call(this,options);};})(jQuery);(function($){$.wikiEditor={'modules':{},'instances':[],'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',3.1]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',3.1]]}},'imgPath':wgScriptPath+'/extensions/UsabilityInitiative/images/wikiEditor/','isSupportKnown':function(){return $.browser.name in $.wikiEditor.browsers[$('body.rtl').size()?'rtl':'ltr'];},'isSupported':function(){if(!$.wikiEditor.isSupportKnown){return true;}
85 -var browser=$.wikiEditor.browsers[$('body.rtl').size()?'rtl':'ltr'][$.browser.name];for(condition in browser){var op=browser[condition][0];var val=browser[condition][1];if(typeof val=='string'){if(!(eval('$.browser.version'+op+'"'+val+'"'))){return false;}}else if(typeof val=='number'){if(!(eval('$.browser.versionNumber'+op+val))){return false;}}}
 84+var context=$(this).data('wikiEditor-context');var hasIframe=context!==undefined&&context.$iframe!==undefined;return(hasIframe?context.fn:fn)[command].call(this,options);};})(jQuery);(function($){$.wikiEditor={'modules':{},'instances':[],'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',3.1]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',3.1]]}},'imgPath':wgScriptPath+'/extensions/UsabilityInitiative/images/wikiEditor/','isSupportKnown':function(){return $.browser.name in $.wikiEditor.browsers[$('body').is('.rtl')?'rtl':'ltr'];},'isSupported':function(){if(!$.wikiEditor.isSupportKnown){return true;}
 85+var browser=$.wikiEditor.browsers[$('body').is('.rtl')?'rtl':'ltr'][$.browser.name];for(condition in browser){var op=browser[condition][0];var val=browser[condition][1];if(typeof val=='string'){if(!(eval('$.browser.version'+op+'"'+val+'"'))){return false;}}else if(typeof val=='number'){if(!(eval('$.browser.versionNumber'+op+val))){return false;}}}
8686 return true;},'autoMsg':function(object,property){if(typeof property=='object'){for(i in property){if(property[i]in object||property[i]+'Msg'in object){property=property[i];break;}}}
8787 if(property in object){return object[property];}else if(property+'Msg'in object){return gM(object[property+'Msg']);}else{return'';}},'fixOperaBrokenness':function(s){return s;}};$.fn.wikiEditor=function(){if($j.wikiEditor.isSupportKnown()&&!$j.wikiEditor.isSupported()){return $(this);}
8888 var context=$(this).data('wikiEditor-context');if(typeof context=='undefined'){var instance=$.wikiEditor.instances.length;context={'$textarea':$(this),'modules':{},'data':{},'instance':instance};$.wikiEditor.instances[instance]=$(this);$(this).wrap($('<div></div>').addClass('wikiEditor-ui')).wrap($('<div></div>').addClass('wikiEditor-wikitext')).wrap($('<div></div>').addClass('wikiEditor-ui-left')).wrap($('<div></div>').addClass('wikiEditor-ui-bottom')).wrap($('<div></div>').addClass('wikiEditor-ui-text'));context.$ui=$(this).parent().parent().parent().parent();context.$ui.after($('<div style="clear:both;"></div>'));context.$ui.append($('<div></div>').addClass('wikiEditor-ui-right'));context.$ui.find('.wikiEditor-ui-left').prepend($('<div></div>').addClass('wikiEditor-ui-top'));context.$iframe=$('<iframe></iframe>').attr('frameborder',0).css({'backgroundColor':'white','width':'100%','height':context.$textarea.height(),'display':'none','overflow-y':'scroll','overflow-x':'hidden',}).insertAfter(context.$textarea);setTimeout(function(){context.fn.setup();},1);context.$textarea.closest('form').submit(function(){context.$textarea.attr('disabled',false);context.$textarea.val(context.$textarea.textSelection('getContents'));});context.api={'addModule':function(context,data){function callModuleApi(module,call,data){if(module in $.wikiEditor.modules&&'fn'in $.wikiEditor.modules[module]&&call in $.wikiEditor.modules[module].fn){$.wikiEditor.modules[module].fn[call](context,data);}}
8989 if(typeof data=='string'){callModuleApi(data,'create',{});}else if(typeof data=='object'){for(module in data){if(typeof module=='string'){callModuleApi(module,'create',data[module]);}}}}};for(module in $.wikiEditor.modules){if('api'in $.wikiEditor.modules[module]){for(call in $.wikiEditor.modules[module].api){if(!(call in context.api)){context.api[call]=$.wikiEditor.modules[module].api[call];}}}}
9090 context.evt={'change':function(event){switch(event.type){case'keypress':if(false){}else{}
9191 break;case'mousedown':if(false){}else{}
92 -break;default:break;}}};context.fn={'setup':function(){context.$iframe[0].contentWindow.document.open();context.$iframe[0].contentWindow.document.write('<html><head><title>wikiEditor</title><script>var context = window.parent.jQuery.wikiEditor.instances['+context.instance+'].data( "wikiEditor-context" ); window.parent.jQuery( document ).bind( "keypress mouseup cut paste", { "context": context }, context.evt.change );</script></head><body style="margin:0;padding:0;width:100%;height:100%;white-space:pre-wrap;font-family:monospace"></body></html>');context.$iframe[0].contentWindow.document.close();context.$iframe[0].contentWindow.document.designMode='on';context.$content=context.$iframe.contents().find('body');context.$textarea.attr('disabled',true);context.$content.text(context.$textarea.val());context.$textarea.hide();context.$iframe.show();},'getContents':function(){return $('<div />').html(context.$content.html().replace(/\<br\>/g,"\n")).text();},'setContents':function(options){context.$content.text(options.contents);return context.$textarea;},'getSelection':function(){var retval;if(context.$iframe[0].contentWindow.getSelection){retval=context.$iframe[0].contentWindow.getSelection();}else if(context.$iframe[0].contentWindow.selection){retval=context.$iframe[0].contentWindow.selection.createRange();}
 92+break;default:break;}}};context.fn={'setup':function(){context.$iframe[0].contentWindow.document.open();context.$iframe[0].contentWindow.document.write('<html><head><title>wikiEditor</title><script>var context = window.parent.jQuery.wikiEditor.instances['+context.instance+'].data( "wikiEditor-context" ); window.parent.jQuery( document ).bind( "keypress mouseup cut paste", { "context": context }, context.evt.change );</script></head><body style="margin:0;padding:0;width:100%;height:100%;white-space:pre-wrap;font-family:monospace"></body></html>');context.$iframe[0].contentWindow.document.close();context.$iframe[0].contentWindow.document.designMode='on';context.$content=context.$iframe.contents().find('body');if($('body').is('.rtl'))
 93+context.$content.addClass('rtl').attr('dir','rtl');context.$textarea.attr('disabled',true);context.$content.text(context.$textarea.val());context.$textarea.hide();context.$iframe.show();},'getContents':function(){return $('<div />').html(context.$content.html().replace(/\<br\>/g,"\n")).text();},'setContents':function(options){context.$content.text(options.contents);return context.$textarea;},'getSelection':function(){var retval;if(context.$iframe[0].contentWindow.getSelection){retval=context.$iframe[0].contentWindow.getSelection();}else if(context.$iframe[0].contentWindow.selection){retval=context.$iframe[0].contentWindow.selection.createRange();}
9394 if(retval.text){retval=retval.text;}else if(retval.toString){retval=retval.toString();}
9495 return retval;},'encapsulateSelection':function(options){var selText=$(this).textSelection('getSelection');var selectAfter=false;var pre=options.pre,post=options.post;if(!selText){selText=options.peri;selectAfter=true;}else if(options.replace){selText=options.peri;}else if(selText.charAt(selText.length-1)==' '){selText=selText.substring(0,selText.length-1);post+=' ';}
9596 var range=context.$iframe[0].contentWindow.getSelection().getRangeAt(0);if(options.ownline){if(range.startOffset!=0)
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -55,14 +55,14 @@
5656 */
5757 'imgPath' : wgScriptPath + '/extensions/UsabilityInitiative/images/wikiEditor/',
5858 'isSupportKnown': function() {
59 - return $.browser.name in $.wikiEditor.browsers[$( 'body.rtl' ).size() ? 'rtl' : 'ltr'];
 59+ return $.browser.name in $.wikiEditor.browsers[$( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'];
6060 },
6161 'isSupported': function() {
6262 if ( !$.wikiEditor.isSupportKnown ) {
6363 // Assume good faith :)
6464 return true;
6565 }
66 - var browser = $.wikiEditor.browsers[$( 'body.rtl' ).size() ? 'rtl' : 'ltr'][$.browser.name];
 66+ var browser = $.wikiEditor.browsers[$( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'][$.browser.name];
6767 for ( condition in browser ) {
6868 var op = browser[condition][0];
6969 var val = browser[condition][1];
@@ -302,6 +302,8 @@
303303 context.$iframe[0].contentWindow.document.designMode = 'on';
304304 // Get a reference to the content area of the iframe
305305 context.$content = context.$iframe.contents().find( 'body' );
 306+ if ( $( 'body' ).is( '.rtl' ) )
 307+ context.$content.addClass( 'rtl' ).attr( 'dir', 'rtl' );
306308
307309 /* Magic IFRAME Activation */
308310

Status & tagging log