jenkins-bot has submitted this change and it was merged.

Change subject: Revert "Anonymous editor warning"
......................................................................


Revert "Anonymous editor warning"

This is not complete enough to go out with the train tomorrow,  we need to add 
login and register callouts to the flyout.

This reverts commit 50fda7daff894bf2b9fd51a3c54ada3cd605e34f.

Change-Id: I0a7dcd4aeb41965a2bd05e260f982145e6be4e6b
---
M Flow.i18n.php
M Resources.php
M modules/base/action.js
M modules/base/styles/actionbox.less
M modules/discussion/topic.js
M modules/mediawiki.ui/styles/settings/colors.less
6 files changed, 5 insertions(+), 71 deletions(-)

Approvals:
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Flow.i18n.php b/Flow.i18n.php
index 7b39067..ee63886 100644
--- a/Flow.i18n.php
+++ b/Flow.i18n.php
@@ -280,9 +280,6 @@
        'flow-terms-of-use-new-topic' => 'By clicking 
"{{int:flow-newtopic-save}}", you agree to the terms of use for this wiki.',
        'flow-terms-of-use-reply' => 'By clicking "{{int:flow-reply-submit}}", 
you agree to the terms of use for this wiki.',
        'flow-terms-of-use-edit' => 'By saving your changes, you agree to the 
terms of use for this wiki.',
-
-       // Anon warning
-       'flow-anon-warning' =>  'You are not logged in.',
 );
 
 /** Message documentation (Message documentation)
diff --git a/Resources.php b/Resources.php
index 68ed008..195fb78 100644
--- a/Resources.php
+++ b/Resources.php
@@ -83,7 +83,6 @@
                        'jquery.conditionalScroll',
                        'ext.flow.parsoid',
                        'mediawiki.jqueryMsg',
-                       'mediawiki.user',
                ),
                'messages' => array(
                        'flow-newtopic-start-placeholder',
@@ -101,7 +100,6 @@
                        'flow-paging-rev',
                        'flow-post-moderated-toggle-show',
                        'flow-post-moderated-toggle-hide',
-                       'flow-anon-warning',
                ),
                'position' => 'top',
        ),
diff --git a/modules/base/action.js b/modules/base/action.js
index 0259f05..da9e55a 100644
--- a/modules/base/action.js
+++ b/modules/base/action.js
@@ -146,7 +146,6 @@
 
                this.object.$container.find( '.flow-edit-form' )
                        .flow( 'hidePreview' )
-                       .trigger( 'flow-form-destroyed' )
                        .remove();
        };
 
@@ -235,11 +234,6 @@
                                        }
                                );
                }, this, $form, loadFunction ), 0 );
-
-               // add anon warning if required
-               if ( mw.user.getId() === 0 ) {
-                       this.showAnonWarning();
-               }
        };
 
        /**
@@ -268,7 +262,6 @@
                 * submit button via setupEmptyDisabler and setupFormHandler.
                 */
                $form.find( '.flow-reply-submit' ).off();
-               $form.trigger( 'flow-form-destroyed' );
                $form.find( '.flow-cancel-link, .flow-content-preview, 
.flow-preview-submit, .flow-error' ).remove();
 
                // when hidden via slideUp, some inline CSS is added to keep the
@@ -380,15 +373,14 @@
         *
         * @param {jQuery} $element
         * @param {string} text
-        * @param {Object} options Overrides
         */
-       mw.flow.action.prototype.tipsy = function ( $element, text, options ) {
+       mw.flow.action.prototype.tipsy = function ( $element, text ) {
                $element
                        .addClass( 'flow-tipsy-trigger' )
                        .click( function () {
                                $( this ).tipsy( 'hide' );
                        } )
-                       .tipsy( $.extend( {
+                       .tipsy( {
                                fade: true,
                                gravity: 'w',
                                html: true,
@@ -413,38 +405,10 @@
                                        var $warning = $( '<div 
class="flow-tipsy-noflyout">' ).text( text );
                                        return $( '<div>' ).append( $warning 
).html();
                                }
-                       }, options ) )
+                       } )
                        .tipsy( 'show' );
 
                // return tipsy flyout node
                return $element.tipsy( 'tip' );
-       };
-
-       /**
-        * Shows a tooltip, dismissed by keyup in the form.
-        */
-       mw.flow.action.prototype.showAnonWarning = function() {
-               var $el = this.$form.find( '.flow-creator > a' );
-
-               if ( ! $el.length ) {
-                       $el = this.$form.find( 'textarea:first' );
-               }
-
-               this.tipsy(
-                       $el,
-                       mw.msg( 'flow-anon-warning' ),
-                       {
-                               className : 'flow-tipsy-warning 
flow-anon-warning'
-                       }
-               );
-
-               this.$form.on( 'keyup', 'input, textarea', function(e) {
-                       $el.tipsy( 'hide' );
-               } );
-
-               this.$form
-                       .on( 'flow-form-destroyed', '*', function(e) {
-                               $el.tipsy( 'hide' );
-                       } );
        };
 } ( jQuery, mediaWiki ) );
diff --git a/modules/base/styles/actionbox.less 
b/modules/base/styles/actionbox.less
index e5759b3..0973ec1 100644
--- a/modules/base/styles/actionbox.less
+++ b/modules/base/styles/actionbox.less
@@ -93,8 +93,6 @@
        .tipsy-inner {
                padding: 0;
                border: 1px solid @flyout-border-color;
-               max-width: 400px;
-               border-radius: 1.5px;
        }
 
        .flow-tipsy-flyout {
@@ -105,7 +103,7 @@
        }
 
        .flow-tipsy-noflyout {
-               padding: 10px;
+               padding: 10px 22px;
        }
 
        // overwrite tipsy arrow
@@ -216,19 +214,6 @@
 
                .tipsy-arrow {
                        .arrow(@arrow-size, @arrow-border-size, 
@destructive-low-base, @destructive-low-base);
-               }
-       }
-
-       &.flow-anon-warning {
-               .tipsy-inner {
-                       background-color: @warning;
-                       box-shadow: 0 3px @warning-border;
-                       border: none;
-                       color: #fff;
-               }
-
-               .tipsy-arrow {
-                       .arrow(@arrow-size, @arrow-border-size, @warning, 
@warning-border)
                }
        }
 }
diff --git a/modules/discussion/topic.js b/modules/discussion/topic.js
index 35b9b96..fff4c56 100644
--- a/modules/discussion/topic.js
+++ b/modules/discussion/topic.js
@@ -456,11 +456,6 @@
 
                // load the form
                this.loadNewForm();
-
-               // add anon warning if required
-               if ( mw.user.getId() === 0 ) {
-                       this.showAnonWarning();
-               }
        };
 
        /**
@@ -519,9 +514,7 @@
                                        .val( '' )
                                        .attr( 'placeholder', mw.msg( 
'flow-newtopic-start-placeholder' ) );
 
-                               this.$form.find( 'form' )
-                                       .flow( 'hidePreview' )
-                                       .trigger( 'flow-form-destroyed' );
+                               this.$form.find( 'form' ).flow( 'hidePreview' );
 
                                /*
                                 * After submitting the new topic, kill the 
events that were bound to
diff --git a/modules/mediawiki.ui/styles/settings/colors.less 
b/modules/mediawiki.ui/styles/settings/colors.less
index b2adc0d..fc281e4 100644
--- a/modules/mediawiki.ui/styles/settings/colors.less
+++ b/modules/mediawiki.ui/styles/settings/colors.less
@@ -13,6 +13,3 @@
 
 @destructive-low-base: #ffb50d;
 @destructive-low-active: #e0a00b;
-
-@warning: #347bff;
-@warning-border: #1059e1;
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/114378
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0a7dcd4aeb41965a2bd05e260f982145e6be4e6b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: EBernhardson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to