リビジョン | ae200a3226cc6407ab381a81ed65f5d7ee557449 (tree) |
---|---|
日時 | 2015-11-09 07:02:43 |
作者 | ![]() |
コミッター | yasushiito |
fix: scenario
@@ -96,6 +96,7 @@ class Editor.PanelEditor.Dock extends Editor.EditorModule.DockBase | ||
96 | 96 | # merge panel and elements |
97 | 97 | attrs = @root_bay.save_data() |
98 | 98 | _.extend(attrs, @element_bay.save_data()) |
99 | + $.extend(true, attrs, @scenario_bay.save_data()) # deep merge by jQuery | |
99 | 100 | # save json data by panel form |
100 | 101 | @root_bay.body.form.save(attrs) |
101 | 102 |
@@ -23,7 +23,7 @@ class Editor.EditorModule.DockModule.ScenarioBay extends Editor.EditorModule.Doc | ||
23 | 23 | @add_element(new_item) |
24 | 24 | |
25 | 25 | save_data: () -> |
26 | - @body.form.save_data() | |
26 | + @body.save_data() | |
27 | 27 | |
28 | 28 | length: () -> |
29 | 29 | @body.length() |
@@ -70,3 +70,12 @@ class Editor.EditorModule.DockModule.TabModule.ScenarioBayBody extends Editor.Ed | ||
70 | 70 | length: () -> |
71 | 71 | @elements.element_lis.length |
72 | 72 | |
73 | + save_data: () -> | |
74 | + attrs = {} | |
75 | + _.each @elements.element_lis, (element_li) -> | |
76 | + form = element_li.body.form | |
77 | + name = form.item.table_name() + '_attributes' | |
78 | + attrs[name] ||= [] | |
79 | + attrs[name].push(form.save_data()) | |
80 | + attrs | |
81 | + |
@@ -18,7 +18,7 @@ class Pettanr.Views.Balloon.Element extends Pettanr.View | ||
18 | 18 | set_style: () -> |
19 | 19 | attr = { |
20 | 20 | src: @system_picture.picture_file().src(), |
21 | - alt: @element.get('caption'), | |
21 | + alt: @speech_balloon.element.get('caption'), | |
22 | 22 | style: Pettanr.to_style(@style()) |
23 | 23 | } |
24 | 24 | this.$el.attr(attr) |
@@ -104,7 +104,9 @@ class PanelPicture < Peta::Element | ||
104 | 104 | o = (spot and spot != self) ? "opacity: #{opacity.to_f/100}; filter:alpha(opacity=#{opacity});" : '' |
105 | 105 | self.tag_attributes(:img, { |
106 | 106 | :class => "panel-picture", :vPicture => self.id, |
107 | - :src => self.url, :width => self.width.abs, :height => self.height.abs, :picture_id => self.picture_id, :ext => self.picture.ext, :alt => self.caption, | |
107 | + :src => self.url, :width => self.width.abs, :height => self.height.abs, | |
108 | + :picture_id => self.picture_id, :ext => self.picture.ext, | |
109 | + :alt => self.caption, | |
108 | 110 | :style => "#{o}" |
109 | 111 | }) |
110 | 112 | end |