From 87605e2abe35931311b1e6f097cc7a4f23950cf5 Mon Sep 17 00:00:00 2001
From: mistic100
Date: Tue, 1 May 2018 10:37:00 +0200
Subject: [PATCH 01/42] Fix #684 : getSQL issue with consecutive dollar signs
---
package.json | 3 ++-
src/plugins/sql-support/plugin.js | 4 +++-
tests/plugins.sql-support.module.js | 29 +++++++++++++++++++++++++++++
3 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index 35050e45..adf28a94 100644
--- a/package.json
+++ b/package.json
@@ -50,7 +50,7 @@
"jit-grunt": "^0.10.0",
"qunit": "^2.5.1",
"selectize": "^0.12.4",
- "sql-parser-mistic": "^1.2.0",
+ "sql-parser-mistic": "^1.2.2",
"time-grunt": "^1.3.0"
},
"keywords": [
@@ -69,6 +69,7 @@
"url": "https://github.com/mistic100/jQuery-QueryBuilder/issues"
},
"scripts": {
+ "serve": "grunt serve",
"test": "grunt test"
}
}
diff --git a/src/plugins/sql-support/plugin.js b/src/plugins/sql-support/plugin.js
index 6f2cc866..b06935a2 100644
--- a/src/plugins/sql-support/plugin.js
+++ b/src/plugins/sql-support/plugin.js
@@ -328,7 +328,9 @@ QueryBuilder.extend(/** @lends module:plugins.SqlSupport.prototype */ {
}
var sqlFn = function(v) {
- return sql.op.replace('?', v);
+ return sql.op.replace('?', function() {
+ return v;
+ });
};
/**
diff --git a/tests/plugins.sql-support.module.js b/tests/plugins.sql-support.module.js
index 46443b37..ee347e57 100644
--- a/tests/plugins.sql-support.module.js
+++ b/tests/plugins.sql-support.module.js
@@ -131,6 +131,35 @@ $(function() {
);
});
+ QUnit.test('Special chars', function(assert) {
+ // PhantomJS is broken https://github.com/ariya/phantomjs/issues/14921
+ if (!!window._phantom) {
+ assert.ok(true, 'Test ignore in PhantomJS');
+ return;
+ }
+
+ var chars = ['\'', '"', '$1', '$$', '$&', '$`', '$\''];
+
+ var sql = "name = '\\'' AND name = '\\\"' AND name = '$1' AND " +
+ "name = '$$' AND name = '$&' AND name = '$`' AND name = '$\\''";
+
+ $b.queryBuilder({
+ filters: basic_filters,
+ rules: chars.map(function(char) {
+ return {
+ id: 'name',
+ value: char
+ };
+ })
+ });
+
+ assert.equal(
+ $b.queryBuilder('getSQL').sql,
+ sql,
+ 'Should output SQL with escaped special chars'
+ );
+ });
+
QUnit.test('All operators', function(assert) {
$b.queryBuilder({
filters: basic_filters,
From c50ebf81d3d2a09dba419c9b95d8245ca73bc7eb Mon Sep 17 00:00:00 2001
From: mistic100
Date: Tue, 1 May 2018 11:18:26 +0200
Subject: [PATCH 02/42] Fix #687 : Negation doubled when using setRulesFromSQL
---
src/plugins/not-group/plugin.js | 14 +++----
src/plugins/sql-support/plugin.js | 5 ++-
tests/plugins.not-group.module.js | 62 ++++++++++++++++++++++++++++++-
3 files changed, 71 insertions(+), 10 deletions(-)
diff --git a/src/plugins/not-group/plugin.js b/src/plugins/not-group/plugin.js
index 4e1056b9..a2ce9459 100644
--- a/src/plugins/not-group/plugin.js
+++ b/src/plugins/not-group/plugin.js
@@ -66,11 +66,11 @@ QueryBuilder.define('not-group', function(options) {
// if the there is no sub-group, create one
if (['AND', 'OR'].indexOf(e.value.operation.toUpperCase()) === -1) {
- e.value = {
- left: e.value,
- operation: self.settings.default_condition,
- right: null
- };
+ e.value = new SQLParser.nodes.Op(
+ self.settings.default_condition,
+ e.value,
+ null
+ );
}
e.value.not = true;
@@ -78,8 +78,8 @@ QueryBuilder.define('not-group', function(options) {
});
// Request to create sub-group if the "not" flag is set
- this.on('sqlGroupsDistinct.filter', function(e, group, data) {
- if (data.not) {
+ this.on('sqlGroupsDistinct.filter', function(e, group, data, i) {
+ if (data.not && i > 0) {
e.value = true;
}
});
diff --git a/src/plugins/sql-support/plugin.js b/src/plugins/sql-support/plugin.js
index b06935a2..95b7eda5 100644
--- a/src/plugins/sql-support/plugin.js
+++ b/src/plugins/sql-support/plugin.js
@@ -491,12 +491,13 @@ QueryBuilder.extend(/** @lends module:plugins.SqlSupport.prototype */ {
* Given an existing group and an AST node, determines if a sub-group must be created
* @event changer:sqlGroupsDistinct
* @memberof module:plugins.SqlSupport
- * @param {boolean} create - try by default if the group condition is different
+ * @param {boolean} create - true by default if the group condition is different
* @param {object} group
* @param {object} AST
+ * @param {int} current group level
* @returns {boolean}
*/
- var createGroup = self.change('sqlGroupsDistinct', i > 0 && curr.condition != data.operation.toUpperCase(), curr, data);
+ var createGroup = self.change('sqlGroupsDistinct', i > 0 && curr.condition != data.operation.toUpperCase(), curr, data, i);
if (createGroup) {
/**
diff --git a/tests/plugins.not-group.module.js b/tests/plugins.not-group.module.js
index 62d7fc99..a2977c61 100644
--- a/tests/plugins.not-group.module.js
+++ b/tests/plugins.not-group.module.js
@@ -59,8 +59,13 @@ $(function () {
sql,
'Should export SQL with NOT function'
);
+ });
- $b.queryBuilder('reset');
+ QUnit.test('SQL import', function (assert) {
+ $b.queryBuilder({
+ filters: basic_filters,
+ plugins: ['not-group']
+ });
$b.queryBuilder('setRulesFromSQL', sql);
@@ -85,6 +90,22 @@ $(function () {
rules3,
'Should parse NOT SQL function with same operation'
);
+
+ $b.queryBuilder('setRulesFromSQL', sql4);
+
+ assert.rulesMatch(
+ $b.queryBuilder('getRules'),
+ rules4,
+ 'Should parse NOT SQL function with negated root group'
+ );
+
+ $b.queryBuilder('setRulesFromSQL', sql5);
+
+ assert.rulesMatch(
+ $b.queryBuilder('getRules'),
+ rules5,
+ 'Should parse NOT SQL function with double negated root group'
+ );
});
QUnit.test('Mongo export', function (assert) {
@@ -113,6 +134,7 @@ $(function () {
var rules = {
condition: 'OR',
+ not: false,
rules: [{
id: 'name',
operator: 'equal',
@@ -137,6 +159,7 @@ $(function () {
var rules2 = {
condition: 'OR',
+ not: false,
rules: [{
id: 'name',
operator: 'equal',
@@ -156,6 +179,7 @@ $(function () {
var rules3 = {
condition: 'OR',
+ not: false,
rules: [{
id: 'name',
operator: 'equal',
@@ -178,6 +202,42 @@ $(function () {
var sql3 = 'name = \'Mistic\' OR ( NOT ( price < 10.25 OR category IN(\'mo\', \'mu\') ) ) ';
+ var rules4 = {
+ condition: 'AND',
+ not: true,
+ rules: [{
+ id: 'price',
+ operator: 'less',
+ value: 10.25
+ }]
+ };
+
+ var sql4 = 'NOT ( price < 10.25 )';
+
+ var rules5 = {
+ condition: 'AND',
+ not: false,
+ rules: [{
+ condition: 'AND',
+ not: true,
+ rules: [{
+ id: 'price',
+ operator: 'less',
+ value: 10.25
+ }]
+ }, {
+ condition: 'AND',
+ not: true,
+ rules: [{
+ id: 'price',
+ operator: 'greater',
+ value: 20.5
+ }]
+ }]
+ };
+
+ var sql5 = 'NOT ( price < 10.25 ) AND NOT ( price > 20.5 )';
+
var mongo = {
"$or": [{
"name": "Mistic"
From 02b61777ad362aa0ace032775acfe3894afc77ed Mon Sep 17 00:00:00 2001
From: mistic100
Date: Thu, 3 May 2018 20:35:20 +0200
Subject: [PATCH 03/42] HTTPS everywhere
---
Gruntfile.js | 4 ++--
LICENSE | 2 +-
README.md | 14 ++++----------
bower.json | 4 ++--
composer.json | 4 ++--
package.json | 4 ++--
6 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/Gruntfile.js b/Gruntfile.js
index c98c3acd..c36b0a42 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -39,14 +39,14 @@ module.exports = function(grunt) {
banner: '/*!\n' +
' * jQuery QueryBuilder <%= pkg.version %>\n' +
' * Copyright 2014-<%= grunt.template.today("yyyy") %> Damien "Mistic" Sorel (http://www.strangeplanet.fr)\n' +
- ' * Licensed under MIT (http://opensource.org/licenses/MIT)\n' +
+ ' * Licensed under MIT (https://opensource.org/licenses/MIT)\n' +
' */',
langBanner: '/*!\n' +
' * jQuery QueryBuilder <%= pkg.version %>\n' +
' * Locale: <%= lang_locale %>\n' +
'<% if (lang_author) { %> * Author: <%= lang_author %>\n<% } %>' +
- ' * Licensed under MIT (http://opensource.org/licenses/MIT)\n' +
+ ' * Licensed under MIT (https://opensource.org/licenses/MIT)\n' +
' */',
// serve folder content
diff --git a/LICENSE b/LICENSE
index 50b5d4bd..2558fa6a 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2014-2017 Damien Sorel
+Copyright (c) 2014-2018 Damien Sorel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 14e526d2..260cc8e2 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,5 @@
# jQuery QueryBuilder
-[](http://querybuilder.js.org)
[](https://www.npmjs.com/package/jQuery-QueryBuilder)
[](https://www.jsdelivr.com/package/npm/jQuery-QueryBuilder)
[](https://travis-ci.org/mistic100/jQuery-QueryBuilder)
@@ -9,12 +8,12 @@
jQuery plugin offering an simple interface to create complex queries.
-[](http://querybuilder.js.org)
+[](https://querybuilder.js.org)
## Documentation
-[http://querybuilder.js.org](http://querybuilder.js.org)
+[querybuilder.js.org](https://querybuilder.js.org)
@@ -43,8 +42,8 @@ jQuery-QueryBuilder is available on [jsDelivr](https://www.jsdelivr.com/package/
* [jQuery 3](https://jquery.com)
* [Bootstrap 3](https://getbootstrap.com/docs/3.3) (CSS only)
* [jQuery.extendext](https://github.com/mistic100/jQuery.extendext)
- * [doT.js](http://olado.github.io/doT)
- * [MomentJS](http://momentjs.com) (optional, for Date/Time validation)
+ * [doT.js](https://olado.github.io/doT)
+ * [MomentJS](https://momentjs.com) (optional, for Date/Time validation)
* [SQL Parser](https://github.com/mistic100/sql-parser) (optional, for SQL methods)
* Other Bootstrap/jQuery plugins used by plugins
@@ -92,10 +91,5 @@ grunt --languages=fr,it
* `grunt doc` to generate the documentation.
-
## License
This library is available under the MIT license.
-
-#### Inspirations
- * [Knockout Query Builder](http://kindohm.github.io/knockout-query-builder/)
- * [jui_filter_rules](http://www.pontikis.net/labs/jui_filter_rules/)
diff --git a/bower.json b/bower.json
index 0a763480..f1850a1e 100644
--- a/bower.json
+++ b/bower.json
@@ -4,7 +4,7 @@
{
"name": "Damien \"Mistic\" Sorel",
"email": "contact@git.strangeplanet.fr",
- "homepage": "http://www.strangeplanet.fr"
+ "homepage": "https://www.strangeplanet.fr"
}
],
"description": "jQuery plugin for user friendly query/filter creator",
@@ -26,7 +26,7 @@
"filter"
],
"license": "MIT",
- "homepage": "https://github.com/mistic100/jQuery-QueryBuilder",
+ "homepage": "https://querybuilder.js.org",
"repository": {
"type": "git",
"url": "git://github.com/mistic100/jQuery-QueryBuilder.git"
diff --git a/composer.json b/composer.json
index 370ecd59..3d52b425 100644
--- a/composer.json
+++ b/composer.json
@@ -4,7 +4,7 @@
"authors": [{
"name": "Damien \"Mistic\" Sorel",
"email": "contact@git.strangeplanet.fr",
- "homepage": "http://www.strangeplanet.fr"
+ "homepage": "https://www.strangeplanet.fr"
}],
"description": "jQuery plugin for user friendly query/filter creator",
"require": {
@@ -20,7 +20,7 @@
"filter"
],
"license": "MIT",
- "homepage": "https://github.com/mistic100/jQuery-QueryBuilder",
+ "homepage": "https://querybuilder.js.org",
"support": {
"issues": "https://github.com/mistic100/jQuery-QueryBuilder/issues"
},
diff --git a/package.json b/package.json
index adf28a94..53b8746c 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
"author": {
"name": "Damien \"Mistic\" Sorel",
"email": "contact@git.strangeplanet.fr",
- "url": "http://www.strangeplanet.fr"
+ "url": "https://www.strangeplanet.fr"
},
"description": "jQuery plugin for user friendly query/filter creator",
"main": "dist/js/query-builder.js",
@@ -60,7 +60,7 @@
"filter"
],
"license": "MIT",
- "homepage": "https://github.com/mistic100/jQuery-QueryBuilder",
+ "homepage": "https://querybuilder.js.org",
"repository": {
"type": "git",
"url": "git://github.com/mistic100/jQuery-QueryBuilder.git"
From 6665e9ba874ba81f128bf9d16ee834fa8d042f0b Mon Sep 17 00:00:00 2001
From: mistic100
Date: Sun, 6 May 2018 14:10:11 +0200
Subject: [PATCH 04/42] Fix #689 : default flags not honored
---
src/core.js | 37 +++++++++++++++++--------------------
src/public.js | 5 -----
2 files changed, 17 insertions(+), 25 deletions(-)
diff --git a/src/core.js b/src/core.js
index 22097fbb..305a9e53 100644
--- a/src/core.js
+++ b/src/core.js
@@ -352,7 +352,7 @@ QueryBuilder.prototype.setRoot = function(addRule, data, flags) {
this.model.root.model = this.model;
this.model.root.data = data;
- this.model.root.__.flags = $.extend({}, this.settings.default_group_flags, flags);
+ this.model.root.flags = $.extend({}, this.settings.default_group_flags, flags);
this.model.root.condition = this.settings.default_condition;
this.trigger('afterAddGroup', this.model.root);
@@ -397,7 +397,7 @@ QueryBuilder.prototype.addGroup = function(parent, addRule, data, flags) {
var model = parent.addGroup($group);
model.data = data;
- model.__.flags = $.extend({}, this.settings.default_group_flags, flags);
+ model.flags = $.extend({}, this.settings.default_group_flags, flags);
model.condition = this.settings.default_condition;
/**
@@ -538,11 +538,8 @@ QueryBuilder.prototype.addRule = function(parent, data, flags) {
var $rule = $(this.getRuleTemplate(rule_id));
var model = parent.addRule($rule);
- if (data !== undefined) {
- model.data = data;
- }
-
- model.__.flags = $.extend({}, this.settings.default_rule_flags, flags);
+ model.data = data;
+ model.flags = $.extend({}, this.settings.default_rule_flags, flags);
/**
* Just after adding a rule
@@ -639,6 +636,8 @@ QueryBuilder.prototype.createRuleFilters = function(rule) {
* @param {Rule} rule
*/
this.trigger('afterCreateRuleFilters', rule);
+
+ this.applyRuleFlags(rule);
};
/**
@@ -677,6 +676,8 @@ QueryBuilder.prototype.createRuleOperators = function(rule) {
* @param {QueryBuilder.Operator[]} operators - allowed operators for this rule
*/
this.trigger('afterCreateRuleOperators', rule, operators);
+
+ this.applyRuleFlags(rule);
};
/**
@@ -735,6 +736,8 @@ QueryBuilder.prototype.createRuleInput = function(rule) {
rule.value = self.getRuleInputValue(rule);
rule._updating_value = false;
}
+
+ this.applyRuleFlags(rule);
};
/**
@@ -846,15 +849,10 @@ QueryBuilder.prototype.applyRuleFlags = function(rule) {
var flags = rule.flags;
var Selectors = QueryBuilder.selectors;
- if (flags.filter_readonly) {
- rule.$el.find(Selectors.rule_filter).prop('disabled', true);
- }
- if (flags.operator_readonly) {
- rule.$el.find(Selectors.rule_operator).prop('disabled', true);
- }
- if (flags.value_readonly) {
- rule.$el.find(Selectors.rule_value).prop('disabled', true);
- }
+ rule.$el.find(Selectors.rule_filter).prop('disabled', flags.filter_readonly);
+ rule.$el.find(Selectors.rule_operator).prop('disabled', flags.operator_readonly);
+ rule.$el.find(Selectors.rule_value).prop('disabled', flags.value_readonly);
+
if (flags.no_delete) {
rule.$el.find(Selectors.delete_rule).remove();
}
@@ -878,10 +876,9 @@ QueryBuilder.prototype.applyGroupFlags = function(group) {
var flags = group.flags;
var Selectors = QueryBuilder.selectors;
- if (flags.condition_readonly) {
- group.$el.find('>' + Selectors.group_condition).prop('disabled', true)
- .parent().addClass('readonly');
- }
+ group.$el.find('>' + Selectors.group_condition).prop('disabled', flags.condition_readonly)
+ .parent().toggleClass('readonly', flags.condition_readonly);
+
if (flags.no_add_rule) {
group.$el.find(Selectors.add_rule).remove();
}
diff --git a/src/public.js b/src/public.js
index d0bbf35a..adeb13bc 100644
--- a/src/public.js
+++ b/src/public.js
@@ -348,7 +348,6 @@ QueryBuilder.prototype.setRules = function(data, options) {
this.clear();
this.setRoot(false, data.data, this.parseGroupFlags(data));
- this.applyGroupFlags(this.model.root);
/**
* Modifies data before the {@link QueryBuilder#setRules} method
@@ -391,8 +390,6 @@ QueryBuilder.prototype.setRules = function(data, options) {
return;
}
- self.applyGroupFlags(model);
-
add(item, model);
}
}
@@ -433,8 +430,6 @@ QueryBuilder.prototype.setRules = function(data, options) {
}
}
- self.applyRuleFlags(model);
-
/**
* Modifies the Rule object generated from the JSON
* @event changer:jsonToRule
From bd623d83a028775e8cb33ff68eb8083fd72deb32 Mon Sep 17 00:00:00 2001
From: mistic100
Date: Sun, 6 May 2018 14:15:23 +0200
Subject: [PATCH 05/42] Fix #691 : clear root data, flags and condition on
reset
---
examples/index.html | 3 +++
src/public.js | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/examples/index.html b/examples/index.html
index 3fbb3d80..e6fc840f 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -552,6 +552,9 @@ Output
flags: {
condition_readonly: true
},
+ data: {
+ root: true
+ },
rules: [{
id: 'price',
operator: 'between',
diff --git a/src/public.js b/src/public.js
index adeb13bc..79491b96 100644
--- a/src/public.js
+++ b/src/public.js
@@ -46,6 +46,10 @@ QueryBuilder.prototype.reset = function() {
this.model.root.empty();
+ this.model.root.data = undefined;
+ this.model.root.flags = $.extend({}, this.settings.default_group_flags);
+ this.model.root.condition = this.settings.default_condition;
+
this.addRule(this.model.root);
/**
From 73cb350b57610d2632e1eda4bb52c27195a303af Mon Sep 17 00:00:00 2001
From: mistic100
Date: Fri, 11 May 2018 20:29:47 +0200
Subject: [PATCH 06/42] Make some methods visible in the doc (#696 )
---
README.md | 2 +-
package.json | 2 +-
src/data.js | 3 ---
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 260cc8e2..cb412ddb 100644
--- a/README.md
+++ b/README.md
@@ -64,7 +64,7 @@ jQuery-QueryBuilder is available on [jsDelivr](https://www.jsdelivr.com/package/
#### Run
-Install Node and Bower dependencies `npm install` then run `grunt` in the root directory to generate production files inside `dist`.
+Install Node dependencies `npm install` then run `grunt` in the root directory to generate production files inside `dist`.
#### Options
diff --git a/package.json b/package.json
index 53b8746c..ad930ee5 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
"bootswatch-dist": "git+https://github.com/dbtek/bootswatch-dist.git#slate",
"chosenjs": "^1.4.3",
"deepmerge": "^2.1.0",
- "foodoc": "^0.0.8",
+ "foodoc": "^0.0.9",
"grunt": "^1.0.2",
"grunt-banner": "^0.6.0",
"grunt-contrib-clean": "^1.0.0",
diff --git a/src/data.js b/src/data.js
index 8f6e1dc1..304f8341 100644
--- a/src/data.js
+++ b/src/data.js
@@ -270,7 +270,6 @@ QueryBuilder.prototype.nextRuleId = function() {
* @param {string|object} filter - filter id or filter object
* @returns {object[]}
* @fires QueryBuilder.changer:getOperators
- * @private
*/
QueryBuilder.prototype.getOperators = function(filter) {
if (typeof filter == 'string') {
@@ -318,7 +317,6 @@ QueryBuilder.prototype.getOperators = function(filter) {
* @param {boolean} [doThrow=true]
* @returns {object|null}
* @throws UndefinedFilterError
- * @private
*/
QueryBuilder.prototype.getFilterById = function(id, doThrow) {
if (id == '-1') {
@@ -342,7 +340,6 @@ QueryBuilder.prototype.getFilterById = function(id, doThrow) {
* @param {boolean} [doThrow=true]
* @returns {object|null}
* @throws UndefinedOperatorError
- * @private
*/
QueryBuilder.prototype.getOperatorByType = function(type, doThrow) {
if (type == '-1') {
From 507e4161799f13cf94b718c37d05bd4cbb680bad Mon Sep 17 00:00:00 2001
From: Sami Mokaddem
Date: Sun, 25 Nov 2018 10:51:20 +0100
Subject: [PATCH 07/42] chg: [plugin:chosen] avoid creating useless chosen
widget (#743)
Prevent the creation of an glitchy empty chosen widget in case of a select containing only one value.
---
src/plugins/chosen-selectpicker/plugin.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/plugins/chosen-selectpicker/plugin.js b/src/plugins/chosen-selectpicker/plugin.js
index 3e72e72f..e18c8573 100644
--- a/src/plugins/chosen-selectpicker/plugin.js
+++ b/src/plugins/chosen-selectpicker/plugin.js
@@ -23,7 +23,9 @@ QueryBuilder.define('chosen-selectpicker', function(options) {
});
this.on('afterCreateRuleOperators', function(e, rule) {
- rule.$el.find(Selectors.rule_operator).removeClass('form-control').chosen(options);
+ if (e.builder.getOperators(rule.filter).length > 1) {
+ rule.$el.find(Selectors.rule_operator).removeClass('form-control').chosen(options);
+ }
});
// update selectpicker on change
From 673571067d3b9ba6ee47d1d485083293c1ddb7bd Mon Sep 17 00:00:00 2001
From: Pavel Savchenko
Date: Tue, 4 Dec 2018 21:18:12 +0100
Subject: [PATCH 08/42] feat: add source map for easier debugging (#749)
---
Gruntfile.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Gruntfile.js b/Gruntfile.js
index c36b0a42..a2298e83 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -243,7 +243,8 @@ module.exports = function(grunt) {
uglify: {
options: {
banner: '<%= banner %>\n',
- mangle: { reserved: ['$'] }
+ mangle: { reserved: ['$'] },
+ sourceMap: true,
},
dist: {
files: [{
From 49d99e52c7c9c430d46dd8dabbc0c2ab9110b2fd Mon Sep 17 00:00:00 2001
From: Timothy Anyona
Date: Tue, 25 Dec 2018 20:13:36 +0300
Subject: [PATCH 09/42] Added swahili translation (#754)
---
src/i18n/sw.json | 63 ++++++++++++++++++++++++++++++
src/plugins/invert/i18n/sw.json | 3 ++
src/plugins/not-group/i18n/sw.json | 3 ++
3 files changed, 69 insertions(+)
create mode 100644 src/i18n/sw.json
create mode 100644 src/plugins/invert/i18n/sw.json
create mode 100644 src/plugins/not-group/i18n/sw.json
diff --git a/src/i18n/sw.json b/src/i18n/sw.json
new file mode 100644
index 00000000..e215a84f
--- /dev/null
+++ b/src/i18n/sw.json
@@ -0,0 +1,63 @@
+{
+ "__locale": "Swahili (sw)",
+ "__author": "Timothy Anyona",
+
+ "add_rule": "Ongeza kanuni",
+ "add_group": "Ongeza kikundi",
+ "delete_rule": "Futa",
+ "delete_group": "Futa",
+
+ "conditions": {
+ "AND": "NA",
+ "OR": "AU"
+ },
+
+ "operators": {
+ "equal": "ni",
+ "not_equal": "sio",
+ "in": "mojawapo ya",
+ "not_in": "sio mojawapo ya",
+ "less": "isiyozidi",
+ "less_or_equal": "isiyozidi au ni sawa na",
+ "greater": "inayozidi",
+ "greater_or_equal": "inayozidi au ni sawa na",
+ "between": "kati ya",
+ "not_between": "isiyo kati ya",
+ "begins_with": "inaanza na",
+ "not_begins_with": "isiyoanza na",
+ "contains": "ina",
+ "not_contains": "haina",
+ "ends_with": "inaisha na",
+ "not_ends_with": "isiyoisha na",
+ "is_empty": "ni tupu",
+ "is_not_empty": "sio tupu",
+ "is_null": "ni batili",
+ "is_not_null": "sio batili"
+ },
+
+ "errors": {
+ "no_filter": "Chujio halijachaguliwa",
+ "empty_group": "Kikundi ki tupu",
+ "radio_empty": "Thamani haijachaguliwa",
+ "checkbox_empty": "Thamani haijachaguliwa",
+ "select_empty": "Thamani haijachaguliwa",
+ "string_empty": "Thamani tupu",
+ "string_exceed_min_length": "Lazima iwe na vibambo visiopungua {0}",
+ "string_exceed_max_length": "Haifai kuwa na vibambo zaidi ya {0}",
+ "string_invalid_format": "Fomati batili ({0})",
+ "number_nan": "Sio nambari",
+ "number_not_integer": "Sio namba kamili",
+ "number_not_double": "Sio namba desimali",
+ "number_exceed_min": "Lazima iwe zaidi ya {0}",
+ "number_exceed_max": "Lazima iwe chini ya {0}",
+ "number_wrong_step": "Lazima iwe kigawe cha {0}",
+ "number_between_invalid": "Thamani batili, {0} ni kubwa kuliko {1}",
+ "datetime_empty": "Thamani tupu",
+ "datetime_invalid": "Fomati tarehe batili ({0})",
+ "datetime_exceed_min": "Lazima iwe baada ya {0}",
+ "datetime_exceed_max": "Lazima iwe kabla ya {0}",
+ "datetime_between_invalid": "Thamani batili, {0} ni baada ya {1}",
+ "boolean_not_valid": "Sio buleani",
+ "operator_not_multiple": "Opereta \"{1}\" haikubali thamani nyingi"
+ }
+}
diff --git a/src/plugins/invert/i18n/sw.json b/src/plugins/invert/i18n/sw.json
new file mode 100644
index 00000000..7ee2e3fd
--- /dev/null
+++ b/src/plugins/invert/i18n/sw.json
@@ -0,0 +1,3 @@
+{
+ "invert": "Pindua"
+}
diff --git a/src/plugins/not-group/i18n/sw.json b/src/plugins/not-group/i18n/sw.json
new file mode 100644
index 00000000..36f9902b
--- /dev/null
+++ b/src/plugins/not-group/i18n/sw.json
@@ -0,0 +1,3 @@
+{
+ "NOT": "SIO"
+}
From c6a23f657d53e8724ef1978732617e0dfe3e67d3 Mon Sep 17 00:00:00 2001
From: John <16876448+b6b@users.noreply.github.com>
Date: Wed, 6 Feb 2019 07:29:56 -0800
Subject: [PATCH 10/42] Support different placeholders for each input when
nb_inputs > 1 (#764)
Co-authored-by: Alejandro Rincon
---
src/template.js | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/template.js b/src/template.js
index c01d43d1..004d4693 100644
--- a/src/template.js
+++ b/src/template.js
@@ -265,6 +265,7 @@ QueryBuilder.prototype.getRuleInput = function(rule, value_id) {
var name = rule.id + '_value_' + value_id;
var c = filter.vertical ? ' class=block' : '';
var h = '';
+ var placeholder = Array.isArray(filter.placeholder) ? filter.placeholder[value_id] : filter.placeholder;
if (typeof filter.input == 'function') {
h = filter.input.call(this, rule, name);
@@ -288,7 +289,7 @@ QueryBuilder.prototype.getRuleInput = function(rule, value_id) {
if (filter.rows) h += ' rows="' + filter.rows + '"';
if (validation.min !== undefined) h += ' minlength="' + validation.min + '"';
if (validation.max !== undefined) h += ' maxlength="' + validation.max + '"';
- if (filter.placeholder) h += ' placeholder="' + filter.placeholder + '"';
+ if (placeholder) h += ' placeholder="' + placeholder + '"';
h += '>';
break;
@@ -297,14 +298,14 @@ QueryBuilder.prototype.getRuleInput = function(rule, value_id) {
if (validation.step !== undefined) h += ' step="' + validation.step + '"';
if (validation.min !== undefined) h += ' min="' + validation.min + '"';
if (validation.max !== undefined) h += ' max="' + validation.max + '"';
- if (filter.placeholder) h += ' placeholder="' + filter.placeholder + '"';
+ if (placeholder) h += ' placeholder="' + placeholder + '"';
if (filter.size) h += ' size="' + filter.size + '"';
h += '>';
break;
default:
h += '
Date: Fri, 22 Feb 2019 12:08:45 +0200
Subject: [PATCH 11/42] Added Lithuanian translation (#766)
---
src/i18n/lt.json | 63 ++++++++++++++++++++++++++++++
src/plugins/invert/i18n/lt.json | 3 ++
src/plugins/not-group/i18n/lt.json | 3 ++
3 files changed, 69 insertions(+)
create mode 100644 src/i18n/lt.json
create mode 100644 src/plugins/invert/i18n/lt.json
create mode 100644 src/plugins/not-group/i18n/lt.json
diff --git a/src/i18n/lt.json b/src/i18n/lt.json
new file mode 100644
index 00000000..c95c4f08
--- /dev/null
+++ b/src/i18n/lt.json
@@ -0,0 +1,63 @@
+{
+ "__locale": "Lithuanian (lt)",
+ "__author": "Dalius Guzauskas (aka Tichij), https://lt.linkedin.com/in/daliusg",
+
+ "add_rule": "Pridėti taisyklę",
+ "add_group": "Pridėti grupę",
+ "delete_rule": "Ištrinti",
+ "delete_group": "Ištrinti",
+
+ "conditions": {
+ "AND": "IR",
+ "OR": "ARBA"
+ },
+
+ "operators": {
+ "equal": "lygu",
+ "not_equal": "nėra lygu",
+ "in": "iš nurodytų",
+ "not_in": "ne iš nurodytų",
+ "less": "mažiau",
+ "less_or_equal": "mažiau arba lygu",
+ "greater": "daugiau",
+ "greater_or_equal": "daugiau arba lygu",
+ "between": "tarp",
+ "not_between": "nėra tarp",
+ "begins_with": "prasideda",
+ "not_begins_with": "neprasideda",
+ "contains": "turi",
+ "not_contains": "neturi",
+ "ends_with": "baigiasi",
+ "not_ends_with": "nesibaigia",
+ "is_empty": "tuščia",
+ "is_not_empty": "ne tuščia",
+ "is_null": "neapibrėžta",
+ "is_not_null": "nėra neapibrėžta"
+ },
+
+ "errors": {
+ "no_filter": "Nepasirinktas filtras",
+ "empty_group": "Grupė tuščia",
+ "radio_empty": "Nepasirinkta reikšmė",
+ "checkbox_empty": "Nepasirinkta reikšmė",
+ "select_empty": "Nepasirinkta reikšmė",
+ "string_empty": "Tuščia reikšmė",
+ "string_exceed_min_length": "Turi būti bent {0} simbolių",
+ "string_exceed_max_length": "Turi būti ne daugiau kaip {0} simbolių",
+ "string_invalid_format": "Klaidingas formatas ({0})",
+ "number_nan": "Nėra skaičius",
+ "number_not_integer": "Ne sveikasis skaičius",
+ "number_not_double": "Ne realusis skaičius",
+ "number_exceed_min": "Turi būti daugiau už {0}",
+ "number_exceed_max": "Turi būti mažiau už {0}",
+ "number_wrong_step": "Turi būti {0} kartotinis",
+ "number_between_invalid": "Klaidingos reikšmės, {0} yra daugiau už {1}",
+ "datetime_empty": "Tuščia reikšmė",
+ "datetime_invalid": "Klaidingas datos formatas ({0})",
+ "datetime_exceed_min": "Turi būti po {0}",
+ "datetime_exceed_max": "Turi būti prieš {0}",
+ "datetime_between_invalid": "Klaidingos reikšmės, {0} yra daugiau už {1}",
+ "boolean_not_valid": "Nėra loginis tipas",
+ "operator_not_multiple": "Operatorius \"{1}\" negali priimti kelių reikšmių"
+ }
+}
diff --git a/src/plugins/invert/i18n/lt.json b/src/plugins/invert/i18n/lt.json
new file mode 100644
index 00000000..6913901d
--- /dev/null
+++ b/src/plugins/invert/i18n/lt.json
@@ -0,0 +1,3 @@
+{
+ "invert": "Invertuoti"
+}
diff --git a/src/plugins/not-group/i18n/lt.json b/src/plugins/not-group/i18n/lt.json
new file mode 100644
index 00000000..8025e4e8
--- /dev/null
+++ b/src/plugins/not-group/i18n/lt.json
@@ -0,0 +1,3 @@
+{
+ "NOT": "NE"
+}
From 62ac960403930a32fd474c8b806dfcea39928e1a Mon Sep 17 00:00:00 2001
From: Timothy Anyona
Date: Mon, 22 Apr 2019 13:05:03 +0300
Subject: [PATCH 12/42] Updated Russian translation (Translation by Hubbitus)
---
src/plugins/not-group/i18n/ru.json | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 src/plugins/not-group/i18n/ru.json
diff --git a/src/plugins/not-group/i18n/ru.json b/src/plugins/not-group/i18n/ru.json
new file mode 100644
index 00000000..923d6069
--- /dev/null
+++ b/src/plugins/not-group/i18n/ru.json
@@ -0,0 +1,3 @@
+{
+ "NOT": "НЕ"
+}
From 42419b6d5ac3bda6d37d83285c6d09c9e313a0b0 Mon Sep 17 00:00:00 2001
From: Timothy Anyona
Date: Thu, 25 Apr 2019 10:20:50 +0300
Subject: [PATCH 13/42] Added missing Russian strings in main translation
(Translation by Hubbitus)
---
src/i18n/ru.json | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/i18n/ru.json b/src/i18n/ru.json
index 33a343e8..aa230155 100644
--- a/src/i18n/ru.json
+++ b/src/i18n/ru.json
@@ -21,6 +21,7 @@
"greater": "больше",
"greater_or_equal": "больше или равно",
"between": "между",
+ "not_between": "не между",
"begins_with": "начинается с",
"not_begins_with": "не начинается с",
"contains": "содержит",
@@ -49,10 +50,12 @@
"number_exceed_min": "Должно быть больше {0}",
"number_exceed_max": "Должно быть меньше, чем {0}",
"number_wrong_step": "Должно быть кратно {0}",
+ "number_between_invalid": "Недопустимые значения, {0} больше {1}",
"datetime_empty": "Не заполненно",
"datetime_invalid": "Неверный формат даты ({0})",
"datetime_exceed_min": "Должно быть, после {0}",
"datetime_exceed_max": "Должно быть, до {0}",
+ "datetime_between_invalid": "Недопустимые значения, {0} больше {1}",
"boolean_not_valid": "Не логическое",
"operator_not_multiple": "Оператор \"{1}\" не поддерживает много значений"
}
From d7c3e262250b1f52294a837be0069d1d14c3fa85 Mon Sep 17 00:00:00 2001
From: Mike Iceman
Date: Wed, 18 Sep 2019 22:00:00 +0200
Subject: [PATCH 14/42] Russian translation typos (#820)
---
src/i18n/ru.json | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/i18n/ru.json b/src/i18n/ru.json
index aa230155..9ccfefcc 100644
--- a/src/i18n/ru.json
+++ b/src/i18n/ru.json
@@ -37,10 +37,10 @@
"errors": {
"no_filter": "Фильтр не выбран",
"empty_group": "Группа пуста",
- "radio_empty": "Не выбранно значение",
- "checkbox_empty": "Не выбранно значение",
- "select_empty": "Не выбранно значение",
- "string_empty": "Не заполненно",
+ "radio_empty": "Не выбрано значение",
+ "checkbox_empty": "Не выбрано значение",
+ "select_empty": "Не выбрано значение",
+ "string_empty": "Не заполнено",
"string_exceed_min_length": "Должен содержать больше {0} символов",
"string_exceed_max_length": "Должен содержать меньше {0} символов",
"string_invalid_format": "Неверный формат ({0})",
@@ -51,7 +51,7 @@
"number_exceed_max": "Должно быть меньше, чем {0}",
"number_wrong_step": "Должно быть кратно {0}",
"number_between_invalid": "Недопустимые значения, {0} больше {1}",
- "datetime_empty": "Не заполненно",
+ "datetime_empty": "Не заполнено",
"datetime_invalid": "Неверный формат даты ({0})",
"datetime_exceed_min": "Должно быть, после {0}",
"datetime_exceed_max": "Должно быть, до {0}",
From f0e8e3efadcda442cc9012061b4c90f2516f79e3 Mon Sep 17 00:00:00 2001
From: Damien Sorel
Date: Wed, 18 Sep 2019 22:09:32 +0200
Subject: [PATCH 15/42] Add Github CI
---
.github/workflows/main.yml | 16 ++++++++++++++++
.travis.yml | 2 --
package.json | 2 ++
3 files changed, 18 insertions(+), 2 deletions(-)
create mode 100644 .github/workflows/main.yml
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 00000000..81718908
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,16 @@
+name: CI
+
+on: [push, pull_request]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v1
+ - name: build
+ run: |
+ npm install
+ npm run test
+ npm run build
diff --git a/.travis.yml b/.travis.yml
index 6a2b5a40..d7ea7141 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,4 @@
language: node_js
node_js:
- "8"
-before_install:
- - npm install -g grunt-cli
after_success: grunt coveralls
diff --git a/package.json b/package.json
index ad930ee5..6b650b9d 100644
--- a/package.json
+++ b/package.json
@@ -27,6 +27,7 @@
"foodoc": "^0.0.9",
"grunt": "^1.0.2",
"grunt-banner": "^0.6.0",
+ "grunt-cli": "^1.3.2",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-concat": "^1.0.0",
"grunt-contrib-connect": "^1.0.0",
@@ -69,6 +70,7 @@
"url": "https://github.com/mistic100/jQuery-QueryBuilder/issues"
},
"scripts": {
+ "build": "grunt",
"serve": "grunt serve",
"test": "grunt test"
}
From 2c748a4f53ea3b95fe313c877a8ccc248cf3d9d2 Mon Sep 17 00:00:00 2001
From: k2s
Date: Fri, 18 Oct 2019 19:11:47 +0200
Subject: [PATCH 16/42] Slovak translation (#830)
---
src/i18n/sk.json | 63 ++++++++++++++++++++++++++++++
src/plugins/invert/i18n/sk.json | 3 ++
src/plugins/not-group/i18n/sk.json | 3 ++
3 files changed, 69 insertions(+)
create mode 100644 src/i18n/sk.json
create mode 100644 src/plugins/invert/i18n/sk.json
create mode 100644 src/plugins/not-group/i18n/sk.json
diff --git a/src/i18n/sk.json b/src/i18n/sk.json
new file mode 100644
index 00000000..0a5926c4
--- /dev/null
+++ b/src/i18n/sk.json
@@ -0,0 +1,63 @@
+{
+ "__locale": "Slovensky (sk)",
+ "__author": "k2s",
+
+ "add_rule": "Pridať podmienku",
+ "add_group": "Pridať skupinu",
+ "delete_rule": "Zmazať",
+ "delete_group": "Zmazať",
+
+ "conditions": {
+ "AND": "A",
+ "OR": "ALEBO"
+ },
+
+ "operators": {
+ "equal": "rovné",
+ "not_equal": "nerovné",
+ "in": "v",
+ "not_in": "nie v",
+ "less": "menej",
+ "less_or_equal": "menej alebo rovné",
+ "greater": "väčšie",
+ "greater_or_equal": "väčšie alebo rovné",
+ "between": "medzi",
+ "not_between": "nie medzi",
+ "begins_with": "začína na",
+ "not_begins_with": "nezačína na",
+ "contains": "obsahuje",
+ "not_contains": "neobsahuje",
+ "ends_with": "končí na",
+ "not_ends_with": "nekončí na",
+ "is_empty": "je prázdne",
+ "is_not_empty": "nie je prázdne",
+ "is_null": "je null",
+ "is_not_null": "nie je null"
+ },
+
+ "errors": {
+ "no_filter": "Nie je zvolený filter",
+ "empty_group": "Skupina je prázdna",
+ "radio_empty": "Nie je označená hodnota",
+ "checkbox_empty": "Nie je označená hodnota",
+ "select_empty": "Nie je označená hodnota",
+ "string_empty": "Prázdna hodnota",
+ "string_exceed_min_length": "Musí obsahovať aspon {0} znakov",
+ "string_exceed_max_length": "Nesmie obsahovať viac ako {0} znakov",
+ "string_invalid_format": "Chybný formát ({0})",
+ "number_nan": "Nie je číslo",
+ "number_not_integer": "Nie je celé číslo",
+ "number_not_double": "Nie je desatinné číslo",
+ "number_exceed_min": "Musí byť väčšie ako {0}",
+ "number_exceed_max": "Musí byť menšie ako {0}",
+ "number_wrong_step": "Musí byť násobkom čísla {0}",
+ "number_between_invalid": "Chybné hodnoty, {0} je väčšie ako {1}",
+ "datetime_empty": "Prázdna hodnota",
+ "datetime_invalid": "Chybný formát dátumu ({0})",
+ "datetime_exceed_min": "Musí byť neskôr ako {0}",
+ "datetime_exceed_max": "Musí byť skôr ako {0}",
+ "datetime_between_invalid": "Chybné hodnoty, {0} je neskôr ako {1}",
+ "boolean_not_valid": "Neplatné áno/nie",
+ "operator_not_multiple": "Operátor '{1}' nepodporuje viacero hodnôt"
+ }
+}
diff --git a/src/plugins/invert/i18n/sk.json b/src/plugins/invert/i18n/sk.json
new file mode 100644
index 00000000..b9d3274b
--- /dev/null
+++ b/src/plugins/invert/i18n/sk.json
@@ -0,0 +1,3 @@
+{
+ "invert": "Invertný"
+}
diff --git a/src/plugins/not-group/i18n/sk.json b/src/plugins/not-group/i18n/sk.json
new file mode 100644
index 00000000..9da29bd5
--- /dev/null
+++ b/src/plugins/not-group/i18n/sk.json
@@ -0,0 +1,3 @@
+{
+ "NOT": "NIE"
+}
From 844e608228045e05a416980fd4f113bfab2753f0 Mon Sep 17 00:00:00 2001
From: itajackass
Date: Thu, 31 Oct 2019 14:21:40 +0100
Subject: [PATCH 17/42] Updated italian translation (#837)
---
src/i18n/it.json | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/i18n/it.json b/src/i18n/it.json
index d16fb50c..076cc172 100644
--- a/src/i18n/it.json
+++ b/src/i18n/it.json
@@ -1,6 +1,6 @@
{
"__locale": "Italian (it)",
- "__author": "davegraziosi",
+ "__author": "davegraziosi, Giuseppe Lodi Rizzini",
"add_rule": "Aggiungi regola",
"add_group": "Aggiungi gruppo",
@@ -51,11 +51,13 @@
"number_exceed_min": "Deve essere maggiore di {0}",
"number_exceed_max": "Deve essere minore di {0}",
"number_wrong_step": "Deve essere multiplo di {0}",
+ "number_between_invalid": "Valori non validi, {0} è maggiore di {1}",
"datetime_empty": "Valore vuoto",
"datetime_invalid": "Formato data non valido ({0})",
"datetime_exceed_min": "Deve essere successivo a {0}",
"datetime_exceed_max": "Deve essere precedente a {0}",
+ "datetime_between_invalid": "Valori non validi, {0} è maggiore di {1}",
"boolean_not_valid": "Non è un booleano",
"operator_not_multiple": "L'Operatore {0} non può accettare valori multipli"
}
-}
\ No newline at end of file
+}
From f8e08cc4f69dd4836a4a14afb6c6b1af7c6b9a2f Mon Sep 17 00:00:00 2001
From: Damien SOREL
Date: Fri, 29 Nov 2019 12:46:37 +0100
Subject: [PATCH 18/42] Remove travis
---
.travis.yml | 4 ----
README.md | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
delete mode 100644 .travis.yml
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index d7ea7141..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - "8"
-after_success: grunt coveralls
diff --git a/README.md b/README.md
index cb412ddb..3f5fea48 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
[](https://www.npmjs.com/package/jQuery-QueryBuilder)
[](https://www.jsdelivr.com/package/npm/jQuery-QueryBuilder)
-[](https://travis-ci.org/mistic100/jQuery-QueryBuilder)
+[](https://github.com/mistic100/jQuery-QueryBuilder/actions)
[](https://coveralls.io/r/mistic100/jQuery-QueryBuilder)
[](https://david-dm.org/mistic100/jQuery-QueryBuilder)
From 9b79b35a9ae1430c28ccf5def1f67056b24a4f03 Mon Sep 17 00:00:00 2001
From: Damien Sorel
Date: Thu, 5 Mar 2020 12:33:29 +0100
Subject: [PATCH 19/42] Hungarian translation (#862)
---
src/i18n/hu.json | 63 ++++++++++++++++++++++++++++++
src/plugins/invert/i18n/hu.json | 3 ++
src/plugins/not-group/i18n/hu.json | 3 ++
3 files changed, 69 insertions(+)
create mode 100644 src/i18n/hu.json
create mode 100644 src/plugins/invert/i18n/hu.json
create mode 100644 src/plugins/not-group/i18n/hu.json
diff --git a/src/i18n/hu.json b/src/i18n/hu.json
new file mode 100644
index 00000000..22fa5e4c
--- /dev/null
+++ b/src/i18n/hu.json
@@ -0,0 +1,63 @@
+{
+ "__locale": "Hungarian - Magyar (hu)",
+ "__author": "Szabó Attila \"Tailor993\", https://www.tailor993.hu",
+
+ "add_rule": "Feltétel hozzáadása",
+ "add_group": "Csoport hozzáadása",
+ "delete_rule": "Feltétel törlése",
+ "delete_group": "Csoport törlése",
+
+ "conditions": {
+ "AND": "ÉS",
+ "OR": "VAGY"
+ },
+
+ "operators": {
+ "equal": "egyenlő",
+ "not_equal": "nem egyenlő",
+ "in": "bennevan",
+ "not_in": "nincs benne",
+ "less": "kisebb",
+ "less_or_equal": "kisebb vagy egyenlő",
+ "greater": "nagyobb",
+ "greater_or_equal": "nagyobb vagy egyenlő",
+ "between": "közötte",
+ "not_between": "nincs közötte",
+ "begins_with": "ezzel kezdődik",
+ "not_begins_with": "ezzel nem kezdődik",
+ "contains": "tartalmazza",
+ "not_contains": "nem tartalmazza",
+ "ends_with": "erre végződik",
+ "not_ends_with": "errre nem végződik",
+ "is_empty": "üres",
+ "is_not_empty": "nem üres",
+ "is_null": "null",
+ "is_not_null": "nem null"
+ },
+
+ "errors": {
+ "no_filter": "Nincs kiválasztott feltétel",
+ "empty_group": "A csoport üres",
+ "radio_empty": "Nincs kiválasztott érték",
+ "checkbox_empty": "Nincs kiválasztott érték",
+ "select_empty": "Nincs kiválasztott érték",
+ "string_empty": "Üres érték",
+ "string_exceed_min_length": "A megadott szöveg rövidebb a várt {0} karakternél",
+ "string_exceed_max_length": "A megadott szöveg nem tartalmazhat többet, mint {0} karaktert",
+ "string_invalid_format": "Nem megfelelő formátum ({0})",
+ "number_nan": "Nem szám",
+ "number_not_integer": "Nem egész szám (integer)",
+ "number_not_double": "Nem valós szám",
+ "number_exceed_min": "Nagyobbnak kell lennie, mint {0}",
+ "number_exceed_max": "Kisebbnek kell lennie, mint {0}",
+ "number_wrong_step": "{0} többszörösének kell lennie.",
+ "number_between_invalid": "INem megfelelő érték, {0} nagyobb, mint {1}",
+ "datetime_empty": "Üres érték",
+ "datetime_invalid": "nem megfelelő dátum formátum ({0})",
+ "datetime_exceed_min": "A dátumnak későbbinek kell lennie, mint{0}",
+ "datetime_exceed_max": "A dátumnak korábbinak kell lennie, mint {0}",
+ "datetime_between_invalid": "Nem megfelelő értékek, {0} nagyobb, mint {1}",
+ "boolean_not_valid": "Nem igaz/hamis (boolean)",
+ "operator_not_multiple": "Ez a művelet: \"{1}\" nem fogadhat el több értéket"
+ }
+}
diff --git a/src/plugins/invert/i18n/hu.json b/src/plugins/invert/i18n/hu.json
new file mode 100644
index 00000000..83b08887
--- /dev/null
+++ b/src/plugins/invert/i18n/hu.json
@@ -0,0 +1,3 @@
+{
+ "invert": "Megfordítás (Invertálás)"
+}
diff --git a/src/plugins/not-group/i18n/hu.json b/src/plugins/not-group/i18n/hu.json
new file mode 100644
index 00000000..4399728c
--- /dev/null
+++ b/src/plugins/not-group/i18n/hu.json
@@ -0,0 +1,3 @@
+{
+ "NOT": "NEM"
+}
From cc03c3336c2a6aaa60ca9a83af506232d4f034b2 Mon Sep 17 00:00:00 2001
From: Henrik
Date: Thu, 19 Mar 2020 10:57:03 +0100
Subject: [PATCH 20/42] Swedish translations (#865)
---
src/i18n/sv.json | 63 ++++++++++++++++++++++++++++++
src/plugins/invert/i18n/sv.json | 3 ++
src/plugins/not-group/i18n/sv.json | 3 ++
3 files changed, 69 insertions(+)
create mode 100644 src/i18n/sv.json
create mode 100644 src/plugins/invert/i18n/sv.json
create mode 100644 src/plugins/not-group/i18n/sv.json
diff --git a/src/i18n/sv.json b/src/i18n/sv.json
new file mode 100644
index 00000000..a3b06e84
--- /dev/null
+++ b/src/i18n/sv.json
@@ -0,0 +1,63 @@
+{
+ "__locale": "Svenska (sv)",
+ "__author": "hekin1",
+
+ "add_rule": "Lägg till regel",
+ "add_group": "Lägg till grupp",
+ "delete_rule": "Ta bort",
+ "delete_group": "Ta bort",
+
+ "conditions": {
+ "AND": "OCH",
+ "OR": "ELLER"
+ },
+
+ "operators": {
+ "equal": "lika med",
+ "not_equal": "ej lika med",
+ "in": "en av",
+ "not_in": "ej en av",
+ "less": "mindre",
+ "less_or_equal": "mindre eller lika med",
+ "greater": "större",
+ "greater_or_equal": "större eller lika med",
+ "between": "mellan",
+ "not_between": "ej mellan",
+ "begins_with": "börjar med",
+ "not_begins_with": "börjar inte med",
+ "contains": "innehåller",
+ "not_contains": "innehåller inte",
+ "ends_with": "slutar med",
+ "not_ends_with": "slutar inte med",
+ "is_empty": "är tom",
+ "is_not_empty": "är inte tom",
+ "is_null": "är null",
+ "is_not_null": "är inte null"
+ },
+
+ "errors": {
+ "no_filter": "Inget filter valt",
+ "empty_group": "Gruppen är tom",
+ "radio_empty": "Inget värde valt",
+ "checkbox_empty": "Inget värde valt",
+ "select_empty": "Inget värde valt",
+ "string_empty": "Tomt värde",
+ "string_exceed_min_length": "Måste innehålla minst {0} tecken",
+ "string_exceed_max_length": "Får ej innehålla fler än {0} tecken",
+ "string_invalid_format": "Felaktigt format ({0})",
+ "number_nan": "Inte numeriskt",
+ "number_not_integer": "Inte en siffra",
+ "number_not_double": "Inte ett decimaltal",
+ "number_exceed_min": "Måste vara större än {0}",
+ "number_exceed_max": "Måste vara lägre än {0}",
+ "number_wrong_step": "Måste vara en mutipel av {0}",
+ "number_between_invalid": "Felaktiga värden, {0} är större än {1}",
+ "datetime_empty": "Tomt värde",
+ "datetime_invalid": "Felaktigt datumformat ({0})",
+ "datetime_exceed_min": "Måste vara efter {0}",
+ "datetime_exceed_max": "Måste vara före {0}",
+ "datetime_between_invalid": "Felaktiga värden, {0} är större än {1}",
+ "boolean_not_valid": "Inte en boolean",
+ "operator_not_multiple": "Operatorn \"{1}\" accepterar inte flera värden"
+ }
+}
diff --git a/src/plugins/invert/i18n/sv.json b/src/plugins/invert/i18n/sv.json
new file mode 100644
index 00000000..aa932882
--- /dev/null
+++ b/src/plugins/invert/i18n/sv.json
@@ -0,0 +1,3 @@
+{
+ "invert": "Invertera"
+}
diff --git a/src/plugins/not-group/i18n/sv.json b/src/plugins/not-group/i18n/sv.json
new file mode 100644
index 00000000..2778b4da
--- /dev/null
+++ b/src/plugins/not-group/i18n/sv.json
@@ -0,0 +1,3 @@
+{
+ "NOT": "INTE"
+}
From e4c845c1ecd270d5a216fac6912f792266c9cecc Mon Sep 17 00:00:00 2001
From: Damien Sorel
Date: Fri, 4 Sep 2020 12:16:10 +0200
Subject: [PATCH 21/42] Update README.md
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 3f5fea48..262fd046 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,7 @@
[](https://github.com/mistic100/jQuery-QueryBuilder/actions)
[](https://coveralls.io/r/mistic100/jQuery-QueryBuilder)
[](https://david-dm.org/mistic100/jQuery-QueryBuilder)
+[](https://gitlocalize.com/repo/5259/whole_project?utm_source=badge)
jQuery plugin offering an simple interface to create complex queries.
From 1539a6ce5de8eee7109f9a8c05208b83354e1faa Mon Sep 17 00:00:00 2001
From: mistic100
Date: Mon, 2 Nov 2020 21:06:20 +0100
Subject: [PATCH 22/42] Better dependencies, remove bower and composer
---
.gitignore | 2 ++
bower.json | 46 ----------------------------------------------
composer.json | 46 ----------------------------------------------
package.json | 12 ++++++------
4 files changed, 8 insertions(+), 98 deletions(-)
delete mode 100644 bower.json
delete mode 100644 composer.json
diff --git a/.gitignore b/.gitignore
index 2b7141a4..d0a0ebb9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,5 @@ doc
.coverage-results
.idea
*.iml
+yarn.lock
+package-lock.json
diff --git a/bower.json b/bower.json
deleted file mode 100644
index f1850a1e..00000000
--- a/bower.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "name": "jQuery-QueryBuilder",
- "authors": [
- {
- "name": "Damien \"Mistic\" Sorel",
- "email": "contact@git.strangeplanet.fr",
- "homepage": "https://www.strangeplanet.fr"
- }
- ],
- "description": "jQuery plugin for user friendly query/filter creator",
- "main": [
- "dist/js/query-builder.js",
- "dist/css/query-builder.default.css"
- ],
- "dependencies": {
- "jquery": ">=1.10.0",
- "bootstrap": ">=3.1.0 <4",
- "moment": ">=2.6.0",
- "jquery-extendext": ">=0.1.2",
- "doT": ">=1.0.3"
- },
- "keywords": [
- "jquery",
- "query",
- "builder",
- "filter"
- ],
- "license": "MIT",
- "homepage": "https://querybuilder.js.org",
- "repository": {
- "type": "git",
- "url": "git://github.com/mistic100/jQuery-QueryBuilder.git"
- },
- "ignore": [
- "**/.*",
- "node_modules",
- "bower_components",
- "build",
- "src",
- "tests",
- "composer.json",
- "package.json",
- "Gruntfile.js",
- "CONTRIBUTING.md"
- ]
-}
diff --git a/composer.json b/composer.json
deleted file mode 100644
index 3d52b425..00000000
--- a/composer.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "name": "mistic100/jquery-querybuilder",
- "version": "2.4.0",
- "authors": [{
- "name": "Damien \"Mistic\" Sorel",
- "email": "contact@git.strangeplanet.fr",
- "homepage": "https://www.strangeplanet.fr"
- }],
- "description": "jQuery plugin for user friendly query/filter creator",
- "require": {
- "robloach/component-installer": "*",
- "components/jquery": ">=1.10.0",
- "moment/moment": ">=2.6.0",
- "components/bootstrap": ">=3.1.0 <4"
- },
- "keywords": [
- "jquery",
- "query",
- "builder",
- "filter"
- ],
- "license": "MIT",
- "homepage": "https://querybuilder.js.org",
- "support": {
- "issues": "https://github.com/mistic100/jQuery-QueryBuilder/issues"
- },
- "extra": {
- "component": {
- "styles": [
- "dist/css/query-builder.default.css"
- ],
- "scripts": [
- "dist/js/query-builder.standalone.js"
- ],
- "files": [
- "dist/css/query-builder.default.min.css",
- "dist/css/query-builder.dark.css",
- "dist/css/query-builder.dark.min.css",
- "dist/js/query-builder.js",
- "dist/js/query-builder.min.js",
- "dist/js/query-builder.standalone.min.js",
- "dist/i18n/*.js"
- ]
- }
- }
-}
diff --git a/package.json b/package.json
index 6b650b9d..14a80bfd 100644
--- a/package.json
+++ b/package.json
@@ -9,11 +9,12 @@
"description": "jQuery plugin for user friendly query/filter creator",
"main": "dist/js/query-builder.js",
"dependencies": {
- "bootstrap": ">=3.1.0 <4",
- "dot": ">=1.0.3",
- "jquery": "^3.3.1",
- "jquery-extendext": ">=0.1.2",
- "moment": "^2.21.0"
+ "bootstrap": "^3.4.1",
+ "dot": "^1.1.3",
+ "jquery": "^3.5.1",
+ "jquery-extendext": "^1.0.0",
+ "moment": "^2.29.1",
+ "sql-parser-mistic": "^1.2.3"
},
"devDependencies": {
"awesome-bootstrap-checkbox": "^0.3.7",
@@ -51,7 +52,6 @@
"jit-grunt": "^0.10.0",
"qunit": "^2.5.1",
"selectize": "^0.12.4",
- "sql-parser-mistic": "^1.2.2",
"time-grunt": "^1.3.0"
},
"keywords": [
From 7027a020bbd41fb925dde7d6e25a3b427dbdde9e Mon Sep 17 00:00:00 2001
From: Ninezero <41019113+ninezero90hy@users.noreply.github.com>
Date: Tue, 3 Nov 2020 05:07:02 +0900
Subject: [PATCH 23/42] Modify the library load information being used in the
example (#893)
---
examples/index.html | 2 +-
tests/index.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/index.html b/examples/index.html
index e6fc840f..8fc91c18 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -114,7 +114,7 @@ Output
-
+
diff --git a/tests/index.html b/tests/index.html
index c1e719e0..463bc9eb 100644
--- a/tests/index.html
+++ b/tests/index.html
@@ -26,7 +26,7 @@
-
+
From a5950dda1c90042aafba5f886d9cf12bc9763fbe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leon=20Strau=C3=9F?=
Date: Wed, 10 Jun 2020 10:33:06 +0200
Subject: [PATCH 24/42] Fixed Unexpected 'NUMBER'
if you had a query with an "IN" with 10 elements or more, the regex of setRulesFromSQL did not match correctly
---
src/plugins/sql-support/plugin.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/sql-support/plugin.js b/src/plugins/sql-support/plugin.js
index 95b7eda5..17f5c506 100644
--- a/src/plugins/sql-support/plugin.js
+++ b/src/plugins/sql-support/plugin.js
@@ -214,7 +214,7 @@ QueryBuilder.defaults({
'named': function(values, char) {
if (!char || char.length > 1) char = ':';
var regex1 = new RegExp('^\\' + char);
- var regex2 = new RegExp('\\' + char + '(' + Object.keys(values).join('|') + ')', 'g');
+ var regex2 = new RegExp('\\' + char + '(' + Object.keys(values).join('|') + ')\\b', 'g');
return {
parse: function(v) {
return regex1.test(v) ? values[v.slice(1)] : v;
From 5a94400d35f497643dcf1f89cecf2da97c852120 Mon Sep 17 00:00:00 2001
From: Robin van der Vliet
Date: Fri, 19 Mar 2021 17:07:25 +0100
Subject: [PATCH 25/42] Esperanto translation (#906)
---
src/i18n/eo.json | 63 ++++++++++++++++++++++++++++++
src/plugins/invert/i18n/eo.json | 3 ++
src/plugins/not-group/i18n/eo.json | 3 ++
3 files changed, 69 insertions(+)
create mode 100644 src/i18n/eo.json
create mode 100644 src/plugins/invert/i18n/eo.json
create mode 100644 src/plugins/not-group/i18n/eo.json
diff --git a/src/i18n/eo.json b/src/i18n/eo.json
new file mode 100644
index 00000000..b3c9166d
--- /dev/null
+++ b/src/i18n/eo.json
@@ -0,0 +1,63 @@
+{
+ "__locale": "Esperanto (eo)",
+ "__author": "Robin van der Vliet, https://robinvandervliet.com/",
+
+ "add_rule": "Aldoni regulon",
+ "add_group": "Aldoni grupon",
+ "delete_rule": "Forigi",
+ "delete_group": "Forigi",
+
+ "conditions": {
+ "AND": "KAJ",
+ "OR": "AŬ"
+ },
+
+ "operators": {
+ "equal": "estas egala al",
+ "not_equal": "ne estas egala al",
+ "in": "estas en",
+ "not_in": "ne estas en",
+ "less": "estas malpli ol",
+ "less_or_equal": "estas malpli ol aŭ egala al",
+ "greater": "estas pli ol",
+ "greater_or_equal": "estas pli ol aŭ egala al",
+ "between": "estas inter",
+ "not_between": "ne estas inter",
+ "begins_with": "komenciĝas per",
+ "not_begins_with": "ne komenciĝas per",
+ "contains": "enhavas",
+ "not_contains": "ne enhavas",
+ "ends_with": "finiĝas per",
+ "not_ends_with": "ne finiĝas per",
+ "is_empty": "estas malplena",
+ "is_not_empty": "ne estas malplena",
+ "is_null": "estas senvalora",
+ "is_not_null": "ne estas senvalora"
+ },
+
+ "errors": {
+ "no_filter": "Neniu filtrilo elektita",
+ "empty_group": "La grupo estas malplena",
+ "radio_empty": "Neniu valoro elektita",
+ "checkbox_empty": "Neniu valoro elektita",
+ "select_empty": "Neniu valoro elektita",
+ "string_empty": "Malplena valoro",
+ "string_exceed_min_length": "Devas enhavi pli ol {0} signojn",
+ "string_exceed_max_length": "Devas ne enhavi pli ol {0} signojn",
+ "string_invalid_format": "Nevalida strukturo ({0})",
+ "number_nan": "Ne estas nombro",
+ "number_not_integer": "Ne estas entjera nombro",
+ "number_not_double": "Ne estas reela nombro",
+ "number_exceed_min": "Devas esti pli ol {0}",
+ "number_exceed_max": "Devas esti malpli ol {0}",
+ "number_wrong_step": "Devas esti oblo de {0}",
+ "number_between_invalid": "Nevalidaj valoroj, {0} estas pli ol {1}",
+ "datetime_empty": "Malplena valoro",
+ "datetime_invalid": "Nevalida dato ({0})",
+ "datetime_exceed_min": "Devas esti post {0}",
+ "datetime_exceed_max": "Devas esti antaŭ {0}",
+ "datetime_between_invalid": "Nevalidaj valoroj, {0} estas post {1}",
+ "boolean_not_valid": "Ne estas bulea valoro",
+ "operator_not_multiple": "La operacio \"{1}\" ne akceptas plurajn valorojn"
+ }
+}
diff --git a/src/plugins/invert/i18n/eo.json b/src/plugins/invert/i18n/eo.json
new file mode 100644
index 00000000..e5ddde54
--- /dev/null
+++ b/src/plugins/invert/i18n/eo.json
@@ -0,0 +1,3 @@
+{
+ "invert": "Inversigi"
+}
diff --git a/src/plugins/not-group/i18n/eo.json b/src/plugins/not-group/i18n/eo.json
new file mode 100644
index 00000000..8025e4e8
--- /dev/null
+++ b/src/plugins/not-group/i18n/eo.json
@@ -0,0 +1,3 @@
+{
+ "NOT": "NE"
+}
From f620fbd06cd620e8b48f8f28bf7c6657a72e268b Mon Sep 17 00:00:00 2001
From: mistic100
Date: Sat, 20 Mar 2021 14:36:53 +0100
Subject: [PATCH 26/42] Fix #905 Potential XSS on template generation
---
src/core.js | 10 +++++-----
src/plugins/bt-tooltip-errors/plugin.js | 2 +-
src/plugins/filter-description/plugin.js | 6 +++---
src/plugins/invert/plugin.js | 4 ++--
src/plugins/not-group/plugin.js | 2 +-
src/plugins/sortable/plugin.js | 6 +++---
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/core.js b/src/core.js
index 305a9e53..6944c9a3 100644
--- a/src/core.js
+++ b/src/core.js
@@ -345,7 +345,7 @@ QueryBuilder.prototype.setRoot = function(addRule, data, flags) {
addRule = (addRule === undefined || addRule === true);
var group_id = this.nextGroupId();
- var $group = $(this.getGroupTemplate(group_id, 1));
+ var $group = $($.parseHTML(this.getGroupTemplate(group_id, 1)));
this.$el.append($group);
this.model.root = new Group(null, $group);
@@ -535,7 +535,7 @@ QueryBuilder.prototype.addRule = function(parent, data, flags) {
}
var rule_id = this.nextRuleId();
- var $rule = $(this.getRuleTemplate(rule_id));
+ var $rule = $($.parseHTML(this.getRuleTemplate(rule_id)));
var model = parent.addRule($rule);
model.data = data;
@@ -625,7 +625,7 @@ QueryBuilder.prototype.createRuleFilters = function(rule) {
* @returns {QueryBuilder.Filter[]}
*/
var filters = this.change('getRuleFilters', this.filters, rule);
- var $filterSelect = $(this.getRuleFilterSelect(rule, filters));
+ var $filterSelect = $($.parseHTML(this.getRuleFilterSelect(rule, filters)));
rule.$el.find(QueryBuilder.selectors.filter_container).html($filterSelect);
@@ -654,7 +654,7 @@ QueryBuilder.prototype.createRuleOperators = function(rule) {
}
var operators = this.getOperators(rule.filter);
- var $operatorSelect = $(this.getRuleOperatorSelect(rule, operators));
+ var $operatorSelect = $($.parseHTML(this.getRuleOperatorSelect(rule, operators)));
$operatorContainer.html($operatorSelect);
@@ -700,7 +700,7 @@ QueryBuilder.prototype.createRuleInput = function(rule) {
var filter = rule.filter;
for (var i = 0; i < rule.operator.nb_inputs; i++) {
- var $ruleInput = $(this.getRuleInput(rule, i));
+ var $ruleInput = $($.parseHTML(this.getRuleInput(rule, i)));
if (i > 0) $valueContainer.append(this.settings.inputs_separator);
$valueContainer.append($ruleInput);
$inputs = $inputs.add($ruleInput);
diff --git a/src/plugins/bt-tooltip-errors/plugin.js b/src/plugins/bt-tooltip-errors/plugin.js
index e9bc935c..68423252 100644
--- a/src/plugins/bt-tooltip-errors/plugin.js
+++ b/src/plugins/bt-tooltip-errors/plugin.js
@@ -15,7 +15,7 @@ QueryBuilder.define('bt-tooltip-errors', function(options) {
// add BT Tooltip data
this.on('getRuleTemplate.filter getGroupTemplate.filter', function(h) {
- var $h = $(h.value);
+ var $h = $($.parseHTML(h.value));
$h.find(QueryBuilder.selectors.error_container).attr('data-toggle', 'tooltip');
h.value = $h.prop('outerHTML');
});
diff --git a/src/plugins/filter-description/plugin.js b/src/plugins/filter-description/plugin.js
index bbe58fcb..472dd328 100644
--- a/src/plugins/filter-description/plugin.js
+++ b/src/plugins/filter-description/plugin.js
@@ -19,7 +19,7 @@ QueryBuilder.define('filter-description', function(options) {
}
else {
if ($p.length === 0) {
- $p = $('');
+ $p = $($.parseHTML(''));
$p.appendTo(rule.$el);
}
else {
@@ -49,7 +49,7 @@ QueryBuilder.define('filter-description', function(options) {
}
else {
if ($b.length === 0) {
- $b = $('');
+ $b = $($.parseHTML(''));
$b.prependTo(rule.$el.find(QueryBuilder.selectors.rule_actions));
$b.popover({
@@ -89,7 +89,7 @@ QueryBuilder.define('filter-description', function(options) {
}
else {
if ($b.length === 0) {
- $b = $('');
+ $b = $($.parseHTML(''));
$b.prependTo(rule.$el.find(QueryBuilder.selectors.rule_actions));
$b.on('click', function() {
diff --git a/src/plugins/invert/plugin.js b/src/plugins/invert/plugin.js
index 6b77e2fd..c0294e84 100644
--- a/src/plugins/invert/plugin.js
+++ b/src/plugins/invert/plugin.js
@@ -31,7 +31,7 @@ QueryBuilder.define('invert', function(options) {
// Modify templates
if (!options.disable_template) {
this.on('getGroupTemplate.filter', function(h) {
- var $h = $(h.value);
+ var $h = $($.parseHTML(h.value));
$h.find(Selectors.condition_container).after(
'