Skip to content

Commit 73f9e0a

Browse files
committed
Update doc for version 2.4.3
1 parent 461a6fb commit 73f9e0a

40 files changed

+271
-125
lines changed

_config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# name of the software
22
name: jQuery QueryBuilder
33
# current version of the software
4-
version: 2.4.2
4+
version: 2.4.3
55
# links to file/dir viewers
66
treeUrl: https://github.com/mistic100/jQuery-QueryBuilder/tree/master
77
blobUrl: https://github.com/mistic100/jQuery-QueryBuilder/blob/master
8-
cdnUrl: https://cdn.jsdelivr.net/jquery.query-builder/2.4.2
8+
cdnUrl: https://cdn.jsdelivr.net/jquery.query-builder/2.4.3
99
# licence of the software
1010
license: MIT License
1111
licenseUrl: http://opensource.org/licenses/MIT
@@ -19,7 +19,7 @@ favicon:
1919
# download.cdn.img is optional
2020
download:
2121
popup: true
22-
url: https://github.com/mistic100/jQuery-QueryBuilder/archive/2.4.2.zip
22+
url: https://github.com/mistic100/jQuery-QueryBuilder/archive/2.4.3.zip
2323
bower: jQuery-QueryBuilder
2424
npm: jQuery-QueryBuilder
2525
cdn:

api/list_event.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ <h5>Parameters</h5>
794794
<div class="form-group">
795795
<label class="col-sm-3 control-label">Source</label>
796796
<div class="col-sm-9">
797-
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-273">line 273</a></p>
797+
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-336">line 336</a></p>
798798
</div>
799799
</div>
800800

@@ -936,7 +936,7 @@ <h5>Parameters</h5>
936936
<div class="form-group">
937937
<label class="col-sm-3 control-label">Source</label>
938938
<div class="col-sm-9">
939-
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-302">line 302</a></p>
939+
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-294">line 294</a></p>
940940
</div>
941941
</div>
942942

@@ -1007,7 +1007,7 @@ <h5>Parameters</h5>
10071007
<div class="form-group">
10081008
<label class="col-sm-3 control-label">Source</label>
10091009
<div class="col-sm-9">
1010-
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-283">line 283</a></p>
1010+
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-275">line 275</a></p>
10111011
</div>
10121012
</div>
10131013

@@ -1412,7 +1412,7 @@ <h5>Parameters</h5>
14121412
<div class="form-group">
14131413
<label class="col-sm-3 control-label">Source</label>
14141414
<div class="col-sm-9">
1415-
<p class="form-control-static"><a href="plugins_sql-support_plugin.js.html">plugins/sql-support/plugin.js</a>, <a href="plugins_sql-support_plugin.js.html#line-548">line 548</a></p>
1415+
<p class="form-control-static"><a href="plugins_sql-support_plugin.js.html">plugins/sql-support/plugin.js</a>, <a href="plugins_sql-support_plugin.js.html#line-599">line 599</a></p>
14161416
</div>
14171417
</div>
14181418

@@ -1775,7 +1775,7 @@ <h5>Parameters</h5>
17751775
<div class="form-group">
17761776
<label class="col-sm-3 control-label">Source</label>
17771777
<div class="col-sm-9">
1778-
<p class="form-control-static"><a href="plugins_sql-support_plugin.js.html">plugins/sql-support/plugin.js</a>, <a href="plugins_sql-support_plugin.js.html#line-558">line 558</a></p>
1778+
<p class="form-control-static"><a href="plugins_sql-support_plugin.js.html">plugins/sql-support/plugin.js</a>, <a href="plugins_sql-support_plugin.js.html#line-550">line 550</a></p>
17791779
</div>
17801780
</div>
17811781

api/module-plugins.MongoDbSupport.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ <h4 id="setRulesFromMongo" class="function"><span class="name">setRulesFromMongo
467467
<div class="form-group">
468468
<label class="col-sm-3 control-label">Source</label>
469469
<div class="col-sm-9">
470-
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-321">line 321</a></p>
470+
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-313">line 313</a></p>
471471
</div>
472472
</div>
473473

@@ -619,7 +619,7 @@ <h5>Parameters</h5>
619619
<div class="form-group">
620620
<label class="col-sm-3 control-label">Source</label>
621621
<div class="col-sm-9">
622-
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-273">line 273</a></p>
622+
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-336">line 336</a></p>
623623
</div>
624624
</div>
625625

@@ -761,7 +761,7 @@ <h5>Parameters</h5>
761761
<div class="form-group">
762762
<label class="col-sm-3 control-label">Source</label>
763763
<div class="col-sm-9">
764-
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-302">line 302</a></p>
764+
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-294">line 294</a></p>
765765
</div>
766766
</div>
767767

@@ -832,7 +832,7 @@ <h5>Parameters</h5>
832832
<div class="form-group">
833833
<label class="col-sm-3 control-label">Source</label>
834834
<div class="col-sm-9">
835-
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-283">line 283</a></p>
835+
<p class="form-control-static"><a href="plugins_mongodb-support_plugin.js.html">plugins/mongodb-support/plugin.js</a>, <a href="plugins_mongodb-support_plugin.js.html#line-275">line 275</a></p>
836836
</div>
837837
</div>
838838

api/module-plugins.SqlSupport.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ <h4 id="setRulesFromSQL" class="function"><span class="name">setRulesFromSQL</sp
493493
<div class="form-group">
494494
<label class="col-sm-3 control-label">Source</label>
495495
<div class="col-sm-9">
496-
<p class="form-control-static"><a href="plugins_sql-support_plugin.js.html">plugins/sql-support/plugin.js</a>, <a href="plugins_sql-support_plugin.js.html#line-584">line 584</a></p>
496+
<p class="form-control-static"><a href="plugins_sql-support_plugin.js.html">plugins/sql-support/plugin.js</a>, <a href="plugins_sql-support_plugin.js.html#line-576">line 576</a></p>
497497
</div>
498498
</div>
499499

@@ -717,7 +717,7 @@ <h5>Parameters</h5>
717717
<div class="form-group">
718718
<label class="col-sm-3 control-label">Source</label>
719719
<div class="col-sm-9">
720-
<p class="form-control-static"><a href="plugins_sql-support_plugin.js.html">plugins/sql-support/plugin.js</a>, <a href="plugins_sql-support_plugin.js.html#line-548">line 548</a></p>
720+
<p class="form-control-static"><a href="plugins_sql-support_plugin.js.html">plugins/sql-support/plugin.js</a>, <a href="plugins_sql-support_plugin.js.html#line-599">line 599</a></p>
721721
</div>
722722
</div>
723723

@@ -1080,7 +1080,7 @@ <h5>Parameters</h5>
10801080
<div class="form-group">
10811081
<label class="col-sm-3 control-label">Source</label>
10821082
<div class="col-sm-9">
1083-
<p class="form-control-static"><a href="plugins_sql-support_plugin.js.html">plugins/sql-support/plugin.js</a>, <a href="plugins_sql-support_plugin.js.html#line-558">line 558</a></p>
1083+
<p class="form-control-static"><a href="plugins_sql-support_plugin.js.html">plugins/sql-support/plugin.js</a>, <a href="plugins_sql-support_plugin.js.html#line-550">line 550</a></p>
10841084
</div>
10851085
</div>
10861086

api/plugins_mongodb-support_plugin.js.html

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -473,15 +473,7 @@ <h1><span class="name">plugins/mongodb-support/plugin.js</span></h1>
473473

474474
var opVal = mdbrl.call(self, value);
475475

476-
/**
477-
* Returns a filter identifier from the MongoDB field
478-
* @event changer:getMongoDBFieldID
479-
* @memberof module:plugins.MongoDbSupport
480-
* @param {string} field
481-
* @param {*} value
482-
* @returns {string}
483-
*/
484-
var id = self.change('getMongoDBFieldID', field, value);
476+
var id = self.getMongoDBFieldID(field, value);
485477

486478
/**
487479
* Modifies the rule generated from the MongoDB expression
@@ -523,6 +515,39 @@ <h1><span class="name">plugins/mongodb-support/plugin.js</span></h1>
523515
*/
524516
setRulesFromMongo: function(query) {
525517
this.setRules(this.getRulesFromMongo(query));
518+
},
519+
520+
/**
521+
* Returns a filter identifier from the MongoDB field.
522+
* Automatically use the only one filter with a matching field, fires a changer otherwise.
523+
* @param {string} field
524+
* @param {*} value
525+
* @fires module:plugins.MongoDbSupport:changer:getMongoDBFieldID
526+
* @returns {string}
527+
* @private
528+
*/
529+
getMongoDBFieldID: function(field, value) {
530+
var matchingFilters = this.filters.filter(function(filter) {
531+
return filter.field === field;
532+
});
533+
534+
var id;
535+
if (matchingFilters.length === 1) {
536+
id = matchingFilters[0].id;
537+
}
538+
else {
539+
/**
540+
* Returns a filter identifier from the MongoDB field
541+
* @event changer:getMongoDBFieldID
542+
* @memberof module:plugins.MongoDbSupport
543+
* @param {string} field
544+
* @param {*} value
545+
* @returns {string}
546+
*/
547+
id = this.change('getMongoDBFieldID', field, value);
548+
}
549+
550+
return id;
526551
}
527552
});
528553

api/plugins_sortable_plugin.js.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ <h1><span class="name">plugins/sortable/plugin.js</span></h1>
305305
.dropzone({
306306
accept: QueryBuilder.selectors.rule_and_group_containers,
307307
ondragenter: function(event) {
308-
moveSortableToTarget(placeholder, $(event.target));
308+
moveSortableToTarget(placeholder, $(event.target), self);
309309
},
310310
ondrop: function(event) {
311311
moveSortableToTarget(src, $(event.target), self);
@@ -318,7 +318,7 @@ <h1><span class="name">plugins/sortable/plugin.js</span></h1>
318318
.dropzone({
319319
accept: QueryBuilder.selectors.rule_and_group_containers,
320320
ondragenter: function(event) {
321-
moveSortableToTarget(placeholder, $(event.target));
321+
moveSortableToTarget(placeholder, $(event.target), self);
322322
},
323323
ondrop: function(event) {
324324
moveSortableToTarget(src, $(event.target), self);

api/plugins_sql-support_plugin.js.html

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -748,15 +748,7 @@ <h1><span class="name">plugins/sql-support/plugin.js</span></h1>
748748
Utils.error('SQLParse', 'Cannot find field name in {0}', JSON.stringify(data.left));
749749
}
750750

751-
/**
752-
* Returns a filter identifier from the SQL field
753-
* @event changer:getSQLFieldID
754-
* @memberof module:plugins.SqlSupport
755-
* @param {string} field
756-
* @param {*} value
757-
* @returns {string}
758-
*/
759-
var id = self.change('getSQLFieldID', field, value);
751+
var id = self.getSQLFieldID(field, value);
760752

761753
/**
762754
* Modifies the rule generated from the SQL expression
@@ -786,6 +778,39 @@ <h1><span class="name">plugins/sql-support/plugin.js</span></h1>
786778
*/
787779
setRulesFromSQL: function(query, stmt) {
788780
this.setRules(this.getRulesFromSQL(query, stmt));
781+
},
782+
783+
/**
784+
* Returns a filter identifier from the SQL field.
785+
* Automatically use the only one filter with a matching field, fires a changer otherwise.
786+
* @param {string} field
787+
* @param {*} value
788+
* @fires module:plugins.SqlSupport:changer:getSQLFieldID
789+
* @returns {string}
790+
* @private
791+
*/
792+
getSQLFieldID: function(field, value) {
793+
var matchingFilters = this.filters.filter(function(filter) {
794+
return filter.field === field;
795+
});
796+
797+
var id;
798+
if (matchingFilters.length === 1) {
799+
id = matchingFilters[0].id;
800+
}
801+
else {
802+
/**
803+
* Returns a filter identifier from the SQL field
804+
* @event changer:getSQLFieldID
805+
* @memberof module:plugins.SqlSupport
806+
* @param {string} field
807+
* @param {*} value
808+
* @returns {string}
809+
*/
810+
id = this.change('getSQLFieldID', field, value);
811+
}
812+
813+
return id;
789814
}
790815
});
791816

dist/jQuery-QueryBuilder/dist/css/query-builder.dark.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* jQuery QueryBuilder 2.4.1
2+
* jQuery QueryBuilder 2.4.3
33
* Copyright 2014-2017 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
44
* Licensed under MIT (http://opensource.org/licenses/MIT)
55
*/

dist/jQuery-QueryBuilder/dist/css/query-builder.dark.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jQuery-QueryBuilder/dist/css/query-builder.default.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* jQuery QueryBuilder 2.4.1
2+
* jQuery QueryBuilder 2.4.3
33
* Copyright 2014-2017 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
44
* Licensed under MIT (http://opensource.org/licenses/MIT)
55
*/

0 commit comments

Comments
 (0)