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

[GitHub] couchdb-fauxton pull request: Fix string modal and add database fi...

GitHub user garrensmith opened a pull request:

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

    Fix string modal and add database filter

    This fixes the regex check for the string modal in the code editor. The
    string modal button now works again.
    
    It also adds a filter function to the typeahead database view so that we
    can filter the databases that are returned.

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

    $ git pull https://github.com/garrensmith/couchdb-fauxton 2-fixes

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

    https://github.com/apache/couchdb-fauxton/pull/195.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 #195
    
----
commit 45654c38aa9d9c647d40da3d35755a79d77e8b7f
Author: Garren Smith <ga...@gmail.com>
Date:   2014-12-10T09:20:46Z

    Fix string modal and add database filter
    
    This fixes the regex check for the string modal in the code editor. The
    string modal button now works again.
    
    It also adds a filter function to the typeahead database view so that we
    can filter the databases that are returned

----


---
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: Fix string modal and add database fi...

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

    https://github.com/apache/couchdb-fauxton/pull/195#issuecomment-66431064
  
    +1 !


---
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: Fix string modal and add database fi...

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

    https://github.com/apache/couchdb-fauxton/pull/195#issuecomment-66431517
  
    Thanks, merged.


---
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: Fix string modal and add database fi...

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

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


---
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: Fix string modal and add database fi...

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

    https://github.com/apache/couchdb-fauxton/pull/195#discussion_r21594086
  
    --- Diff: app/addons/documents/views-doceditor.js ---
    @@ -239,7 +239,7 @@ function (app, FauxtonAPI, Components, Documents, Databases, resizeColumns, pret
           /* one JS(ON) string can't span more than one line - we edit one string, so ensure we don't select several lines */
           if (selStart >=0 && selEnd >= 0 && selStart === selEnd && this.editor.isRowExpanded(selStart)) {
             var editLine = this.editor.getLine(selStart),
    -            editMatch = editLine.match(/^([ \t]*)('[a-zA-Z0-9_]*': )?('.*',?[ \t]*)$/);
    +            editMatch = editLine.match(/^([ \t]*)("[a-zA-Z0-9_]*": )?(".*",?[ \t]*)$/);
    --- End diff --
    
    Nice idea I'll make the change


---
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: Fix string modal and add database fi...

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/195#discussion_r21593979
  
    --- Diff: app/addons/documents/views-doceditor.js ---
    @@ -239,7 +239,7 @@ function (app, FauxtonAPI, Components, Documents, Databases, resizeColumns, pret
           /* one JS(ON) string can't span more than one line - we edit one string, so ensure we don't select several lines */
           if (selStart >=0 && selEnd >= 0 && selStart === selEnd && this.editor.isRowExpanded(selStart)) {
             var editLine = this.editor.getLine(selStart),
    -            editMatch = editLine.match(/^([ \t]*)('[a-zA-Z0-9_]*': )?('.*',?[ \t]*)$/);
    +            editMatch = editLine.match(/^([ \t]*)("[a-zA-Z0-9_]*": )?(".*",?[ \t]*)$/);
    --- End diff --
    
    I would suggest something like: 
    
    ```
    /^([ \t]*)(["|'][a-zA-Z0-9_]*["|']: )?(["|'].*["|'],?[ \t]*)$
    ```
    
    so the user can use `"` or `'`


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