The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

Suggestion: allow users to delete a saved draft from the posting form

BethrynBethryn Unhappiness is MandatoryRegistered User regular
edited March 2012 in H.Q. Reception Desk
It seems unnecessarily cumbersome to have to go back to the main page, go to your drafts and delete one every time you decide that you don't want to post what you've written.

If you're going to let users save and delete drafts, please make it easy for them to manage them, Vanilla.

...and of course, as always, Kill Hitler.
Bethryn on

Posts

  • DelzhandDelzhand Registered User, Transition Team regular
  • BarrakkethBarrakketh Registered User regular
    Delzhand wrote: »
    FWIW, that changed a little after the recent-ish big forum downtime:
    $('<a href="#" id="PAT_Delete_Draft">Delete Draft</a>')
             .css({'margin': '0 6px'})
            .insertAfter($('div.Buttons > a.DraftButton'));
        $('#PAT_Delete_Draft').click(function (e) {
            e.preventDefault();
           var textarea = $('#Form_Body');
           //input:hidden[name$=DraftID]
           var draft_id = $('#Form_DraftID').attr('value');
           var trans_key = $('#Form_TransientKey').attr('value');
           if (draft_id) {
               var uri = '/vanilla/drafts/delete/{0}/{1}?Target=drafts'.format(draft_id, trans_key);
               $.ajax(
                   {url: uri,
                   type: 'GET',
                   data: {DeliveryType: 'BOOL'},
                   success: function (data) {
                       textarea.val("");                   
                   }}
               );
           }
           else {
               textarea.val("");
           }
        });
    }
    

    Rollers are red, chargers are blue....omae wa mou shindeiru
  • IcyLiquidIcyLiquid Two Steaks Montreal, QuebecAdministrator, Vanilla Staff vanilla
    We have plans to make the 'Cancel' button just do this.

Sign In or Register to comment.