bootstrap-switch-rails 0.1.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c672d058e8f3eff8971d573078cae4a30ad8397d
|
4
|
+
data.tar.gz: 87596d7c5caff46479bfa34969614042d0ec5f13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d36c3650c993bf28a2f93dc94f1b246a06778921fd67a6073a875a818e47a2931bea4a14b29cd53e6c5e865c9bc4f0d8c0ed1422bd1de925f84e341f26dab31
|
7
|
+
data.tar.gz: 6c03c19f7d6045e7bd3b6a758ba0968c56d434797b9e9126aac30b763cc5a6af67ed304fc2f746f23efde5538be89140e184e0e0c111128ff1b3344b32cd8c53
|
data/README.md
CHANGED
@@ -33,10 +33,11 @@ See the [demo page of Mattia Larentis](http://www.larentis.eu/switch/) for examp
|
|
33
33
|
|
34
34
|
## Changes
|
35
35
|
|
36
|
-
| Version | Notes
|
37
|
-
|
38
|
-
|
|
39
|
-
| 0.1.
|
36
|
+
| Version | Notes |
|
37
|
+
|---------+-------------------------------------------------------------------------------------|
|
38
|
+
| 1.4.0 | Update to v1.4 of the bootstrap-switch plugin and make version equal to the plugin |
|
39
|
+
| 0.1.1 | Update to v1.3 of the bootstrap-switch plugin |
|
40
|
+
| 0.1.0 | Initial release |
|
40
41
|
|
41
42
|
## License
|
42
43
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# Checkout vendor repo
|
4
|
+
echo "Cloning nostalgiaz/bootstrap-switch github repo into tmp_vendor"
|
5
|
+
git clone https://github.com/nostalgiaz/bootstrap-switch.git tmp_vendor
|
6
|
+
|
7
|
+
# Copy files
|
8
|
+
echo "Copying bootstrap-switch.js"
|
9
|
+
cp tmp_vendor/static/js/bootstrap-switch.js vendor/assets/javascripts/bootstrap-switch.js
|
10
|
+
echo "Copying bootstrap-switch.css"
|
11
|
+
cp tmp_vendor/static/stylesheets/bootstrap-switch.css vendor/assets/stylesheets/bootstrap-switch.css
|
12
|
+
|
13
|
+
# Delete vendor repo
|
14
|
+
echo "Removing cloned vendor repo"
|
15
|
+
rm -rf tmp_vendor
|
16
|
+
|
17
|
+
echo "Finished... You'll need to commit the changes. You should consider updating the changelog and gem version number"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ============================================================
|
2
|
-
* bootstrapSwitch v1.
|
2
|
+
* bootstrapSwitch v1.4 by Larentis Mattia @spiritualGuru
|
3
3
|
* http://www.larentis.eu/switch/
|
4
4
|
* ============================================================
|
5
5
|
* Licensed under the Apache License, Version 2.0
|
@@ -205,15 +205,25 @@
|
|
205
205
|
);
|
206
206
|
},
|
207
207
|
toggleActivation: function () {
|
208
|
-
$(this)
|
208
|
+
var $this = $(this);
|
209
|
+
|
210
|
+
$this.toggleClass('deactivate');
|
211
|
+
$this.find('input:checkbox').attr('disabled', $this.is('.deactivate'));
|
209
212
|
},
|
210
213
|
isActive: function () {
|
211
214
|
return !$(this).hasClass('deactivate');
|
212
215
|
},
|
213
216
|
setActive: function (active) {
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
+
var $this = $(this);
|
218
|
+
|
219
|
+
if (active) {
|
220
|
+
$this.removeClass('deactivate');
|
221
|
+
$this.find('input:checkbox').attr('disabled', false);
|
222
|
+
}
|
223
|
+
else {
|
224
|
+
$this.addClass('deactivate');
|
225
|
+
$this.find('input:checkbox').attr('disabled', true);
|
226
|
+
}
|
217
227
|
},
|
218
228
|
toggleState: function (skipOnChange) {
|
219
229
|
var $input = $(this).find('input:checkbox');
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/* ============================================================
|
2
|
-
* bootstrapSwitch v1.
|
2
|
+
* bootstrapSwitch v1.3 by Larentis Mattia @spiritualGuru
|
3
3
|
* http://www.larentis.eu/switch/
|
4
4
|
* ============================================================
|
5
5
|
* Licensed under the Apache License, Version 2.0
|
@@ -357,3 +357,35 @@
|
|
357
357
|
.has-switch span.switch-danger.active {
|
358
358
|
background-color: #e9322d \9;
|
359
359
|
}
|
360
|
+
.has-switch span.switch-default {
|
361
|
+
color: #333333;
|
362
|
+
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
363
|
+
background-color: #f0f0f0;
|
364
|
+
background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff);
|
365
|
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff));
|
366
|
+
background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff);
|
367
|
+
background-image: -o-linear-gradient(top, #e6e6e6, #ffffff);
|
368
|
+
background-image: linear-gradient(to bottom, #e6e6e6, #ffffff);
|
369
|
+
background-repeat: repeat-x;
|
370
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0);
|
371
|
+
border-color: #ffffff #ffffff #d9d9d9;
|
372
|
+
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
373
|
+
*background-color: #ffffff;
|
374
|
+
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
|
375
|
+
|
376
|
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
|
377
|
+
}
|
378
|
+
.has-switch span.switch-default:hover,
|
379
|
+
.has-switch span.switch-default:focus,
|
380
|
+
.has-switch span.switch-default:active,
|
381
|
+
.has-switch span.switch-default.active,
|
382
|
+
.has-switch span.switch-default.disabled,
|
383
|
+
.has-switch span.switch-default[disabled] {
|
384
|
+
color: #333333;
|
385
|
+
background-color: #ffffff;
|
386
|
+
*background-color: #f2f2f2;
|
387
|
+
}
|
388
|
+
.has-switch span.switch-default:active,
|
389
|
+
.has-switch span.switch-default.active {
|
390
|
+
background-color: #e6e6e6 \9;
|
391
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-switch-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel van Rijn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- lib/bootstrap-switch-rails/engine.rb
|
56
56
|
- lib/bootstrap-switch-rails/railtie.rb
|
57
57
|
- lib/bootstrap-switch-rails/version.rb
|
58
|
+
- update_from_vendor.sh
|
58
59
|
- vendor/assets/javascripts/bootstrap-switch.js
|
59
60
|
- vendor/assets/stylesheets/bootstrap-switch.css
|
60
61
|
homepage: https://github.com/manuelvanrijn/bootstrap-switch-rails
|
@@ -77,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
78
|
version: '0'
|
78
79
|
requirements: []
|
79
80
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.0.
|
81
|
+
rubygems_version: 2.0.3
|
81
82
|
signing_key:
|
82
83
|
specification_version: 4
|
83
84
|
summary: an asset gemification of the bootstrap-switch plugin
|