weaver 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/weaver/version.rb +1 -1
- data/lib/weaver.rb +43 -14
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5f4d34b80117b37e934c9c5bd9391339ca04d7b
|
4
|
+
data.tar.gz: f3d7460153ce3ecddceb3ec69faf1955edaf26b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 135aad79ce90cfc8abe3f957e077e590ec9f214d707f116baf8061b3e43e10915fcb18a10de4f165d7def4b20ce530144f945ac7ce4d53995caf3ac14c90a8f2
|
7
|
+
data.tar.gz: 70d011dbbba5c182c66c4d70eb4e4bbeb90fa6bc2768fceecdf1344921e433e3a706fb89ffedb2e4d929321b81c011a1a43e96e22f2fb132deb319b2147d76cc
|
data/lib/weaver/version.rb
CHANGED
data/lib/weaver.rb
CHANGED
@@ -1247,20 +1247,36 @@ $("##{@id}").keyup(function()
|
|
1247
1247
|
active = options[:value]
|
1248
1248
|
end
|
1249
1249
|
|
1250
|
-
|
1250
|
+
div_options = {}
|
1251
|
+
curobject = self
|
1252
|
+
if options[:form] == :button
|
1253
|
+
div_options[:"data-toggle"] = "buttons"
|
1254
|
+
end
|
1255
|
+
div div_options do
|
1256
|
+
choice_array.each do |choice|
|
1257
|
+
|
1258
|
+
value = choice[:value]
|
1259
|
+
label = choice[:label]
|
1251
1260
|
|
1252
|
-
|
1253
|
-
label = choice[:label]
|
1261
|
+
the_options = Hash.new(options)
|
1254
1262
|
|
1255
|
-
|
1263
|
+
if active == value
|
1264
|
+
the_options[:checked] = ""
|
1265
|
+
end
|
1256
1266
|
|
1257
|
-
|
1258
|
-
|
1267
|
+
if options[:form] == :button
|
1268
|
+
the_options[:type] = "radio"
|
1269
|
+
the_options[:value] = value
|
1270
|
+
the_options[:name] = name
|
1271
|
+
the_options[:form] = :button
|
1272
|
+
text curobject.boolean_element(label, the_options)
|
1273
|
+
else
|
1274
|
+
the_options[:type] = "radio"
|
1275
|
+
the_options[:value] = value
|
1276
|
+
the_options[:name] = name
|
1277
|
+
text curobject.boolean_element(label, the_options)
|
1278
|
+
end
|
1259
1279
|
end
|
1260
|
-
the_options[:type] = "radio"
|
1261
|
-
the_options[:value] = value
|
1262
|
-
the_options[:name] = name
|
1263
|
-
text boolean_element(label, the_options)
|
1264
1280
|
end
|
1265
1281
|
|
1266
1282
|
|
@@ -1316,15 +1332,28 @@ $(document).ready(function () {
|
|
1316
1332
|
});
|
1317
1333
|
SCRIPT
|
1318
1334
|
|
1335
|
+
label_options = {}
|
1319
1336
|
elem = Elements.new(@page, @anchors)
|
1320
1337
|
elem.instance_eval do
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1338
|
+
|
1339
|
+
if options[:form] == :button
|
1340
|
+
label class: "btn btn-primary btn-block btn-outline" do
|
1341
|
+
input options
|
1342
|
+
text "#{checkbox_label}"
|
1343
|
+
end
|
1344
|
+
#<label class="btn btn-primary btn-block active">
|
1345
|
+
# <input type="radio" name="options" id="option1" autocomplete="off" checked> Radio 1 (preselected)
|
1346
|
+
#</label>
|
1347
|
+
else
|
1348
|
+
div class: "i-checks" do
|
1349
|
+
label label_options do
|
1350
|
+
input options do
|
1351
|
+
text " #{checkbox_label}"
|
1352
|
+
end
|
1325
1353
|
end
|
1326
1354
|
end
|
1327
1355
|
end
|
1356
|
+
|
1328
1357
|
end
|
1329
1358
|
|
1330
1359
|
elem.generate
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weaver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Siaw
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -720,7 +720,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
720
720
|
version: '0'
|
721
721
|
requirements: []
|
722
722
|
rubyforge_project:
|
723
|
-
rubygems_version: 2.
|
723
|
+
rubygems_version: 2.4.5.1
|
724
724
|
signing_key:
|
725
725
|
specification_version: 4
|
726
726
|
summary: Website generator
|