Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -66,17 +66,17 @@ |
67 | 67 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 14 ), |
68 | 68 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 7 ), |
69 | 69 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 11 ), |
70 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 3 ), |
| 70 | + array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 4 ), |
71 | 71 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 13 ), |
72 | 72 | // FIXME: jQuery UI doesn't belong here, should move to no_js2 |
73 | 73 | // once we figure out how to do jQuery UI properly in JS2 |
74 | 74 | array( 'src' => 'js/js2/jquery-ui-1.7.2.js', 'version' => '1.7.2y' ), |
75 | 75 | ), |
76 | 76 | 'combined' => array( |
77 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 33 ), |
| 77 | + array( 'src' => 'js/plugins.combined.js', 'version' => 34 ), |
78 | 78 | ), |
79 | 79 | 'minified' => array( |
80 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 33 ), |
| 80 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 34 ), |
81 | 81 | ), |
82 | 82 | ), |
83 | 83 | ); |
Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js |
— | — | @@ -760,19 +760,19 @@ |
761 | 761 | <div id="edittoolbar-link-dialog-tab-int"><fieldset><table><tr>\ |
762 | 762 | <td><label for="edittoolbar-link-int-target" rel="edittoolbar-tool-link-int-target"></label></td>\ |
763 | 763 | <td>\ |
764 | | - <input type="text" id="edittoolbar-link-int-target" />\ |
| 764 | + <input type="text" id="edittoolbar-link-int-target" size="50" />\ |
765 | 765 | <div id="edittoolbar-link-int-target-status" style="display: inline;"></div>\ |
766 | 766 | </td>\ |
767 | 767 | </tr><tr>\ |
768 | 768 | <td><label for="edittoolbar-link-int-text" rel="edittoolbar-tool-link-int-text"></label></td>\ |
769 | | - <td><input type="text" id="edittoolbar-link-int-text" /></td>\ |
| 769 | + <td><input type="text" id="edittoolbar-link-int-text" size="50" /></td>\ |
770 | 770 | </table></fieldset></div>\ |
771 | 771 | <div id="edittoolbar-link-dialog-tab-ext"><fieldset><table><tr>\ |
772 | 772 | <td><label for="edittoolbar-link-ext-target" rel="edittoolbar-tool-link-ext-target"></label></td>\ |
773 | | - <td><input type="text" id="edittoolbar-link-ext-target" /></td>\ |
| 773 | + <td><input type="text" id="edittoolbar-link-ext-target" size="50" /></td>\ |
774 | 774 | </tr><tr>\ |
775 | 775 | <td><label for="edittoolbar-link-ext-text" rel="edittoolbar-tool-link-ext-text"></label></td>\ |
776 | | - <td><input type="text" id="edittoolbar-link-ext-text" /></td>\ |
| 776 | + <td><input type="text" id="edittoolbar-link-ext-text" size="50" /></td>\ |
777 | 777 | </table></fieldset></div>\ |
778 | 778 | </div>', |
779 | 779 | init: function() { |
Index: trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | /* Configuration */ |
21 | 21 | |
22 | 22 | // Bump the version number every time you change any of the .css/.js files |
23 | | -$wgEditToolbarStyleVersion = 46; |
| 23 | +$wgEditToolbarStyleVersion = 47; |
24 | 24 | |
25 | 25 | // Set this to true to simply override the stock toolbar for everyone |
26 | 26 | $wgEditToolbarGlobalEnable = false; |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.dialogs.js |
— | — | @@ -100,6 +100,7 @@ |
101 | 101 | */ |
102 | 102 | resize: function() { |
103 | 103 | var wrapper = $(this).closest( '.ui-dialog' ); |
| 104 | + var oldWidth = wrapper.width(); |
104 | 105 | // Make sure elements don't wrapped so we get an accurate idea |
105 | 106 | // of whether they really fit. Also temporarily show hidden |
106 | 107 | // elements. |
— | — | @@ -122,6 +123,9 @@ |
123 | 124 | $(this).width( $(this).get(0).scrollWidth ); |
124 | 125 | wrapper.width( wrapper.get(0).scrollWidth ); |
125 | 126 | $(this).dialog( { 'width': wrapper.width() } ); |
| 127 | + wrapper.css( 'left', |
| 128 | + parseInt( wrapper.css( 'left' ) ) - |
| 129 | + ( wrapper.width() - oldWidth ) / 2 ); |
126 | 130 | } |
127 | 131 | |
128 | 132 | $(this).css( 'white-space', oldWS ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -1407,6 +1407,7 @@ |
1408 | 1408 | */ |
1409 | 1409 | resize: function() { |
1410 | 1410 | var wrapper = $(this).closest( '.ui-dialog' ); |
| 1411 | + var oldWidth = wrapper.width(); |
1411 | 1412 | // Make sure elements don't wrapped so we get an accurate idea |
1412 | 1413 | // of whether they really fit. Also temporarily show hidden |
1413 | 1414 | // elements. |
— | — | @@ -1429,6 +1430,9 @@ |
1430 | 1431 | $(this).width( $(this).get(0).scrollWidth ); |
1431 | 1432 | wrapper.width( wrapper.get(0).scrollWidth ); |
1432 | 1433 | $(this).dialog( { 'width': wrapper.width() } ); |
| 1434 | + wrapper.css( 'left', |
| 1435 | + parseInt( wrapper.css( 'left' ) ) - |
| 1436 | + ( wrapper.width() - oldWidth ) / 2 ); |
1433 | 1437 | } |
1434 | 1438 | |
1435 | 1439 | $(this).css( 'white-space', oldWS ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -89,7 +89,8 @@ |
90 | 90 | return $(this).data('wikiEditor-context',context);};})(jQuery);RegExp.escape=function(s){return s.replace(/([.*+?^${}()|\/\\[\]])/g,'\\$1');};(function($){$.wikiEditor.modules.dialogs={api:{addDialog:function(context,data){$.wikiEditor.modules.dialogs.fn.create(context,{'modules':data})},openDialog:function(context,data){if(data.dialog in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[data.dialog].id).dialog('open');}},closeDialog:function(context,data){if(data.dialog in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[data.dialog].id).dialog('close');}}},fn:{create:function(context,config){for(module in config){$.wikiEditor.modules.dialogs.modules[module]=config[module];} |
91 | 91 | for(module in $.wikiEditor.modules.dialogs.modules){var module=$.wikiEditor.modules.dialogs.modules[module];if($('#'+module.id).size()==0){var configuration=module.dialog;configuration.bgiframe=true;configuration.autoOpen=false;configuration.modal=true;configuration.title=$.wikiEditor.autoMsg(module,'title');configuration.newButtons={};for(msg in configuration.buttons) |
92 | 92 | configuration.newButtons[gM(msg)]=configuration.buttons[msg];configuration.buttons=configuration.newButtons;$('<div /> ').attr('id',module.id).html(module.html).data('context',context).appendTo($('body')).each(module.init).dialog(configuration).bind('dialogopen',$.wikiEditor.modules.dialogs.fn.resize).find('.ui-tabs').bind('tabsshow',function(){$(this).closest('.ui-dialog-content').each($.wikiEditor.modules.dialogs.fn.resize);});var maxTI=0;$j('[tabindex]').each(function(){var ti=parseInt($j(this).attr('tabindex'));if(ti>maxTI) |
93 | | -maxTI=ti;});var tabIndex=maxTI+1;$j('.ui-dialog input, .ui-dialog button').not('[tabindex]').each(function(){$j(this).attr('tabindex',tabIndex++);});}}},resize:function(){var wrapper=$(this).closest('.ui-dialog');var oldHidden=$(this).find('*').not(':visible');oldHidden.each(function(){$(this).data('oldstyle',$(this).attr('style'));});oldHidden.show();var oldWS=$(this).css('white-space');$(this).css('white-space','nowrap');if(wrapper.width()<=$(this).get(0).scrollWidth){$(this).width($(this).get(0).scrollWidth);wrapper.width(wrapper.get(0).scrollWidth);$(this).dialog({'width':wrapper.width()});} |
| 93 | +maxTI=ti;});var tabIndex=maxTI+1;$j('.ui-dialog input, .ui-dialog button').not('[tabindex]').each(function(){$j(this).attr('tabindex',tabIndex++);});}}},resize:function(){var wrapper=$(this).closest('.ui-dialog');var oldWidth=wrapper.width();var oldHidden=$(this).find('*').not(':visible');oldHidden.each(function(){$(this).data('oldstyle',$(this).attr('style'));});oldHidden.show();var oldWS=$(this).css('white-space');$(this).css('white-space','nowrap');if(wrapper.width()<=$(this).get(0).scrollWidth){$(this).width($(this).get(0).scrollWidth);wrapper.width(wrapper.get(0).scrollWidth);$(this).dialog({'width':wrapper.width()});wrapper.css('left',parseInt(wrapper.css('left'))- |
| 94 | +(wrapper.width()-oldWidth)/2);} |
94 | 95 | $(this).css('white-space',oldWS);oldHidden.each(function(){$(this).attr('style',$(this).data('oldstyle'));});}},'modules':{}};})(jQuery);(function($){$.wikiEditor.modules.toolbar={api:{addToToolbar:function(context,data){for(type in data){switch(type){case'sections':var $sections=context.modules.$toolbar.find('div.sections');var $tabs=context.modules.$toolbar.find('div.tabs');for(section in data[type]){if(section=='main'){context.modules.$toolbar.prepend($.wikiEditor.modules.toolbar.fn.buildSection(context,section,data[type][section]));continue;} |
95 | 96 | $sections.append($.wikiEditor.modules.toolbar.fn.buildSection(context,section,data[type][section]));$tabs.append($.wikiEditor.modules.toolbar.fn.buildTab(context,section,data[type][section]));} |
96 | 97 | break;case'groups':if(!('section'in data)){continue;} |