moode-haml-component-angular 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. data/README.md +4 -0
  2. data/lib/moode-haml-component-angular.rb +26 -6
  3. data/lib/moode-haml-component-angular/{badge_label.haml → _badge_label.haml} +1 -1
  4. data/lib/moode-haml-component-angular/{break.haml → _break.haml} +0 -0
  5. data/lib/moode-haml-component-angular/{footer.haml → _footer.haml} +1 -1
  6. data/lib/moode-haml-component-angular/{header.haml → _header.haml} +1 -1
  7. data/lib/moode-haml-component-angular/{label.haml → _label.haml} +0 -0
  8. data/lib/moode-haml-component-angular/_label_input.haml +4 -0
  9. data/lib/moode-haml-component-angular/{label_textarea.haml → _label_textarea.haml} +0 -0
  10. data/lib/moode-haml-component-angular/{large_button.haml → _large_button.haml} +0 -0
  11. data/lib/moode-haml-component-angular/_list_item_with_badge.haml +9 -0
  12. data/lib/moode-haml-component-angular/{prepend_input.haml → _prepend_input.haml} +0 -0
  13. data/lib/moode-haml-component-angular/{select_button.haml → _select_button.haml} +0 -0
  14. data/lib/moode-haml-component-angular/{small_button.haml → _small_button.haml} +0 -0
  15. data/lib/moode-haml-component-angular/{table.haml → _table.haml} +0 -0
  16. data/lib/moode-haml-component-angular/container/.gitkeep +0 -0
  17. data/lib/moode-haml-component-angular/container/_form_view.haml +4 -0
  18. data/lib/moode-haml-component-angular/container/{list_panel.haml → _list_panel.haml} +0 -0
  19. data/lib/moode-haml-component-angular/container/{prepend_box.haml → _prepend_box.haml} +0 -0
  20. data/lib/moode-haml-component-angular/container/{prepend_form.haml → _prepend_form.haml} +0 -0
  21. data/lib/moode-haml-component-angular/container/{scroll_view.haml → _scroll_view.haml} +0 -0
  22. data/lib/moode-haml-component-angular/version.rb +1 -1
  23. metadata +30 -23
  24. checksums.yaml +0 -15
  25. data/lib/moode-haml-component-angular/container/form_view.haml +0 -3
  26. data/lib/moode-haml-component-angular/label_input.haml +0 -4
  27. data/lib/moode-haml-component-angular/list_item_with_badge.haml +0 -7
data/README.md CHANGED
@@ -27,3 +27,7 @@ TODO: Write usage instructions here
27
27
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
28
  4. Push to the branch (`git push origin my-new-feature`)
29
29
  5. Create new Pull Request
30
+
31
+ TODO
32
+ 1. header_left
33
+ 2. header_right
@@ -1,11 +1,31 @@
1
1
  require "moode-haml-component-angular/version"
2
2
 
3
- module Moode
4
- module Haml
5
- module Component
6
- module Angular
7
- # Your code goes here...
3
+ class Object < BasicObject
4
+
5
+ template_path = File.expand_path('../moode-haml-component-angular', __FILE__)
6
+
7
+ haml_files = File.join(template_path, "*.haml")
8
+ Dir.glob haml_files do |file|
9
+ file_name = File.basename file , ".haml"
10
+ method_name = file_name[1, file_name.length].to_sym
11
+ if(not self.respond_to? method_name, true)
12
+ self.send :define_method, method_name do |args = {}|
13
+ template = File.read("#{template_path}/_#{method_name}.haml")
14
+ Haml::Engine.new(template).render Object.new, args
15
+ end
16
+ end
17
+ end
18
+
19
+ containers_files = File.join(template_path, "container", "*.haml")
20
+ Dir.glob containers_files do |file|
21
+ file_name = File.basename file , ".haml"
22
+ method_name = file_name[1, file_name.length].to_sym
23
+ if(not self.respond_to? method_name)
24
+ self.send :define_method, method_name do |args = {}, &block|
25
+ container "#{template_path}/container/_#{method_name}.haml", args, &block
8
26
  end
9
27
  end
10
28
  end
11
- end
29
+
30
+
31
+ end
@@ -1,2 +1,2 @@
1
1
  %span(class="label #{defined?(label_class)?label_class:"label-info"}")
2
- #{label}
2
+ #{label}
@@ -5,4 +5,4 @@
5
5
  %a(ng-tap="#{tab[:tap] unless tab[:tap].nil?}" href="javascript:void(0);")
6
6
  %i(class="#{tab[:icon] unless tab[:icon].nil?}")
7
7
  %br/
8
- #{tab[:label] unless tab[:label]}
8
+ #{tab[:label] unless tab[:label].nil?}
@@ -8,5 +8,5 @@
8
8
  - if defined?(right_icon) || defined?(right_label)
9
9
  .header-right
10
10
  %a(href="javascript:void(0);" ng-tap="#{right_tap if defined?(right_tap)}" class="btn-style btn-4")
11
- %i(class="#{right_icon if defined?(right_icon)}")></i>
11
+ %i(class="#{right_icon if defined?(right_icon)}")
12
12
  #{right_label if defined?(right_label)}
@@ -0,0 +1,4 @@
1
+ %h5
2
+ %i(class="#{icon if defined?(icon)}")
3
+ #{label if defined?(label)}
4
+ %input(type="text" class="input-full" id="#{id if defined?(id)}" placeholder="#{placeholder if defined?(placeholder)}")
@@ -0,0 +1,9 @@
1
+ %li(ng-repeat="#{ng_repeat}" class="#{"active" if defined?(active)}")
2
+ %a(href="javascript:void(0);" class="" ng-tap="#{ng_tap if defined?(ng_tap)}")>
3
+ %h3
4
+ #{label}
5
+ - if defined?(badges)
6
+ - badges.each do |badge|
7
+ %span(class="badge #{badge[:class] unless badge[:class].nil?}")
8
+ #{badge[:label] unless badge[:label].nil?}
9
+ %i(class="#{tail_icon if defined? tail_icon}")
@@ -0,0 +1,4 @@
1
+ .wrapper.scrollable
2
+ .wrapper-inner
3
+ %fieldset.form-wrapper
4
+ =yield
@@ -2,7 +2,7 @@ module Moode
2
2
  module Haml
3
3
  module Component
4
4
  module Angular
5
- VERSION = "0.0.1"
5
+ VERSION = "0.0.3"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moode-haml-component-angular
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - jtong
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-08-01 00:00:00.000000000 Z
12
+ date: 2013-08-06 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ! '>='
39
44
  - !ruby/object:Gem::Version
@@ -51,48 +56,50 @@ files:
51
56
  - README.md
52
57
  - Rakefile
53
58
  - lib/moode-haml-component-angular.rb
54
- - lib/moode-haml-component-angular/badge_label.haml
55
- - lib/moode-haml-component-angular/break.haml
56
- - lib/moode-haml-component-angular/container/form_view.haml
57
- - lib/moode-haml-component-angular/container/list_panel.haml
58
- - lib/moode-haml-component-angular/container/prepend_box.haml
59
- - lib/moode-haml-component-angular/container/prepend_form.haml
60
- - lib/moode-haml-component-angular/container/scroll_view.haml
61
- - lib/moode-haml-component-angular/footer.haml
62
- - lib/moode-haml-component-angular/header.haml
63
- - lib/moode-haml-component-angular/label.haml
64
- - lib/moode-haml-component-angular/label_input.haml
65
- - lib/moode-haml-component-angular/label_textarea.haml
66
- - lib/moode-haml-component-angular/large_button.haml
67
- - lib/moode-haml-component-angular/list_item_with_badge.haml
68
- - lib/moode-haml-component-angular/prepend_input.haml
69
- - lib/moode-haml-component-angular/select_button.haml
70
- - lib/moode-haml-component-angular/small_button.haml
71
- - lib/moode-haml-component-angular/table.haml
59
+ - lib/moode-haml-component-angular/_badge_label.haml
60
+ - lib/moode-haml-component-angular/_break.haml
61
+ - lib/moode-haml-component-angular/_footer.haml
62
+ - lib/moode-haml-component-angular/_header.haml
63
+ - lib/moode-haml-component-angular/_label.haml
64
+ - lib/moode-haml-component-angular/_label_input.haml
65
+ - lib/moode-haml-component-angular/_label_textarea.haml
66
+ - lib/moode-haml-component-angular/_large_button.haml
67
+ - lib/moode-haml-component-angular/_list_item_with_badge.haml
68
+ - lib/moode-haml-component-angular/_prepend_input.haml
69
+ - lib/moode-haml-component-angular/_select_button.haml
70
+ - lib/moode-haml-component-angular/_small_button.haml
71
+ - lib/moode-haml-component-angular/_table.haml
72
+ - lib/moode-haml-component-angular/container/.gitkeep
73
+ - lib/moode-haml-component-angular/container/_form_view.haml
74
+ - lib/moode-haml-component-angular/container/_list_panel.haml
75
+ - lib/moode-haml-component-angular/container/_prepend_box.haml
76
+ - lib/moode-haml-component-angular/container/_prepend_form.haml
77
+ - lib/moode-haml-component-angular/container/_scroll_view.haml
72
78
  - lib/moode-haml-component-angular/version.rb
73
79
  - moode-haml-component-angular.gemspec
74
80
  homepage: ''
75
81
  licenses:
76
82
  - GPL
77
- metadata: {}
78
83
  post_install_message:
79
84
  rdoc_options: []
80
85
  require_paths:
81
86
  - lib
82
87
  required_ruby_version: !ruby/object:Gem::Requirement
88
+ none: false
83
89
  requirements:
84
90
  - - ! '>='
85
91
  - !ruby/object:Gem::Version
86
92
  version: '0'
87
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
+ none: false
88
95
  requirements:
89
96
  - - ! '>='
90
97
  - !ruby/object:Gem::Version
91
98
  version: '0'
92
99
  requirements: []
93
100
  rubyforge_project:
94
- rubygems_version: 2.0.3
101
+ rubygems_version: 1.8.24
95
102
  signing_key:
96
- specification_version: 4
103
+ specification_version: 3
97
104
  summary: coral ui components
98
105
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZGNlN2UyMmY4ZTMxNjQ0NTZjZDU5ODg3YmI1NmI1YjQ0YTc3NWRlMQ==
5
- data.tar.gz: !binary |-
6
- NDI2ZTJkMTQ5ZTVmOWFiMTc2MDExNGEwNzIxY2NjOTc5NTdmYWM4Zg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- ZTkwNWFhNDM5YzgyMmRlNDAyM2FlNjBhZjFlZjdkZjlkNTZmMzBjZWYxODY4
10
- NDA4YzljMTJiMjkzZTQ0N2EyNWU4YTdhMDNiMzFiMWZjZTlmNWJjMzkwNGUx
11
- ZTNkMTI0ZTFlNjQ0MmViZjE0M2FlNGIzZTM0ZTY4MjA0NWY5M2Q=
12
- data.tar.gz: !binary |-
13
- NTJlOTU0MDgyOWY3ZWFiY2YyZjdjZmUwODkxOGU1NWMwMmNkZDAzYmY4ZWJk
14
- NWIxM2E5MDE4YmZlMjczZDJlNzVkMDg3MTgxYjlhZGIxMTY1NjljNDIwMDc2
15
- MDgxODZiZGFhYWU2NjU0OWQ1OWQzMmYyNDRkMGZhNmM2ODYzZDc=
@@ -1,3 +0,0 @@
1
- .wrapper-inner
2
- .form-wrapper
3
- =yield
@@ -1,4 +0,0 @@
1
- %h5
2
- %i(class="#{icon if defined?(icon)}")
3
- #{label if defined?(label)}
4
- %input(type="text" class="input-full")
@@ -1,7 +0,0 @@
1
- %li(class="#{"active" if defined?(active)}")
2
- %a(href="javascript:void(0);" class="")>
3
- %span class="list-head">#{label}</span>
4
- - badges.each do |badge|
5
- %span(class="badge #{badge[:class] unless badge[:class].nil?}")
6
- #{badge[:label] unless badge[:label].nil?}
7
- %i(class="#{tail_icon if defined? tail_icon}")