OSDN Git Service

replace codes
authoryasushiito <yas@pen-chan.jp>
Wed, 4 Jan 2012 09:44:43 +0000 (18:44 +0900)
committeryasushiito <yas@pen-chan.jp>
Wed, 4 Jan 2012 09:44:43 +0000 (18:44 +0900)
14 files changed:
app/controllers/panels_controller.rb
app/controllers/speach_balloons_controller.rb
app/models/panel_picture.rb
app/views/balloon_templates/index.html.erb
app/views/balloons/index.html.erb
app/views/comics/index.html.erb
app/views/comics/play.html.erb
app/views/comics/show.html.erb
app/views/panel_pictures/index.html.erb
app/views/panels/_standard.html.erb
app/views/speach_balloons/index.html.erb
app/views/speach_balloons/show.html.erb
app/views/speach_templates/index.html.erb
app/views/speaches/index.html.erb

index e0a7789..d35751c 100644 (file)
@@ -38,7 +38,7 @@ class PanelsController < ApplicationController
         }) + ");"
       }
 #      format.json { render :json => @frame.to_json(include: {
-#        :comic => {:only => :title}, :panel_pictures => {:include => {:image => {:only => [:width]}},:only => [:width, :height, :zindex, :image_id]}
+#        :comic => {:only => :title}, :panel_pictures => {:include => {:image => {:only => [:width]}},:only => [:width, :height, :z, :image_id]}
 #      }, only: [:border]) }
    end
   end
index 54d0f29..1eeba3d 100644 (file)
@@ -6,8 +6,8 @@ class SpeachBalloonsController < ApplicationController
   
   def validate_param(ft)
     res = nil
-    bl = ft[:border_limit].to_i
-    tl = ft[:tail_limit].to_i
+    bl = ft[:size_count].to_i
+    tl = ft[:tail_count].to_i
     if bl * tl == ft[:balloon_templates_attributes].size
       flag = []
       bl.times do |i|
@@ -17,7 +17,7 @@ class SpeachBalloonsController < ApplicationController
         end
       end
       ft[:balloon_templates_attributes].each do |k, t|
-        flag[t[:border].to_i - 1][t[:tail].to_i - 1] = nil
+        flag[t[:size].to_i - 1][t[:tail].to_i - 1] = nil
       end
       if flag.flatten.compact.size == 0
       else
index 426248c..0bc6734 100644 (file)
@@ -3,7 +3,7 @@ class PanelPicture < ActiveRecord::Base
   belongs_to :resource_picture
   
   def flip
-    res = (self.v == 0 ? '' : 'v') + (self.h == 0 ? '' : 'h')
+    res = (self.flipv == 0 ? '' : 'v') + (self.fliph == 0 ? '' : 'h')
     res += '/' unless res.empty?
     res
   end
index 45f2e0d..7e59e7d 100644 (file)
@@ -5,7 +5,7 @@
     <th>speach balloon</th>
     <th>system_picture</th>
     <th>Tail</th>
-    <th>Border</th>
+    <th>size</th>
     <th>MinWidth</th>
     <th>MinHeight</th>
     <th>MaxWidth</th>
@@ -17,7 +17,7 @@
     <td><%= balloon_template.speach_balloon_id %></td>
     <td><%= balloon_template.system_picture_id %></td>
     <td><%= balloon_template.tail %></td>
-    <td><%= balloon_template.border %></td>
+    <td><%= balloon_template.size %></td>
     <td><%= balloon_template.min_width %></td>
     <td><%= balloon_template.min_height %></td>
     <td><%= balloon_template.max_width %></td>
index bf0f8d2..48994b7 100644 (file)
@@ -6,8 +6,8 @@
     <th>balloonTemplate</th>
     <th>system_picture</th>
     <th>Tail</th>
-    <th>Border</th>
-    <th>Zindex</th>
+    <th>size</th>
+    <th>z</th>
     <th>Top offset</th>
     <th>Left offset</th>
     <th>Width</th>
     <td><%= balloon.balloon_template_id %></td>
     <td><%= balloon.system_picture_id %></td>
     <td><%= balloon.tail %></td>
-    <td><%= balloon.border %></td>
-    <td><%= balloon.zindex %></td>
-    <td><%= balloon.top_offset %></td>
-    <td><%= balloon.left_offset %></td>
+    <td><%= balloon.size %></td>
+    <td><%= balloon.z %></td>
+    <td><%= balloon.y %></td>
+    <td><%= balloon.x %></td>
     <td><%= balloon.width %></td>
     <td><%= balloon.height %></td>
   </tr>
index 022e342..508620e 100644 (file)
@@ -17,8 +17,8 @@
   <tr>
     <td><%= comic.id %></td>
     <td><%= h comic.title %></td>
-    <td><%= comic.default_width %></td>
-    <td><%= comic.default_height %></td>
+    <td><%= comic.width %></td>
+    <td><%= comic.height %></td>
     <td><%= comic.author_id%></td>
     <td><%= comic.updated_at %></td>
     <td><%= link_to 'Show', comic %></td>
index c038dc0..fd90107 100644 (file)
@@ -7,12 +7,12 @@
 
 <p>
   <b>Default width:</b>
-  <%= @comic.default_width %>
+  <%= @comic.width %>
 </p>
 
 <p>
   <b>Default height:</b>
-  <%= @comic.default_height %>
+  <%= @comic.height %>
 </p>
 <% @comic.panels.each do |panel| %>
   <% @panel = panel %>
index 7d2fe84..624205c 100644 (file)
@@ -7,12 +7,12 @@
 
 <p>
   <b>Default width:</b>
-  <%= @comic.default_width %>
+  <%= @comic.width %>
 </p>
 
 <p>
   <b>Default height:</b>
-  <%= @comic.default_height %>
+  <%= @comic.height %>
 </p>
 
 <%= link_to 'Back', comics_path %>
index afb2280..c1c9378 100644 (file)
@@ -9,7 +9,7 @@
     <th>Height</th>
     <th>Top offset</th>
     <th>Left offset</th>
-    <th>Zindex</th>
+    <th>z</th>
     <th>flip</th>
     <th>updated_at</th>
   </tr>
@@ -21,9 +21,9 @@
     <td><%= panel_picture.resource_picture_id %></td>
     <td><%= panel_picture.width %></td>
     <td><%= panel_picture.height %></td>
-    <td><%= panel_picture.top_offset %></td>
-    <td><%= panel_picture.left_offset %></td>
-    <td><%= panel_picture.zindex %></td>
+    <td><%= panel_picture.y %></td>
+    <td><%= panel_picture.x %></td>
+    <td><%= panel_picture.z %></td>
     <td><%= panel_picture.flip %></td>
     <td><%= panel_picture.updated_at %></td>
   </tr>
index 2d70b3b..11e32b7 100644 (file)
@@ -3,15 +3,15 @@ Seqno:<%= @panel.seqno %>
 </span>
 <div class="panel" style="width:<%= @panel.width %>px;height:<%= @panel.height %>px;overflow:hidden; border:solid black <%= @panel.border %>px; background:white;">
   <% @panel.panel_pictures.each do |panel_picture| %>
-    <div id="vPicture<%= panel_picture.id -%>" class="panel_picture" style="position:relative;  top:<%= panel_picture.top_offset -%>px; left:<%= panel_picture.left_offset -%>px; z-index:<%= panel_picture.zindex -%>; ">
+    <div id="vPicture<%= panel_picture.id -%>" class="panel_picture" style="position:relative;  top:<%= panel_picture.y -%>px; left:<%= panel_picture.x -%>px; z-index:<%= panel_picture.z -%>; ">
       <img style=" position:absolute; width:<%= panel_picture.width -%>px; height:<%= panel_picture.height -%>px; " src="<%= panel_picture.url -%>">
     </div>
   <% end %>
   <% @panel.balloons.each do |balloon| %>
-    <div id="vballoon<%= balloon.id -%>" class="balloon" style="position:relative;  top:<%= balloon.top_offset -%>px; left:<%= balloon.left_offset -%>px; z-index:<%= balloon.zindex -%>; ">
+    <div id="vballoon<%= balloon.id -%>" class="balloon" style="position:relative;  top:<%= balloon.y -%>px; left:<%= balloon.x -%>px; z-index:<%= balloon.z -%>; ">
       <img style=" position:absolute; width:<%= balloon.width -%>px; height:<%= balloon.height -%>px; " src="<%= balloon.system_picture.url -%>">
       <% balloon.speaches.each do |speach| %>
-        <div style="position:relative; top:<%= speach.top_offset -%>px; left:<%= speach.left_offset -%>px;width:<%= speach.width -%>px; height:<%= speach.height -%>px; top:1px; left:1px; z-index:1; ">
+        <div style="position:relative; top:<%= speach.y -%>px; left:<%= speach.x -%>px;width:<%= speach.width -%>px; height:<%= speach.height -%>px; top:1px; left:1px; z-index:1; ">
           <%= h speach.content -%>
         </div>
       <% end %>
index bb51d37..371a262 100644 (file)
@@ -3,7 +3,7 @@
   <tr>
     <th>Name</th>
     <th>Tail limit</th>
-    <th>Border limit</th>
+    <th>size limit</th>
     <th></th>
     <th></th>
   </tr>
@@ -11,8 +11,8 @@
 <% @speach_balloons.each do |speach_balloon| %>
   <tr>
     <td><%= h speach_balloon.name %></td>
-    <td><%= speach_balloon.tail_limit %></td>
-    <td><%= speach_balloon.border_limit %></td>
+    <td><%= speach_balloon.tail_count %></td>
+    <td><%= speach_balloon.size_count %></td>
     <td><%= link_to 'show', speach_balloon %></td>
     <td>
       <% if admin_signed_in? -%>
index 89a2d46..9f93eef 100644 (file)
@@ -7,18 +7,18 @@
 
 <p>
   <b>Tail limit:</b>
-  <%= @speach_balloon.tail_limit %>
+  <%= @speach_balloon.tail_count %>
 </p>
 
 <p>
-  <b>Border limit:</b>
-  <%= @speach_balloon.border_limit %>
+  <b>size limit:</b>
+  <%= @speach_balloon.size_count %>
 </p>
 <% @speach_balloon.balloon_templates.each do |balloon_template| -%>\r
   <div>\r
     <p>\r
       Tail:<%= balloon_template.tail -%>\r
-      Border:<%= balloon_template.border -%>\r
+      Size:<%= balloon_template.size -%>\r
     </p>\r
     <img src="<%= balloon_template.system_picture.url -%>" />\r
   </div>\r
index b2fe5a6..6d6f2d3 100644 (file)
@@ -12,8 +12,8 @@
 <% @speach_templates.each do |speach_template| %>
   <tr>
     <td><%= speach_template.balloon_template_id %></td>
-    <td><%= speach_template.top_offset %></td>
-    <td><%= speach_template.left_offset %></td>
+    <td><%= speach_template.y %></td>
+    <td><%= speach_template.x %></td>
     <td><%= speach_template.width %></td>
     <td><%= speach_template.height %></td>
   </tr>
index 8eb855b..9a51fd6 100644 (file)
@@ -14,8 +14,8 @@
   <tr>
     <td><%= speach.balloon_id %></td>
     <td><%= h speach.content %></td>
-    <td><%= speach.top_offset %></td>
-    <td><%= speach.left_offset %></td>
+    <td><%= speach.y %></td>
+    <td><%= speach.x %></td>
     <td><%= speach.width %></td>
     <td><%= speach.height %></td>
   </tr>