OSDN Git Service

add editor
authoryasushiito <yas@pen-chan.jp>
Mon, 27 Jan 2014 08:34:48 +0000 (17:34 +0900)
committeryasushiito <yas@pen-chan.jp>
Mon, 27 Jan 2014 08:34:48 +0000 (17:34 +0900)
15 files changed:
app/models/panel.rb
app/views/templates/r/editor/dock/_bay_bodys.html.erb
app/views/templates/r/editor/dock/_bay_label.html.erb
app/views/templates/r/editor/dock/_bay_labels.html.erb
app/views/templates/r/editor/dock/_board_bodys.html.erb [new file with mode: 0644]
app/views/templates/r/editor/dock/_board_label.html.erb [new file with mode: 0644]
app/views/templates/r/editor/dock/_board_labels.html.erb [new file with mode: 0644]
app/views/templates/r/editor/dock/_dock_bodys.html.erb [deleted file]
app/views/templates/r/editor/dock/_dock_label.html.erb [deleted file]
app/views/templates/r/editor/dock/_dock_labels.html.erb [deleted file]
lib/editor/dock.rb
lib/editor/dock/bay.rb
lib/editor/dock/bay/board/element.rb
lib/editor/dock/bay/board/torder.rb
lib/editor/dock/bay/board/zorder.rb

index 723bdb2..137b2c0 100644 (file)
@@ -23,7 +23,7 @@ class Panel < Pettanr::Content
   end
   
   def self.each_element_class_names
-    Pettanr::Application.manifest.system_resources.elements.each do |k, n|
+    Manifest.manifest.system_resources.elements.each do |k, n|
       yield k
     end
   end
index b4d9481..b2b9886 100644 (file)
@@ -1,5 +1,3 @@
-  <div class="<%= bay.dom_bodys_class -%>" <%= raw @panel.tag_attr(:scenario) -%>>
-    <% bay.tabs.each do |board| %>
-      <%= render board.body.bucket.template_name, :form => board.body.bucket %>
-    <% end %>
-  </div>
+<% dock.tabs.each do |tab| %>
+  <%= render tab.body.template_name, :bay => tab %>
+<% end %>
index 33d35fe..b304c75 100644 (file)
@@ -1,5 +1,5 @@
-<li <%= raw label.element.tag_attr(:tsort) -%>>
-  <div class="elements-tab">
-    <%= render label.face_template_name, :elm => label.element %>
-  </div>
+<li id="<%= label.dom_id %>" class="<%= label.dom_class %>">
+  <a href="#<%= label.body.dom_id %>">
+    <%= label.caption %>
+  </a>
 </li>
index e303ec9..bf2b647 100644 (file)
@@ -1,7 +1,5 @@
-<div class="<%= bay.dom_labels_class %>">
-  <ul class="board-labels tsort tsort-tabs-nav" <%= raw @panel.tag_attr(:tsort) -%>>
-    <% bay.tabs.each do |board| %>
-      <%= render board.label.template_name, :label => board.label %>
-    <% end %>
-  </ul>
-</div>
+<ul class="<%= dock.dom_labels_class -%>">
+  <% dock.tabs.each do |tab| %>
+    <%= render tab.label.template_name, :label => tab.label %>
+  <% end %>
+</ul>
diff --git a/app/views/templates/r/editor/dock/_board_bodys.html.erb b/app/views/templates/r/editor/dock/_board_bodys.html.erb
new file mode 100644 (file)
index 0000000..b4d9481
--- /dev/null
@@ -0,0 +1,5 @@
+  <div class="<%= bay.dom_bodys_class -%>" <%= raw @panel.tag_attr(:scenario) -%>>
+    <% bay.tabs.each do |board| %>
+      <%= render board.body.bucket.template_name, :form => board.body.bucket %>
+    <% end %>
+  </div>
diff --git a/app/views/templates/r/editor/dock/_board_label.html.erb b/app/views/templates/r/editor/dock/_board_label.html.erb
new file mode 100644 (file)
index 0000000..33d35fe
--- /dev/null
@@ -0,0 +1,5 @@
+<li <%= raw label.element.tag_attr(:tsort) -%>>
+  <div class="elements-tab">
+    <%= render label.face_template_name, :elm => label.element %>
+  </div>
+</li>
diff --git a/app/views/templates/r/editor/dock/_board_labels.html.erb b/app/views/templates/r/editor/dock/_board_labels.html.erb
new file mode 100644 (file)
index 0000000..e303ec9
--- /dev/null
@@ -0,0 +1,7 @@
+<div class="<%= bay.dom_labels_class %>">
+  <ul class="board-labels tsort tsort-tabs-nav" <%= raw @panel.tag_attr(:tsort) -%>>
+    <% bay.tabs.each do |board| %>
+      <%= render board.label.template_name, :label => board.label %>
+    <% end %>
+  </ul>
+</div>
diff --git a/app/views/templates/r/editor/dock/_dock_bodys.html.erb b/app/views/templates/r/editor/dock/_dock_bodys.html.erb
deleted file mode 100644 (file)
index b2b9886..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-<% dock.tabs.each do |tab| %>
-  <%= render tab.body.template_name, :bay => tab %>
-<% end %>
diff --git a/app/views/templates/r/editor/dock/_dock_label.html.erb b/app/views/templates/r/editor/dock/_dock_label.html.erb
deleted file mode 100644 (file)
index b304c75..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<li id="<%= label.dom_id %>" class="<%= label.dom_class %>">
-  <a href="#<%= label.body.dom_id %>">
-    <%= label.caption %>
-  </a>
-</li>
diff --git a/app/views/templates/r/editor/dock/_dock_labels.html.erb b/app/views/templates/r/editor/dock/_dock_labels.html.erb
deleted file mode 100644 (file)
index bf2b647..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<ul class="<%= dock.dom_labels_class -%>">
-  <% dock.tabs.each do |tab| %>
-    <%= render tab.label.template_name, :label => tab.label %>
-  <% end %>
-</ul>
index 487877d..114a17d 100644 (file)
@@ -57,11 +57,11 @@ module Editor
       end
       
       def labels_template_name
-        self.template_dir + 'dock_labels'
+        self.template_dir + 'bay_labels'
       end
       
       def bodys_template_name
-        self.template_dir + 'dock_bodys'
+        self.template_dir + 'bay_bodys'
       end
       
       def dom_id
index 8d82c0a..ffbc556 100644 (file)
@@ -18,11 +18,11 @@ module Editor
       end
       
       def labels_template_name
-        self.template_dir + 'bay_labels'
+        self.template_dir + 'board_labels'
       end
       
       def bodys_template_name
-        self.template_dir + 'bay_bodys'
+        self.template_dir + 'board_bodys'
       end
       
       def dom_id
@@ -75,7 +75,7 @@ module Editor
     
     class BayLabel < Label
       def template_file_name
-        'dock_label'
+        'bay_label'
       end
       
       def bay
index 43315d0..0d43051 100644 (file)
@@ -14,7 +14,7 @@ module Editor
     
     class ElementBoardLabel < BoardLabel
       def template_file_name
-        'bay_label'
+        'board_label'
       end
       
       def face_template_name
index 6b49e60..04e5cba 100644 (file)
@@ -14,7 +14,7 @@ module Editor
     
     class TorderBoardLabel < BoardLabel
       def template_file_name
-        'bay_label'
+        'board_label'
       end
       
       def face_template_name
index e822825..f55b2f1 100644 (file)
@@ -18,7 +18,7 @@ module Editor
     
     class ZorderBoardLabel < BoardLabel
       def template_file_name
-        'bay_label'
+        'board_label'
       end
       
       def face_template_name