Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for /src/cb/condition-builder.js #7

Open
gantir opened this issue Nov 26, 2013 · 2 comments
Open

Patch for /src/cb/condition-builder.js #7

gantir opened this issue Nov 26, 2013 · 2 comments

Comments

@gantir
Copy link
Owner

gantir commented Nov 26, 2013

Added '> div > table' to lines 126, 127 and 130. This stopped the query builder looping through all inner tables multiple times. When choosing the following:

(and)
code contains test1
(add +() set to and)
country contains test2
government contains test3
(add +() set to and)
continent contains test4

When running it with the original file, it produces this:

( code contains test1 and ( country contains test2 and govt contains test3 and ( cont contains test4 ) ) and ( cont contains test4 ) )

Notice "cont contains test4" is repeated. If you add the find to look for '> div > table', it will only search each table once, in the order they are displayed and produce the following output:

( code contains test1 and ( country contains test2 and govt contains test3 and ( cont contains test4 ) ) )

@gantir
Copy link
Owner Author

gantir commented Nov 26, 2013

Hello Pete,
I tried your solution but it's not working for me.
Are you sure that the patch you gave fix this issue?
Anyway thanks for sharing and for suggesting a solution

@gantir
Copy link
Owner Author

gantir commented Nov 26, 2013

find the full fix .js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant