@@ -503,9 +503,21 @@ module.exports = Backbone.View.extend({
503503 //don't add unless it comes from the model
504504 if ( moderator . fromModel ) {
505505 this . $el . find ( '.js-settingsCurrentMods' ) . append ( modShort . el ) ;
506+ if ( ! this . $ ( '.js-loadingMsgOld' ) . hasClass ( 'foldIn' ) ) {
507+ //hide spinners after a while
508+ setTimeout ( ( ) => {
509+ this . $ ( '.js-loadingMsgOld' ) . addClass ( 'foldIn' ) ;
510+ } , 2000 ) ;
511+ }
506512 }
507513 } else {
508514 this . $el . find ( '.js-settingsNewMods' ) . append ( modShort . el ) ;
515+ if ( ! this . $ ( '.js-loadingMsgNew' ) . hasClass ( 'foldIn' ) ) {
516+ //hide spinners after a while
517+ setTimeout ( ( ) => {
518+ this . $ ( '.js-loadingMsgNew' ) . addClass ( 'foldIn' ) ;
519+ } , 2000 ) ;
520+ }
509521 }
510522 this . moderatorCount ++ ;
511523 this . subViews . push ( modShort ) ;
@@ -557,10 +569,6 @@ module.exports = Backbone.View.extend({
557569 }
558570 } ) ;
559571 }
560- //hide spinners after a while
561- setTimeout ( ( ) => {
562- this . $ ( '.js-loadingMsg' ) . addClass ( 'foldIn' ) ;
563- } , 3000 ) ;
564572 this . firstLoadModerators = false ;
565573 } else if ( state === 'blocked' ) {
566574 // Since the Blocked Users View kicks off many server calls (one
@@ -819,23 +827,18 @@ module.exports = Backbone.View.extend({
819827
820828 $saveBtn . addClass ( 'loading' ) ;
821829
822- console . log ( moderatorList )
823-
824830 //first, remove any existing moderators that have been unchecked. This prevents removing saved moderators that don't show up in the UI for some reason
825831 moderatorsUnChecked . each ( function ( ) {
826832 moderatorList = __ . without ( moderatorList , ( $ ( this ) . data ( 'guid' ) ) ) ;
827833 } ) ;
828834
829- console . log ( moderatorList )
830-
831835 //add any new moderators that have been checked
832836 moderatorsNew . each ( function ( ) {
833837 moderatorList . push ( $ ( this ) . data ( 'guid' ) ) ;
834838 } ) ;
835-
839+
836840 //add any manually entered mods
837841 manualModList = this . $ ( '#addManualMods' ) . val ( ) . split ( ',' ) ;
838- console . log ( manualModList ) ;
839842 __ . each ( manualModList , function ( mod ) {
840843 if ( mod . length === 40 ) {
841844 moderatorList . push ( mod ) ;
@@ -850,8 +853,6 @@ module.exports = Backbone.View.extend({
850853 messageModal . show ( window . polyglot . t ( 'errorMessages.saveError' ) , data . reason ) ;
851854 } ;
852855
853- return ;
854-
855856 saveToAPI ( form , "" , self . serverUrl + "profile" , function ( ) {
856857 saveToAPI ( form , self . userModel . toJSON ( ) , self . serverUrl + "settings" ,
857858 function ( ) {
0 commit comments