glib-web 0.0.12 → 0.0.13

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: 0c5f212e754c0a5e435ed1dc5ccfe1829b90cbef5f76b0341f6d0230cc3e4867
4
- data.tar.gz: 7345667f4b3ca65e822272f3f4ec9a6408b30d92e39ba4125ba1eab308a0b198
3
+ metadata.gz: fa54978babb0309d7e60e95a3ac0a8de38d6e7114986154e07ce37af78014f49
4
+ data.tar.gz: 9f74445f4674fbbe6985565db1e621ba4dd04bc9c029b8dbcff8276d7066cafa
5
5
  SHA512:
6
- metadata.gz: 2dfa110a927c6762e5a9867380c052d1f1cfdbb78f1394c7499e85467786a6073e348d01439e1a5c8ecef505551441c17235a2b41bc97feba4a264ad06c7d722
7
- data.tar.gz: 54305791082719325d20c9d05dfca87c3e0bce8cbb8dc452927d1bc61a6e4db95ded1e7ea35f3c730f1f09c9f59a818b345bb5c916ff475d7e0dd894865120bf
6
+ metadata.gz: 5b8022ad0f2c590e36832fdee3b985c2470421bce4d13047883cce252979bf5ff7d7000598e139d709d09eb1f1bdd9febf9c19a6b406699bb4955cb9bbd2366d
7
+ data.tar.gz: 1a760bc4370f659e4d819af3b966462301818f36ea85e88d5201a06a47132efa56f580fe39a81431ee7ffc9b49c8c6ab8befe592c243f93df3b89bea221232e8
@@ -5,23 +5,23 @@ module Glib
5
5
  def method_missing m, *args
6
6
  add_element_to_array 'template', m, *args
7
7
  end
8
-
8
+
9
9
  class AbstractTemplate < JsonUiElement
10
10
  def editButtons(block)
11
11
  json.editButtons do
12
12
  block.call page.menu_builder
13
13
  end
14
14
  end
15
-
15
+
16
16
  end
17
-
17
+
18
18
  class Thumbnail < AbstractTemplate
19
19
  string :title
20
20
  string :subtitle
21
21
  action :onClick
22
22
  end
23
23
  end
24
-
24
+
25
25
  class Section < AbstractBuilder
26
26
  def header(options = {})
27
27
  json.header do
@@ -44,8 +44,17 @@ module Glib
44
44
  end
45
45
  end
46
46
  end
47
+
48
+ def footer(options = {})
49
+ json.footer do
50
+ json.padding options[:padding]
51
+ json.childViews do
52
+ yield page.view_builder
53
+ end
54
+ end
55
+ end
47
56
  end
48
-
57
+
49
58
  end
50
59
  end
51
60
  end
@@ -2,7 +2,7 @@ class Glib::JsonUi::ViewBuilder
2
2
  module Fields
3
3
  class AbstractField < View
4
4
  string :label
5
-
5
+
6
6
  def name(name)
7
7
  @name = name
8
8
  end
@@ -23,42 +23,44 @@ class Glib::JsonUi::ViewBuilder
23
23
  json.name @name
24
24
  json.value @value
25
25
  end
26
-
26
+
27
27
  end
28
28
 
29
29
  class Text < AbstractField
30
30
  int :maxlength
31
+ bool :readOnly
31
32
  end
32
-
33
+
33
34
  class Email < Text
34
35
  end
35
-
36
+
36
37
  class Password < Text
37
38
  end
38
-
39
+
39
40
  class Hidden < Text
40
41
  end
41
42
 
42
43
  class Textarea < Text
44
+ bool :readOnly
43
45
  end
44
46
 
45
47
  class Country < AbstractField
46
48
  hash :region
47
49
  end
48
-
50
+
49
51
  class Select < AbstractField
50
52
  array :options
53
+ bool :readOnly
51
54
  end
52
-
55
+
53
56
  class RadioGroup < View
54
57
  string :name
55
58
  views :childViews
56
59
  end
57
-
60
+
58
61
  class Radio < View
59
62
  string :label
60
63
  string :value
61
64
  end
62
65
  end
63
66
  end
64
-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''