plain_speech_balloon 0.0.1
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.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +29 -0
- data/app/assets/javascripts/plain_speech_balloon/application.js +15 -0
- data/app/assets/javascripts/plain_speech_balloon/balloon.js +2 -0
- data/app/assets/javascripts/plain_speech_balloon/balloons.js +2 -0
- data/app/assets/javascripts/plain_speech_balloon/speech.js +2 -0
- data/app/assets/javascripts/plain_speech_balloon/speech_balloon.js +2 -0
- data/app/assets/javascripts/plain_speech_balloon/speech_balloons.js +2 -0
- data/app/assets/javascripts/plain_speech_balloon/speeches.js +2 -0
- data/app/assets/stylesheets/plain_speech_balloon/application.css +13 -0
- data/app/assets/stylesheets/plain_speech_balloon/balloon.css +4 -0
- data/app/assets/stylesheets/plain_speech_balloon/balloons.css +4 -0
- data/app/assets/stylesheets/plain_speech_balloon/speech.css +4 -0
- data/app/assets/stylesheets/plain_speech_balloon/speech_balloon.css +4 -0
- data/app/assets/stylesheets/plain_speech_balloon/speech_balloons.css +4 -0
- data/app/assets/stylesheets/plain_speech_balloon/speeches.css +4 -0
- data/app/controllers/plain_speech_balloon/application_controller.rb +4 -0
- data/app/controllers/plain_speech_balloon/balloons_controller.rb +6 -0
- data/app/controllers/plain_speech_balloon/speech_balloons_controller.rb +6 -0
- data/app/controllers/plain_speech_balloon/speeches_controller.rb +6 -0
- data/app/helpers/plain_speech_balloon/application_helper.rb +4 -0
- data/app/helpers/plain_speech_balloon/balloons_helper.rb +4 -0
- data/app/helpers/plain_speech_balloon/speech_balloons_helper.rb +4 -0
- data/app/helpers/plain_speech_balloon/speeches_helper.rb +4 -0
- data/app/models/plain_speech_balloon/balloon.rb +5 -0
- data/app/models/plain_speech_balloon/speech.rb +5 -0
- data/app/models/plain_speech_balloon/speech_balloon.rb +5 -0
- data/app/views/layouts/plain_speech_balloon/application.html.erb +14 -0
- data/app/views/plain_speech_balloon/balloons/_form.html.erb +32 -0
- data/app/views/plain_speech_balloon/speech_balloons/_form.html.erb +38 -0
- data/app/views/plain_speech_balloon/speech_balloons/_standard.html.erb +6 -0
- data/app/views/plain_speech_balloon/speech_balloons/edit.html.erb +7 -0
- data/app/views/plain_speech_balloon/speech_balloons/new.html.erb +7 -0
- data/app/views/plain_speech_balloon/speech_balloons/show.html.erb +92 -0
- data/app/views/plain_speech_balloon/speeches/_form.html.erb +16 -0
- data/config/routes.rb +2 -0
- data/db/migrate/20130628082138_create_plain_speech_balloon_speech_balloons.rb +8 -0
- data/db/migrate/20130628082206_create_plain_speech_balloon_balloons.rb +8 -0
- data/db/migrate/20130628082225_create_plain_speech_balloon_speeches.rb +8 -0
- data/db/plain.png +0 -0
- data/db/plain_speech_balloon_templates.json +23 -0
- data/db/work/plain.png +0 -0
- data/db/work/plain_speech_balloon_templates.json +1 -0
- data/lib/plain_speech_balloon/engine.rb +5 -0
- data/lib/plain_speech_balloon/version.rb +3 -0
- data/lib/plain_speech_balloon.rb +69 -0
- data/lib/tasks/plain_speech_balloon_tasks.rake +4 -0
- metadata +125 -0
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2013 YOURNAME
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
13
|
+
end
|
14
|
+
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'PlainSpeechBalloon'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
21
|
+
end
|
22
|
+
|
23
|
+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
24
|
+
load 'rails/tasks/engine.rake'
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
Bundler::GemHelper.install_tasks
|
29
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>PlainSpeechBalloon</title>
|
5
|
+
<%= stylesheet_link_tag "plain_speech_balloon/application", :media => "all" %>
|
6
|
+
<%= javascript_include_tag "plain_speech_balloon/application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
<div class="field">
|
3
|
+
<%= f.label :x %><br />
|
4
|
+
<%= f.number_field :x, :id => balloon.field_tag_id(:x), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :x, :tree => balloon.field_tree(:x) %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="field">
|
8
|
+
<%= f.label :y %><br />
|
9
|
+
<%= f.number_field :y, :id => balloon.field_tag_id(:y), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :y, :tree => balloon.field_tree(:y) %>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<div class="field">
|
13
|
+
<%= f.label :width %><br />
|
14
|
+
<%= f.number_field :width, :id => balloon.field_tag_id(:width), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :width, :tree => balloon.field_tree(:width) %>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
<div class="field">
|
18
|
+
<%= f.label :height %><br />
|
19
|
+
<%= f.number_field :height, :id => balloon.field_tag_id(:height), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :height, :tree => balloon.field_tree(:height) %>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div class="field">
|
23
|
+
<%= f.label :r %><br />
|
24
|
+
<%= f.number_field :r, :id => balloon.field_tag_id(:r), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :r, :tree => balloon.field_tree(:r) %>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<%= f.hidden_field :system_picture_id, :id => balloon.field_tag_id(:system_picture_id), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :system_picture_id, :tree => balloon.field_tree(:system_picture_id) %>
|
28
|
+
<%= f.hidden_field :settings, :id => balloon.field_tag_id(:settings), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :settings, :tree => balloon.field_tree(:settings) %>
|
29
|
+
<%= f.hidden_field :speech_balloon_id, :id => balloon.field_tag_id(:speech_balloon_id), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :speech_balloon_id, :tree => balloon.field_tree(:speech_balloon_id) %>
|
30
|
+
<% unless balloon.new_record? %>
|
31
|
+
<%= f.hidden_field :id, :id => balloon.field_tag_id(:id), :panel_id => balloon.tag_panel_id, :element_id => balloon.tag_element_id, :element_type => balloon.tag_element_type, :element_part_id => balloon.tag_element_part_id, :element_part_type => balloon.tag_element_part_type, :column => :id, :tree => balloon.field_tree(:id) %>
|
32
|
+
<% end %>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<%= form_for(speech_balloon) do |f| %>
|
2
|
+
<%= render 'system/error_explanation', :obj => speech_balloon %>
|
3
|
+
<%= render 'system/error_explanation', :obj => speech_balloon_extend %>
|
4
|
+
<%= render 'system/error_explanation', :obj => balloon_extend %>
|
5
|
+
<%= render 'system/error_explanation', :obj => speech_extend %>
|
6
|
+
|
7
|
+
<div class="field">
|
8
|
+
<%= f.label :caption %><br />
|
9
|
+
<%= f.number_field :caption, :id => speech_balloon.field_tag_id(:caption), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :caption, :tree => speech_balloon.field_tree(:caption) %>
|
10
|
+
</div>
|
11
|
+
<div class="field">
|
12
|
+
<%= f.label :z %><br />
|
13
|
+
<%= f.number_field :z, :id => speech_balloon.field_tag_id(:z), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :z, :tree => speech_balloon.field_tree(:z) %>
|
14
|
+
</div>
|
15
|
+
<div class="field">
|
16
|
+
<%= f.label :t %><br />
|
17
|
+
<%= f.number_field :t, :id => speech_balloon.field_tag_id(:t), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :t, :tree => speech_balloon.field_tree(:t) %>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<%= f.fields_for(:balloon) do |bf| %>
|
21
|
+
<%= render speech_balloon.speech_balloon_template.engine_name + '/balloons/form', :f => bf, :balloon => speech_balloon.balloon %>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<%= f.fields_for(:speech) do |sf| %>
|
25
|
+
<%= render speech_balloon.speech_balloon_template.engine_name + '/speeches/form', :f => sf, :speech => speech_balloon.speech %>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<%= f.hidden_field :panel_id, :id => speech_balloon.field_tag_id(:panel_id), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :panel_id, :tree => speech_balloon.field_tree(:panel_id) %>
|
29
|
+
<%= f.hidden_field :classname, :id => speech_balloon.field_tag_id(:classname), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :classname, :tree => speech_balloon.field_tree(:classname) %>
|
30
|
+
<%= f.hidden_field :speech_balloon_template_id, :id => speech_balloon.field_tag_id(:speech_balloon_template_id), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :speech_balloon_template_id, :tree => speech_balloon.field_tree(:speech_balloon_template_id) %>
|
31
|
+
<% unless speech_balloon.new_record? %>
|
32
|
+
<%= f.hidden_field :id, :id => speech_balloon.field_tag_id(:id), :panel_id => speech_balloon.tag_panel_id, :element_id => speech_balloon.tag_element_id, :element_type => speech_balloon.tag_element_type, :column => :id, :tree => speech_balloon.field_tree(:id) %>
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<div class="actions">
|
36
|
+
<%= f.submit t('speech_balloons.submit'), :class => "submit" %>
|
37
|
+
</div>
|
38
|
+
<% end %>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<b><%= t_m 'Panel.caption' -%>:</b>
|
2
|
+
<%= h(panel.caption) %>
|
3
|
+
<%= render 'panels/body', :panel => panel, :author => author, :spot => spot %>
|
4
|
+
<%= render 'panels/footer', :panel => panel, :author => author %>
|
5
|
+
<%= render 'panels/licensed_pictures', :licensed_pictures => panel.licensed_pictures %>
|
6
|
+
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<h1><%= t('.title') %></h1>
|
2
|
+
<p id="notice"><%= notice %></p>
|
3
|
+
|
4
|
+
<h2><%= t('home.index.catch') -%></h2>
|
5
|
+
<%= render 'panels/standard', :panel => @panel, :author => @author %>
|
6
|
+
<h2><%= t('speech_balloons.update_speech_balloon') -%></h2>
|
7
|
+
<%= render @speech_balloon.speech_balloon_template.engine_name + '/speech_balloons/form', :speech_balloon => @speech_balloon, :balloon => @balloon, :speech => @speech, :speech_balloon_extend => @speech_balloon_extend, :balloon_extend => @balloon_extend, :speech_balloon_extend => @speech_balloon_extend %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<h1><%= t('.title') %></h1>
|
2
|
+
<p id="notice"><%= notice %></p>
|
3
|
+
|
4
|
+
<h2><%= t('home.index.catch') -%></h2>
|
5
|
+
<%= render 'panels/standard', :panel => @panel, :author => @author %>
|
6
|
+
<h2><%= t('speech_balloons.create_speech_balloon') -%></h2>
|
7
|
+
<%= render @speech_balloon.speech_balloon_template.engine_name + '/speech_balloons/form', :speech_balloon => @speech_balloon, :balloon => @balloon, :speech => @speech, :speech_balloon_extend => @speech_balloon_extend, :balloon_extend => @balloon_extend, :speech_balloon_extend => @speech_balloon_extend %>
|
@@ -0,0 +1,92 @@
|
|
1
|
+
<h1><%= t('.title') %></h1>
|
2
|
+
<p id="notice"><%= notice %></p>
|
3
|
+
|
4
|
+
<%= render 'speech_balloons/standard', :panel => @speech_balloon.panel, :author => @author, :spot => @speech_balloon %>
|
5
|
+
|
6
|
+
<p>
|
7
|
+
<b><%= t_m 'SpeechBalloon.caption' -%>:</b>
|
8
|
+
<%= h @speech_balloon.caption %>
|
9
|
+
</p>
|
10
|
+
|
11
|
+
<p>
|
12
|
+
<b><%= t_m 'SpeechBalloon.speech_balloon_template_id' -%>:</b>
|
13
|
+
<%= link_to h(@speech_balloon.speech_balloon_template.caption), @speech_balloon.speech_balloon_template %>
|
14
|
+
</p>
|
15
|
+
|
16
|
+
<p>
|
17
|
+
<b><%= t_m 'SpeechBalloon.classname' -%>:</b>
|
18
|
+
<%= @speech_balloon.classname %>
|
19
|
+
</p>
|
20
|
+
|
21
|
+
<p>
|
22
|
+
<b><%= t_m 'SpeechBalloon.z' -%>:</b>
|
23
|
+
<%= @speech_balloon.z %>
|
24
|
+
</p>
|
25
|
+
|
26
|
+
<p>
|
27
|
+
<b><%= t_m 'SpeechBalloon.t' -%>:</b>
|
28
|
+
<%= @speech_balloon.t %>
|
29
|
+
</p>
|
30
|
+
|
31
|
+
<p>
|
32
|
+
<b><%= t_m 'Balloon.x' -%>:</b>
|
33
|
+
<%= @speech_balloon.balloon.x %>
|
34
|
+
</p>
|
35
|
+
|
36
|
+
<p>
|
37
|
+
<b><%= t_m 'Balloon.y' -%>:</b>
|
38
|
+
<%= @speech_balloon.balloon.y %>
|
39
|
+
</p>
|
40
|
+
|
41
|
+
<p>
|
42
|
+
<b><%= t_m 'Balloon.width' -%>:</b>
|
43
|
+
<%= @speech_balloon.balloon.width %>
|
44
|
+
</p>
|
45
|
+
|
46
|
+
<p>
|
47
|
+
<b><%= t_m 'Balloon.height' -%>:</b>
|
48
|
+
<%= @speech_balloon.balloon.height %>
|
49
|
+
</p>
|
50
|
+
|
51
|
+
<p>
|
52
|
+
<b><%= t_m 'Balloon.r' -%>:</b>
|
53
|
+
<%= @speech_balloon.balloon.r %>
|
54
|
+
</p>
|
55
|
+
|
56
|
+
<p>
|
57
|
+
<b><%= t_m 'Speech.content' -%>:</b>
|
58
|
+
<%= @speech_balloon.speech.content %>
|
59
|
+
</p>
|
60
|
+
|
61
|
+
<p>
|
62
|
+
<b><%= t_m 'Speech.x' -%>:</b>
|
63
|
+
<%= @speech_balloon.speech.x %>
|
64
|
+
</p>
|
65
|
+
|
66
|
+
<p>
|
67
|
+
<b><%= t_m 'Speech.y' -%>:</b>
|
68
|
+
<%= @speech_balloon.speech.y %>
|
69
|
+
</p>
|
70
|
+
|
71
|
+
<p>
|
72
|
+
<b><%= t_m 'Speech.width' -%>:</b>
|
73
|
+
<%= @speech_balloon.speech.width %>
|
74
|
+
</p>
|
75
|
+
|
76
|
+
<p>
|
77
|
+
<b><%= t_m 'Speech.height' -%>:</b>
|
78
|
+
<%= @speech_balloon.speech.height %>
|
79
|
+
</p>
|
80
|
+
|
81
|
+
<p>
|
82
|
+
<b><%= t_m 'SpeechBalloon.created_at' -%>:</b>
|
83
|
+
<%= l @speech_balloon.created_at %>
|
84
|
+
</p>
|
85
|
+
|
86
|
+
<p>
|
87
|
+
<b><%= t_m 'SpeechBalloon.updated_at' -%>:</b>
|
88
|
+
<%= l @speech_balloon.updated_at %>
|
89
|
+
</p>
|
90
|
+
|
91
|
+
<%= link_to t('link.edit'), plain_speech_balloon.edit_speech_balloon_path(@speech_balloon) %>
|
92
|
+
<%= link_to t('link.destroy'), plain_speech_balloon.speech_balloon_path(@speech_balloon), :method => :delete %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
<div class="field">
|
3
|
+
<%= f.label :content %><br />
|
4
|
+
<%= f.number_field :content, :id => speech.field_tag_id(:content), :panel_id => speech.tag_panel_id, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :content, :tree => speech.field_tree(:content) %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<%= f.hidden_field :x, :id => speech.field_tag_id(:x), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :x, :tree => speech.field_tree(:x) %>
|
8
|
+
<%= f.hidden_field :y, :id => speech.field_tag_id(:y), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :y, :tree => speech.field_tree(:y) %>
|
9
|
+
<%= f.hidden_field :width, :id => speech.field_tag_id(:width), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :width, :tree => speech.field_tree(:width) %>
|
10
|
+
<%= f.hidden_field :height, :id => speech.field_tag_id(:height), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :height, :tree => speech.field_tree(:height) %>
|
11
|
+
<%= f.hidden_field :settings, :id => speech.field_tag_id(:settings), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :settings, :tree => speech.field_tree(:settings) %>
|
12
|
+
<%= f.hidden_field :speech_balloon_id, :id => speech.field_tag_id(:speech_balloon_id), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :element_part_id => speech.tag_element_part_id, :element_part_type => speech.tag_element_part_type, :column => :speech_balloon_id, :tree => speech.field_tree(:speech_balloon_id) %>
|
13
|
+
|
14
|
+
<% unless speech.new_record? %>
|
15
|
+
<%= f.hidden_field :id, :id => speech.field_tag_id(:id), :panel_id => speech.tag_panel_id, :element_id => speech.tag_element_id, :element_type => speech.tag_element_type, :column => :id, :tree => speech.field_tree(:id) %>
|
16
|
+
<% end %>
|
data/config/routes.rb
ADDED
data/db/plain.png
ADDED
Binary file
|
@@ -0,0 +1,23 @@
|
|
1
|
+
{
|
2
|
+
"plain@pettan.com": {
|
3
|
+
"classname": "PlainSpeechBalloon",
|
4
|
+
"caption": "plain",
|
5
|
+
"settings": {
|
6
|
+
"speech_balloon": {
|
7
|
+
"default_width": 150,
|
8
|
+
"default_height": 150
|
9
|
+
},
|
10
|
+
"all": {
|
11
|
+
"balloon": {
|
12
|
+
"system_picture_file": "plain.png"
|
13
|
+
},
|
14
|
+
"speech": {
|
15
|
+
"x_rate": 0,
|
16
|
+
"y_rate": 0,
|
17
|
+
"width_rate": 100,
|
18
|
+
"height_rate": 100
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
data/db/work/plain.png
ADDED
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
{"plain@pettan.com":{"classname":"PlainSpeechBalloon","caption":"plain","settings":{"speech_balloon":{"default_width":150,"default_height":150},"all":{"balloon":{"system_picture_id":{"text":"iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAABl0lEQVR4nO3SwQ3AIBDAsNL9dz6WIEJC9gR5ZM3MB6f9twN4k7FIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi4SxSBiLhLFIGIuEsUgYi8QGS9IEKe20OQwAAAAASUVORK5CYII="}},"speech":{"x_rate":0,"y_rate":0,"width_rate":100,"height_rate":100}}}}}
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require "plain_speech_balloon/engine"
|
2
|
+
|
3
|
+
module PlainSpeechBalloon
|
4
|
+
module SpeechBalloonModule
|
5
|
+
def supply_default
|
6
|
+
if self.speech_balloon_template
|
7
|
+
self.classname = self.speech_balloon_template.classname
|
8
|
+
self.settings = self.speech_balloon_template.parsed_settings['speech_balloon']
|
9
|
+
end
|
10
|
+
if self.panel
|
11
|
+
self.t = self.panel.new_t
|
12
|
+
self.z = self.panel.new_z
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
def extend_speech_balloon
|
17
|
+
@extend_speech_balloon ||= PlainSpeechBalloon::SpeechBalloon.new
|
18
|
+
end
|
19
|
+
|
20
|
+
def extend_speech_balloon= params
|
21
|
+
@extend_speech_balloon = PlainSpeechBalloon::SpeechBalloon.new params
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
module BalloonModule
|
27
|
+
def supply_default parsed_settings
|
28
|
+
s = parsed_settings['all']['balloon']
|
29
|
+
self.x = 0
|
30
|
+
self.y = 0
|
31
|
+
self.width = parsed_settings['speech_balloon']['default_width']
|
32
|
+
self.height = parsed_settings['speech_balloon']['default_height']
|
33
|
+
self.r = 0
|
34
|
+
end
|
35
|
+
|
36
|
+
def extend_balloon
|
37
|
+
@extend_balloon ||= PlainSpeechBalloon::Balloon.new
|
38
|
+
end
|
39
|
+
|
40
|
+
def extend_balloon= params
|
41
|
+
@extend_balloon = PlainSpeechBalloon::Balloon.new params
|
42
|
+
end
|
43
|
+
|
44
|
+
def select_system_picture parsed_settings
|
45
|
+
s = parsed_settings['all']['balloon']
|
46
|
+
self.system_picture_id = s['system_picture_id']
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
50
|
+
|
51
|
+
module SpeechModule
|
52
|
+
def supply_default parsed_settings
|
53
|
+
s = parsed_settings['all']['speech']
|
54
|
+
self.x = s['x_rate']
|
55
|
+
self.y = s['y_rate']
|
56
|
+
self.width = s['width_rate']
|
57
|
+
self.height = s['height_rate']
|
58
|
+
end
|
59
|
+
|
60
|
+
def extend_speech
|
61
|
+
@extend_speech ||= PlainSpeechBalloon::Speech.new
|
62
|
+
end
|
63
|
+
|
64
|
+
def extend_speech= params
|
65
|
+
@extend_speech = PlainSpeechBalloon::Speech.new params
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
metadata
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: plain_speech_balloon
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- yasushiito
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-06-29 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rails
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 3.1.1
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.1.1
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: sqlite3
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
description: This software is a SpeechBalloon plugin for PettanR
|
47
|
+
email:
|
48
|
+
- yasusiito@gmail.com
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- app/assets/javascripts/plain_speech_balloon/application.js
|
54
|
+
- app/assets/javascripts/plain_speech_balloon/balloon.js
|
55
|
+
- app/assets/javascripts/plain_speech_balloon/balloons.js
|
56
|
+
- app/assets/javascripts/plain_speech_balloon/speech.js
|
57
|
+
- app/assets/javascripts/plain_speech_balloon/speeches.js
|
58
|
+
- app/assets/javascripts/plain_speech_balloon/speech_balloon.js
|
59
|
+
- app/assets/javascripts/plain_speech_balloon/speech_balloons.js
|
60
|
+
- app/assets/stylesheets/plain_speech_balloon/application.css
|
61
|
+
- app/assets/stylesheets/plain_speech_balloon/balloon.css
|
62
|
+
- app/assets/stylesheets/plain_speech_balloon/balloons.css
|
63
|
+
- app/assets/stylesheets/plain_speech_balloon/speech.css
|
64
|
+
- app/assets/stylesheets/plain_speech_balloon/speeches.css
|
65
|
+
- app/assets/stylesheets/plain_speech_balloon/speech_balloon.css
|
66
|
+
- app/assets/stylesheets/plain_speech_balloon/speech_balloons.css
|
67
|
+
- app/controllers/plain_speech_balloon/application_controller.rb
|
68
|
+
- app/controllers/plain_speech_balloon/balloons_controller.rb
|
69
|
+
- app/controllers/plain_speech_balloon/speeches_controller.rb
|
70
|
+
- app/controllers/plain_speech_balloon/speech_balloons_controller.rb
|
71
|
+
- app/helpers/plain_speech_balloon/application_helper.rb
|
72
|
+
- app/helpers/plain_speech_balloon/balloons_helper.rb
|
73
|
+
- app/helpers/plain_speech_balloon/speeches_helper.rb
|
74
|
+
- app/helpers/plain_speech_balloon/speech_balloons_helper.rb
|
75
|
+
- app/models/plain_speech_balloon/balloon.rb
|
76
|
+
- app/models/plain_speech_balloon/speech.rb
|
77
|
+
- app/models/plain_speech_balloon/speech_balloon.rb
|
78
|
+
- app/views/layouts/plain_speech_balloon/application.html.erb
|
79
|
+
- app/views/plain_speech_balloon/balloons/_form.html.erb
|
80
|
+
- app/views/plain_speech_balloon/speeches/_form.html.erb
|
81
|
+
- app/views/plain_speech_balloon/speech_balloons/edit.html.erb
|
82
|
+
- app/views/plain_speech_balloon/speech_balloons/new.html.erb
|
83
|
+
- app/views/plain_speech_balloon/speech_balloons/show.html.erb
|
84
|
+
- app/views/plain_speech_balloon/speech_balloons/_form.html.erb
|
85
|
+
- app/views/plain_speech_balloon/speech_balloons/_standard.html.erb
|
86
|
+
- config/routes.rb
|
87
|
+
- db/migrate/20130628082138_create_plain_speech_balloon_speech_balloons.rb
|
88
|
+
- db/migrate/20130628082206_create_plain_speech_balloon_balloons.rb
|
89
|
+
- db/migrate/20130628082225_create_plain_speech_balloon_speeches.rb
|
90
|
+
- db/plain.png
|
91
|
+
- db/plain_speech_balloon_templates.json
|
92
|
+
- db/work/plain.png
|
93
|
+
- db/work/plain_speech_balloon_templates.json
|
94
|
+
- lib/plain_speech_balloon/engine.rb
|
95
|
+
- lib/plain_speech_balloon/version.rb
|
96
|
+
- lib/plain_speech_balloon.rb
|
97
|
+
- lib/tasks/plain_speech_balloon_tasks.rake
|
98
|
+
- MIT-LICENSE
|
99
|
+
- Rakefile
|
100
|
+
- README.rdoc
|
101
|
+
homepage: https://github.com/yasushiito/circle_speech_balloon/wiki
|
102
|
+
licenses: []
|
103
|
+
post_install_message:
|
104
|
+
rdoc_options: []
|
105
|
+
require_paths:
|
106
|
+
- lib
|
107
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
109
|
+
requirements:
|
110
|
+
- - ! '>='
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
115
|
+
requirements:
|
116
|
+
- - ! '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
requirements: []
|
120
|
+
rubyforge_project:
|
121
|
+
rubygems_version: 1.8.25
|
122
|
+
signing_key:
|
123
|
+
specification_version: 3
|
124
|
+
summary: Plain for PettanR SpeechBalloon
|
125
|
+
test_files: []
|