Skip to content

Commit 80db97d

Browse files
committed
first commit
1 parent f2a17f4 commit 80db97d

File tree

6 files changed

+1099
-2
lines changed

6 files changed

+1099
-2
lines changed

README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
1-
jQuery-QueryBuilder
1+
jQuery QueryBuilder
22
===================
33

4-
jQuery QueryBuilder
4+
jQuery plugin offering an interface to create complex queries.
5+
6+
**Still in developpement**
7+
8+
### Requirements
9+
* Bootstrap 3.x CSS
10+
* jQuery >= 1.9
11+
* (optional) MomentJS
12+
* (optional) any widgets library like jQuery UI
13+
14+
### Browser support
15+
* Internet Explorer >= 10
16+
* Mozilla FireFox ??
17+
* Google Chrome ??
18+
* Opera ??
19+
* Safari ??
20+
21+
### Inspiration
22+
* [Knockout Query Builder](http://kindohm.com/posts/2013/09/25/knockout-query-builder/)
23+
* [jui_filter_rules](http://www.pontikis.net/labs/jui_filter_rules/)

bower.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "jQuery-QueryBuilder",
3+
"version": "1.0.0-SNAPSHOT",
4+
"homepage": "https://github.com/mistic100/jQuery-QueryBuilder",
5+
"authors": [
6+
"mistic100"
7+
],
8+
"description": "jQuery-QueryBuilder",
9+
"main": [
10+
"./query-builder.js",
11+
"./query-builder.css"
12+
],
13+
"dependencies" : {
14+
"bootstrap": "3.x.x"
15+
},
16+
"license": "MIT"
17+
}

i18n/fr.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
QueryBuilder.setDefaults({ lang: {
2+
add_rule: 'Ajouter un règle',
3+
add_group: 'Ajouter un groupe',
4+
delete_rule: 'Supprimer',
5+
delete_group: 'Supprimer',
6+
7+
and_condition: 'ET',
8+
or_condition: 'OU',
9+
10+
operator_equal: 'égal',
11+
operator_not_equal: 'non égal',
12+
operator_in: 'dans',
13+
operator_not_in: 'pas dans',
14+
operator_less: 'inférieur',
15+
operator_less_or_equal: 'inférieur ou égal',
16+
operator_greater: 'supérieur',
17+
operator_greater_or_equal: 'supérieur ou égal',
18+
operator_begins_with: 'commence par',
19+
operator_not_begins_with: 'ne commence pas par',
20+
operator_contains: 'contient',
21+
operator_not_contains: 'ne contient pas',
22+
operator_ends_with: 'finit par',
23+
operator_not_ends_with: 'ne finit pas par',
24+
operator_is_empty: 'est vide',
25+
operator_is_not_empty: 'n\'est pas vide',
26+
operator_is_null: 'est nul',
27+
operator_is_not_null: 'n\'est pas nul'
28+
}});

package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "jQuery-QueryBuilder",
3+
"version": "1.0.0-SNAPSHOT",,
4+
"homepage": "https://github.com/mistic100/jQuery-QueryBuilder",
5+
"author": "mistic100",
6+
"main": [
7+
"./query-builder.js",
8+
"./query-builder.css"
9+
],
10+
"scripts": {
11+
"test": "echo \"Error: no test specified\" && exit 1"
12+
},
13+
"repository": {
14+
"type": "git",
15+
"url": "git://github.com/mistic100/jQuery-QueryBuilder.git"
16+
},
17+
"dependencies" : {
18+
"bootstrap": "3.x.x"
19+
},
20+
"license": "MIT",
21+
"bugs": {
22+
"url": "https://github.com/mistic100/jQuery-QueryBuilder/issues"
23+
}
24+
}

query-builder.css

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/*!
2+
* QueryBuilder v0.0.1
3+
* Copyright 2014 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
4+
* Licensed under MIT (http://opensource.org/licenses/MIT)
5+
*/
6+
7+
/* GROUPS */
8+
.rules-group-container {
9+
padding:10px;
10+
margin:4px 0;
11+
border:1px solid #DCC896;
12+
background:#FCF8E3;
13+
border-radius:5px;
14+
}
15+
.rules-group-header {
16+
margin-bottom:10px;
17+
}
18+
.rules-group-header input[name$=_cond] {
19+
display:none;
20+
}
21+
22+
/* hide first delete button */
23+
.query-builder>.rules-group-container>.rules-group-header [data-delete] {
24+
display:none;
25+
}
26+
27+
/* RULES */
28+
.rules-list {
29+
list-style:none;
30+
padding:0 0 0 20px;
31+
margin:0;
32+
}
33+
.rule-container {
34+
margin:4px 0;
35+
padding:5px;
36+
border:1px solid #eee;
37+
background:#fff;
38+
border-radius:5px;
39+
}
40+
.rule-container.has-error {
41+
background:#fdd;
42+
border-color:#f99;
43+
}
44+
.rule-container>div:not(.rule-header) {
45+
display:inline-block;
46+
margin:0 5px 0 0;
47+
vertical-align:top;
48+
}
49+
.rule-value-container:not(:empty) {
50+
border-left:1px solid #ddd;
51+
padding-left:5px;
52+
}
53+
.rule-value-container label {
54+
margin-bottom:0;
55+
}
56+
.rule-value-container label.block {
57+
display:block;
58+
}
59+
.rule-container select,
60+
.rule-container input[type=text],
61+
.rule-container input[type=number] {
62+
padding:1px;
63+
}
64+
65+
/* TICKS */
66+
.rules-list>* {
67+
position:relative;
68+
}
69+
.rules-list>*:before,
70+
.rules-list>*:after {
71+
content:'';
72+
position:absolute;
73+
left:-15px;
74+
width:15px;
75+
height:calc(50% + 4px);
76+
border-color:#ccc;
77+
border-style:solid;
78+
}
79+
80+
.rules-list>*:before {
81+
top:-2px;
82+
border-width:0 0 2px 2px;
83+
}
84+
.rules-list>*:after {
85+
top:50%;
86+
border-width:2px 0 0 2px;
87+
}
88+
89+
.rules-list>*:first-child:before {
90+
top:-12px;
91+
height:calc(50% + 14px);
92+
}
93+
.rules-list>*:last-child:before {
94+
border-radius:0 0 0 4px;
95+
}
96+
.rules-list>*:last-child:after {
97+
display:none;
98+
}

0 commit comments

Comments
 (0)