Index: trunk/extensions/UsabilityInitiative/Vector/Modules/SimpleSearch/SimpleSearch.js |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | 'color': '#999999', |
26 | 26 | 'cursor': 'text' |
27 | 27 | }) |
28 | | - .css( ( $j( 'body.rtl' ).size() > 0 ? 'right' : 'left' ), 0 ) |
| 28 | + .css( ( $j( 'body' ).is( '.rtl' ) ? 'right' : 'left' ), 0 ) |
29 | 29 | .click( function() { |
30 | 30 | $j(this).parent().find( 'input#searchInput' ).focus(); |
31 | 31 | }) |
Index: trunk/extensions/UsabilityInitiative/Vector/Modules/CollapsibleTabs/CollapsibleTabs.js |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | js2AddOnloadHook( function() { |
3 | 3 | |
4 | | - var rtl = $j( 'body.rtl' ).size() ? true : false; |
| 4 | + var rtl = $j( 'body' ).is( '.rtl' ) ? true : false; |
5 | 5 | |
6 | 6 | //Overloading the moveToCollapsed function to animate the transition |
7 | 7 | $j.collapsibleTabs.moveToCollapsed = function( ele ) { |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.hooks.php |
— | — | @@ -12,15 +12,15 @@ |
13 | 13 | |
14 | 14 | static $scripts = array( |
15 | 15 | 'raw' => array( |
16 | | - array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 3 ), |
| 16 | + array( 'src' => 'Modules/CollapsibleTabs/CollapsibleTabs.js', 'version' => 4 ), |
17 | 17 | 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 ), |
19 | 19 | ), |
20 | 20 | 'combined' => array( |
21 | | - array( 'src' => 'Vector.combined.js', 'version' => 3 ), |
| 21 | + array( 'src' => 'Vector.combined.js', 'version' => 4 ), |
22 | 22 | ), |
23 | 23 | 'minified' => array( |
24 | | - array( 'src' => 'Vector.combined.min.js', 'version' => 3 ), |
| 24 | + array( 'src' => 'Vector.combined.min.js', 'version' => 4 ), |
25 | 25 | ), |
26 | 26 | ); |
27 | 27 | static $modules = array( |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.js |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | js2AddOnloadHook( function() { |
3 | 3 | |
4 | | - var rtl = $j( 'body.rtl' ).size() ? true : false; |
| 4 | + var rtl = $j( 'body' ).is( '.rtl' ) ? true : false; |
5 | 5 | |
6 | 6 | //Overloading the moveToCollapsed function to animate the transition |
7 | 7 | $j.collapsibleTabs.moveToCollapsed = function( ele ) { |
— | — | @@ -144,7 +144,7 @@ |
145 | 145 | 'color': '#999999', |
146 | 146 | 'cursor': 'text' |
147 | 147 | }) |
148 | | - .css( ( $j( 'body.rtl' ).size() > 0 ? 'right' : 'left' ), 0 ) |
| 148 | + .css( ( $j( 'body' ).is( '.rtl' ) ? 'right' : 'left' ), 0 ) |
149 | 149 | .click( function() { |
150 | 150 | $j(this).parent().find( 'input#searchInput' ).focus(); |
151 | 151 | }) |
Index: trunk/extensions/UsabilityInitiative/Vector/Vector.combined.min.js |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | |
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') |
4 | 4 | $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) |
5 | 5 | $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;} |
6 | 6 | $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 @@ |
8 | 8 | if($j('#wpTextbox1').data('origtext')!=$j('#wpTextbox1').val()||$j('#wpSummary').data('origtext')!=$j('#wpSummary').val()||$j('#wikiPreview').is(':visible')){return gM('vector-editwarning-warning');}} |
9 | 9 | $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=[];} |
10 | 10 | 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 @@ |
23 | 23 | array( 'src' => 'css/wikiEditor.css', 'version' => 7 ), |
24 | 24 | array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 7 ), |
25 | 25 | 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 ), |
27 | 27 | array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ), |
28 | 28 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
29 | 29 | ), |
30 | 30 | 'combined' => array( |
31 | | - array( 'src' => 'css/combined.css', 'version' => 27 ), |
| 31 | + array( 'src' => 'css/combined.css', 'version' => 28 ), |
32 | 32 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
33 | 33 | ), |
34 | 34 | 'minified' => array( |
35 | | - array( 'src' => 'css/combined.min.css', 'version' => 27 ), |
| 35 | + array( 'src' => 'css/combined.min.css', 'version' => 28 ), |
36 | 36 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
37 | 37 | ), |
38 | 38 | ) |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ), |
72 | 72 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 6 ), |
73 | 73 | 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 ), |
75 | 75 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 1 ), |
76 | 76 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 32 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 9 ), |
— | — | @@ -78,10 +78,10 @@ |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 3 ), |
80 | 80 | ), |
81 | 81 | 'combined' => array( |
82 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 84 ), |
| 82 | + array( 'src' => 'js/plugins.combined.js', 'version' => 85 ), |
83 | 83 | ), |
84 | 84 | 'minified' => array( |
85 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 84 ), |
| 85 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 85 ), |
86 | 86 | ), |
87 | 87 | ), |
88 | 88 | ); |
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.css |
— | — | @@ -43,13 +43,19 @@ |
44 | 44 | } |
45 | 45 | .wikiEditor-ui .wikiEditor-ui-left { |
46 | 46 | float: left; |
47 | | - width:100%; |
| 47 | + width: 100%; |
48 | 48 | } |
| 49 | +body.rtl .wikiEditor-ui .wikiEditor-ui-left { |
| 50 | + float: right; |
| 51 | +} |
49 | 52 | .wikiEditor-ui .wikiEditor-ui-right { |
50 | 53 | float: right; |
51 | 54 | background: #F3F3F3; |
52 | | - overflow:hidden; |
| 55 | + overflow: hidden; |
53 | 56 | } |
| 57 | +body.rtl .wikiEditor-ui .wikiEditor-ui-right { |
| 58 | + float: left; |
| 59 | +} |
54 | 60 | .wikiEditor-wikitext { |
55 | 61 | float: left; |
56 | 62 | width: 100%; |
— | — | @@ -59,7 +65,6 @@ |
60 | 66 | float: left; |
61 | 67 | width: 50%; |
62 | 68 | } |
63 | | -*/ |
64 | 69 | .wikiEditor-buttons { |
65 | 70 | float: right; |
66 | 71 | width: 50%; |
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.toc.css |
— | — | @@ -48,6 +48,10 @@ |
49 | 49 | white-space: nowrap; |
50 | 50 | overflow: hidden; |
51 | 51 | } |
| 52 | +body.rtl .tab-toc { |
| 53 | + background-position: right top; |
| 54 | + padding-right: 1em; |
| 55 | +} |
52 | 56 | .tab-toc a { |
53 | 57 | outline: none; |
54 | 58 | } |
— | — | @@ -71,21 +75,39 @@ |
72 | 76 | cursor: pointer; |
73 | 77 | color: #0645ad; |
74 | 78 | } |
| 79 | +body.rtl .wikiEditor-ui-toc ul li div { |
| 80 | + padding-right: 1em; |
| 81 | +} |
75 | 82 | .wikiEditor-ui-toc ul ul li div { |
76 | 83 | padding-left: 2em; |
77 | 84 | } |
| 85 | +body.rtl .wikiEditor-ui-toc ul ul li div { |
| 86 | + padding-right: 2em; |
| 87 | +} |
78 | 88 | .wikiEditor-ui-toc ul ul ul li div { |
79 | 89 | padding-left: 3em; |
80 | 90 | } |
| 91 | +body.rtl .wikiEditor-ui-toc ul ul ul li div { |
| 92 | + padding-right: 3em; |
| 93 | +} |
81 | 94 | .wikiEditor-ui-toc ul ul ul ul li div { |
82 | 95 | padding-left: 4em; |
83 | 96 | } |
| 97 | +body.rtl .wikiEditor-ui-toc ul ul ul ul li div { |
| 98 | + padding-right: 4em; |
| 99 | +} |
84 | 100 | .wikiEditor-ui-toc ul ul ul ul ul li div { |
85 | 101 | padding-left: 5em; |
86 | 102 | } |
| 103 | +body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div { |
| 104 | + padding-right: 5em; |
| 105 | +} |
87 | 106 | .wikiEditor-ui-toc ul ul ul ul ul ul li div { |
88 | 107 | padding-left: 6em; |
89 | 108 | } |
| 109 | +body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div { |
| 110 | + padding-right: 6em; |
| 111 | +} |
90 | 112 | .wikiEditor-ui-toc ul li div.current { |
91 | 113 | background-color: #FAFAFA; |
92 | 114 | color: #333333; |
— | — | @@ -174,6 +196,10 @@ |
175 | 197 | white-space: nowrap; |
176 | 198 | overflow: hidden; |
177 | 199 | } |
| 200 | +body.rtl .wikiEditor-ui-toc-expandControl { |
| 201 | + left: 10px; |
| 202 | + padding-left: 1em; |
| 203 | +} |
178 | 204 | .wikiEditor-ui-text textarea { |
179 | 205 | resize: none; |
180 | 206 | } |
Index: trunk/extensions/UsabilityInitiative/css/combined.css |
— | — | @@ -93,13 +93,19 @@ |
94 | 94 | } |
95 | 95 | .wikiEditor-ui .wikiEditor-ui-left { |
96 | 96 | float: left; |
97 | | - width:100%; |
| 97 | + width: 100%; |
98 | 98 | } |
| 99 | +body.rtl .wikiEditor-ui .wikiEditor-ui-left { |
| 100 | + float: right; |
| 101 | +} |
99 | 102 | .wikiEditor-ui .wikiEditor-ui-right { |
100 | 103 | float: right; |
101 | 104 | background: #F3F3F3; |
102 | | - overflow:hidden; |
| 105 | + overflow: hidden; |
103 | 106 | } |
| 107 | +body.rtl .wikiEditor-ui .wikiEditor-ui-right { |
| 108 | + float: left; |
| 109 | +} |
104 | 110 | .wikiEditor-wikitext { |
105 | 111 | float: left; |
106 | 112 | width: 100%; |
— | — | @@ -109,7 +115,6 @@ |
110 | 116 | float: left; |
111 | 117 | width: 50%; |
112 | 118 | } |
113 | | -*/ |
114 | 119 | .wikiEditor-buttons { |
115 | 120 | float: right; |
116 | 121 | width: 50%; |
— | — | @@ -178,6 +183,10 @@ |
179 | 184 | white-space: nowrap; |
180 | 185 | overflow: hidden; |
181 | 186 | } |
| 187 | +body.rtl .tab-toc { |
| 188 | + background-position: right top; |
| 189 | + padding-right: 1em; |
| 190 | +} |
182 | 191 | .tab-toc a { |
183 | 192 | outline: none; |
184 | 193 | } |
— | — | @@ -201,21 +210,39 @@ |
202 | 211 | cursor: pointer; |
203 | 212 | color: #0645ad; |
204 | 213 | } |
| 214 | +body.rtl .wikiEditor-ui-toc ul li div { |
| 215 | + padding-right: 1em; |
| 216 | +} |
205 | 217 | .wikiEditor-ui-toc ul ul li div { |
206 | 218 | padding-left: 2em; |
207 | 219 | } |
| 220 | +body.rtl .wikiEditor-ui-toc ul ul li div { |
| 221 | + padding-right: 2em; |
| 222 | +} |
208 | 223 | .wikiEditor-ui-toc ul ul ul li div { |
209 | 224 | padding-left: 3em; |
210 | 225 | } |
| 226 | +body.rtl .wikiEditor-ui-toc ul ul ul li div { |
| 227 | + padding-right: 3em; |
| 228 | +} |
211 | 229 | .wikiEditor-ui-toc ul ul ul ul li div { |
212 | 230 | padding-left: 4em; |
213 | 231 | } |
| 232 | +body.rtl .wikiEditor-ui-toc ul ul ul ul li div { |
| 233 | + padding-right: 4em; |
| 234 | +} |
214 | 235 | .wikiEditor-ui-toc ul ul ul ul ul li div { |
215 | 236 | padding-left: 5em; |
216 | 237 | } |
| 238 | +body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div { |
| 239 | + padding-right: 5em; |
| 240 | +} |
217 | 241 | .wikiEditor-ui-toc ul ul ul ul ul ul li div { |
218 | 242 | padding-left: 6em; |
219 | 243 | } |
| 244 | +body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div { |
| 245 | + padding-right: 6em; |
| 246 | +} |
220 | 247 | .wikiEditor-ui-toc ul li div.current { |
221 | 248 | background-color: #FAFAFA; |
222 | 249 | color: #333333; |
— | — | @@ -304,6 +331,10 @@ |
305 | 332 | white-space: nowrap; |
306 | 333 | overflow: hidden; |
307 | 334 | } |
| 335 | +body.rtl .wikiEditor-ui-toc-expandControl { |
| 336 | + left: 10px; |
| 337 | + padding-left: 1em; |
| 338 | +} |
308 | 339 | .wikiEditor-ui-text textarea { |
309 | 340 | resize: none; |
310 | 341 | } |
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -88,11 +88,17 @@ |
89 | 89 | float:left; |
90 | 90 | width:100%; |
91 | 91 | } |
| 92 | +body.rtl .wikiEditor-ui .wikiEditor-ui-left{ |
| 93 | +float:right; |
| 94 | +} |
92 | 95 | .wikiEditor-ui .wikiEditor-ui-right{ |
93 | 96 | float:right; |
94 | 97 | background:#F3F3F3; |
95 | 98 | overflow:hidden; |
96 | 99 | } |
| 100 | +body.rtl .wikiEditor-ui .wikiEditor-ui-right{ |
| 101 | +float:left; |
| 102 | +} |
97 | 103 | .wikiEditor-wikitext{ |
98 | 104 | float:left; |
99 | 105 | width:100%; |
— | — | @@ -102,7 +108,6 @@ |
103 | 109 | float:left; |
104 | 110 | width:50%; |
105 | 111 | } |
106 | | -*/ |
107 | 112 | .wikiEditor-buttons{ |
108 | 113 | float:right; |
109 | 114 | width:50%; |
— | — | @@ -163,6 +168,10 @@ |
164 | 169 | white-space:nowrap; |
165 | 170 | overflow:hidden; |
166 | 171 | } |
| 172 | +body.rtl .tab-toc{ |
| 173 | +background-position:right top; |
| 174 | +padding-right:1em; |
| 175 | +} |
167 | 176 | .tab-toc a{ |
168 | 177 | outline:none; |
169 | 178 | } |
— | — | @@ -186,21 +195,39 @@ |
187 | 196 | cursor:pointer; |
188 | 197 | color:#0645ad; |
189 | 198 | } |
| 199 | +body.rtl .wikiEditor-ui-toc ul li div{ |
| 200 | +padding-right:1em; |
| 201 | +} |
190 | 202 | .wikiEditor-ui-toc ul ul li div{ |
191 | 203 | padding-left:2em; |
192 | 204 | } |
| 205 | +body.rtl .wikiEditor-ui-toc ul ul li div{ |
| 206 | +padding-right:2em; |
| 207 | +} |
193 | 208 | .wikiEditor-ui-toc ul ul ul li div{ |
194 | 209 | padding-left:3em; |
195 | 210 | } |
| 211 | +body.rtl .wikiEditor-ui-toc ul ul ul li div{ |
| 212 | +padding-right:3em; |
| 213 | +} |
196 | 214 | .wikiEditor-ui-toc ul ul ul ul li div{ |
197 | 215 | padding-left:4em; |
198 | 216 | } |
| 217 | +body.rtl .wikiEditor-ui-toc ul ul ul ul li div{ |
| 218 | +padding-right:4em; |
| 219 | +} |
199 | 220 | .wikiEditor-ui-toc ul ul ul ul ul li div{ |
200 | 221 | padding-left:5em; |
201 | 222 | } |
| 223 | +body.rtl .wikiEditor-ui-toc ul ul ul ul ul li div{ |
| 224 | +padding-right:5em; |
| 225 | +} |
202 | 226 | .wikiEditor-ui-toc ul ul ul ul ul ul li div{ |
203 | 227 | padding-left:6em; |
204 | 228 | } |
| 229 | +body.rtl wikiEditor-ui-toc ul ul ul ul ul ul li div{ |
| 230 | +padding-right:6em; |
| 231 | +} |
205 | 232 | .wikiEditor-ui-toc ul li div.current{ |
206 | 233 | background-color:#FAFAFA; |
207 | 234 | color:#333333; |
— | — | @@ -281,6 +308,10 @@ |
282 | 309 | white-space:nowrap; |
283 | 310 | overflow:hidden; |
284 | 311 | } |
| 312 | +body.rtl .wikiEditor-ui-toc-expandControl{ |
| 313 | +left:10px; |
| 314 | +padding-left:1em; |
| 315 | +} |
285 | 316 | .wikiEditor-ui-text textarea{ |
286 | 317 | resize:none; |
287 | 318 | } |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -948,7 +948,7 @@ |
949 | 949 | 'color': '#999999', |
950 | 950 | 'cursor': 'text' |
951 | 951 | }) |
952 | | - .css( ( $j( 'body.rtl' ).size() > 0 ? 'right' : 'left' ), 0 ) |
| 952 | + .css( ( $j( 'body' ).is( '.rtl' ) ? 'right' : 'left' ), 0 ) |
953 | 953 | .click( function() { |
954 | 954 | $j(this).parent().find( 'input' ).focus(); |
955 | 955 | }); |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | cache[target]=status;updateWidget(status);}}));} |
43 | 43 | $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()=='') |
44 | 44 | $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())) |
46 | 46 | $j('#wikieditor-toolbar-link-type-ext').attr('checked','checked');else |
47 | 47 | $j('#wikieditor-toolbar-link-type-int').attr('checked','checked');if($j('#wikieditor-toolbar-link-int-text').data('untouched')) |
48 | 48 | $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 @@ |
949 | 949 | 'color': '#999999', |
950 | 950 | 'cursor': 'text' |
951 | 951 | }) |
952 | | - .css( ( $j( 'body.rtl' ).size() > 0 ? 'right' : 'left' ), 0 ) |
| 952 | + .css( ( $j( 'body' ).is( '.rtl' ) ? 'right' : 'left' ), 0 ) |
953 | 953 | .click( function() { |
954 | 954 | $j(this).parent().find( 'input' ).focus(); |
955 | 955 | }); |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php |
— | — | @@ -15,13 +15,13 @@ |
16 | 16 | array( 'src' => 'Modules/Highlight/Highlight.js', 'version' => 1 ), |
17 | 17 | array( 'src' => 'Modules/Preview/Preview.js', 'version' => 1 ), |
18 | 18 | 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 ), |
20 | 20 | ), |
21 | 21 | 'combined' => array( |
22 | | - array( 'src' => 'WikiEditor.combined.js', 'version' => 5 ), |
| 22 | + array( 'src' => 'WikiEditor.combined.js', 'version' => 6 ), |
23 | 23 | ), |
24 | 24 | 'minified' => array( |
25 | | - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 5 ), |
| 25 | + array( 'src' => 'WikiEditor.combined.min.js', 'version' => 6 ), |
26 | 26 | ), |
27 | 27 | ); |
28 | 28 | static $modules = array( |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -1353,14 +1353,14 @@ |
1354 | 1354 | */ |
1355 | 1355 | 'imgPath' : wgScriptPath + '/extensions/UsabilityInitiative/images/wikiEditor/', |
1356 | 1356 | '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']; |
1358 | 1358 | }, |
1359 | 1359 | 'isSupported': function() { |
1360 | 1360 | if ( !$.wikiEditor.isSupportKnown ) { |
1361 | 1361 | // Assume good faith :) |
1362 | 1362 | return true; |
1363 | 1363 | } |
1364 | | - var browser = $.wikiEditor.browsers[$( 'body.rtl' ).size() ? 'rtl' : 'ltr'][$.browser.name]; |
| 1364 | + var browser = $.wikiEditor.browsers[$( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'][$.browser.name]; |
1365 | 1365 | for ( condition in browser ) { |
1366 | 1366 | var op = browser[condition][0]; |
1367 | 1367 | var val = browser[condition][1]; |
— | — | @@ -1600,6 +1600,8 @@ |
1601 | 1601 | context.$iframe[0].contentWindow.document.designMode = 'on'; |
1602 | 1602 | // Get a reference to the content area of the iframe |
1603 | 1603 | context.$content = context.$iframe.contents().find( 'body' ); |
| 1604 | + if ( $( 'body' ).is( '.rtl' ) ) |
| 1605 | + context.$content.addClass( 'rtl' ).attr( 'dir', 'rtl' ); |
1604 | 1606 | |
1605 | 1607 | /* Magic IFRAME Activation */ |
1606 | 1608 | |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -80,15 +80,16 @@ |
81 | 81 | this.scrollTop+=range.offsetTop;else if(options.force){range.move('character',-1);range.select();}} |
82 | 82 | $(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) |
83 | 83 | 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;}}} |
86 | 86 | 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;}}} |
87 | 87 | 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);} |
88 | 88 | 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);}} |
89 | 89 | 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];}}}} |
90 | 90 | context.evt={'change':function(event){switch(event.type){case'keypress':if(false){}else{} |
91 | 91 | 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();} |
93 | 94 | if(retval.text){retval=retval.text;}else if(retval.toString){retval=retval.toString();} |
94 | 95 | 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+=' ';} |
95 | 96 | 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 @@ |
56 | 56 | */ |
57 | 57 | 'imgPath' : wgScriptPath + '/extensions/UsabilityInitiative/images/wikiEditor/', |
58 | 58 | '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']; |
60 | 60 | }, |
61 | 61 | 'isSupported': function() { |
62 | 62 | if ( !$.wikiEditor.isSupportKnown ) { |
63 | 63 | // Assume good faith :) |
64 | 64 | return true; |
65 | 65 | } |
66 | | - var browser = $.wikiEditor.browsers[$( 'body.rtl' ).size() ? 'rtl' : 'ltr'][$.browser.name]; |
| 66 | + var browser = $.wikiEditor.browsers[$( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'][$.browser.name]; |
67 | 67 | for ( condition in browser ) { |
68 | 68 | var op = browser[condition][0]; |
69 | 69 | var val = browser[condition][1]; |
— | — | @@ -302,6 +302,8 @@ |
303 | 303 | context.$iframe[0].contentWindow.document.designMode = 'on'; |
304 | 304 | // Get a reference to the content area of the iframe |
305 | 305 | context.$content = context.$iframe.contents().find( 'body' ); |
| 306 | + if ( $( 'body' ).is( '.rtl' ) ) |
| 307 | + context.$content.addClass( 'rtl' ).attr( 'dir', 'rtl' ); |
306 | 308 | |
307 | 309 | /* Magic IFRAME Activation */ |
308 | 310 | |