Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -26,15 +26,15 @@ |
27 | 27 | array( 'src' => 'css/wikiEditor.preview.css', 'version' => 1 ), |
28 | 28 | array( 'src' => 'css/wikiEditor.templateEditor.css', 'version' => 1 ), |
29 | 29 | array( 'src' => 'css/wikiEditor.toc.css', 'version' => 26 ), |
30 | | - array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 8 ), |
| 30 | + array( 'src' => 'css/wikiEditor.toolbar.css', 'version' => 9 ), |
31 | 31 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
32 | 32 | ), |
33 | 33 | 'combined' => array( |
34 | | - array( 'src' => 'css/combined.css', 'version' => 48 ), |
| 34 | + array( 'src' => 'css/combined.css', 'version' => 49 ), |
35 | 35 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
36 | 36 | ), |
37 | 37 | 'minified' => array( |
38 | | - array( 'src' => 'css/combined.min.css', 'version' => 48 ), |
| 38 | + array( 'src' => 'css/combined.min.css', 'version' => 49 ), |
39 | 39 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
40 | 40 | ), |
41 | 41 | ) |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 22 ), |
88 | 88 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 44 ), |
89 | 89 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 12 ), |
90 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 40 ), |
| 90 | + array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 41 ), |
91 | 91 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 10 ), |
92 | 92 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 61 ), |
93 | 93 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 9 ), |
— | — | @@ -94,10 +94,10 @@ |
95 | 95 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 1 ), |
96 | 96 | ), |
97 | 97 | 'combined' => array( |
98 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 141 ), |
| 98 | + array( 'src' => 'js/plugins.combined.js', 'version' => 142 ), |
99 | 99 | ), |
100 | 100 | 'minified' => array( |
101 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 141 ), |
| 101 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 142 ), |
102 | 102 | ), |
103 | 103 | ), |
104 | 104 | ); |
Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.toolbar.css |
— | — | @@ -345,9 +345,12 @@ |
346 | 346 | text-decoration: none; |
347 | 347 | border-color: #a8d7f9; |
348 | 348 | } |
| 349 | +.ui-widget table td.wikieditor-toolbar-table-preview-wrapper span { |
| 350 | + padding: 4px 6px 0px; |
| 351 | + display: block; |
| 352 | +} |
349 | 353 | .ui-widget table .wikieditor-toolbar-table-preview-frame { |
350 | 354 | width: 340px; |
351 | | - height: 250px; |
352 | 355 | background: #fff; |
353 | 356 | padding: 10px; |
354 | 357 | border: 1px solid #cdcdcd; |
— | — | @@ -358,8 +361,6 @@ |
359 | 362 | .ui-widget table .wikieditor-toolbar-table-preview-content { |
360 | 363 | width: 375px; |
361 | 364 | display: block; |
362 | | - position: absolute; |
363 | | - top: -29px; |
364 | 365 | } |
365 | 366 | .ui-widget table .wikieditor-toolbar-table-preview { |
366 | 367 | width: 340px; |
Index: trunk/extensions/UsabilityInitiative/css/combined.css |
— | — | @@ -815,9 +815,12 @@ |
816 | 816 | text-decoration: none; |
817 | 817 | border-color: #a8d7f9; |
818 | 818 | } |
| 819 | +.ui-widget table td.wikieditor-toolbar-table-preview-wrapper span { |
| 820 | + padding: 4px 6px 0px; |
| 821 | + display: block; |
| 822 | +} |
819 | 823 | .ui-widget table .wikieditor-toolbar-table-preview-frame { |
820 | 824 | width: 340px; |
821 | | - height: 250px; |
822 | 825 | background: #fff; |
823 | 826 | padding: 10px; |
824 | 827 | border: 1px solid #cdcdcd; |
— | — | @@ -828,8 +831,6 @@ |
829 | 832 | .ui-widget table .wikieditor-toolbar-table-preview-content { |
830 | 833 | width: 375px; |
831 | 834 | display: block; |
832 | | - position: absolute; |
833 | | - top: -29px; |
834 | 835 | } |
835 | 836 | .ui-widget table .wikieditor-toolbar-table-preview { |
836 | 837 | width: 340px; |
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -767,9 +767,12 @@ |
768 | 768 | text-decoration:none; |
769 | 769 | border-color:#a8d7f9; |
770 | 770 | } |
| 771 | +.ui-widget table td.wikieditor-toolbar-table-preview-wrapper span{ |
| 772 | +padding:4px 6px 0px; |
| 773 | +display:block; |
| 774 | +} |
771 | 775 | .ui-widget table .wikieditor-toolbar-table-preview-frame{ |
772 | 776 | width:340px; |
773 | | -height:250px; |
774 | 777 | background:#fff; |
775 | 778 | padding:10px; |
776 | 779 | border:1px solid #cdcdcd; |
— | — | @@ -780,8 +783,6 @@ |
781 | 784 | .ui-widget table .wikieditor-toolbar-table-preview-content{ |
782 | 785 | width:375px; |
783 | 786 | display:block; |
784 | | -position:absolute; |
785 | | -top:-29px; |
786 | 787 | } |
787 | 788 | .ui-widget table .wikieditor-toolbar-table-preview{ |
788 | 789 | width:340px; |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -1167,6 +1167,7 @@ |
1168 | 1168 | }); |
1169 | 1169 | }, |
1170 | 1170 | dialog: { |
| 1171 | + resizable: false, |
1171 | 1172 | width: 500, |
1172 | 1173 | buttons: { |
1173 | 1174 | 'wikieditor-toolbar-tool-link-insert': function() { |
— | — | @@ -1340,7 +1341,6 @@ |
1341 | 1342 | <span rel="wikieditor-toolbar-tool-table-example"></span>\ |
1342 | 1343 | <div class="wikieditor-toolbar-table-preview-frame">\ |
1343 | 1344 | <div class="wikieditor-toolbar-table-preview-content">\ |
1344 | | - <span rel="wikieditor-toolbar-tool-table-example-text"></span>\ |
1345 | 1345 | <table id="wikieditor-toolbar-table-preview" class="wikieditor-toolbar-table-preview wikitable">\ |
1346 | 1346 | <tr class="wikieditor-toolbar-table-preview-header">\ |
1347 | 1347 | <th rel="wikieditor-toolbar-tool-table-example-header"></th>\ |
— | — | @@ -1433,6 +1433,7 @@ |
1434 | 1434 | |
1435 | 1435 | }, |
1436 | 1436 | dialog: { |
| 1437 | + resizable: false, |
1437 | 1438 | buttons: { |
1438 | 1439 | 'wikieditor-toolbar-tool-table-insert': function() { |
1439 | 1440 | var rowsVal = $j( '#wikieditor-toolbar-table-dimensions-rows' ).val(); |
— | — | @@ -1639,6 +1640,8 @@ |
1640 | 1641 | }); |
1641 | 1642 | }, |
1642 | 1643 | dialog: { |
| 1644 | + resizable: false, |
| 1645 | + width: 500, |
1643 | 1646 | buttons: { |
1644 | 1647 | 'wikieditor-toolbar-tool-replace-button-findnext': function( e ) { |
1645 | 1648 | $j(this).closest( '.ui-dialog' ).data( 'dialogaction', e.target ); |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -54,7 +54,7 @@ |
55 | 55 | updateExistence();});$j('#wikieditor-toolbar-link-int-target').data('suggcache',{}).suggestions({fetch:function(query){var that=this;var title=$j(this).val();if(isExternalLink(title)||title.indexOf('|')!=-1||title==''){$j(this).suggestions('suggestions',[]);return;} |
56 | 56 | var cache=$j(this).data('suggcache');if(typeof cache[title]!='undefined'){$j(this).suggestions('suggestions',cache[title]);return;} |
57 | 57 | var request=$j.ajax({url:wgScriptPath+'/api.php',data:{'action':'opensearch','search':title,'namespace':0,'suggest':'','format':'json'},dataType:'json',success:function(data){cache[title]=data[1];$j(that).suggestions('suggestions',data[1]);}});$j(this).data('request',request);},cancel:function(){var request=$j(this).data('request');if(request) |
58 | | -request.abort();}});},dialog:{width:500,buttons:{'wikieditor-toolbar-tool-link-insert':function(){function escapeInternalText(s){return s.replace(/(]{2,})/g,'<nowiki>$1</nowiki>');} |
| 58 | +request.abort();}});},dialog:{resizable:false,width:500,buttons:{'wikieditor-toolbar-tool-link-insert':function(){function escapeInternalText(s){return s.replace(/(]{2,})/g,'<nowiki>$1</nowiki>');} |
59 | 59 | function escapeExternalTarget(s){return s.replace(/ /g,'%20').replace(/]/g,'%5D');} |
60 | 60 | function escapeExternalText(s){return s.replace(/(]+)/g,'<nowiki>$1</nowiki>');} |
61 | 61 | var insertText='';var whitespace=$j('#wikieditor-toolbar-link-dialog').data('whitespace');var target=$j('#wikieditor-toolbar-link-int-target').val();var text=$j('#wikieditor-toolbar-link-int-text').val();if(target==''){alert(gM('wikieditor-toolbar-tool-link-empty'));return;} |
— | — | @@ -83,7 +83,6 @@ |
84 | 84 | <span rel="wikieditor-toolbar-tool-table-example"></span>\ |
85 | 85 | <div class="wikieditor-toolbar-table-preview-frame">\ |
86 | 86 | <div class="wikieditor-toolbar-table-preview-content">\ |
87 | | - <span rel="wikieditor-toolbar-tool-table-example-text"></span>\ |
88 | 87 | <table id="wikieditor-toolbar-table-preview" class="wikieditor-toolbar-table-preview wikitable">\ |
89 | 88 | <tr class="wikieditor-toolbar-table-preview-header">\ |
90 | 89 | <th rel="wikieditor-toolbar-tool-table-example-header"></th>\ |
— | — | @@ -127,7 +126,7 @@ |
128 | 127 | <input type="text" id="wikieditor-toolbar-table-dimensions-columns" size="4" />\ |
129 | 128 | </td></tr></table></fieldset>',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') |
130 | 129 | 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') |
131 | | -ts_makeSortable($j('#wikieditor-toolbar-table-preview, #wikieditor-toolbar-table-preview2').filter('.sortable').get(0));});},dialog:{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;} |
| 130 | +ts_makeSortable($j('#wikieditor-toolbar-table-preview, #wikieditor-toolbar-table-preview2').filter('.sortable').get(0));});},dialog:{resizable:false,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;} |
132 | 131 | if(rows+header==0||cols==0){alert(gM('wikieditor-toolbar-tool-table-zero'));return;} |
133 | 132 | if(rows*cols>1000){alert(gM('wikieditor-toolbar-tool-table-toomany',1000));return;} |
134 | 133 | 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;} |
— | — | @@ -167,6 +166,6 @@ |
168 | 167 | matches=text.match(regex);if(!matches) |
169 | 168 | $j('#wikieditor-toolbar-replace-nomatch').show();else if(mode=='replaceAll'){var start=text.lastIndexOf(matches[matches.length-1]);var end=start+replaceStr.length;var replaced=text.replace(regex,replaceStr);var corr=replaced.length-text.length-replaceStr.length+matches[matches.length-1].length;$textarea.val(replaced).change().focus().textSelection('setSelection',{'start':start+corr,'end':end+corr}).textSelection('scrollToCaretPosition');$j('#wikieditor-toolbar-replace-success').text(gM('wikieditor-toolbar-tool-replace-success',matches.length)).show();$j(this).data('offset',0);}else{var start=text.indexOf(matches[0],$j(this).data('offset'));if(start==-1) |
170 | 169 | start=text.indexOf(matches[0]);var end=start+matches[0].length;var newEnd=start+replaceStr.length;$textarea.focus().textSelection('setSelection',{'start':start,'end':end});if(mode=='replace'){$textarea.textSelection('encapsulateSelection',{'peri':replaceStr,'replace':true}).textSelection('setSelection',{'start':start,'end':newEnd});} |
171 | | -$textarea.textSelection('scrollToCaretPosition');$j(this).data('offset',mode=='replace'?newEnd:end);}});},dialog:{buttons:{'wikieditor-toolbar-tool-replace-button-findnext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'find');},'wikieditor-toolbar-tool-replace-button-replacenext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replace');},'wikieditor-toolbar-tool-replace-button-replaceall':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replaceAll');},'wikieditor-toolbar-tool-replace-close':function(){$j(this).dialog('close');}},open:function(){$j(this).data('offset',0);$j('#wikieditor-toolbar-replace-search').focus();$j('#wikieditor-toolbar-replace-nomatch, #wikieditor-toolbar-replace-success, #wikieditor-toolbar-replace-emptysearch, #wikieditor-toolbar-replace-invalidregex').hide();if(!($j(this).data('onetimeonlystuff'))){$j(this).data('onetimeonlystuff',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);});} |
| 170 | +$textarea.textSelection('scrollToCaretPosition');$j(this).data('offset',mode=='replace'?newEnd:end);}});},dialog:{resizable:false,width:500,buttons:{'wikieditor-toolbar-tool-replace-button-findnext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'find');},'wikieditor-toolbar-tool-replace-button-replacenext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replace');},'wikieditor-toolbar-tool-replace-button-replaceall':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replaceAll');},'wikieditor-toolbar-tool-replace-close':function(){$j(this).dialog('close');}},open:function(){$j(this).data('offset',0);$j('#wikieditor-toolbar-replace-search').focus();$j('#wikieditor-toolbar-replace-nomatch, #wikieditor-toolbar-replace-success, #wikieditor-toolbar-replace-emptysearch, #wikieditor-toolbar-replace-invalidregex').hide();if(!($j(this).data('onetimeonlystuff'))){$j(this).data('onetimeonlystuff',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);});} |
172 | 171 | var dialog=$j(this).closest('.ui-dialog');$j(this).data('context').$textarea.bind('keypress.srdialog',function(e){if((e.keyCode||e.which)==13){var button=dialog.data('dialogaction')||dialog.find('button:first');button.click();e.preventDefault();}});},close:function(){$j(this).data('context').$textarea.unbind('keypress.srdialog').focus();$j(this).closest('.ui-dialog').data('dialogaction',false);}}}}});}});mw.ready(function(){if(!wgWikiEditorEnabledModules.templateEditor){return true;} |
173 | 172 | if($j.fn.wikiEditor){$j('textarea#wpTextbox1').wikiEditor('addModule','templateEditor');}}); |
\ No newline at end of file |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js |
— | — | @@ -1118,6 +1118,7 @@ |
1119 | 1119 | }); |
1120 | 1120 | }, |
1121 | 1121 | dialog: { |
| 1122 | + resizable: false, |
1122 | 1123 | width: 500, |
1123 | 1124 | buttons: { |
1124 | 1125 | 'wikieditor-toolbar-tool-link-insert': function() { |
— | — | @@ -1291,7 +1292,6 @@ |
1292 | 1293 | <span rel="wikieditor-toolbar-tool-table-example"></span>\ |
1293 | 1294 | <div class="wikieditor-toolbar-table-preview-frame">\ |
1294 | 1295 | <div class="wikieditor-toolbar-table-preview-content">\ |
1295 | | - <span rel="wikieditor-toolbar-tool-table-example-text"></span>\ |
1296 | 1296 | <table id="wikieditor-toolbar-table-preview" class="wikieditor-toolbar-table-preview wikitable">\ |
1297 | 1297 | <tr class="wikieditor-toolbar-table-preview-header">\ |
1298 | 1298 | <th rel="wikieditor-toolbar-tool-table-example-header"></th>\ |
— | — | @@ -1384,6 +1384,7 @@ |
1385 | 1385 | |
1386 | 1386 | }, |
1387 | 1387 | dialog: { |
| 1388 | + resizable: false, |
1388 | 1389 | buttons: { |
1389 | 1390 | 'wikieditor-toolbar-tool-table-insert': function() { |
1390 | 1391 | var rowsVal = $j( '#wikieditor-toolbar-table-dimensions-rows' ).val(); |
— | — | @@ -1590,6 +1591,8 @@ |
1591 | 1592 | }); |
1592 | 1593 | }, |
1593 | 1594 | dialog: { |
| 1595 | + resizable: false, |
| 1596 | + width: 500, |
1594 | 1597 | buttons: { |
1595 | 1598 | 'wikieditor-toolbar-tool-replace-button-findnext': function( e ) { |
1596 | 1599 | $j(this).closest( '.ui-dialog' ).data( 'dialogaction', e.target ); |