Skip to content

Commit

Permalink
next version is 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Apr 8, 2015
1 parent 14c9934 commit f81d0d2
Show file tree
Hide file tree
Showing 25 changed files with 55 additions and 49 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jQuery-QueryBuilder",
"version": "2.0.0",
"version": "2.0.1",
"authors": [{
"name": "Damien \"Mistic\" Sorel",
"email": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mistic100/jquery-querybuilder",
"version": "2.0.0",
"version": "2.0.1",
"authors": [{
"name": "Damien \"Mistic\" Sorel",
"email": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion dist/css/query-builder.dark.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Copyright 2014-2015 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/css/query-builder.dark.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/query-builder.default.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Copyright 2014-2015 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/css/query-builder.default.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/i18n/da.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Oversat af Jna Borup Coyle, [email protected]
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/de.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* German translation by "raimu"
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/en.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Reference language file
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/es.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Spanish translation by "pyarza"
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/fr.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* French translation by Damien "Mistic" Sorel
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/it.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Italian translation
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/nl.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Dutch translation by "Roywcm"
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/no.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Oversat af Jna Borup Coyle, [email protected]
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/pl.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Polish translation by Artur Smolarek
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/pt-BR.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Portuguese Brazilian translation by Leandro Gehlen ([email protected])
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/ro.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Romanian translation by ArianServ
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/i18n/ru.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Локализационный файл
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
25 changes: 14 additions & 11 deletions dist/js/query-builder.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Copyright 2014-2015 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down Expand Up @@ -771,7 +771,9 @@ QueryBuilder.prototype.updateRuleOperator = function(rule, previousOperator) {
if ($valueContainer.is(':empty') || rule.operator.nb_inputs !== previousOperator.nb_inputs) {
this.createRuleInput(rule);
}
}

if (rule.operator) {
rule.$el.find('.rule-operator-container [name$=_operator]').val(rule.operator.type);
}

Expand Down Expand Up @@ -1076,9 +1078,6 @@ QueryBuilder.prototype.setRules = function(data) {
if (rule.id === undefined) {
error('Missing rule field id');
}
if (rule.value === undefined) {
rule.value = '';
}
if (rule.operator === undefined) {
rule.operator = 'equal';
}
Expand All @@ -1096,7 +1095,7 @@ QueryBuilder.prototype.setRules = function(data) {
model.data = rule.data;
}

if (model.operator.nb_inputs !== 0) {
if (model.operator.nb_inputs !== 0 && rule.value !== undefined) {
that.setRuleValue(model, rule.value);
}
}
Expand Down Expand Up @@ -2890,13 +2889,15 @@ QueryBuilder.define('sortable', function(options) {

src = Model(e.target);

var ph = $('<div class="rule-placeholder">&nbsp;</div>');
ph.css('min-height', src.$el.height());
// Chrome glitchs
// - helper invisible if hidden immediately
// - "dragend" is called immediately if we modify the DOM directly
setTimeout(function() {
var ph = $('<div class="rule-placeholder">&nbsp;</div>');
ph.css('min-height', src.$el.height());

placeholder = src.parent.addRule(ph, src.getPos());
placeholder = src.parent.addRule(ph, src.getPos());

// Chrome glitch (helper invisible if hidden immediately)
setTimeout(function() {
src.$el.hide();
}, 0);
});
Expand All @@ -2906,7 +2907,9 @@ QueryBuilder.define('sortable', function(options) {
e.preventDefault();
e.stopPropagation();

moveSortableToTarget(placeholder, $(e.target));
if (placeholder) {
moveSortableToTarget(placeholder, $(e.target));
}
});

// dragover: prevent glitches
Expand Down
6 changes: 3 additions & 3 deletions dist/js/query-builder.min.js

Large diffs are not rendered by default.

25 changes: 14 additions & 11 deletions dist/js/query-builder.standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
}));

/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Copyright 2014-2015 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down Expand Up @@ -896,7 +896,9 @@ QueryBuilder.prototype.updateRuleOperator = function(rule, previousOperator) {
if ($valueContainer.is(':empty') || rule.operator.nb_inputs !== previousOperator.nb_inputs) {
this.createRuleInput(rule);
}
}

if (rule.operator) {
rule.$el.find('.rule-operator-container [name$=_operator]').val(rule.operator.type);
}

Expand Down Expand Up @@ -1201,9 +1203,6 @@ QueryBuilder.prototype.setRules = function(data) {
if (rule.id === undefined) {
error('Missing rule field id');
}
if (rule.value === undefined) {
rule.value = '';
}
if (rule.operator === undefined) {
rule.operator = 'equal';
}
Expand All @@ -1221,7 +1220,7 @@ QueryBuilder.prototype.setRules = function(data) {
model.data = rule.data;
}

if (model.operator.nb_inputs !== 0) {
if (model.operator.nb_inputs !== 0 && rule.value !== undefined) {
that.setRuleValue(model, rule.value);
}
}
Expand Down Expand Up @@ -3015,13 +3014,15 @@ QueryBuilder.define('sortable', function(options) {

src = Model(e.target);

var ph = $('<div class="rule-placeholder">&nbsp;</div>');
ph.css('min-height', src.$el.height());
// Chrome glitchs
// - helper invisible if hidden immediately
// - "dragend" is called immediately if we modify the DOM directly
setTimeout(function() {
var ph = $('<div class="rule-placeholder">&nbsp;</div>');
ph.css('min-height', src.$el.height());

placeholder = src.parent.addRule(ph, src.getPos());
placeholder = src.parent.addRule(ph, src.getPos());

// Chrome glitch (helper invisible if hidden immediately)
setTimeout(function() {
src.$el.hide();
}, 0);
});
Expand All @@ -3031,7 +3032,9 @@ QueryBuilder.define('sortable', function(options) {
e.preventDefault();
e.stopPropagation();

moveSortableToTarget(placeholder, $(e.target));
if (placeholder) {
moveSortableToTarget(placeholder, $(e.target));
}
});

// dragover: prevent glitches
Expand Down
6 changes: 3 additions & 3 deletions dist/js/query-builder.standalone.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/scss/dark.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Copyright 2014-2015 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/scss/default.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* jQuery QueryBuilder 2.0.0
* jQuery QueryBuilder 2.0.1
* Copyright 2014-2015 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jQuery-QueryBuilder",
"version": "2.0.0",
"version": "2.0.1",
"author": {
"name": "Damien \"Mistic\" Sorel",
"email": "[email protected]",
Expand Down

0 comments on commit f81d0d2

Please sign in to comment.