r58925 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58924‎ | r58925 | r58926 >
Date:20:14, 11 November 2009
Author:catrope
Status:deferred
Tags:
Comment:
usability: Merge r58923 (header dropdown fix) from trunk to acaifix
Modified paths:
  • /branches/usability/acaifix/EditToolbar/EditToolbar.js (modified) (history)
  • /branches/usability/acaifix/EditToolbar/EditToolbar.php (modified) (history)
  • /branches/usability/acaifix/UsabilityInitiative.hooks.php (modified) (history)
  • /branches/usability/acaifix/js/plugins.combined.js (modified) (history)
  • /branches/usability/acaifix/js/plugins.combined.min.js (modified) (history)
  • /branches/usability/acaifix/js/plugins/jquery.wikiEditor.toolbar.js (modified) (history)

Diff [purge]

Index: branches/usability/acaifix/UsabilityInitiative.hooks.php
@@ -67,15 +67,15 @@
6868 array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 6 ),
6969 array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 17 ),
7070 array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 12 ),
71 - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 18 ),
 71+ array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 19 ),
7272 array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 8 ),
7373 array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 27 ),
7474 ),
7575 'combined' => array(
76 - array( 'src' => 'js/plugins.combined.js', 'version' => 60 ),
 76+ array( 'src' => 'js/plugins.combined.js', 'version' => 61 ),
7777 ),
7878 'minified' => array(
79 - array( 'src' => 'js/plugins.combined.min.js', 'version' => 60 ),
 79+ array( 'src' => 'js/plugins.combined.min.js', 'version' => 61 ),
8080 ),
8181 ),
8282 );
Index: branches/usability/acaifix/EditToolbar/EditToolbar.js
@@ -149,9 +149,11 @@
150150 action: {
151151 type: 'replace',
152152 options: {
 153+ pre: '==',
153154 periMsg: 'edittoolbar-tool-heading-example',
154 - periRegex: /^(\s*)(={1,6})(.*?)\2(\s*)$/,
155 - periRegexReplace: "\$1==\$3==\$4"
 155+ post: '==',
 156+ regex: /^(\s*)(={0,6})(.*?)\2(\s*)$/,
 157+ regexReplace: "\$1==\$3==\$4"
156158 }
157159 }
158160 },
@@ -160,9 +162,11 @@
161163 action: {
162164 type: 'replace',
163165 options: {
 166+ pre: '===',
164167 periMsg: 'edittoolbar-tool-heading-example',
165 - periRegex: /^(\s*)(={1,6})(.*?)\2(\s*)$/,
166 - periRegexReplace: "\$1===\$3===\$4"
 168+ post: '===',
 169+ regex: /^(\s*)(={0,6})(.*?)\2(\s*)$/,
 170+ regexReplace: "\$1===\$3===\$4"
167171 }
168172 }
169173 },
@@ -171,9 +175,11 @@
172176 action: {
173177 type: 'replace',
174178 options: {
 179+ pre: '====',
175180 periMsg: 'edittoolbar-tool-heading-example',
176 - periRegex: /^(\s*)(={1,6})(.*?)\2(\s*)$/,
177 - periRegexReplace: "\$1====\$3====\$4"
 181+ post: '====',
 182+ regex: /^(\s*)(={0,6})(.*?)\2(\s*)$/,
 183+ regexReplace: "\$1====\$3====\$4"
178184 }
179185 }
180186 },
@@ -182,9 +188,11 @@
183189 action: {
184190 type: 'replace',
185191 options: {
 192+ pre: '=====',
186193 periMsg: 'edittoolbar-tool-heading-example',
187 - periRegex: /^(\s*)(={1,6})(.*?)\2(\s*)$/,
188 - periRegexReplace: "\$1=====\$3=====\$4"
 194+ post: '=====',
 195+ regex: /^(\s*)(={0,6})(.*?)\2(\s*)$/,
 196+ regexReplace: "\$1=====\$3=====\$4"
189197 }
190198 }
191199 }
Property changes on: branches/usability/acaifix/EditToolbar/EditToolbar.js
___________________________________________________________________
Name: svn:mergeinfo
192200 - /branches/REL1_15/phase3/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js:51646
/trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js:56151-57234
/trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js:58873
/trunk/phase3/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447
193201 + /branches/REL1_15/phase3/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js:51646
/trunk/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js:56151-57234
/trunk/extensions/UsabilityInitiative/WikiEditor/Modules/Toolbar/Toolbar.js:58873,58923
/trunk/phase3/extensions/UsabilityInitiative/EditToolbar/EditToolbar.js:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447
Index: branches/usability/acaifix/EditToolbar/EditToolbar.php
@@ -19,7 +19,7 @@
2020 /* Configuration */
2121
2222 // Bump the version number every time you change any of the .css/.js files
23 -$wgEditToolbarStyleVersion = 72;
 23+$wgEditToolbarStyleVersion = 73;
2424
2525 // Set this to true to simply override the stock toolbar for everyone
2626 $wgEditToolbarGlobalEnable = false;
Index: branches/usability/acaifix/js/plugins/jquery.wikiEditor.toolbar.js
@@ -222,11 +222,12 @@
223223 parts[part] = ( action.options[part] || '' )
224224 }
225225 }
226 - if ( 'periRegex' in action.options && 'periRegexReplace' in action.options ) {
 226+ if ( 'regex' in action.options && 'regexReplace' in action.options ) {
227227 var selection = context.$textarea.getSelection();
228 - if ( selection != '' ) {
229 - parts.peri = selection.replace( action.options.periRegex,
230 - action.options.periRegexReplace );
 228+ if ( selection != '' && selection.match( action.options.regex ) ) {
 229+ parts.peri = selection.replace( action.options.regex,
 230+ action.options.regexReplace );
 231+ parts.pre = parts.post = '';
231232 }
232233 }
233234 context.$textarea.encapsulateSelection(
Property changes on: branches/usability/acaifix/js/plugins/jquery.wikiEditor.toolbar.js
___________________________________________________________________
Name: svn:mergeinfo
234235 - /branches/REL1_15/phase3/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js:51646
/trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js:56151-57234,57443
/trunk/phase3/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447
235236 + /branches/REL1_15/phase3/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js:51646
/trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js:56151-57234,57443,58923
/trunk/phase3/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447
Index: branches/usability/acaifix/js/plugins.combined.js
@@ -1754,11 +1754,12 @@
17551755 parts[part] = ( action.options[part] || '' )
17561756 }
17571757 }
1758 - if ( 'periRegex' in action.options && 'periRegexReplace' in action.options ) {
 1758+ if ( 'regex' in action.options && 'regexReplace' in action.options ) {
17591759 var selection = context.$textarea.getSelection();
1760 - if ( selection != '' ) {
1761 - parts.peri = selection.replace( action.options.periRegex,
1762 - action.options.periRegexReplace );
 1760+ if ( selection != '' && selection.match( action.options.regex ) ) {
 1761+ parts.peri = selection.replace( action.options.regex,
 1762+ action.options.regexReplace );
 1763+ parts.pre = parts.post = '';
17631764 }
17641765 }
17651766 context.$textarea.encapsulateSelection(
Index: branches/usability/acaifix/js/plugins.combined.min.js
@@ -111,7 +111,7 @@
112112 step=step.parent();}
113113 rels.reverse();var id=rels.join('.');$.trackAction(id);}
114114 switch(action.type){case'replace':case'encapsulate':var parts={'pre':'','peri':'','post':''};for(part in parts){if(part+'Msg'in action.options){parts[part]=gM(action.options[part+'Msg'],(action.options[part]||null));}else{parts[part]=(action.options[part]||'')}}
115 -if('periRegex'in action.options&&'periRegexReplace'in action.options){var selection=context.$textarea.getSelection();if(selection!=''){parts.peri=selection.replace(action.options.periRegex,action.options.periRegexReplace);}}
 115+if('regex'in action.options&&'regexReplace'in action.options){var selection=context.$textarea.getSelection();if(selection!=''&&selection.match(action.options.regex)){parts.peri=selection.replace(action.options.regex,action.options.regexReplace);parts.pre=parts.post='';}}
116116 context.$textarea.encapsulateSelection(parts.pre,parts.peri,parts.post,action.options.ownline,action.type=='replace');break;case'callback':if(typeof action.execute=='function'){action.execute(context);}
117117 break;case'dialog':context.$textarea.wikiEditor('openDialog',{'dialog':action.module});break;default:break;}},buildGroup:function(context,id,group){var $group=$('<div />').attr({'class':'group group-'+id,'rel':id});var label=$.wikiEditor.autoMsg(group,'label');if(label){$group.append('<div class="label">'+label+'</div>')}
118118 if('tools'in group){for(tool in group.tools){$group.append($.wikiEditor.modules.toolbar.fn.buildTool(context,tool,group.tools[tool]));}}

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r58923UsabilityIntiative: Toolbar: Fix header dropdown per bug 21476 comment #2catrope19:55, 11 November 2009

Status & tagging log