Index: branches/usability/acaifix/UsabilityInitiative.hooks.php |
— | — | @@ -67,15 +67,15 @@ |
68 | 68 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 6 ), |
69 | 69 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 17 ), |
70 | 70 | 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 ), |
72 | 72 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 8 ), |
73 | 73 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 27 ), |
74 | 74 | ), |
75 | 75 | 'combined' => array( |
76 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 60 ), |
| 76 | + array( 'src' => 'js/plugins.combined.js', 'version' => 61 ), |
77 | 77 | ), |
78 | 78 | 'minified' => array( |
79 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 60 ), |
| 79 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 61 ), |
80 | 80 | ), |
81 | 81 | ), |
82 | 82 | ); |
Index: branches/usability/acaifix/EditToolbar/EditToolbar.js |
— | — | @@ -149,9 +149,11 @@ |
150 | 150 | action: { |
151 | 151 | type: 'replace', |
152 | 152 | options: { |
| 153 | + pre: '==', |
153 | 154 | 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" |
156 | 158 | } |
157 | 159 | } |
158 | 160 | }, |
— | — | @@ -160,9 +162,11 @@ |
161 | 163 | action: { |
162 | 164 | type: 'replace', |
163 | 165 | options: { |
| 166 | + pre: '===', |
164 | 167 | 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" |
167 | 171 | } |
168 | 172 | } |
169 | 173 | }, |
— | — | @@ -171,9 +175,11 @@ |
172 | 176 | action: { |
173 | 177 | type: 'replace', |
174 | 178 | options: { |
| 179 | + pre: '====', |
175 | 180 | 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" |
178 | 184 | } |
179 | 185 | } |
180 | 186 | }, |
— | — | @@ -182,9 +188,11 @@ |
183 | 189 | action: { |
184 | 190 | type: 'replace', |
185 | 191 | options: { |
| 192 | + pre: '=====', |
186 | 193 | 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" |
189 | 197 | } |
190 | 198 | } |
191 | 199 | } |
Property changes on: branches/usability/acaifix/EditToolbar/EditToolbar.js |
___________________________________________________________________ |
Name: svn:mergeinfo |
192 | 200 | - /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 |
193 | 201 | + /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 @@ |
20 | 20 | /* Configuration */ |
21 | 21 | |
22 | 22 | // Bump the version number every time you change any of the .css/.js files |
23 | | -$wgEditToolbarStyleVersion = 72; |
| 23 | +$wgEditToolbarStyleVersion = 73; |
24 | 24 | |
25 | 25 | // Set this to true to simply override the stock toolbar for everyone |
26 | 26 | $wgEditToolbarGlobalEnable = false; |
Index: branches/usability/acaifix/js/plugins/jquery.wikiEditor.toolbar.js |
— | — | @@ -222,11 +222,12 @@ |
223 | 223 | parts[part] = ( action.options[part] || '' ) |
224 | 224 | } |
225 | 225 | } |
226 | | - if ( 'periRegex' in action.options && 'periRegexReplace' in action.options ) { |
| 226 | + if ( 'regex' in action.options && 'regexReplace' in action.options ) { |
227 | 227 | 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 = ''; |
231 | 232 | } |
232 | 233 | } |
233 | 234 | context.$textarea.encapsulateSelection( |
Property changes on: branches/usability/acaifix/js/plugins/jquery.wikiEditor.toolbar.js |
___________________________________________________________________ |
Name: svn:mergeinfo |
234 | 235 | - /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 |
235 | 236 | + /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 @@ |
1755 | 1755 | parts[part] = ( action.options[part] || '' ) |
1756 | 1756 | } |
1757 | 1757 | } |
1758 | | - if ( 'periRegex' in action.options && 'periRegexReplace' in action.options ) { |
| 1758 | + if ( 'regex' in action.options && 'regexReplace' in action.options ) { |
1759 | 1759 | 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 = ''; |
1763 | 1764 | } |
1764 | 1765 | } |
1765 | 1766 | context.$textarea.encapsulateSelection( |
Index: branches/usability/acaifix/js/plugins.combined.min.js |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | step=step.parent();} |
113 | 113 | rels.reverse();var id=rels.join('.');$.trackAction(id);} |
114 | 114 | 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='';}} |
116 | 116 | 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);} |
117 | 117 | 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>')} |
118 | 118 | if('tools'in group){for(tool in group.tools){$group.append($.wikiEditor.modules.toolbar.fn.buildTool(context,tool,group.tools[tool]));}} |