diff --git a/Gruntfile.js b/Gruntfile.js
index 36ab0d62..3704fcb6 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -150,7 +150,7 @@ module.exports = function(grunt) {
dev: {
options: {
host: '0.0.0.0',
- port: 9000,
+ port: 9100,
livereload: true
}
}
diff --git a/bower.json b/bower.json
index bf6b6519..ba495e77 100644
--- a/bower.json
+++ b/bower.json
@@ -1,10 +1,9 @@
{
- "name": "jQuery-QueryBuilder",
+ "name": "bdt-jQuery-QueryBuilder",
+ "version": "0.1.0",
"authors": [
{
- "name": "Damien \"Mistic\" Sorel",
- "email": "contact@git.strangeplanet.fr",
- "homepage": "http://www.strangeplanet.fr"
+ "name": "Michele Monti"
}
],
"description": "jQuery plugin for user friendly query/filter creator",
diff --git a/examples/index.html b/examples/index.html
index 205d2a06..29bfbf82 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -183,6 +183,37 @@
Output
size: 30,
unique: true
},
+ /*
+ * result
+ */
+ {
+ id: 'result',
+ label: 'Result',
+ type: 'integer',
+ input: 'select',
+ values: {
+ 1: 'Books',
+ 2: 'Movies',
+ 3: 'Music',
+ 4: 'Tools',
+ 5: 'Goodies',
+ 6: 'Clothes'
+ },
+ operators: ['equal'],
+ type2: 'string',
+ operators2: ['equal', 'less', 'less_or_equal', 'greater', 'greater_or_equal'],
+ type3: 'integer',
+ input3: 'select',
+ values3: {
+ 1: 'Books',
+ 2: 'Movies',
+ 3: 'Music',
+ 4: 'Tools',
+ 5: 'Goodies',
+ 6: 'Clothes'
+ },
+ operators3: []
+ },
/*
* textarea
*/
diff --git a/package.json b/package.json
index c546cfad..7a62f282 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,8 @@
{
- "name": "jQuery-QueryBuilder",
- "version": "2.4.0",
+ "name": "bdt-jQuery-QueryBuilder",
+ "version": "0.1.0",
"author": {
- "name": "Damien \"Mistic\" Sorel",
- "email": "contact@git.strangeplanet.fr",
- "url": "http://www.strangeplanet.fr"
+ "name": "BDT"
},
"description": "jQuery plugin for user friendly query/filter creator",
"dependencies": {
diff --git a/src/core.js b/src/core.js
index 33138413..03878f7b 100644
--- a/src/core.js
+++ b/src/core.js
@@ -30,6 +30,8 @@ QueryBuilder.prototype.init = function($el, options) {
this.filters = this.settings.filters;
this.icons = this.settings.icons;
this.operators = this.settings.operators;
+ this.operators2 = this.settings.operators2;
+ this.operators3 = this.settings.operators3;
this.templates = this.settings.templates;
this.plugins = this.settings.plugins;
@@ -61,6 +63,8 @@ QueryBuilder.prototype.init = function($el, options) {
this.filters = this.checkFilters(this.filters);
this.operators = this.checkOperators(this.operators);
+ this.operators2 = this.checkOperators(this.operators2);
+ this.operators3 = this.checkOperators(this.operators3);
this.bindEvents();
this.initPlugins();
@@ -574,6 +578,50 @@ QueryBuilder.prototype.createRuleOperators = function(rule) {
this.trigger('afterCreateRuleOperators', rule, operators);
};
+/**
+ * Create the operators