Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Hide 'Draft Saved' pop-up?

edited March 2018 in Vanilla 2.0 - 2.8

The intermittent pop-up that notifies the user that a draft has been saved is bothering some of my users. I want to hide it ideally without changing core code so that it doesn't get overwritten on future upgrades. Is there a way to do this?

I briefly looked at the CSS but seems to be generic class for all notifications rather than a class just for drafts.

Comments

  • R_JR_J Admin

    Not sure, but it might be that a popup without text will not be displayed. Try creating a custom translation string for "Draft saved at %s":

    <?php
    
    $Definition['Draft saved at %s'] = '';
    
  • edited March 2018

    Awesome, that worked great! Thanks :)

    Only downside I've noticed to this whole approach is clicking 'Save' gives no indication that it's done anything. But perhaps I can play with some CSS in order to display a response to the users action for that.

  • So in case others find this thread useful, here's the CSS to make sure the 'Save Comment' button still gives the impression of working when clicked:

    .DraftButton:active:after {
        padding: 0;
        margin: 0;
        opacity: 1;
        transition: 0s
    }
    
    .DraftButton:after {
        content: "Saved";
        position: absolute;
        right: 15px;
        bottom: 65px;
        opacity: 0;
        transition: all 2s
    }
    

    This fades in some text near the button that says "Saved" and then fades out. Having it replace the existing button text directly proved too tricky with just CSS.

Sign In or Register to comment.