r61523 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61522‎ | r61523 | r61524 >
Date:18:03, 26 January 2010
Author:adam
Status:deferred
Tags:
Comment:
One minor tweak to the TOC collapse/expand code, and styling tweaks to the insert link and table dialogs
Modified paths:
  • /trunk/extensions/UsabilityInitiative/UsabilityInitiative.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.dialogs.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.toc.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php
@@ -22,18 +22,18 @@
2323 array( 'src' => 'css/vector.collapsibleNav.css', 'version' => 6 ),
2424 array( 'src' => 'css/vector.footerCleanup.css', 'version' => 1 ),
2525 array( 'src' => 'css/wikiEditor.css', 'version' => 8 ),
26 - array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 13 ),
 26+ array( 'src' => 'css/wikiEditor.dialogs.css', 'version' => 14 ),
2727 array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ),
2828 array( 'src' => 'css/wikiEditor.toc.css', 'version' => 28 ),
2929 array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 10 ),
3030 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3131 ),
3232 'combined' => array(
33 - array( 'src' => 'css/combined.css', 'version' => 55 ),
 33+ array( 'src' => 'css/combined.css', 'version' => 56 ),
3434 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3535 ),
3636 'minified' => array(
37 - array( 'src' => 'css/combined.min.css', 'version' => 55 ),
 37+ array( 'src' => 'css/combined.min.css', 'version' => 56 ),
3838 array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ),
3939 ),
4040 )
@@ -155,7 +155,7 @@
156156 array(
157157 'src' => 'js/plugins/jquery.wikiEditor.toc.js',
158158 'class' => 'j.wikiEditor.modules.toc',
159 - 'version' => 71
 159+ 'version' => 72
160160 ),
161161 array(
162162 'src' => 'js/plugins/jquery.wikiEditor.preview.js',
@@ -173,10 +173,10 @@
174174 'version' => 1 ),
175175 ),
176176 'combined' => array(
177 - array( 'src' => 'js/plugins.combined.js', 'version' => 177 ),
 177+ array( 'src' => 'js/plugins.combined.js', 'version' => 178 ),
178178 ),
179179 'minified' => array(
180 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 177 ),
 180+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 178 ),
181181 ),
182182 ),
183183 );
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.dialogs.css
@@ -26,7 +26,7 @@
2727
2828
2929 .ui-dialog .ui-dialog-titlebar {
30 - padding: 0.75em 20px !important;
 30+ padding: 0.9em 1.4em 0.6em !important;
3131 }
3232 .ui-widget table td {
3333 padding: 0 !important;
@@ -65,17 +65,30 @@
6666 }
6767 .ui-dialog .ui-dialog-buttonpane {
6868 margin-top: 0 !important;
69 - padding:0.3em 1em 0.5em 1em !important;
 69+ padding:0.3em 1.4em 0.5em 1.4em !important;
7070 }
7171
7272 .ui-dialog-content fieldset{
7373 border: none !important;
7474 margin: 0 !important;
 75+ padding: 0 !important;
7576 }
76 -
7777 .ui-widget-header {
7878 border-bottom:1px solid #6bc8f3 !important;
7979 }
 80+.ui-dialog-content input[type=text] {
 81+ -moz-box-sizing: border-box;
 82+ -ms-box-sizing: border-box;
 83+ -webkit-box-sizing: border-box;
 84+ -khtml-box-sizing: border-box;
 85+}
 86+.ui-dialog-content input[type="radio"],
 87+.ui-dialog-content input[type="checkbox"] {
 88+ margin-left: 0;
 89+}
 90+.ui-dialog .ui-dialog-titlebar-close {
 91+ right: 0.9em !important;
 92+}
8093 .wikieditor-toolbar-field-wrapper {
8194 padding: 0 0 25px 0;
8295 }
@@ -86,14 +99,15 @@
87100 border: none !important;
88101 }
89102 /* Table Dialog */
 103+
90104 #wikieditor-toolbar-table-dialog fieldset {
91 - width: 200px;
92 - padding: 30px 0 0;
 105+ width: 218px;
 106+ padding: 0;
93107 float: left;
94108 }
95 -.wikieditor-toolbar-table-preview-wrapper {
96 - padding: 30px 0 0;
97 - width: 280px;
 109+#wikieditor-toolbar-table-dialog .wikieditor-toolbar-table-preview-wrapper {
 110+ width: 330px;
 111+ padding: 0;
98112 float: right;
99113 }
100114 .wikieditor-toolbar-table-preview-content * {
@@ -104,20 +118,24 @@
105119 }
106120 .ui-widget .wikieditor-toolbar-table-preview-content table td {
107121 padding: 10px 4px !important;
 122+ height: auto !important;
108123 }
109124 .ui-widget .wikieditor-toolbar-table-preview-content table th {
110125 padding: 7px 3px !important;
111126 }
112 -.wikieditor-toolbar-table-dimension-fields {
113 - overflow: visible;
114 - width: 100%;
115 - margin: 0 4px;
116 -}
117127 .wikieditor-toolbar-table-dimension-fields .wikieditor-toolbar-field-wrapper {
118128 float: left;
119129 margin-right: 20px;
120130 vertical-align: bottom;
121131 }
 132+.ui-dialog .ui-dialog-content {
 133+ padding: 30px 20px 0 !important;
 134+}
 135+.wikieditor-toolbar-dialog-wrapper {
 136+ width: 100%;
 137+}
 138+/* REPLACE Dialog */
 139+
122140 /* RTL Changes */
123141 body.rtl .ui-dialog .ui-dialog-buttonpane button {
124142 float: left;
@@ -129,4 +147,28 @@
130148 }
131149 body.rtl .ui-dialog .ui-dialog-title {
132150 float:right;
133 -}
\ No newline at end of file
 151+}
 152+/* Self Clearing Floats */
 153+.wikieditor-toolbar-table-dimension-fields:after,
 154+.wikieditor-toolbar-dialog-wrapper:after {
 155+ visibility: hidden;
 156+ display: block;
 157+ font-size: 0;
 158+ content: " ";
 159+ clear: both;
 160+ height: 0;
 161+}
 162+.wikieditor-toolbar-table-dimension-fields,
 163+.wikieditor-toolbar-dialog-wrapper {
 164+ display: inline-table;
 165+}
 166+/* Hides from IE-mac \*/
 167+* html .wikieditor-toolbar-table-dimension-fields,
 168+* html .wikieditor-toolbar-dialog-wrapper {
 169+ height: 1%;
 170+}
 171+.wikieditor-toolbar-table-dimension-fields,
 172+.wikieditor-toolbar-dialog-wrapper {
 173+ display: block;
 174+}
 175+/* End hide from IE-mac */
\ No newline at end of file
Index: trunk/extensions/UsabilityInitiative/css/combined.css
@@ -235,7 +235,7 @@
236236
237237
238238 .ui-dialog .ui-dialog-titlebar {
239 - padding: 0.75em 20px !important;
 239+ padding: 0.9em 1.4em 0.6em !important;
240240 }
241241 .ui-widget table td {
242242 padding: 0 !important;
@@ -274,17 +274,30 @@
275275 }
276276 .ui-dialog .ui-dialog-buttonpane {
277277 margin-top: 0 !important;
278 - padding:0.3em 1em 0.5em 1em !important;
 278+ padding:0.3em 1.4em 0.5em 1.4em !important;
279279 }
280280
281281 .ui-dialog-content fieldset{
282282 border: none !important;
283283 margin: 0 !important;
 284+ padding: 0 !important;
284285 }
285 -
286286 .ui-widget-header {
287287 border-bottom:1px solid #6bc8f3 !important;
288288 }
 289+.ui-dialog-content input[type=text] {
 290+ -moz-box-sizing: border-box;
 291+ -ms-box-sizing: border-box;
 292+ -webkit-box-sizing: border-box;
 293+ -khtml-box-sizing: border-box;
 294+}
 295+.ui-dialog-content input[type="radio"],
 296+.ui-dialog-content input[type="checkbox"] {
 297+ margin-left: 0;
 298+}
 299+.ui-dialog .ui-dialog-titlebar-close {
 300+ right: 0.9em !important;
 301+}
289302 .wikieditor-toolbar-field-wrapper {
290303 padding: 0 0 25px 0;
291304 }
@@ -295,14 +308,15 @@
296309 border: none !important;
297310 }
298311 /* Table Dialog */
 312+
299313 #wikieditor-toolbar-table-dialog fieldset {
300 - width: 200px;
301 - padding: 30px 0 0;
 314+ width: 218px;
 315+ padding: 0;
302316 float: left;
303317 }
304 -.wikieditor-toolbar-table-preview-wrapper {
305 - padding: 30px 0 0;
306 - width: 280px;
 318+#wikieditor-toolbar-table-dialog .wikieditor-toolbar-table-preview-wrapper {
 319+ width: 330px;
 320+ padding: 0;
307321 float: right;
308322 }
309323 .wikieditor-toolbar-table-preview-content * {
@@ -313,20 +327,24 @@
314328 }
315329 .ui-widget .wikieditor-toolbar-table-preview-content table td {
316330 padding: 10px 4px !important;
 331+ height: auto !important;
317332 }
318333 .ui-widget .wikieditor-toolbar-table-preview-content table th {
319334 padding: 7px 3px !important;
320335 }
321 -.wikieditor-toolbar-table-dimension-fields {
322 - overflow: visible;
323 - width: 100%;
324 - margin: 0 4px;
325 -}
326336 .wikieditor-toolbar-table-dimension-fields .wikieditor-toolbar-field-wrapper {
327337 float: left;
328338 margin-right: 20px;
329339 vertical-align: bottom;
330340 }
 341+.ui-dialog .ui-dialog-content {
 342+ padding: 30px 20px 0 !important;
 343+}
 344+.wikieditor-toolbar-dialog-wrapper {
 345+ width: 100%;
 346+}
 347+/* REPLACE Dialog */
 348+
331349 /* RTL Changes */
332350 body.rtl .ui-dialog .ui-dialog-buttonpane button {
333351 float: left;
@@ -338,7 +356,31 @@
339357 }
340358 body.rtl .ui-dialog .ui-dialog-title {
341359 float:right;
342 -}/* wikiEditor toc module */
 360+}
 361+/* Self Clearing Floats */
 362+.wikieditor-toolbar-table-dimension-fields:after,
 363+.wikieditor-toolbar-dialog-wrapper:after {
 364+ visibility: hidden;
 365+ display: block;
 366+ font-size: 0;
 367+ content: " ";
 368+ clear: both;
 369+ height: 0;
 370+}
 371+.wikieditor-toolbar-table-dimension-fields,
 372+.wikieditor-toolbar-dialog-wrapper {
 373+ display: inline-table;
 374+}
 375+/* Hides from IE-mac \*/
 376+* html .wikieditor-toolbar-table-dimension-fields,
 377+* html .wikieditor-toolbar-dialog-wrapper {
 378+ height: 1%;
 379+}
 380+.wikieditor-toolbar-table-dimension-fields,
 381+.wikieditor-toolbar-dialog-wrapper {
 382+ display: block;
 383+}
 384+/* End hide from IE-mac *//* wikiEditor toc module */
343385 .wikiEditor-ui-toc {
344386 /* height and width are set dynamically */
345387 /*float: right;*/
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css
@@ -217,7 +217,7 @@
218218 padding:2px 1px;
219219 }
220220 .ui-dialog .ui-dialog-titlebar{
221 -padding:0.75em 20px !important;
 221+padding:0.9em 1.4em 0.6em !important;
222222 }
223223 .ui-widget table td{
224224 padding:0 !important;
@@ -253,15 +253,29 @@
254254 }
255255 .ui-dialog .ui-dialog-buttonpane{
256256 margin-top:0 !important;
257 -padding:0.3em 1em 0.5em 1em !important;
 257+padding:0.3em 1.4em 0.5em 1.4em !important;
258258 }
259259 .ui-dialog-content fieldset{
260260 border:none !important;
261261 margin:0 !important;
 262+padding:0 !important;
262263 }
263264 .ui-widget-header{
264265 border-bottom:1px solid #6bc8f3 !important;
265266 }
 267+.ui-dialog-content input[type=text]{
 268+-moz-box-sizing:border-box;
 269+-ms-box-sizing:border-box;
 270+-webkit-box-sizing:border-box;
 271+-khtml-box-sizing:border-box;
 272+}
 273+.ui-dialog-content input[type="radio"],
 274+.ui-dialog-content input[type="checkbox"]{
 275+margin-left:0;
 276+}
 277+.ui-dialog .ui-dialog-titlebar-close{
 278+right:0.9em !important;
 279+}
266280 .wikieditor-toolbar-field-wrapper{
267281 padding:0 0 25px 0;
268282 }
@@ -272,13 +286,13 @@
273287 border:none !important;
274288 }
275289 #wikieditor-toolbar-table-dialog fieldset{
276 -width:200px;
277 -padding:30px 0 0;
 290+width:218px;
 291+padding:0;
278292 float:left;
279293 }
280 -.wikieditor-toolbar-table-preview-wrapper{
281 -padding:30px 0 0;
282 -width:280px;
 294+#wikieditor-toolbar-table-dialog .wikieditor-toolbar-table-preview-wrapper{
 295+width:330px;
 296+padding:0;
283297 float:right;
284298 }
285299 .wikieditor-toolbar-table-preview-content *{
@@ -289,20 +303,22 @@
290304 }
291305 .ui-widget .wikieditor-toolbar-table-preview-content table td{
292306 padding:10px 4px !important;
 307+height:auto !important;
293308 }
294309 .ui-widget .wikieditor-toolbar-table-preview-content table th{
295310 padding:7px 3px !important;
296311 }
297 -.wikieditor-toolbar-table-dimension-fields{
298 -overflow:visible;
299 -width:100%;
300 -margin:0 4px;
301 -}
302312 .wikieditor-toolbar-table-dimension-fields .wikieditor-toolbar-field-wrapper{
303313 float:left;
304314 margin-right:20px;
305315 vertical-align:bottom;
306316 }
 317+.ui-dialog .ui-dialog-content{
 318+padding:30px 20px 0 !important;
 319+}
 320+.wikieditor-toolbar-dialog-wrapper{
 321+width:100%;
 322+}
307323 body.rtl .ui-dialog .ui-dialog-buttonpane button{
308324 float:left;
309325 margin:0.5em 0.4 0.5em 0em !important;
@@ -314,6 +330,27 @@
315331 body.rtl .ui-dialog .ui-dialog-title{
316332 float:right;
317333 }
 334+.wikieditor-toolbar-table-dimension-fields:after,
 335+.wikieditor-toolbar-dialog-wrapper:after{
 336+visibility:hidden;
 337+display:block;
 338+font-size:0;
 339+content:" ";
 340+clear:both;
 341+height:0;
 342+}
 343+.wikieditor-toolbar-table-dimension-fields,
 344+.wikieditor-toolbar-dialog-wrapper{
 345+display:inline-table;
 346+}
 347+* html .wikieditor-toolbar-table-dimension-fields,
 348+* html .wikieditor-toolbar-dialog-wrapper{
 349+height:1%;
 350+}
 351+.wikieditor-toolbar-table-dimension-fields,
 352+.wikieditor-toolbar-dialog-wrapper{
 353+display:block;
 354+}
318355 .wikiEditor-ui-toc{
319356 padding:0;
320357 overflow:auto;
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.hooks.php
@@ -35,7 +35,7 @@
3636 array(
3737 'src' => 'Modules/Toolbar/Toolbar.js',
3838 'class' => 'wikiEditor.config.toolbar',
39 - 'version' => 32
 39+ 'version' => 33
4040 ),
4141 array(
4242 'src' => 'Modules/TemplateEditor/TemplateEditor.js',
@@ -44,10 +44,10 @@
4545 ),
4646 ),
4747 'combined' => array(
48 - array( 'src' => 'WikiEditor.combined.js', 'version' => 34 ),
 48+ array( 'src' => 'WikiEditor.combined.js', 'version' => 35 ),
4949 ),
5050 'minified' => array(
51 - array( 'src' => 'WikiEditor.combined.min.js', 'version' => 34 ),
 51+ array( 'src' => 'WikiEditor.combined.min.js', 'version' => 35 ),
5252 ),
5353 );
5454 static $messages = array(
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js
@@ -1556,6 +1556,7 @@
15571557 id: 'wikieditor-toolbar-table-dialog',
15581558 // FIXME: Localize 'x'?
15591559 html: '\
 1560+ <div class="wikieditor-toolbar-dialog-wrapper">\
15601561 <fieldset><div class="wikieditor-toolbar-table-form">\
15611562 <div class="wikieditor-toolbar-field-wrapper">\
15621563 <input type="checkbox" id="wikieditor-toolbar-table-dimensions-header" checked />\
@@ -1610,7 +1611,7 @@
16111612 </tr>\
16121613 </table>\
16131614 </div>\
1614 - </div>',
 1615+ </div></div>',
16151616 init: function() {
16161617 $j(this).find( '[rel]' ).each( function() {
16171618 $j(this).text( gM( $j(this).attr( 'rel' ) ) );
@@ -1662,7 +1663,7 @@
16631664 },
16641665 dialog: {
16651666 resizable: false,
1666 - width: 500,
 1667+ width: 590,
16671668 buttons: {
16681669 'wikieditor-toolbar-tool-table-insert': function() {
16691670 var rowsVal = $j( '#wikieditor-toolbar-table-dimensions-rows' ).val();
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js
@@ -72,6 +72,7 @@
7373 $j('#wikieditor-toolbar-link-'+type).attr('checked','checked');}
7474 $j('#wikieditor-toolbar-link-int-text').data('untouched',$j('#wikieditor-toolbar-link-int-text').val()==$j('#wikieditor-toolbar-link-int-target').val()||$j('#wikieditor-toolbar-link-int-text').hasClass('wikieditor-toolbar-dialog-hint'));$j('#wikieditor-toolbar-link-int-target').suggestions();$j('#wikieditor-toolbar-link-int-text, #wikiedit-toolbar-link-int-target').each(function(){if($j(this).val()=='')
7575 $j(this).parent().find('label').show();});if(!($j(this).data('dialogkeypressset'))){$j(this).data('dialogkeypressset',true);$j(this).closest('.ui-dialog').keypress(function(e){if((e.keyCode||e.which)==13){var button=$j(this).data('dialogaction')||$j(this).find('button:first');button.click();e.preventDefault();}});$j(this).closest('.ui-dialog').find('button').focus(function(){$j(this).closest('.ui-dialog').data('dialogaction',this);});}}}},'insert-table':{titleMsg:'wikieditor-toolbar-tool-table-title',id:'wikieditor-toolbar-table-dialog',html:'\
 76+ <div class="wikieditor-toolbar-dialog-wrapper">\
7677 <fieldset><div class="wikieditor-toolbar-table-form">\
7778 <div class="wikieditor-toolbar-field-wrapper">\
7879 <input type="checkbox" id="wikieditor-toolbar-table-dimensions-header" checked />\
@@ -126,9 +127,9 @@
127128 </tr>\
128129 </table>\
129130 </div>\
130 - </div>',init:function(){$j(this).find('[rel]').each(function(){$j(this).text(gM($j(this).attr('rel')));});$j('#wikieditor-toolbar-table-dimensions-rows').val(4);$j('#wikieditor-toolbar-table-dimensions-columns').val(3);$j('#wikieditor-toolbar-table-wikitable').click(function(){$j('.wikieditor-toolbar-table-preview').toggleClass('wikitable');});$j('#wikieditor-toolbar-table-preview').clone().attr('id','wikieditor-toolbar-table-preview2').addClass('sortable').insertAfter($j('#wikieditor-toolbar-table-preview')).hide();if(typeof ts_makeSortable=='function')
 131+ </div></div>',init:function(){$j(this).find('[rel]').each(function(){$j(this).text(gM($j(this).attr('rel')));});$j('#wikieditor-toolbar-table-dimensions-rows').val(4);$j('#wikieditor-toolbar-table-dimensions-columns').val(3);$j('#wikieditor-toolbar-table-wikitable').click(function(){$j('.wikieditor-toolbar-table-preview').toggleClass('wikitable');});$j('#wikieditor-toolbar-table-preview').clone().attr('id','wikieditor-toolbar-table-preview2').addClass('sortable').insertAfter($j('#wikieditor-toolbar-table-preview')).hide();if(typeof ts_makeSortable=='function')
131132 ts_makeSortable($j('#wikieditor-toolbar-table-preview2').get(0));$j('#wikieditor-toolbar-table-sortable').click(function(){$j('#wikieditor-toolbar-table-preview').hide().attr('id','wikieditor-toolbar-table-preview3');$j('#wikieditor-toolbar-table-preview2').attr('id','wikieditor-toolbar-table-preview').show();$j('#wikieditor-toolbar-table-preview3').attr('id','wikieditor-toolbar-table-preview2');});$j('#wikieditor-toolbar-table-dimensions-header').click(function(){var headerHTML=$j('.wikieditor-toolbar-table-preview-header').html();var hiddenHTML=$j('.wikieditor-toolbar-table-preview-hidden').html();$j('.wikieditor-toolbar-table-preview-header').html(hiddenHTML);$j('.wikieditor-toolbar-table-preview-hidden').html(headerHTML);if(typeof ts_makeSortable=='function')
132 -ts_makeSortable($j('#wikieditor-toolbar-table-preview, #wikieditor-toolbar-table-preview2').filter('.sortable').get(0));});},dialog:{resizable:false,width:500,buttons:{'wikieditor-toolbar-tool-table-insert':function(){var rowsVal=$j('#wikieditor-toolbar-table-dimensions-rows').val();var colsVal=$j('#wikieditor-toolbar-table-dimensions-columns').val();var rows=parseInt(rowsVal,10);var cols=parseInt(colsVal,10);var header=Math.min(1,$j('#wikieditor-toolbar-table-dimensions-header:checked').size());if(isNaN(rows)||isNaN(cols)||rows!=rowsVal||cols!=colsVal){alert(gM('wikieditor-toolbar-tool-table-invalidnumber'));return;}
 133+ts_makeSortable($j('#wikieditor-toolbar-table-preview, #wikieditor-toolbar-table-preview2').filter('.sortable').get(0));});},dialog:{resizable:false,width:590,buttons:{'wikieditor-toolbar-tool-table-insert':function(){var rowsVal=$j('#wikieditor-toolbar-table-dimensions-rows').val();var colsVal=$j('#wikieditor-toolbar-table-dimensions-columns').val();var rows=parseInt(rowsVal,10);var cols=parseInt(colsVal,10);var header=Math.min(1,$j('#wikieditor-toolbar-table-dimensions-header:checked').size());if(isNaN(rows)||isNaN(cols)||rows!=rowsVal||cols!=colsVal){alert(gM('wikieditor-toolbar-tool-table-invalidnumber'));return;}
133134 if(rows+header==0||cols==0){alert(gM('wikieditor-toolbar-tool-table-zero'));return;}
134135 if(rows*cols>1000){alert(gM('wikieditor-toolbar-tool-table-toomany',1000));return;}
135136 var headerText=gM('wikieditor-toolbar-tool-table-example-header');var normalText=gM('wikieditor-toolbar-tool-table-example');var table="";for(var r=0;r<rows+header;r++){table+="|-\n";for(var c=0;c<cols;c++){var isHeader=(r+1==header);var delim=isHeader?'!':'|';if(c>0){delim+=delim;}
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js
@@ -1475,6 +1475,7 @@
14761476 id: 'wikieditor-toolbar-table-dialog',
14771477 // FIXME: Localize 'x'?
14781478 html: '\
 1479+ <div class="wikieditor-toolbar-dialog-wrapper">\
14791480 <fieldset><div class="wikieditor-toolbar-table-form">\
14801481 <div class="wikieditor-toolbar-field-wrapper">\
14811482 <input type="checkbox" id="wikieditor-toolbar-table-dimensions-header" checked />\
@@ -1529,7 +1530,7 @@
15301531 </tr>\
15311532 </table>\
15321533 </div>\
1533 - </div>',
 1534+ </div></div>',
15341535 init: function() {
15351536 $j(this).find( '[rel]' ).each( function() {
15361537 $j(this).text( gM( $j(this).attr( 'rel' ) ) );
@@ -1581,7 +1582,7 @@
15821583 },
15831584 dialog: {
15841585 resizable: false,
1585 - width: 500,
 1586+ width: 590,
15861587 buttons: {
15871588 'wikieditor-toolbar-tool-table-insert': function() {
15881589 var rowsVal = $j( '#wikieditor-toolbar-table-dimensions-rows' ).val();
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js
@@ -62,10 +62,13 @@
6363 context.modules.toc.$toc.find( 'div' ).autoEllipsis( { 'position': 'right', 'tooltip': true, 'restoreText': true } );
6464 }
6565 // reset the height of the TOC
66 - context.modules.toc.$toc.height(
67 - context.$ui.find( '.wikiEditor-ui-left' ).height() -
68 - context.$ui.find( '.tab-toc' ).outerHeight()
69 - );
 66+ if ( !context.modules.toc.$toc.data( 'collapsed' ) ){
 67+ context.modules.toc.$toc.height(
 68+ context.$ui.find( '.wikiEditor-ui-left' ).height() -
 69+ context.$ui.find( '.tab-toc' ).outerHeight()
 70+ );
 71+ }
 72+
7073 // store the width of the view for comparison on next resize
7174 context.modules.toc.$toc.data( 'previousWidth', context.$wikitext.width() );
7275 },
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -8704,10 +8704,13 @@
87058705 context.modules.toc.$toc.find( 'div' ).autoEllipsis( { 'position': 'right', 'tooltip': true, 'restoreText': true } );
87068706 }
87078707 // reset the height of the TOC
8708 - context.modules.toc.$toc.height(
8709 - context.$ui.find( '.wikiEditor-ui-left' ).height() -
8710 - context.$ui.find( '.tab-toc' ).outerHeight()
8711 - );
 8708+ if ( !context.modules.toc.$toc.data( 'collapsed' ) ){
 8709+ context.modules.toc.$toc.height(
 8710+ context.$ui.find( '.wikiEditor-ui-left' ).height() -
 8711+ context.$ui.find( '.tab-toc' ).outerHeight()
 8712+ );
 8713+ }
 8714+
87128715 // store the width of the view for comparison on next resize
87138716 context.modules.toc.$toc.data( 'previousWidth', context.$wikitext.width() );
87148717 },
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -581,8 +581,9 @@
582582 ranges.push(new Range(valueEndIndex,wikitext.length));this.ranges=ranges;this.wikitext=wikitext;this.params=params;this.paramsByName=paramsByName;this.templateNameIndex=templateNameIndex;}}};})(jQuery);(function($){$.wikiEditor.modules.toc={cfg:{defaultWidth:'166px',minimumWidth:'70px',textMinimumWidth:'450px',rtl:false},api:{},evt:{change:function(context,event){$.wikiEditor.modules.toc.fn.update(context);},ready:function(context,event){$.wikiEditor.modules.toc.fn.build(context);context.$content.parent().blur(function(){var context=event.data.context;$.wikiEditor.modules.toc.fn.unhighlight(context);});$.wikiEditor.modules.toc.evt.resize(context);},resize:function(context,event){var availableWidth=context.$wikitext.width()-parseFloat($.wikiEditor.modules.toc.cfg.textMinimumWidth),totalMinWidth=parseFloat($.wikiEditor.modules.toc.cfg.minimumWidth)+
583583 parseFloat($.wikiEditor.modules.toc.cfg.textMinimumWidth);context.$ui.find('.wikiEditor-ui-right').resizable('option','maxWidth',availableWidth);if(context.modules.toc.$toc.data('positionMode')!='disabled'&&context.$wikitext.width()<totalMinWidth){$.wikiEditor.modules.toc.fn.disable(context);}else if(context.modules.toc.$toc.data('positionMode')=='disabled'&&context.$wikitext.width()>totalMinWidth){$.wikiEditor.modules.toc.fn.enable(context);}else if(context.modules.toc.$toc.data('positionMode')=='regular'&&context.$ui.find('.wikiEditor-ui-right').width()>availableWidth){$.wikiEditor.modules.toc.fn.switchLayout(context);}else if(context.modules.toc.$toc.data('positionMode')=='goofy'&&context.modules.toc.$toc.data('previousWidth')<context.$wikitext.width()){$.wikiEditor.modules.toc.fn.switchLayout(context);}
584584 if(context.modules.toc.$toc.data('positionMode')=='goofy'){context.modules.toc.$toc.find('div').autoEllipsis({'position':'right','tooltip':true,'restoreText':true});}
585 -context.modules.toc.$toc.height(context.$ui.find('.wikiEditor-ui-left').height()-
586 -context.$ui.find('.tab-toc').outerHeight());context.modules.toc.$toc.data('previousWidth',context.$wikitext.width());},mark:function(context,event){var markers=context.modules.highlight.markers;var tokenArray=context.modules.highlight.tokenArray;var outline=context.data.outline=[];var h=0;for(var i=0;i<tokenArray.length;i++){if(tokenArray[i].label!='TOC_HEADER'){continue;}
 585+if(!context.modules.toc.$toc.data('collapsed')){context.modules.toc.$toc.height(context.$ui.find('.wikiEditor-ui-left').height()-
 586+context.$ui.find('.tab-toc').outerHeight());}
 587+context.modules.toc.$toc.data('previousWidth',context.$wikitext.width());},mark:function(context,event){var markers=context.modules.highlight.markers;var tokenArray=context.modules.highlight.tokenArray;var outline=context.data.outline=[];var h=0;for(var i=0;i<tokenArray.length;i++){if(tokenArray[i].label!='TOC_HEADER'){continue;}
587588 h++;markers.push({index:h,start:tokenArray[i].tokenStart,end:tokenArray[i].offset,anchor:'before',afterWrap:function(node){var marker=$(node).data('marker');$(node).addClass('wikiEditor-toc-header').addClass('wikiEditor-toc-section-'+marker.index).data('section',marker.index);},onSkip:function(node){var marker=$(node).data('marker');$(node).removeClass('wikiEditor-toc-section-'+$(node).data('section')).addClass('wikiEditor-toc-section-'+marker.index).data('section',marker.index);},getAnchor:function(ca1,ca2){return $(ca1.previousSibling).is('div.wikiEditor-toc-header')?ca1.previousSibling:null;}});outline.push({'text':tokenArray[i].match[2],'level':tokenArray[i].match[1].length,'index':h});}
588589 $.wikiEditor.modules.toc.fn.build(context);$.wikiEditor.modules.toc.fn.update(context);}},exp:[{'regex':/^(={1,6})([^\r\n]+?)\1\s*$/m,'label':'TOC_HEADER','markAfter':true}],fn:{create:function(context,config){if('$toc'in context.modules.toc){return;}
589590 $.wikiEditor.modules.toc.cfg.rtl=config.rtl;var height=context.$ui.find('.wikiEditor-ui-left').height();context.modules.toc.$toc=$('<div />').addClass('wikiEditor-ui-toc').data('context',context).data('positionMode','regular').data('collapsed',false);context.$ui.find('.wikiEditor-ui-right').append(context.modules.toc.$toc);context.modules.toc.$toc.height(context.$ui.find('.wikiEditor-ui-left').height());$.wikiEditor.modules.toc.fn.redraw(context,$.wikiEditor.modules.toc.cfg.defaultWidth);},redraw:function(context,fixedWidth){var fixedWidth=parseFloat(fixedWidth);if(context.modules.toc.$toc.data('positionMode')=='regular'){context.$ui.find('.wikiEditor-ui-right').css('width',fixedWidth+'px');context.$ui.find('.wikiEditor-ui-left').css('marginRight',(-1*fixedWidth)+'px').children().css('marginRight',fixedWidth+'px');}else if(context.modules.toc.$toc.data('positionMode')=='goofy'){context.$ui.find('.wikiEditor-ui-left').css('width',fixedWidth);context.$ui.find('.wikiEditor-ui-right').css($.wikiEditor.modules.toc.cfg.rtl?'right':'left',fixedWidth);context.$wikitext.css('height',context.$ui.find('.wikiEditor-ui-right').height());}},switchLayout:function(context){var width,height=context.$ui.find('.wikiEditor-ui-right').height();if(context.modules.toc.$toc.data('positionMode')=='regular'&&!context.modules.toc.$toc.data('collapsed')){context.modules.toc.$toc.data('positionMode','goofy');context.modules.toc.$toc.data('positionModeChangeAt',context.$ui.find('.wikiEditor-ui-right').width());width=$.wikiEditor.modules.toc.cfg.textMinimumWidth;context.$ui.find('.wikiEditor-ui-left').css({'marginRight':'','position':'absolute','float':'none','left':$.wikiEditor.modules.toc.cfg.rtl?'auto':0,'right':$.wikiEditor.modules.toc.cfg.rtl?0:'auto'}).children().css('marginRight','');context.$ui.find('.wikiEditor-ui-right').css({'width':'auto','position':'absolute','float':'none','right':$.wikiEditor.modules.toc.cfg.rtl?'auto':0,'left':$.wikiEditor.modules.toc.cfg.rtl?0:'auto'});context.$wikitext.css('position','relative');}else if(context.modules.toc.$toc.data('positionMode')=='goofy'){context.modules.toc.$toc.data('positionMode','regular');width=context.$wikitext.width()-context.$ui.find('.wikiEditor-ui-left').width();if(width>context.modules.toc.$toc.data('positionModeChangeAt')){width=context.modules.toc.$toc.data('positionModeChangeAt');}

Status & tagging log