Skip to content

Commit

Permalink
Version 1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Mar 15, 2016
1 parent cfbdb2a commit 16d8b6a
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jQuery-QueryBuilder",
"version": "1.4.2",
"version": "1.4.3",
"authors": [{
"name": "Damien \"Mistic\" Sorel",
"homepage": "http://www.strangeplanet.fr"
Expand All @@ -14,7 +14,7 @@
"jquery": ">= 1.9.0",
"bootstrap": "^3.1.0",
"momentjs": "^2.6.0",
"microevent-mistic100": "^2.0.0",
"uevent": "^1.0.0",
"jquery-extendext": "^0.1.1"
},
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mistic100/jquery-querybuilder",
"version": "1.4.2",
"version": "1.4.3",
"description": "jQuery plugin for user friendly query/filter creator",
"keywords": [
"jquery",
Expand All @@ -23,4 +23,4 @@
"twbs/bootstrap": "3.2.*@dev"
},
"license": "MIT"
}
}
28 changes: 14 additions & 14 deletions examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
<div class="container">
<div class="col-md-12 col-lg-10 col-lg-offset-1">
<p><a href="http://www.eyecon.ro/bootstrap-slider">Bootstrap Slider</a> and <a href="http://bootboxjs.com">Bootbox</a> must be installed with Bower to run this demo.</p>

<div id="builder"></div>

<div class="btn-group">
<button class="btn btn-warning reset">Reset</button>
<button class="btn btn-success set">Set rules</button>
<button class="btn btn-success set-mongo">Set rules from MongoDB</button>
</div>

<div class="btn-group">
<button class="btn btn-primary parse-json">JSON</button>
<button class="btn btn-primary parse-sql" data-stmt="question_mark">SQL (question mark)</button>
Expand All @@ -42,7 +42,7 @@ <h3>Output</h3>
</div>

<script src="../bower_components/jquery/dist/jquery.min.js"></script>
<script src="../bower_components/microevent-mistic100/microevent.js"></script>
<script src="../bower_components/uevent/uevent.js"></script>
<script src="../bower_components/jquery-extendext/jQuery.extendext.js"></script>
<script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="../src/query-builder.js"></script>
Expand All @@ -58,17 +58,17 @@ <h3>Output</h3>
// define filters
$('#builder').queryBuilder({
allow_empty: true,

onValidationError: function($target, err) {
console.error(err, $target);
},

plugins: {
'bt-tooltip-errors': { delay: 100},
'sortable': null,
'filter-description': { mode: 'bootbox' }
},

filters: [
/*
* basic
Expand Down Expand Up @@ -139,7 +139,7 @@ <h3>Output</h3>
min: 0,
step: 0.01
}
},
},
/*
* slider
*/
Expand All @@ -162,7 +162,7 @@ <h3>Output</h3>
input.slider('setValue', value);
input.val(value); // don't know why I need it
}
},
},
/*
* placeholder and regex validation
*/
Expand Down Expand Up @@ -197,10 +197,10 @@ <h3>Output</h3>
},
input: function($rule, filter) {
var $container = $rule.find('.rule-value-container');

$container.on('change', '[name=coord_1]', function(){
var h = '';

switch ($(this).val()) {
case 'A':
h = '<option value="-1">-</option> <option value="1">1</option> <option value="2">2</option>';
Expand All @@ -212,10 +212,10 @@ <h3>Output</h3>
h = '<option value="-1">-</option> <option value="5">5</option> <option value="6">6</option>';
break;
}

$container.find('[name=coord_2]').html(h).toggle(h!='');
});

return '\
<select name="coord_1"> \
<option value="-1">-</option> \
Expand All @@ -232,7 +232,7 @@ <h3>Output</h3>
onAfterSetValue: function($rule, value, filter, operator) {
if (operator.accept_values) {
var val = value[0].split('.');

$rule.find('[name=coord_1]').val(val[0]).trigger('change');
$rule.find('[name=coord_2]').val(val[1]);
}
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": "1.4.2",
"version": "1.4.3",
"author": {
"name": "Damien \"Mistic\" Sorel",
"homepage": "http://www.strangeplanet.fr"
Expand Down
10 changes: 5 additions & 5 deletions src/.wrapper.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery', 'microevent', 'jQuery.extendext'], factory);
define(['jquery', 'uevent', 'jQuery.extendext'], factory);
}
else {
factory(root.jQuery, root.MicroEvent);
factory(root.jQuery, root.uEvent);
}
}(this, function($, MicroEvent) {
}(this, function($, uEvent) {
"use strict";

@@js
}));
}));
6 changes: 3 additions & 3 deletions src/query-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
this.init(options);
};

MicroEvent.mixin(QueryBuilder);
uEvent.mixin(QueryBuilder);


// DEFAULT CONFIG
Expand Down Expand Up @@ -1404,7 +1404,7 @@
<i class="' + this.icons.add_group + '"></i> '+ this.lang.add_group +' \
</button>'
:'') +' \
'+ (level>1 ?
'+ (level>1 ?
'<button type="button" class="btn btn-xs btn-danger" data-delete="group"> \
<i class="' + this.icons.remove_group + '"></i> '+ this.lang.delete_group +' \
</button>'
Expand Down Expand Up @@ -1709,4 +1709,4 @@
});
}

}(jQuery));
}(jQuery));
8 changes: 4 additions & 4 deletions tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
<head>
<title>jQuery-QueryBuilder</title>
<meta charset="utf-8">

<link rel="stylesheet" href="../node_modules/qunitjs/qunit/qunit.css">
<link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="../src/query-builder.css">

<script src="../bower_components/jquery/dist/jquery.min.js"></script>
<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
<script src="../bower_components/microevent-mistic100/microevent.js"></script>
<script src="../bower_components/uevent/uevent.js"></script>
<script src="../bower_components/jquery-extendext/jQuery.extendext.js"></script>
<script src="../src/query-builder.js"></script>
<script src="../src/plugins/sql-support/plugin.js"></script>
Expand All @@ -24,7 +24,7 @@
<div class="col-lg-8 col-lg-push-2">
<div id="qunit"></div>
<div id="qunit-fixture"></div>

<div id="container1"></div>
<div id="container2"></div>
<div id="container3"></div>
Expand Down

0 comments on commit 16d8b6a

Please sign in to comment.