Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js |
— | — | @@ -1343,7 +1343,8 @@ |
1344 | 1344 | 'articlefeedbackv5-bucket5-form-panel-helpimprove-note', |
1345 | 1345 | { |
1346 | 1346 | href: mw.config.get( 'wgArticleFeedbackv5TermsPage' ), // TODO: Make this work |
1347 | | - text: 'articlefeedbackv5-bucket5-form-panel-helpimprove-privacy' |
| 1347 | + text: 'articlefeedbackv5-bucket5-form-panel-helpimprove-privacy', |
| 1348 | + target: '_blank' |
1348 | 1349 | } |
1349 | 1350 | ) ); |
1350 | 1351 | |
— | — | @@ -2168,25 +2169,46 @@ |
2169 | 2170 | if ( link1 ) { |
2170 | 2171 | full = full.replace( |
2171 | 2172 | /\$1/, |
2172 | | - mw.html.element( 'a', { href: link1.href }, mw.msg( link1.text ) |
| 2173 | + mw.html.element( 'a', $.articleFeedbackv5.attribs( link1 ), mw.msg( link1.text ) |
2173 | 2174 | ).toString() ); |
2174 | 2175 | } |
2175 | 2176 | if ( link2 ) { |
2176 | 2177 | full = full.replace( |
2177 | 2178 | /\$2/, |
2178 | | - mw.html.element( 'a', { href: link2.href }, mw.msg( link2.text ) |
| 2179 | + mw.html.element( 'a', $.articleFeedbackv5.attribs( link2 ), mw.msg( link2.text ) |
2179 | 2180 | ).toString() ); |
2180 | 2181 | } |
2181 | 2182 | if ( link3 ) { |
2182 | 2183 | full = full.replace( |
2183 | 2184 | /\$3/, |
2184 | | - mw.html.element( 'a', { href: link3.href }, mw.msg( link3.text ) |
| 2185 | + mw.html.element( 'a', $.articleFeedbackv5.attribs( link3 ), mw.msg( link3.text ) |
2185 | 2186 | ).toString() ); |
2186 | 2187 | } |
2187 | 2188 | return full; |
2188 | 2189 | }; |
2189 | 2190 | |
2190 | 2191 | // }}} |
| 2192 | + // {{{ attribs |
| 2193 | + |
| 2194 | + /** |
| 2195 | + * Utility method: Set up the attributes for a link (works with |
| 2196 | + * buildLink()) |
| 2197 | + * |
| 2198 | + * @param object link the first link, as { href: '#', text: 'click here'. |
| 2199 | + * other-attrib: 'whatever'} |
| 2200 | + * @return object the attributes |
| 2201 | + */ |
| 2202 | + $.articleFeedbackv5.attribs = function ( link ) { |
| 2203 | + var attr = {}; |
| 2204 | + for ( var k in link ) { |
| 2205 | + if ( 'text' != k ) { |
| 2206 | + attr[k] = link[k]; |
| 2207 | + } |
| 2208 | + } |
| 2209 | + return attr; |
| 2210 | + }; |
| 2211 | + |
| 2212 | + // }}} |
2191 | 2213 | // {{{ enableSubmission |
2192 | 2214 | |
2193 | 2215 | /** |
— | — | @@ -2552,7 +2574,6 @@ |
2553 | 2575 | } else { |
2554 | 2576 | msg = mw.msg( data.error ); |
2555 | 2577 | } |
2556 | | - aft5_debug( data.error ); |
2557 | 2578 | } else { |
2558 | 2579 | msg = { info: mw.msg( 'articlefeedbackv5-error-unknown' ) }; |
2559 | 2580 | } |