card-mod-bootstrap 0.11.2 → 0.12.0
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 +4 -4
- data/db/migrate_core_cards/20170719163733_update_bootswatch_themes_to_4_beta.rb +1 -2
- data/db/migrate_core_cards/20170726111053_add_bootstrap_mixins.rb +2 -2
- data/db/migrate_core_cards/20170726145012_select2.rb +2 -2
- data/db/migrate_core_cards/20180423160231_migrate_customized_bootstrap_skin.rb +1 -0
- data/db/migrate_core_cards/20180423170283_add_type_bootswatch_skin.rb +1 -0
- data/db/migrate_core_cards/20180425174433_delete_deprecated_skin_cards.rb +1 -0
- data/db/migrate_core_cards/20181129140917_fix_skin_images.rb +0 -1
- data/db/migrate_core_cards/data/20181108181219_migrate_classic_skins_to_bootstrap.rb +1 -0
- data/db/migrate_core_cards/lib/skin.rb +1 -1
- data/lib/card/bootstrap.rb +17 -0
- data/lib/card/bootstrap/basic_tags.rb +26 -0
- data/lib/card/bootstrap/component.rb +110 -0
- data/lib/card/bootstrap/component/carousel.rb +78 -0
- data/lib/card/bootstrap/component/form.rb +67 -0
- data/lib/card/bootstrap/component/horizontal_form.rb +65 -0
- data/lib/card/bootstrap/component/layout.rb +107 -0
- data/lib/card/bootstrap/component/panel.rb +11 -0
- data/lib/card/bootstrap/component_klass.rb +37 -0
- data/lib/card/bootstrap/component_loader.rb +30 -0
- data/lib/card/bootstrap/content.rb +42 -0
- data/lib/card/bootstrap/delegate.rb +18 -0
- data/lib/card/bootstrap/old_component.rb +108 -0
- data/lib/card/bootstrap/tag_method.rb +56 -0
- data/lib/card/bootstrapper.rb +17 -0
- data/lib/card/tab.rb +8 -1
- data/set/abstract/bootstrap_code_file.rb +0 -1
- data/set/abstract/bootswatch_theme.rb +1 -0
- data/set/abstract/bs_badge/tab_badge.haml +1 -1
- data/set/all/bootstrap/dropdown.rb +12 -4
- data/set/all/bootstrap/helper.rb +18 -11
- data/set/all/bootstrap/icon.rb +3 -1
- data/set/all/bootstrap/table.rb +1 -0
- data/set/all/bootstrap/wrapper.rb +2 -4
- data/set/self/bootstrap_core.rb +7 -8
- data/set/type/customized_bootswatch_skin.rb +11 -7
- data/set/type_plus_right/customized_bootswatch_skin/colors.rb +3 -2
- metadata +28 -27
- data/lib/bootstrap.rb +0 -16
- data/lib/bootstrap/basic_tags.rb +0 -26
- data/lib/bootstrap/component.rb +0 -139
- data/lib/bootstrap/component/carousel.rb +0 -68
- data/lib/bootstrap/component/form.rb +0 -65
- data/lib/bootstrap/component/horizontal_form.rb +0 -63
- data/lib/bootstrap/component/layout.rb +0 -95
- data/lib/bootstrap/component/panel.rb +0 -9
- data/lib/bootstrap/component_loader.rb +0 -28
- data/lib/bootstrap/content.rb +0 -40
- data/lib/bootstrap/delegate.rb +0 -16
- data/lib/bootstrap/old_component.rb +0 -103
- data/lib/bootstrap/tag_method.rb +0 -54
- data/lib/bootstrapper.rb +0 -16
data/lib/bootstrap/tag_method.rb
DELETED
@@ -1,54 +0,0 @@
|
|
1
|
-
class Bootstrap
|
2
|
-
# support html tag generation
|
3
|
-
class TagMethod
|
4
|
-
include Content
|
5
|
-
|
6
|
-
def initialize component, name, html_class, tag_opts={}, &tag_block
|
7
|
-
@component = component
|
8
|
-
@name = name
|
9
|
-
@html_class = html_class
|
10
|
-
@tag_opts = tag_opts
|
11
|
-
@tag_block = tag_block
|
12
|
-
@append = []
|
13
|
-
@wrap = []
|
14
|
-
@xm = Builder::XmlMarkup.new
|
15
|
-
end
|
16
|
-
|
17
|
-
def call *_args, &content_block
|
18
|
-
component.content.push "".html_safe
|
19
|
-
|
20
|
-
opts = process_content(&content_block)
|
21
|
-
process_collected_content tag_name, opts
|
22
|
-
process_append
|
23
|
-
""
|
24
|
-
end
|
25
|
-
|
26
|
-
def method_missing method, *args, &block
|
27
|
-
return super unless respond_to_missing? method
|
28
|
-
|
29
|
-
@component.send method, *args, &block
|
30
|
-
end
|
31
|
-
|
32
|
-
def respond_to_missing? method, _include_private=false
|
33
|
-
@component.respond_to? method
|
34
|
-
end
|
35
|
-
|
36
|
-
def prepend &block
|
37
|
-
tmp = @content.pop
|
38
|
-
instance_exec(&block)
|
39
|
-
@content << tmp
|
40
|
-
end
|
41
|
-
|
42
|
-
def wrap &block
|
43
|
-
instance_exec(&block)
|
44
|
-
end
|
45
|
-
|
46
|
-
def append &block
|
47
|
-
@append[-1] << block
|
48
|
-
end
|
49
|
-
|
50
|
-
def wrapInner tag=nil, &block
|
51
|
-
@wrap[-1] << (block_given? ? block : tag)
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
data/lib/bootstrapper.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
require "bootstrap"
|
2
|
-
module Bootstrapper
|
3
|
-
extend Bootstrap::ComponentLoader
|
4
|
-
|
5
|
-
def bootstrap
|
6
|
-
@bootstrap ||= ::Bootstrap.new(self)
|
7
|
-
end
|
8
|
-
|
9
|
-
def bs *args, &block
|
10
|
-
bootstrap.render *args, &block
|
11
|
-
end
|
12
|
-
|
13
|
-
components.each do |component|
|
14
|
-
delegate component, to: :bootstrap, prefix: :bs
|
15
|
-
end
|
16
|
-
end
|