square_speech_balloon 0.0.36 → 0.0.37

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,11 @@
1
+ class PettanrSquareSpeechBalloon
2
+ WritingFormat = window.PettanrWritingFormat
3
+ @engine_name = 'square_speech_balloon'
4
+ @id = 0
5
+ @onLoad = () ->
6
+ PettanrSquareSpeechBalloon.id = window.PettanrSpeechBalloonTemplate.id(PettanrSquareSpeechBalloon.engine_name)
7
+
8
+ @add_helper = (opt) ->
9
+
10
+ window.PettanrSpeechBalloonTemplate.scripts[PettanrPlainSpeechBalloon.engine_name] = PettanrSquareSpeechBalloon
11
+ @PettanrSquareSpeechBalloon = PettanrSquareSpeechBalloon
@@ -1,46 +1,32 @@
1
1
  <div class="field">
2
- <%= f.label :writing_format_id %><br />
2
+ <%= f.label :writing_format_id %>
3
3
  <%= f.collection_select :writing_format_id, WritingFormat.list.map {|l| [l.caption, l.id] }, :last, :first, {:html => {:selected => speech.writing_format_id}}, speech.field_tag_attributes(:writing_format_id, no_attr) %>
4
+
5
+ <%= f.label :font_size %>
6
+ <%= f.collection_select :font_size, t_select_items(MagicNumber['speech_font_size_items']), :last, :first, {:html => {:selected => speech.font_size}}, speech.field_tag_attributes(:font_size, no_attr) %>
4
7
  </div>
5
8
 
6
9
  <div class="field">
7
- <%= f.label :content %><br />
8
- <%= f.text_area :content, speech.field_tag_attributes(:content, no_attr, :size => '35x7') %>
9
- </div>
10
-
11
- <div class="field">
12
- <%= f.label :font_size %><br />
13
- <%= f.collection_select :font_size, t_select_items(MagicNumber['speech_font_size_items']), :last, :first, {:html => {:selected => speech.font_size}}, speech.field_tag_attributes(:font_size, no_attr) %>
10
+ <%= f.label :text_align %>
11
+ <%= f.collection_select :text_align, t_select_items(MagicNumber['speech_text_align_items']), :last, :first, {:html => {:selected => speech.text_align}}, speech.field_tag_attributes(:text_align, no_attr) %>
12
+
13
+ <%= f.label :quotes %>
14
+ <%= f.text_field :quotes, speech.field_tag_attributes(:quotes, no_attr, :size => 5) %>
14
15
  </div>
15
16
 
16
17
  <div class="field">
17
- <%= f.label :text_align %><br />
18
- <%= f.collection_select :text_align, t_select_items(MagicNumber['speech_text_align_items']), :last, :first, {:html => {:selected => speech.text_align}}, speech.field_tag_attributes(:text_align, no_attr) %>
18
+ <%= f.label :content %><br />
19
+ <%= f.text_area :content, speech.field_tag_attributes(:content, no_attr, :size => '35x7') %>
19
20
  </div>
20
21
 
21
22
  <div class="field">
22
23
  <%= f.label :fore_color %>
23
24
  <%= f.text_field :fore_color, speech.field_tag_attributes(:fore_color, no_attr, :size => 8) %>
24
- <div class="colorpicker-wrap">
25
- <div class="colorpicker" style="float: left;" <%= raw speech.field_tag_attr(:code_picker, no_attr) -%>>
26
- <div id="<%= speech.tag_id(:code_red) -%>" class="colorpicker-red"></div>
27
- <div id="<%= speech.tag_id(:code_green) -%>" class="colorpicker-green"></div>
28
- <div id="<%= speech.tag_id(:code_blue) -%>" class="colorpicker-blue"></div>
29
- </div>
30
- <div style="float: left;">
31
- <div id="<%= speech.tag_id(:code_swatch) -%>" class="ui-widget-content ui-corner-all code_swatch"></div>
32
- </div>
33
- <div style="float: left;">
34
- <div id="<%= speech.tag_id(:code_hex) -%>"></div>
35
- <div id="<%= speech.tag_id(:code_rgb) -%>"></div>
25
+ <% if speech.has_helper?(:fore_color) %>
26
+ <div class="speech-fore_color-wrap">
27
+ <%= render speech.form_helper_template(:fore_color), :elm => speech, :no_attr => no_attr %>
36
28
  </div>
37
- <div style="clear: both;"></div>
38
- </div>
39
- </div>
40
-
41
- <div class="field">
42
- <%= f.label :quotes %>
43
- <%= f.text_field :quotes, speech.field_tag_attributes(:quotes, no_attr, :size => 5) %>
29
+ <% end %>
44
30
  </div>
45
31
 
46
32
  <%= f.hidden_field :x, speech.field_tag_attributes(:x, no_attr) %>
@@ -1,3 +1,3 @@
1
1
  module SquareSpeechBalloon
2
- VERSION = "0.0.36"
2
+ VERSION = "0.0.37"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: square_speech_balloon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.36
4
+ version: 0.0.37
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-23 00:00:00.000000000 Z
12
+ date: 2013-09-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -51,7 +51,7 @@ extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
53
  - app/assets/javascripts/square_speech_balloon/application.js
54
- - app/assets/javascripts/square_speech_balloon/balloons.js.coffee
54
+ - app/assets/javascripts/square_speech_balloon/square_speech_balloon.js.coffee
55
55
  - app/assets/stylesheets/square_speech_balloon/application.css
56
56
  - app/assets/stylesheets/square_speech_balloon/balloons.css
57
57
  - app/assets/stylesheets/square_speech_balloon/speeches.css