OSDN Git Service

fix:panel elm play
authoryasushiito <yas@pen-chan.jp>
Thu, 13 Aug 2015 23:35:57 +0000 (08:35 +0900)
committeryasushiito <yas@pen-chan.jp>
Thu, 13 Aug 2015 23:35:57 +0000 (08:35 +0900)
Gemfile
app/assets/javascripts/pettanr/inspire.js.coffee
app/assets/javascripts/views/balloons/show.js.coffee
app/assets/javascripts/views/ground_colors/show.js.coffee
app/assets/javascripts/views/ground_pictures/show.js.coffee
app/assets/javascripts/views/panel_pictures/show.js.coffee
app/assets/javascripts/views/scrolls/play.js.coffee
app/assets/javascripts/views/speech_balloons/show.js.coffee
app/assets/javascripts/views/speeches/show.js.coffee
lib/s3_picture.rb

diff --git a/Gemfile b/Gemfile
index f093162..3e4e281 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -13,8 +13,6 @@ gem 'underscore-rails'
 gem 'rails-timeago'
 gem 'kaminari'
 gem 'sanitize'
-#gem 'aws-s3'
-#gem 'aws-s3', :git => 'https://github.com/bartoszkopinski/aws-s3'
 gem 'aws-sdk', '~> 2.0'
 gem 'awesome_nested_set', '~> 3.0'
 gem 'validates_existence'
@@ -67,6 +65,7 @@ gem 'bcrypt-ruby', '~> 3.0.0'
 group :production do
   #gem 'pg'
   #gem 'therubyracer-heroku'
+  #gem 'rails_12factor'
 end
 
 group :mgk do
index c40cd93..b706feb 100644 (file)
@@ -41,7 +41,7 @@ class Pettanr.Inspire
     delete attrs['id']\r
     _.extend(attrs, @elements_save_data())\r
     # save json data by panel form\r
-    new_panel = new Pettanr.Panel.WithElements()\r
+    new_panel = new Pettanr.Panel.Edit()\r
     new_form = Locmare.Form.factory({\r
       form_name: new_panel.item_name(), \r
       use_name: 'default' \r
index 65e39a7..a02f82c 100644 (file)
@@ -9,9 +9,9 @@ class Pettanr.Views.Balloon.Show extends Pettanr.View.Show
       success: (@speech_balloon) =>\r
         @speech_balloon.get_parent('panel', this, {\r
           success: (item) =>\r
-            @panel = item.with_elements()\r
+            @panel = item.play()\r
             @panel.fetch().done =>\r
-              @panel.attributes = @panel.replaced_attributes()\r
+              @panel.attributes = @panel.decoded_attributes()\r
               @authored_by = @panel.authored_by()\r
               @body = new Pettanr.Views.Panel.Body({\r
                 panel: @panel,\r
index 79b28b6..7e8b6b3 100644 (file)
@@ -7,9 +7,9 @@ class Pettanr.Views.GroundColor.Show extends Pettanr.View.Show
     this.$el.html('')\r
     @item.get_parent('panel', this, {\r
       success: (item) =>\r
-        @panel = item.with_elements()\r
+        @panel = item.play()\r
         @panel.fetch().done =>\r
-          @panel.attributes = @panel.replaced_attributes()\r
+          @panel.attributes = @panel.decoded_attributes()\r
           @authored_by = @panel.authored_by()\r
           @body = new Pettanr.Views.Panel.Body({\r
             panel: @panel,\r
index 7c91449..4fad461 100644 (file)
@@ -7,9 +7,9 @@ class Pettanr.Views.GroundPicture.Show extends Pettanr.View.Show
     this.$el.html('')\r
     @item.get_parent('panel', this, {\r
       success: (item) =>\r
-        @panel = item.with_elements()\r
+        @panel = item.play()\r
         @panel.fetch().done =>\r
-          @panel.attributes = @panel.replaced_attributes()\r
+          @panel.attributes = @panel.decoded_attributes()\r
           @authored_by = @panel.authored_by()\r
           @body = new Pettanr.Views.Panel.Body({\r
             panel: @panel,\r
index fd13938..f539a5d 100644 (file)
@@ -7,7 +7,7 @@ class Pettanr.Views.PanelPicture.Show extends Pettanr.View.Show
     this.$el.html('')\r
     @item.get_parent('panel', this, {\r
       success: (item) =>\r
-        @panel = item.with_elements()\r
+        @panel = item.play()\r
         @panel.fetch().done =>\r
           @panel.attributes = @panel.decoded_attributes()\r
           @authored_by = @panel.authored_by()\r
index 20b4f5d..2eb032a 100644 (file)
@@ -153,7 +153,7 @@ class Pettanr.Views.Scroll.PlayModule.Panel extends Pettanr.View
     this.$el.html('')\r
     @panel = @panel.play() # retake panel for 'with_elements' mode\r
     @panel.fetch({cache: true}).done =>\r
-      @panel.attributes = @panel.replaced_attributes()\r
+      @panel.attributes = @panel.decoded_attributes()\r
       body = new Pettanr.Views.Scroll.PlayModule.PanelBody({\r
         panel: @panel\r
       })\r
index 7cb05c2..5aa6147 100644 (file)
@@ -7,9 +7,9 @@ class Pettanr.Views.SpeechBalloon.Show extends Pettanr.View.Show
     this.$el.html('')\r
     @item.get_parent('panel', this, {\r
       success: (item) =>\r
-        @panel = item.with_elements()\r
+        @panel = item.play()\r
         @panel.fetch().done =>\r
-          @panel.attributes = @panel.replaced_attributes()\r
+          @panel.attributes = @panel.decoded_attributes()\r
           @authored_by = @panel.authored_by()\r
           @body = new Pettanr.Views.Panel.Body({\r
             panel: @panel,\r
index 5e5ca4c..7b6d5f9 100644 (file)
@@ -9,9 +9,9 @@ class Pettanr.Views.Speech.Show extends Pettanr.View.Show
       success: (@speech_balloon) =>\r
         @speech_balloon.get_parent('panel', this, {\r
           success: (item) =>\r
-            @panel = item.with_elements()\r
+            @panel = item.play()\r
             @panel.fetch().done =>\r
-              @panel.attributes = @panel.replaced_attributes()\r
+              @panel.attributes = @panel.decoded_attributes()\r
               @authored_by = @panel.authored_by()\r
               @body = new Pettanr.Views.Panel.Body({\r
                 panel: @panel,\r
index 1f78e62..0b06157 100644 (file)
@@ -43,7 +43,7 @@ class PictureIO
       else
         subdir.to_s + '/'
       end
-      sd
+      @base_dir + '/' + sd
     end
     
     def exist?(filename, subdir = nil)