r111127 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111126‎ | r111127 | r111128 >
Date:23:45, 9 February 2012
Author:werdna
Status:ok
Tags:
Comment:
ArticleCreationWorkflow:
* Allow HTML in interstitial message again.
* Quit out of interstitials when you click outside them
Modified paths:
  • /trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.i18n.php (modified) (history)
  • /trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.php (modified) (history)
  • /trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.user/ext.articleCreation.user.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.i18n.php
@@ -41,10 +41,10 @@
4242 'ac-action-create' => 'Create this article myself',
4343 'ac-action-create-subtitle' => 'I know what I\'m doing.',
4444 'ac-create-warning-create' => "Articles may be deleted immediately if:
45 - they copy from other sources, or
46 - are overly promotional, or
47 - lack context, or
48 - fail to explain why their subject is notable.
 45+ <ul><li>they copy from other sources, or</li>
 46+ <li>are overly promotional, or</li>
 47+ <li>lack context, or</li>
 48+ <li>fail to explain why their subject is notable.</li></ul>
4949 ",
5050 'ac-create-button' => "Let's Go",
5151 'ac-hover-tooltip-body-create' => "<ul><li>You have created articles before, and</li>
Index: trunk/extensions/ArticleCreationWorkflow/modules/ext.articleCreation.user/ext.articleCreation.user.js
@@ -11,6 +11,22 @@
1212
1313 ac.setupTooltips();
1414
 15+ $(document).click( function(e) {
 16+ $('.ac-article-button')
 17+ //remove green states and hide their tooltips
 18+ .removeClass('ac-button-green')
 19+ .removeClass('ac-button-selected')
 20+ .each ( function (i, e) {
 21+ $(this) .parent()
 22+ .find('.mw-ac-tooltip')
 23+ .hide();
 24+ });
 25+
 26+ ac.panel
 27+ .find('.mw-ac-interstitial')
 28+ .hide();
 29+ } );
 30+
1531 //setup button hover states
1632 ac.panel
1733 .find( '.ac-article-button' )
@@ -22,7 +38,7 @@
2339 //attach other events here, just making first tooltip for now
2440 //testing hover effects
2541 .hover (function (){
26 - if ( $(this).hasClass('ac-button-selected') )
 42+ if ( $('.ac-button-selected') )
2743 return;
2844
2945 $( this ).parent()
@@ -50,6 +66,7 @@
5167 .find('.ac-article-button')
5268 .click (function (e) {
5369 e.preventDefault();
 70+ e.stopPropagation();
5471
5572 $('.ac-article-button')
5673 //remove green states and hide their tooltips
@@ -109,6 +126,7 @@
110127 .find('.ac-action-button')
111128 .click( function(e) {
112129 e.preventDefault();
 130+ e.stopPropagation();
113131 ac.executeAction($(this).data('ac-action'));
114132 } );
115133 },
Index: trunk/extensions/ArticleCreationWorkflow/ArticleCreationWorkflow.php
@@ -136,7 +136,7 @@
137137 <a class="mw-ac-help" href="http://www.google.com"><html:msg key="ac-create-help" /></a>
138138 <div class="mw-ac-tooltip-title"><html:msg key="ac-click-tip-title-create" /></div>
139139 <div class="mw-ac-tooltip-body">
140 - <div class="mw-ac-create-verbiage"><html:msg key="ac-create-warning-create" /></div>
 140+ <div class="mw-ac-create-verbiage"><html:msg raw="1" key="ac-create-warning-create" /></div>
141141 <div class="ac-button-wrap">
142142 <a class="ac-button-green ac-button ac-action-button" data-ac-action="create">
143143 <div class="ac-arrow ac-arrow-forward">&nbsp;</div>

Status & tagging log