ui_bibz 2.0.0.alpha → 2.0.0.alpha2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTORS.md +23 -0
- data/Gemfile.lock +53 -43
- data/Rakefile +1 -0
- data/app/assets/javascripts/fix_bootstrap.coffee +7 -0
- data/app/assets/javascripts/form.coffee +65 -0
- data/app/assets/javascripts/interface.coffee +17 -0
- data/app/assets/javascripts/table.coffee +35 -0
- data/app/assets/javascripts/ui_bibz.coffee +24 -38
- data/app/assets/stylesheets/bootstrap-switch.sass +150 -0
- data/app/assets/stylesheets/fix-bootstrap-4.sass +33 -2
- data/app/assets/stylesheets/fix-dropdown-select.sass +239 -0
- data/app/assets/stylesheets/ui_bibz.sass +29 -18
- data/app/inputs/custom_inputs/autocomplete_input.rb +14 -0
- data/app/inputs/custom_inputs/date_picker_input.rb +2 -0
- data/app/inputs/custom_inputs/dropdown_select_input.rb +15 -0
- data/app/inputs/custom_inputs/multi_column_input.rb +51 -5
- data/app/inputs/custom_inputs/multi_select_input.rb +1 -1
- data/app/inputs/custom_inputs/surround_input.rb +3 -1
- data/app/inputs/custom_inputs/switch_input.rb +11 -0
- data/lib/ui_bibz/concerns/models/searchable.rb +6 -2
- data/lib/ui_bibz/helpers/ui_core_helper.rb +76 -54
- data/lib/ui_bibz/rails/engine.rb +9 -1
- data/lib/ui_bibz/ui/core/button/button_group.rb +1 -1
- data/lib/ui_bibz/ui/core/card/components/card_image.rb +1 -1
- data/lib/ui_bibz/ui/core/component.rb +1 -0
- data/lib/ui_bibz/ui/core/input/autocomplete_field.rb +87 -0
- data/lib/ui_bibz/ui/core/input/date_picker_field.rb +10 -2
- data/lib/ui_bibz/ui/core/input/dropdown_select_field.rb +124 -0
- data/lib/ui_bibz/ui/core/input/multi_select_field.rb +5 -0
- data/lib/ui_bibz/ui/core/input/surround_field.rb +11 -2
- data/lib/ui_bibz/ui/core/input/switch_field.rb +127 -0
- data/lib/ui_bibz/ui/ux/table/components/thead.rb +51 -0
- data/lib/ui_bibz/ui/ux/table/extensions/actionable.rb +1 -1
- data/lib/ui_bibz/ui/ux/table/extensions/sortable.rb +2 -2
- data/lib/ui_bibz/ui/ux/table/table.rb +47 -4
- data/lib/ui_bibz/ui/ux/table/table_card.rb +12 -4
- data/lib/ui_bibz/version.rb +1 -1
- data/lib/ui_bibz.rb +24 -10
- data/test/ui/card_test.rb +1 -1
- data/test/ui/input_dropdown_select_field_test.rb +78 -0
- data/test/ui/input_switch_field_test.rb +86 -0
- data/test/ui/inputs_test.rb +12 -4
- data/test/ui/table_test.rb +16 -0
- data/ui_bibz.gemspec +14 -4
- data/vendor/assets/stylesheets/bootstrap-switch.min.css +1 -1
- metadata +132 -13
- data/app/assets/javascripts/multi_column.coffee +0 -45
- data/app/inputs/custom_inputs/date_picker_input_old.rb +0 -61
- data/vendor/assets/javascripts/bootstrap-4.0.0-alpha.min.js +0 -7
- data/vendor/assets/javascripts/bootstrap-select.min.js +0 -8
- data/vendor/assets/stylesheets/bootstrap-4.0.0-alpha.min.css +0 -6
- data/vendor/assets/stylesheets/bootstrap-select.min.css +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ca87b30a6f0b743c5d0920fbb4bf4d6e1f70ae6
|
4
|
+
data.tar.gz: 7bc4d0f9593a3be1dd72ff43867f1a5fd4fc4860
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45c883860ae029fc88e88b5feba32fde8e2fea04315d569708904cbd44146303ad0e426fc02f7cf190a3a6300bd2421ed3c676939e7119636978f4b89be6a0c9
|
7
|
+
data.tar.gz: dcebafe16e76ac735aae051f652f3b875e628063dd60a527e62ea45083f77b4905d3f54f20313413cc5c1167faa0c51027d4beeb110d5adc819d395c62ea1fd7
|
data/CONTRIBUTORS.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# Ui Bibz Contributors
|
2
|
+
|
3
|
+
## Ui Bibz
|
4
|
+
|
5
|
+
* [Thomas HUMMEL](https://github.com/thooams)
|
6
|
+
* Ruby developer and Creator of Ui Bibz
|
7
|
+
* [Jeremy Gontard](https://github.com/JeremyGontard)
|
8
|
+
* Ruby developer (component developer)
|
9
|
+
|
10
|
+
## External library (bootstrap)
|
11
|
+
|
12
|
+
* [Boostrap project](https://github.com/twbs)
|
13
|
+
* [bootstrap](https://github.com/twbs/bootstrap)
|
14
|
+
|
15
|
+
## External library (js)
|
16
|
+
|
17
|
+
* [Silvio Moreto](https://github.com/silviomoreto)
|
18
|
+
* [bootstrap-select](https://github.com/silviomoreto/bootstrap-select)
|
19
|
+
* [David Stutz](https://github.com/davidstutz)
|
20
|
+
* [bootstrap-multiselect](https://github.com/davidstutz/bootstrap-multiselect)
|
21
|
+
* [Louis Cuny](https://github.com/lou)
|
22
|
+
* [multi-select](https://github.com/lou/multi-select/)
|
23
|
+
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,15 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ui_bibz (2.0.0.
|
5
|
-
bootstrap (
|
4
|
+
ui_bibz (2.0.0.alpha2)
|
5
|
+
bootstrap (< 4.0.0.alpha3)
|
6
|
+
bundler (>= 1.8.4)
|
6
7
|
font-awesome-sass
|
7
8
|
haml
|
8
9
|
haml-rails
|
9
10
|
rails (>= 4.2.0)
|
11
|
+
rails-assets-bootstrap-datepicker (>= 1.6.0)
|
12
|
+
rails-assets-bootstrap-select (>= 1.10.0)
|
10
13
|
rails-assets-tether (>= 1.1.0)
|
11
14
|
sass-rails (>= 5.0.0)
|
12
15
|
will-paginate-i18n
|
@@ -17,46 +20,46 @@ GEM
|
|
17
20
|
remote: https://rubygems.org/
|
18
21
|
remote: https://rails-assets.org/
|
19
22
|
specs:
|
20
|
-
actionmailer (4.2.
|
21
|
-
actionpack (= 4.2.
|
22
|
-
actionview (= 4.2.
|
23
|
-
activejob (= 4.2.
|
23
|
+
actionmailer (4.2.6)
|
24
|
+
actionpack (= 4.2.6)
|
25
|
+
actionview (= 4.2.6)
|
26
|
+
activejob (= 4.2.6)
|
24
27
|
mail (~> 2.5, >= 2.5.4)
|
25
28
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
26
|
-
actionpack (4.2.
|
27
|
-
actionview (= 4.2.
|
28
|
-
activesupport (= 4.2.
|
29
|
+
actionpack (4.2.6)
|
30
|
+
actionview (= 4.2.6)
|
31
|
+
activesupport (= 4.2.6)
|
29
32
|
rack (~> 1.6)
|
30
33
|
rack-test (~> 0.6.2)
|
31
34
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
32
35
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
33
|
-
actionview (4.2.
|
34
|
-
activesupport (= 4.2.
|
36
|
+
actionview (4.2.6)
|
37
|
+
activesupport (= 4.2.6)
|
35
38
|
builder (~> 3.1)
|
36
39
|
erubis (~> 2.7.0)
|
37
40
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
38
41
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
39
|
-
activejob (4.2.
|
40
|
-
activesupport (= 4.2.
|
42
|
+
activejob (4.2.6)
|
43
|
+
activesupport (= 4.2.6)
|
41
44
|
globalid (>= 0.3.0)
|
42
|
-
activemodel (4.2.
|
43
|
-
activesupport (= 4.2.
|
45
|
+
activemodel (4.2.6)
|
46
|
+
activesupport (= 4.2.6)
|
44
47
|
builder (~> 3.1)
|
45
|
-
activerecord (4.2.
|
46
|
-
activemodel (= 4.2.
|
47
|
-
activesupport (= 4.2.
|
48
|
+
activerecord (4.2.6)
|
49
|
+
activemodel (= 4.2.6)
|
50
|
+
activesupport (= 4.2.6)
|
48
51
|
arel (~> 6.0)
|
49
|
-
activesupport (4.2.
|
52
|
+
activesupport (4.2.6)
|
50
53
|
i18n (~> 0.7)
|
51
54
|
json (~> 1.7, >= 1.7.7)
|
52
55
|
minitest (~> 5.1)
|
53
56
|
thread_safe (~> 0.3, >= 0.3.4)
|
54
57
|
tzinfo (~> 1.1)
|
55
58
|
arel (6.0.3)
|
56
|
-
autoprefixer-rails (6.3.
|
59
|
+
autoprefixer-rails (6.3.6)
|
57
60
|
execjs
|
58
61
|
awesome_print (1.6.1)
|
59
|
-
bootstrap (4.0.0.
|
62
|
+
bootstrap (4.0.0.alpha2)
|
60
63
|
autoprefixer-rails (>= 6.0.3)
|
61
64
|
sass (>= 3.4.19)
|
62
65
|
builder (3.2.2)
|
@@ -66,10 +69,10 @@ GEM
|
|
66
69
|
docile (1.1.5)
|
67
70
|
erubis (2.7.0)
|
68
71
|
execjs (2.6.0)
|
69
|
-
factory_girl (4.
|
72
|
+
factory_girl (4.7.0)
|
70
73
|
activesupport (>= 3.0.0)
|
71
|
-
factory_girl_rails (4.
|
72
|
-
factory_girl (~> 4.
|
74
|
+
factory_girl_rails (4.7.0)
|
75
|
+
factory_girl (~> 4.7.0)
|
73
76
|
railties (>= 3.0.0)
|
74
77
|
font-awesome-sass (4.5.0)
|
75
78
|
sass (>= 3.2)
|
@@ -92,9 +95,11 @@ GEM
|
|
92
95
|
json (1.8.3)
|
93
96
|
loofah (2.0.3)
|
94
97
|
nokogiri (>= 1.5.9)
|
95
|
-
mail (2.6.
|
96
|
-
mime-types (>= 1.16, <
|
97
|
-
mime-types (
|
98
|
+
mail (2.6.4)
|
99
|
+
mime-types (>= 1.16, < 4)
|
100
|
+
mime-types (3.0)
|
101
|
+
mime-types-data (~> 3.2015)
|
102
|
+
mime-types-data (3.2016.0221)
|
98
103
|
mini_portile2 (2.0.0)
|
99
104
|
minitest (5.8.4)
|
100
105
|
nokogiri (1.6.7.2)
|
@@ -102,17 +107,22 @@ GEM
|
|
102
107
|
rack (1.6.4)
|
103
108
|
rack-test (0.6.3)
|
104
109
|
rack (>= 1.0)
|
105
|
-
rails (4.2.
|
106
|
-
actionmailer (= 4.2.
|
107
|
-
actionpack (= 4.2.
|
108
|
-
actionview (= 4.2.
|
109
|
-
activejob (= 4.2.
|
110
|
-
activemodel (= 4.2.
|
111
|
-
activerecord (= 4.2.
|
112
|
-
activesupport (= 4.2.
|
110
|
+
rails (4.2.6)
|
111
|
+
actionmailer (= 4.2.6)
|
112
|
+
actionpack (= 4.2.6)
|
113
|
+
actionview (= 4.2.6)
|
114
|
+
activejob (= 4.2.6)
|
115
|
+
activemodel (= 4.2.6)
|
116
|
+
activerecord (= 4.2.6)
|
117
|
+
activesupport (= 4.2.6)
|
113
118
|
bundler (>= 1.3.0, < 2.0)
|
114
|
-
railties (= 4.2.
|
119
|
+
railties (= 4.2.6)
|
115
120
|
sprockets-rails
|
121
|
+
rails-assets-bootstrap-datepicker (1.6.0)
|
122
|
+
rails-assets-jquery (>= 1.7.1)
|
123
|
+
rails-assets-bootstrap-select (1.10.0)
|
124
|
+
rails-assets-jquery (>= 1.8)
|
125
|
+
rails-assets-jquery (2.2.3)
|
116
126
|
rails-assets-tether (1.2.0)
|
117
127
|
rails-deprecated_sanitizer (1.0.3)
|
118
128
|
activesupport (>= 4.2.0.alpha)
|
@@ -122,17 +132,17 @@ GEM
|
|
122
132
|
rails-deprecated_sanitizer (>= 1.0.1)
|
123
133
|
rails-html-sanitizer (1.0.3)
|
124
134
|
loofah (~> 2.0)
|
125
|
-
railties (4.2.
|
126
|
-
actionpack (= 4.2.
|
127
|
-
activesupport (= 4.2.
|
135
|
+
railties (4.2.6)
|
136
|
+
actionpack (= 4.2.6)
|
137
|
+
activesupport (= 4.2.6)
|
128
138
|
rake (>= 0.8.7)
|
129
139
|
thor (>= 0.18.1, < 2.0)
|
130
|
-
rake (
|
140
|
+
rake (11.1.2)
|
131
141
|
rdoc (4.2.2)
|
132
142
|
json (~> 1.4)
|
133
143
|
ruby_parser (3.8.1)
|
134
144
|
sexp_processor (~> 4.1)
|
135
|
-
sass (3.4.
|
145
|
+
sass (3.4.22)
|
136
146
|
sass-rails (5.0.4)
|
137
147
|
railties (>= 4.0.0, < 5.0)
|
138
148
|
sass (~> 3.1)
|
@@ -145,10 +155,10 @@ GEM
|
|
145
155
|
json (~> 1.8)
|
146
156
|
simplecov-html (~> 0.10.0)
|
147
157
|
simplecov-html (0.10.0)
|
148
|
-
sprockets (3.
|
158
|
+
sprockets (3.6.0)
|
149
159
|
concurrent-ruby (~> 1.0)
|
150
160
|
rack (> 1, < 3)
|
151
|
-
sprockets-rails (3.0.
|
161
|
+
sprockets-rails (3.0.4)
|
152
162
|
actionpack (>= 4.0)
|
153
163
|
activesupport (>= 4.0)
|
154
164
|
sprockets (>= 3.0.0)
|
data/Rakefile
CHANGED
@@ -0,0 +1,7 @@
|
|
1
|
+
# Fix for button link in button group
|
2
|
+
$(document).on 'turbolinks:load page:change ready', ->
|
3
|
+
$('.btn-group > a.btn').click ->
|
4
|
+
try # Turbolinks exist
|
5
|
+
Turbolinks.visit($(this).attr('href'))
|
6
|
+
catch exception # Turbolinks doesn't exist
|
7
|
+
window.location = $(this).attr('href')
|
@@ -0,0 +1,65 @@
|
|
1
|
+
@UiBibzForm = class Form
|
2
|
+
|
3
|
+
constructor: ->
|
4
|
+
@selectPicker()
|
5
|
+
@switch()
|
6
|
+
@multiSelect()
|
7
|
+
@multiColumn()
|
8
|
+
|
9
|
+
selectPicker: ->
|
10
|
+
$('select.selectpicker').selectpicker
|
11
|
+
iconBase: 'fa'
|
12
|
+
tickIcon: 'fa-check'
|
13
|
+
style: 'btn-secondary'
|
14
|
+
|
15
|
+
switch: ->
|
16
|
+
$('input.switch').bootstrapSwitch({ size: 'large' })
|
17
|
+
|
18
|
+
multiSelect: ->
|
19
|
+
# http://loudev.com/
|
20
|
+
$('.multi-select').each ->
|
21
|
+
data = $(this).data()
|
22
|
+
delete data["multiselect"]
|
23
|
+
data = Object.assign({ inheritClass: true }, data)
|
24
|
+
$(this).multiselect(data)
|
25
|
+
|
26
|
+
multiColumn: ->
|
27
|
+
$('.multi-column').each ->
|
28
|
+
data = $(this).data()
|
29
|
+
delete data["multiselect"]
|
30
|
+
if data["searchable"]
|
31
|
+
$(this).multiSelect
|
32
|
+
selectableOptgroup: if data["selectableOptgroup"] then true else false
|
33
|
+
selectableHeader: "<input type='text' class='search-input form-control' autocomplete='off' placeholder='Search in selectable items'><br/>"
|
34
|
+
selectionHeader: "<input type='text' class='search-input form-control' autocomplete='off' placeholder='Search in selected items'><br/>"
|
35
|
+
afterInit: (ms) ->
|
36
|
+
that = this
|
37
|
+
$selectableSearch = that.$selectableUl.siblings('input')
|
38
|
+
$selectionSearch = that.$selectionUl.siblings('input')
|
39
|
+
$selectionSearch = that.$selectionUl.siblings('input')
|
40
|
+
selectableSearchString = "#" + that.$container.attr("id") + " .ms-elem-selectable:not(.ms-selected)"
|
41
|
+
selectionSearchString = "#" + that.$container.attr("id") + " .ms-elem-selection.ms-selected"
|
42
|
+
|
43
|
+
that.qs1 = $selectableSearch.quicksearch(selectableSearchString).on("keydown", (e) ->
|
44
|
+
if e.which is 40
|
45
|
+
that.$selectableUl.focus()
|
46
|
+
false
|
47
|
+
)
|
48
|
+
that.qs2 = $selectionSearch.quicksearch(selectionSearchString).on("keydown", (e) ->
|
49
|
+
if e.which is 40
|
50
|
+
that.$selectionUl.focus()
|
51
|
+
false
|
52
|
+
)
|
53
|
+
return
|
54
|
+
|
55
|
+
afterSelect: ->
|
56
|
+
@qs1.cache()
|
57
|
+
@qs2.cache()
|
58
|
+
return
|
59
|
+
|
60
|
+
afterDeselect: ->
|
61
|
+
@qs1.cache()
|
62
|
+
@qs2.cache()
|
63
|
+
return
|
64
|
+
else
|
65
|
+
$(this).multiSelect(data)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
@UiBibzInterface = class Interface
|
2
|
+
|
3
|
+
constructor: ->
|
4
|
+
@nav()
|
5
|
+
@tooltip()
|
6
|
+
@dropdown()
|
7
|
+
|
8
|
+
nav: ->
|
9
|
+
$('.nav-tabs a').click (e) ->
|
10
|
+
e.preventDefault()
|
11
|
+
$(this).tab('show')
|
12
|
+
|
13
|
+
tooltip: ->
|
14
|
+
$('[data-toggle="tooltip"]').tooltip()
|
15
|
+
|
16
|
+
dropdown: ->
|
17
|
+
$('.dropdown-toggle').dropdown()
|
@@ -0,0 +1,35 @@
|
|
1
|
+
@UiBibzTable = class Table
|
2
|
+
|
3
|
+
constructor: ->
|
4
|
+
@submitPerPageSelect()
|
5
|
+
@clearSearch()
|
6
|
+
@animeSearchInput()
|
7
|
+
@focusSearchInput()
|
8
|
+
@initializeSearchInput()
|
9
|
+
|
10
|
+
# Submit form when per_page select changing
|
11
|
+
submitPerPageSelect: ->
|
12
|
+
$('.table-pagination-per-page select').change () ->
|
13
|
+
$(this).parents('form').submit()
|
14
|
+
|
15
|
+
# Clear search
|
16
|
+
clearSearch: ->
|
17
|
+
$('.table-search-field .clear-search-btn').click () ->
|
18
|
+
$(this).prev().val('')
|
19
|
+
$(this).parents('form').submit()
|
20
|
+
|
21
|
+
# Resize search field
|
22
|
+
animeSearchInput: ->
|
23
|
+
$('.table-card input[type=search]').blur ->
|
24
|
+
$parent = $(this).parent()
|
25
|
+
$parent.removeClass('has-value') if $(this).val() == ''
|
26
|
+
$parent.removeClass('is-focused')
|
27
|
+
|
28
|
+
focusSearchInput: ->
|
29
|
+
$('.table-card input[type=search]').focus ->
|
30
|
+
$(this).parent().addClass('is-focused has-value')
|
31
|
+
|
32
|
+
initializeSearchInput: ->
|
33
|
+
$('.table-card input[type=search]').each ->
|
34
|
+
$(this).parent().addClass('has-value') if $(this).val() != ''
|
35
|
+
|
@@ -1,50 +1,36 @@
|
|
1
|
-
#= require
|
1
|
+
#= require jquery
|
2
2
|
#= require jquery_ujs
|
3
|
+
|
4
|
+
#= require jquery.quicksearch.min
|
5
|
+
#= require jquery.multi-select.min
|
6
|
+
|
7
|
+
# Bootstrap
|
3
8
|
#= require tether
|
4
9
|
#= require bootstrap-sprockets
|
5
10
|
#= require bootstrap
|
6
|
-
#= require bootstrap-datepicker
|
7
|
-
#= require bootstrap-select
|
11
|
+
#= require bootstrap-datepicker
|
12
|
+
#= require bootstrap-select
|
8
13
|
#= require bootstrap-switch.min
|
9
14
|
#= require bootstrap-multiselect.min
|
10
|
-
#= require multi_column
|
11
|
-
|
12
|
-
# For turbolink
|
13
|
-
$(document).on 'ready page:load', ->
|
14
|
-
|
15
|
-
# Submit form when per_page select changing
|
16
|
-
$('.table-pagination-per-page select').change () ->
|
17
|
-
$(this).parents('form').submit()
|
18
|
-
|
19
|
-
# Clear search
|
20
|
-
$('.table-search-field .clear-search-btn').click () ->
|
21
|
-
$(this).prev().val('')
|
22
|
-
$(this).parents('form').submit()
|
23
|
-
|
24
|
-
# Resize search field
|
25
|
-
$('.table-card input[type=search]').blur ->
|
26
|
-
$parent = $(this).parent()
|
27
|
-
$parent.removeClass('has-value') if $(this).val() == ''
|
28
|
-
$parent.removeClass('is-focused')
|
29
|
-
|
30
|
-
$('.table-card input[type=search]').focus ->
|
31
|
-
$(this).parent().addClass('is-focused has-value')
|
32
15
|
|
33
|
-
|
34
|
-
|
16
|
+
# Ui Bibz
|
17
|
+
#= require table
|
18
|
+
#= require interface
|
19
|
+
#= require form
|
20
|
+
#= require fix_bootstrap
|
35
21
|
|
36
|
-
$('.selectpicker').selectpicker()
|
37
22
|
|
38
|
-
|
23
|
+
@UiBibz = class UiBibz
|
39
24
|
|
40
|
-
|
41
|
-
|
42
|
-
|
25
|
+
constructor: ->
|
26
|
+
@table = new window.UiBibzTable()
|
27
|
+
@form = new window.UiBibzForm()
|
28
|
+
@interface = new window.UiBibzInterface()
|
29
|
+
#delete window.UiBibzTable
|
30
|
+
#delete window.UiBibzForm
|
31
|
+
#delete window.UiBibzInterface
|
43
32
|
|
44
|
-
|
45
|
-
|
46
|
-
delete data["multiselect"]
|
47
|
-
data = Object.assign({ inheritClass: true }, data)
|
48
|
-
$(this).multiselect(data)
|
33
|
+
ready = ->
|
34
|
+
new UiBibz
|
49
35
|
|
50
|
-
|
36
|
+
$(document).on('turbolinks:load page:change', ready)
|
@@ -0,0 +1,150 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* bootstrap-switch - v3.3.2
|
3
|
+
* http://www.bootstrap-switch.org
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2012-2013 Mattia Larentis
|
6
|
+
*
|
7
|
+
* ========================================================================
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
* you may not use this file except in compliance with the License.
|
10
|
+
* You may obtain a copy of the License at
|
11
|
+
*
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
*
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
* See the License for the specific language governing permissions and
|
18
|
+
* limitations under the License.
|
19
|
+
* ========================================================================
|
20
|
+
*/
|
21
|
+
|
22
|
+
.bootstrap-switch
|
23
|
+
display: inline-block
|
24
|
+
direction: ltr
|
25
|
+
cursor: pointer
|
26
|
+
border-radius: 5px
|
27
|
+
border: 1px solid #ccc
|
28
|
+
position: relative
|
29
|
+
text-align: left
|
30
|
+
overflow: hidden
|
31
|
+
line-height: 8px
|
32
|
+
z-index: 0
|
33
|
+
-webkit-user-select: none
|
34
|
+
-moz-user-select: none
|
35
|
+
-ms-user-select: none
|
36
|
+
user-select: none
|
37
|
+
vertical-align: middle
|
38
|
+
-webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s
|
39
|
+
-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s
|
40
|
+
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s
|
41
|
+
.bootstrap-switch-container
|
42
|
+
display: inline-block
|
43
|
+
top: 0
|
44
|
+
border-radius: 4px
|
45
|
+
-webkit-transform: translate3d(0, 0, 0)
|
46
|
+
transform: translate3d(0, 0, 0)
|
47
|
+
.bootstrap-switch-handle-off, .bootstrap-switch-handle-on, .bootstrap-switch-label
|
48
|
+
-webkit-box-sizing: border-box
|
49
|
+
-moz-box-sizing: border-box
|
50
|
+
box-sizing: border-box
|
51
|
+
cursor: pointer
|
52
|
+
display: inline-block !important
|
53
|
+
padding: 6px 12px
|
54
|
+
font-size: 14px
|
55
|
+
line-height: 20px
|
56
|
+
.bootstrap-switch-handle-off, .bootstrap-switch-handle-on
|
57
|
+
text-align: center
|
58
|
+
z-index: 1
|
59
|
+
.bootstrap-switch-handle-off.bootstrap-switch-primary, .bootstrap-switch-handle-on.bootstrap-switch-primary
|
60
|
+
color: #fff
|
61
|
+
background: $brand-primary
|
62
|
+
.bootstrap-switch-handle-off.bootstrap-switch-info, .bootstrap-switch-handle-on.bootstrap-switch-info
|
63
|
+
color: #fff
|
64
|
+
background: $brand-info
|
65
|
+
.bootstrap-switch-handle-off.bootstrap-switch-success, .bootstrap-switch-handle-on.bootstrap-switch-success
|
66
|
+
color: #fff
|
67
|
+
background: $brand-success
|
68
|
+
.bootstrap-switch-handle-off.bootstrap-switch-warning, .bootstrap-switch-handle-on.bootstrap-switch-warning
|
69
|
+
background: $brand-warning
|
70
|
+
color: #fff
|
71
|
+
.bootstrap-switch-handle-off.bootstrap-switch-danger, .bootstrap-switch-handle-on.bootstrap-switch-danger
|
72
|
+
color: #fff
|
73
|
+
background: $brand-danger
|
74
|
+
.bootstrap-switch-handle-off.bootstrap-switch-default, .bootstrap-switch-handle-on.bootstrap-switch-default
|
75
|
+
color: #000
|
76
|
+
background: $brand-secondary
|
77
|
+
.bootstrap-switch-label
|
78
|
+
text-align: center
|
79
|
+
margin-top: -1px
|
80
|
+
margin-bottom: -1px
|
81
|
+
z-index: 100
|
82
|
+
color: #333
|
83
|
+
background: #fff
|
84
|
+
.bootstrap-switch-handle-on
|
85
|
+
border-bottom-left-radius: 3px
|
86
|
+
border-top-left-radius: 3px
|
87
|
+
.bootstrap-switch-handle-off
|
88
|
+
border-bottom-right-radius: 3px
|
89
|
+
border-top-right-radius: 3px
|
90
|
+
input
|
91
|
+
&[type=radio], &[type=checkbox]
|
92
|
+
position: absolute !important
|
93
|
+
top: 0
|
94
|
+
left: 0
|
95
|
+
margin: 0
|
96
|
+
z-index: -1
|
97
|
+
opacity: 0
|
98
|
+
filter: alpha(opacity = 0)
|
99
|
+
&.bootstrap-switch-mini
|
100
|
+
.bootstrap-switch-handle-off, .bootstrap-switch-handle-on, .bootstrap-switch-label
|
101
|
+
padding: 1px 5px
|
102
|
+
font-size: 12px
|
103
|
+
line-height: 1.5
|
104
|
+
&.bootstrap-switch-small
|
105
|
+
.bootstrap-switch-handle-off, .bootstrap-switch-handle-on, .bootstrap-switch-label
|
106
|
+
padding: 5px 10px
|
107
|
+
font-size: 12px
|
108
|
+
line-height: 1.5
|
109
|
+
&.bootstrap-switch-large
|
110
|
+
.bootstrap-switch-handle-off, .bootstrap-switch-handle-on, .bootstrap-switch-label
|
111
|
+
padding: 6px 16px
|
112
|
+
font-size: 18px
|
113
|
+
line-height: 1.3333333
|
114
|
+
&.bootstrap-switch-disabled, &.bootstrap-switch-indeterminate, &.bootstrap-switch-readonly
|
115
|
+
cursor: default !important
|
116
|
+
&.bootstrap-switch-disabled
|
117
|
+
.bootstrap-switch-handle-off, .bootstrap-switch-handle-on, .bootstrap-switch-label
|
118
|
+
opacity: .5
|
119
|
+
filter: alpha(opacity = 50)
|
120
|
+
cursor: default !important
|
121
|
+
&.bootstrap-switch-indeterminate
|
122
|
+
.bootstrap-switch-handle-off, .bootstrap-switch-handle-on, .bootstrap-switch-label
|
123
|
+
opacity: .5
|
124
|
+
filter: alpha(opacity = 50)
|
125
|
+
cursor: default !important
|
126
|
+
&.bootstrap-switch-readonly
|
127
|
+
.bootstrap-switch-handle-off, .bootstrap-switch-handle-on, .bootstrap-switch-label
|
128
|
+
opacity: .5
|
129
|
+
filter: alpha(opacity = 50)
|
130
|
+
cursor: default !important
|
131
|
+
&.bootstrap-switch-animate .bootstrap-switch-container
|
132
|
+
-webkit-transition: margin-left .5s
|
133
|
+
-o-transition: margin-left .5s
|
134
|
+
transition: margin-left .5s
|
135
|
+
&.bootstrap-switch-inverse
|
136
|
+
.bootstrap-switch-handle-on
|
137
|
+
border-radius: 0 3px 3px 0
|
138
|
+
.bootstrap-switch-handle-off
|
139
|
+
border-radius: 3px 0 0 3px
|
140
|
+
&.bootstrap-switch-focused
|
141
|
+
//border-color: #66afe9
|
142
|
+
outline: 0
|
143
|
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6)
|
144
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6)
|
145
|
+
&.bootstrap-switch-inverse.bootstrap-switch-off .bootstrap-switch-label, &.bootstrap-switch-on .bootstrap-switch-label
|
146
|
+
border-bottom-right-radius: 3px
|
147
|
+
border-top-right-radius: 3px
|
148
|
+
&.bootstrap-switch-inverse.bootstrap-switch-on .bootstrap-switch-label, &.bootstrap-switch-off .bootstrap-switch-label
|
149
|
+
border-bottom-left-radius: 3px
|
150
|
+
border-top-left-radius: 3px
|
@@ -1,2 +1,33 @@
|
|
1
|
-
|
2
|
-
margin: 32px 3px 0px 0px !important
|
1
|
+
//.btn-group > .dropdown-menu
|
2
|
+
//margin: 32px 3px 0px 0px !important
|
3
|
+
|
4
|
+
// fix form states
|
5
|
+
@each $key, $value in $states_colors
|
6
|
+
.has-#{$key}
|
7
|
+
.form-control
|
8
|
+
border-color: $value !important
|
9
|
+
label, span.help-block
|
10
|
+
color: $value
|
11
|
+
|
12
|
+
// fix dropdown size
|
13
|
+
.btn-group
|
14
|
+
// fix dropdown sticky
|
15
|
+
padding: 0 0 0.2rem 0.05rem
|
16
|
+
// size default (md)
|
17
|
+
.btn + .dropdown-toggle
|
18
|
+
height: 2.37rem
|
19
|
+
padding-right: 8px
|
20
|
+
padding-left: 8px
|
21
|
+
// size sm
|
22
|
+
.btn-sm + .dropdown-toggle
|
23
|
+
height: 1.94rem
|
24
|
+
// size lg
|
25
|
+
.btn-lg + .dropdown-toggle
|
26
|
+
height: 3.28rem
|
27
|
+
|
28
|
+
// Add xs size
|
29
|
+
.btn-xs, .btn-group-xs > .btn
|
30
|
+
padding: 0.15rem 0.5rem
|
31
|
+
font-size: 0.79rem
|
32
|
+
line-height: 1.5
|
33
|
+
border-radius: 0.2rem
|