You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by sebastianrothbucher <gi...@git.apache.org> on 2014/10/17 21:21:58 UTC

[GitHub] couchdb-fauxton pull request: Prevent double query submission 2nd ...

GitHub user sebastianrothbucher opened a pull request:

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

    Prevent double query submission 2nd attempt to fix COUCHDB-2378

    

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

    $ git pull https://github.com/sebastianrothbucher/couchdb-fauxton 2378-double-query-submission-new

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

    https://github.com/apache/couchdb-fauxton/pull/104.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 #104
    
----
commit 0eed29797dbd6300f984ff78912485f28dd589b6
Author: sebastianrothbucher <se...@googlemail.com>
Date:   2014-10-17T19:18:31Z

    Prevent double query submission 2nd attempt to fix COUCHDB-2378

----


---
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.
---

[GitHub] couchdb-fauxton pull request: Prevent double query submission 2nd ...

Posted by sebastianrothbucher <gi...@git.apache.org>.
Github user sebastianrothbucher commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/104#issuecomment-59645033
  
    merged as cd91b276a09d1295b1f20eb8ad6183e7379e0ab2 - close


---
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.
---

[GitHub] couchdb-fauxton pull request: Prevent double query submission 2nd ...

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/104#issuecomment-59645102
  
    This one wasn't easy I see (: Great work!


---
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.
---

[GitHub] couchdb-fauxton pull request: Prevent double query submission 2nd ...

Posted by sebastianrothbucher <gi...@git.apache.org>.
Github user sebastianrothbucher commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/104#issuecomment-59609858
  
    Included the feedback - thanks a lot @robertkowalski 


---
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.
---

[GitHub] couchdb-fauxton pull request: Prevent double query submission 2nd ...

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/104#discussion_r19045456
  
    --- Diff: app/addons/documents/views-queryoptions.js ---
    @@ -129,6 +131,9 @@ define([
               return;
             }
     
    +        // make sure we can not submit twice which results in chaos (and no result ever)
    +        $("#query-options-tray button[type=\"submit\"]").attr("disabled", "disabled");
    +
    --- End diff --
    
    You can also use ``this.$('#query-options-tray button[type="submit"]')` here


---
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.
---

[GitHub] couchdb-fauxton pull request: Prevent double query submission 2nd ...

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/104#discussion_r19045448
  
    --- Diff: app/addons/documents/views-queryoptions.js ---
    @@ -107,6 +107,8 @@ define([
             if (!this.trayIsVisible()) {
               $("#query-options-tray").velocity("transition.slideDownIn", 250); // TODO constant
               FauxtonAPI.Events.trigger("APIbar:closeTray");
    +          // make sure the query button is active again. As we can only expand for completed results, this is sufficient to prevent double submission
    +          $("#query-options-tray button[type=\"submit\"]").removeAttr("disabled");
    --- End diff --
    
    You do not need to escape the `"`- just mix single and double quotes - you can also use `this.$` to explicitly access the elements that are in this view, so people do not get confused which element in the DOM you are manipulating:
    
    `this.$('#query-options-tray button[type="submit"]').removeAttr("disabled");`


---
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.
---

[GitHub] couchdb-fauxton pull request: Prevent double query submission 2nd ...

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/104#issuecomment-59581021
  
    Hi @sebastianrothbucher - I really like the way the fix works - great work! I found two minor nits, feel free to merge after fixing them. 
    
    If you want me to take a second look or to merge it for you, just ping me.


---
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.
---

[GitHub] couchdb-fauxton pull request: Prevent double query submission 2nd ...

Posted by sebastianrothbucher <gi...@git.apache.org>.
Github user sebastianrothbucher closed the pull request at:

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


---
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.
---