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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6095e2d991c112c4d4e7ddb11f69dc9ec74a10e2e1fb5c2b577834d7db62cbf0
4
- data.tar.gz: ef9efcaad8b56f58b2cb9cb4d8ee3931192037805701915a411fccabb2995032
3
+ metadata.gz: fa4ce2599f3137734dcbc471ecd27592241b1043086c1671d10728d87432025b
4
+ data.tar.gz: 7cd5851bd3d4e81788256f94c0372afd1dedf4a1cd7f597e4cb04a9bb007e14c
5
5
  SHA512:
6
- metadata.gz: 5e1c2cbafd19b644630eecb8542577adbaa702d1a1c8d3f44d553f7d3e32ec32792cc45b076eebbaea9d73b49884ebb892dd8345dec9eab87a1ead44267c3e4d
7
- data.tar.gz: d5dd9ddbb57de13e3c7e4d008b01ca0c785d491f5d315aebd86ea90eeeb2b91ad76620096fe2a7bd4c7a206de4db919880b380fee1328d9ba6abace86fd1988a
6
+ metadata.gz: 4d3c9b32037026c1235d80f0a2abd4bae7883c093fdc05192ed135cf75190ccc08696d1a556a8324db0d9fa38467e1a7c80a86fff3a043d5c80823d656efcfff
7
+ data.tar.gz: e28adc2053545077db25b8c3b023c9aa4fc5dba671883b0f9fa1379e968972c6a43123336579e07539290efc5e57e8b88594bef2b09f0603147aaa9059e502a3
@@ -677,4 +677,8 @@ function read_notify(id,url) {
677
677
  window.location = url;
678
678
  }
679
679
  });
680
+ }
681
+
682
+ function capitalize(word) {
683
+ return word[0].toUpperCase() + word.slice(1).toLowerCase();
680
684
  }
@@ -11,7 +11,16 @@
11
11
  -unless defined? readonly
12
12
  -readonly = false
13
13
 
14
- -if required
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.2
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-03-17 00:00:00.000000000 Z
11
+ date: 2021-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sucker_punch