couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From benkeen <...@git.apache.org>
Subject [GitHub] couchdb-fauxton pull request: Ensure save changes conf appears
Date Tue, 10 Feb 2015 19:08:51 GMT
GitHub user benkeen opened a pull request:

    https://github.com/apache/couchdb-fauxton/pull/263

    Ensure save changes conf appears

    Extra eyes on this ticket are appreciated! Bit of explanation
    needed.
    
    Whenever you make a change to content in an Ace editor then
    navigate away, you should see a confirmation alert saying "Are you
    sure you don't want to save these changes?". Right now this
    appears sometimes, but not always. This ticket makes a small
    change to the main event delegation function in main.js that runs
    on all <a> tags. Before, as long as the <a> didn't contain a
    data-bypass attribute, it did a FauxtonAPI.navigate call, which
    meant that all beforeUnload functions got ran prior to redirecting
    - and that was where the confirmation alert appeared.
    
    This has now been changed to only NOT run when the data-bypass
    attribute is set to true, which I think is what was originally
    intended. This small change will ensure any pages containing the
    Ace editor will have their beforeUnload functions ran prior to
    redirecting from any link.
    
    Closes COUCHDB-2574

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/benkeen/couchdb-fauxton 2574-save-editor-changed-confirmation

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-fauxton/pull/263.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #263
    
----
commit c29562a2da382b15ba4c59f487835fdd6974c435
Author: Ben Keen <ben.keen@gmail.com>
Date:   2015-02-10T18:59:41Z

    Ensure save changes conf appears
    
    Extra eyes on this ticket are appreciated! Bit of explanation
    needed.
    
    Whenever you make a change to content in an Ace editor then
    navigate away, you should see a confirmation alert saying "Are you
    sure you don't want to save these changes?". Right now this
    appears sometimes, but not always. This ticket makes a small
    change to the main event delegation function in main.js that runs
    on all <a> tags. Before, as long as the <a> didn't contain a
    data-bypass attribute, it did a FauxtonAPI.navigate call, which
    meant that all beforeUnload functions got ran prior to redirecting
    - and that was where the confirmation alert appeared.
    
    This has now been changed to only NOT run when the data-bypass
    attribute is set to true, which I think is what was originally
    intended. This small change will ensure any pages containing the
    Ace editor will have their beforeUnload functions ran prior to
    redirecting from any link.
    
    Closes COUCHDB-2574

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message