shul 0.4.3 → 0.4.4

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: '098110e5e756f70347548f9eb4768f73212a8141'
4
- data.tar.gz: ce51ba363268796d1cf2a908322ab53561bf9c43
3
+ metadata.gz: 43dfe1bc74517a3b8469a82d65424584cbe8f38c
4
+ data.tar.gz: 555b493057c36c7c9e0a1491d157a8b5cbeeaa20
5
5
  SHA512:
6
- metadata.gz: ce614c657369ee85f870bfdf22ce4af39fedc44505bd42e61e7e0fdb21b9f2a03a07320efa8b72cdd516d81269573f23820a72ea89fe0dae26cf696838459c93
7
- data.tar.gz: 4a5450d2d4814ec9315fd9e7cc2839bde5d723688850bb0a491912e248118e0d1b85f45eeae2945248f9308fc3bcda2af2a64749be834070c7c7abd504605da7
6
+ metadata.gz: 7bd795c58fec0463f455c9b2f1599c01475a6deef8ac7021b43c45baa5c8bf14578737cb1d958c6373a4d1da5ffb9d2845bc09a3aac98343f04209e1669085e6
7
+ data.tar.gz: 874433ee295b8085826fb7126e28e78b32afd434cd96bf8b50953d0cf2180893876b690346fe30b5312c71212be24ee2bf532bdc78909777f0ff205b58a7398a
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/shul.rb CHANGED
@@ -41,6 +41,8 @@ Shul::Main.new Shoes, doc
41
41
 
42
42
  # modifications
43
43
  #
44
+ # 09-Aug-2017: feature: onkeypress() now implemented.
45
+ # Listboxes can now be rendered
44
46
  # 09-jun-2017: bug fix: The button class has now been implemented with Shule
45
47
  # 22-May-2017: feature: The font size for a label can now be set
46
48
  # 21-May-2017: Added a Document Object Model (DOM) class called Shule
@@ -61,9 +63,13 @@ Shul::Main.new Shoes, doc
61
63
  # Rexle::Element enhancement rather than a monkey patch
62
64
  # * tested using the green_shoes gem.
63
65
 
66
+
67
+
64
68
  require 'domle'
65
69
 
66
70
 
71
+
72
+
67
73
  module RexleObject
68
74
  refine Rexle::Element do
69
75
 
@@ -79,6 +85,8 @@ app {background-color: white}
79
85
  hbox {background-color: yellow}
80
86
  vbox {background-color: #0e0}
81
87
  label {background-color: #aa1}
88
+ listbox {background-color: #aa1}
89
+ listitem {background-color: #aa1}
82
90
 
83
91
  CSS
84
92
 
@@ -115,6 +123,14 @@ module Shul
115
123
  class Label < Component
116
124
 
117
125
  end
126
+
127
+ class Listbox < Component
128
+
129
+ end
130
+
131
+ class Listitem < Component
132
+
133
+ end
118
134
 
119
135
 
120
136
  def inspect()
@@ -137,7 +153,9 @@ module Shul
137
153
  script: Shule::Script,
138
154
  hbox: Shule::Hbox,
139
155
  vbox: Shule::Vbox,
140
- label: Shule::Label
156
+ label: Shule::Label,
157
+ listbox: Shule::Listbox,
158
+ listitem: Shule::Listitem
141
159
  })
142
160
  end
143
161
 
@@ -284,6 +302,14 @@ module Shul
284
302
  end
285
303
 
286
304
  @doc.root.xpath('script').each {|x| script x }
305
+
306
+ h = @doc.root.attributes
307
+
308
+ if h[:onkeypress] then
309
+ shoes.keypress do |k|
310
+ method(h[:onkeypress][/^[a-z]\w+/].to_sym).call(k)
311
+ end
312
+ end
287
313
 
288
314
  end
289
315
 
@@ -492,9 +518,14 @@ module Shul
492
518
  end
493
519
 
494
520
  def listbox(e)
495
- a = e.xpath 'listem/attribute::label'
521
+
522
+ a = e.xpath('listitem/attribute::label').map(&:to_s)
496
523
  e.obj = @shoes.list_box items: a
524
+ #
497
525
  end
526
+
527
+ def listitem()
528
+ end
498
529
 
499
530
  def progressmeter(e)
500
531
  e.obj = @shoes.progress
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  t8eGazfn6KO3ECwm0DI6ZG6K+/TPPHv8HXfONWq0oGmvwamHXWjcz3hCa5hZw0Vt
32
32
  +vU993j3UFViMQ==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-06-10 00:00:00.000000000 Z
34
+ date: 2017-08-08 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: domle
metadata.gz.sig CHANGED
Binary file