sinatra-hexacta 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sinatra/public/js/app.js +4 -0
- data/lib/sinatra/views/inputs/select.slim +18 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa4ce2599f3137734dcbc471ecd27592241b1043086c1671d10728d87432025b
|
4
|
+
data.tar.gz: 7cd5851bd3d4e81788256f94c0372afd1dedf4a1cd7f597e4cb04a9bb007e14c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d3c9b32037026c1235d80f0a2abd4bae7883c093fdc05192ed135cf75190ccc08696d1a556a8324db0d9fa38467e1a7c80a86fff3a043d5c80823d656efcfff
|
7
|
+
data.tar.gz: e28adc2053545077db25b8c3b023c9aa4fc5dba671883b0f9fa1379e968972c6a43123336579e07539290efc5e57e8b88594bef2b09f0603147aaa9059e502a3
|
@@ -11,7 +11,16 @@
|
|
11
11
|
-unless defined? readonly
|
12
12
|
-readonly = false
|
13
13
|
|
14
|
-
-if
|
14
|
+
-if readonly
|
15
|
+
.form-group
|
16
|
+
label #{placeholder}
|
17
|
+
select.chosen id="#{id}" class="#{clazz}" name="#{name}" data-placeholder=("#{placeholder}") style=("display: none;") disabled=""
|
18
|
+
-for element in elements
|
19
|
+
-if chosen == element[:value]
|
20
|
+
option value="#{element[:value]}" selected="" #{element[:text]}
|
21
|
+
-else
|
22
|
+
option value="#{element[:value]}" #{element[:text]}
|
23
|
+
-elsif required
|
15
24
|
.form-group.has-success
|
16
25
|
label #{placeholder}
|
17
26
|
select.chosen.form-control id="#{id}" class="#{clazz}" name="#{name}" data-placeholder=("#{placeholder}") style=("display: none;") required=""
|
@@ -29,4 +38,11 @@
|
|
29
38
|
-if chosen == element[:value]
|
30
39
|
option value="#{element[:value]}" selected="" #{element[:text]}
|
31
40
|
-else
|
32
|
-
option value="#{element[:value]}" #{element[:text]}
|
41
|
+
option value="#{element[:value]}" #{element[:text]}
|
42
|
+
|
43
|
+
|
44
|
+
/ For enabling
|
45
|
+
/ var myselect=$('select');
|
46
|
+
/ myselect.chosen();
|
47
|
+
/ myselect.prop('disabled', true);
|
48
|
+
/ myselect.trigger("chosen:updated");
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-hexacta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marco Zanger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sucker_punch
|