\r
filer_list: () ->\r
@set_list()\r
- @list.open(() =>\r
- pager = Locmare.ListGroupModule.LibModule.Pager.factory(@list.page_status, @params)\r
- filer = new Locmare.Filer({\r
- item_name: @list.item_name, \r
- items: @list.items(), \r
- pager: pager\r
- })\r
- @listenTo(filer, 'navigate', @navigate)\r
- filer.render()\r
- @trigger('ready', filer)\r
- )\r
+ @list.to_filer(this, {\r
+ success: (filer) =>\r
+ @listenTo(filer, 'navigate', @navigate)\r
+ filer.render()\r
+ @trigger('ready', filer)\r
+ })\r
false\r
\r
set_play: (render_func) ->\r
@set_play(@render_play)\r
\r
render_play: (@item) ->\r
- @list.open(() => \r
- @trigger('title', @params, @item.get('title'))\r
- show = new Pettanr.Views.Comic.Play({\r
- item: @item,\r
- list: @list,\r
- })\r
- show.render()\r
- @trigger('ready', show)\r
- )\r
+ @list.open(this, {\r
+ success: (items) => \r
+ @trigger('title', @params, @item.get('title'))\r
+ show = new Pettanr.Views.Comic.Play({\r
+ item: @item,\r
+ list: items,\r
+ })\r
+ show.render()\r
+ @trigger('ready', show)\r
+ })\r
@trigger('done', @params)\r
\r
count: () ->\r
@set_play(@render_play)\r
\r
render_play: (@item) ->\r
- @list.open(() => \r
- pager = Locmare.ListGroupModule.LibModule.PlayPager.factory(@list.page_status, @params)\r
- @trigger('title', @params, @item.get('title'))\r
- show = new Pettanr.Views.Scroll.Play({\r
- item: @item,\r
- list: @list,\r
- pager: pager\r
- })\r
- @listenTo(show, 'insert', @insert)\r
- @listenTo(show, 'move', @move)\r
- @listenTo(show, 'dialog:close', @close_dialog)\r
- show.render()\r
- @trigger('ready', show)\r
- )\r
+ @list.open(this, {\r
+ success: (items) => \r
+ pager = Locmare.ListGroupModule.LibModule.PlayPager.factory(@list.page_status, @params)\r
+ @trigger('title', @params, @item.get('title'))\r
+ show = new Pettanr.Views.Scroll.Play({\r
+ item: @item,\r
+ list: @list,\r
+ pager: pager\r
+ })\r
+ @listenTo(show, 'insert', @insert)\r
+ @listenTo(show, 'move', @move)\r
+ @listenTo(show, 'dialog:close', @close_dialog)\r
+ show.render()\r
+ @trigger('ready', show)\r
+ })\r
@trigger('done', @params)\r
\r
insert: (dialog) ->\r
@set_play(@render_play)\r
\r
render_play: (@item) ->\r
- @list.open(() => \r
- @trigger('title', @params, @item.get('caption'))\r
- show = new Pettanr.Views.Sheet.Play({\r
- item: @item,\r
- list: @list,\r
- })\r
- show.render()\r
- @trigger('ready', show)\r
- )\r
+ @list.open(this, {\r
+ success: (items) => \r
+ @trigger('title', @params, @item.get('caption'))\r
+ show = new Pettanr.Views.Sheet.Play({\r
+ item: @item,\r
+ list: items,\r
+ })\r
+ show.render()\r
+ @trigger('ready', show)\r
+ })\r
@trigger('done', @params)\r
\r
count: () ->\r
@set_play(@render_play)\r
\r
render_play: (@item) ->\r
- @list.open(() => \r
- @trigger('title', @params, @item.get('title'))\r
- show = new Pettanr.Views.Story.Play({\r
- item: @item,\r
- list: @list,\r
- })\r
- show.render()\r
- @trigger('ready', show)\r
- )\r
+ @list.open(this, {\r
+ success: (items) => \r
+ @trigger('title', @params, @item.get('title'))\r
+ show = new Pettanr.Views.Story.Play({\r
+ item: @item,\r
+ list: items,\r
+ })\r
+ show.render()\r
+ @trigger('ready', show)\r
+ })\r
@trigger('done', @params)\r
\r
count: () ->\r
spot: null\r
})\r
@dock = new Editor.PanelEditor.Dock({parent: this})\r
- @credits = new Pettanr.Views.Panel.ShowModule.Credits({pictures: {}})\r
+ @credits = new Pettanr.Views.Common.Credits(parent: this)\r
\r
@body.on('panel:resize', @panel_resize)\r
@listenTo(@dock, 'http_post', @http_post)\r
@body.add_element(element)\r
\r
add_credit: (element) ->\r
- @credits.add_picture(element.picture())\r
+ r = {}\r
+ r[element.get('picture_id')] = null\r
+ @credits.push(r)\r
\r
open_dialog: (dialog) ->\r
@dialogs[dialog.cid] = dialog\r
# get caption data and send message\r
render: () ->\r
if @item[@method_name()]\r
- @listenTo(@item, 'ready:caption', @ready_caption)\r
- @item[@method_name()]()\r
+ @item[@method_name()].call(@item, this, {\r
+ success: (caption) =>\r
+ @trigger('ready:caption', Pettanr.Views.Common.replace_empty(caption))\r
+ })\r
+ this\r
\r
method_name: () ->\r
@my_manifest.method_name\r
\r
- ready_caption: (caption) ->\r
- @trigger('ready:caption', Pettanr.Views.Common.replace_empty(caption))\r
- \r
# get symbol data and send message\r
render: () ->\r
if @item[@method_name()]\r
- @listenTo(@item, 'ready:symbol', @ready_symbol)\r
- @item[@method_name()]()\r
+ @item[@method_name()].call(@item, this, {\r
+ success: (symbol) =>\r
+ @trigger('ready:symbol', symbol)\r
+ })\r
this\r
\r
method_name: () ->\r
@my_manifest.method_name\r
\r
ready_symbol: (symbol) ->\r
- @trigger('ready:symbol', symbol)\r
\r
else\r
{}\r
list = Locmare.ListGroup.list(resource_controller_name, resource_action_name, params)\r
- list.open((page_status) ->\r
- members = _.map list.models, (member) ->\r
- [member.get(caption_name), member.get('id')]\r
- cb(members)\r
- )\r
+ list.open(this, {\r
+ success: (page_status) ->\r
+ members = _.map list.models, (member) ->\r
+ [member.get(caption_name), member.get('id')]\r
+ cb(members)\r
+ })\r
else\r
members = Manifest.manifest().system_resources.select_items[@select_item_name()]\r
cb(members)\r
count: () ->\r
new Pettanr.CounterModel({}, {url: '/' + @action_manifest.counter_url(@params)})\r
\r
- open: (cb) ->\r
+ open: (context, options) ->\r
@url = '/' + @action_manifest.url(@params)\r
@fetch().done =>\r
# @boost(items)\r
- cb()\r
+ options.success.call(context, @items())\r
+ \r
+ to_filer: (context, options) ->\r
+ @open(context, {\r
+ success: (items) => \r
+ pager = Locmare.ListGroupModule.LibModule.Pager.factory(@page_status, @params)\r
+ filer = new Locmare.Filer({\r
+ item_name: @item_name, \r
+ items: items, \r
+ pager: pager\r
+ })\r
+ options.success.call(context, filer)\r
+ })\r
\r
\r
clear: () ->\r
this.$el.html('')\r
- f = \r
- @parent_model().retrieve(@parent_id(), this, {\r
+ @item().get_parent(@belongs_to_manifest.name, this, {\r
success: (@parent_item) =>\r
@set_filer()\r
@render()\r
\r
clear: () ->\r
this.$el.html('')\r
- @list.open((page_status) =>\r
- @set_filer()\r
- @render()\r
- )\r
+ @list.open(this, {\r
+ success: (page_status) =>\r
+ @set_filer()\r
+ @render()\r
+ })\r
this\r
\r
render: () ->\r
\r
clear: () ->\r
this.$el.html('')\r
- @list.open((page_status) =>\r
- @set_filer()\r
- @render()\r
- )\r
+ @list.open(this, {\r
+ success: (page_status) =>\r
+ @set_filer()\r
+ @render()\r
+ })\r
this\r
\r
render: () ->\r
r: 0\r
} \r
\r
+ @trace_routes: () ->\r
+ {\r
+ speech_balloon: 'speech_balloon',\r
+ symbol: ['speech_balloon', 'speech_balloon_template', 'system_picture']\r
+ }\r
+ \r
pick: () ->\r
# \r
speech_balloon_template = @templates.speech_balloon_template\r
speech_balloon_template_module_name: speech_balloon_template.get('module_name'),\r
}\r
\r
- speech_balloon: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.SpeechBalloon, @get('speech_balloon_id'))\r
- \r
- system_picture: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.SystemPicture, @get('system_picture_id'))\r
- \r
r_url: () ->\r
'/system_pictures/' + @system_picture().filename()\r
\r
- symbol_option: () ->\r
- @get_parent('speech_balloon', this, {\r
- success: (speech_balloon) => \r
- speech_balloon.get_parent('speech_balloon_template', this, {\r
- success: (speech_balloon_template) => \r
- speech_balloon_template.get_parent('system_picture', this, {\r
- success: (system_picture) => \r
- @trigger('ready:symbol', system_picture.tmb_opt_img_tag())\r
- })\r
- })\r
- })\r
+ plain_scenario: () ->\r
+ ''\r
\r
initialize: (attr, options) ->\r
super(attr, options)\r
author_id: null\r
} \r
\r
- author: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Author, @get('author_id'))\r
- \r
is_visible: (operators = Pettanr.cache.operators) ->\r
switch super(operators)\r
when null\r
t: null\r
} \r
\r
- comic: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Comic, @get('comic_id'))\r
- \r
- story: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Story, @get('story_id'))\r
- \r
has_story: () ->\r
if @get('story_id')\r
true\r
caption: () ->\r
@get('name').replace(/\/$/, '').split('/').pop()\r
\r
- filer_caption: () ->\r
+ filer_caption: (context, options) ->\r
caption = _.escape(@caption())\r
- @trigger('ready:caption', caption)\r
+ options.success.call(context, caption)\r
\r
is_remote: () ->\r
if @get('category_id') == 10\r
@pick_item_name: () ->\r
''\r
\r
- panel: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Panel, @get('panel_id'))\r
- \r
element_face: () ->\r
new Pettanr.Views.GroundColor.ElementFace({element: this})\r
\r
pick: (picked_item) ->\r
{picture_id: picked_item.get('picture_id')}\r
\r
- panel: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Panel, @get('panel_id'))\r
- \r
- picture: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Picture, @get('picture_id'))\r
+ @trace_routes: () ->\r
+ {\r
+ resource_picture: ['picture', 'resource_picture_picture', 'resource_picture'],\r
+ symbol: 'picture'\r
+ }\r
\r
@has_picture: () ->\r
true\r
picture: picture\r
})\r
\r
- symbol_option: () ->\r
- @get_parent('picture', this, {\r
- success: (picture) => \r
- @trigger('ready:symbol', picture.tmb_opt_img_tag())\r
- })\r
- \r
repeat_text: () ->\r
Pettanr.GroundPicture.repeat_texts()[@get('repeat')]\r
\r
initialize: (attr, options) ->\r
super(attr, options)\r
\r
-class Pettanr.GroundPicture.TraceFromPicture\r
- \r
- constructor: (options) ->\r
- _.extend(this, Backbone.Events)\r
- \r
- trace: (picture) ->\r
- @picture(picture)\r
- \r
- picture: (picture) ->\r
- resource_picture_picture_list = picture.has_one('resource_picture_picture')\r
- resource_picture_picture_list.open(() =>\r
- resource_picture_picture = resource_picture_picture_list.items()[0]\r
- Pettanr.ResourcePicture.retrieve(resource_picture_picture.get('resource_picture_id'), this, {\r
- success: (resource_picture) => \r
- @trigger('trace', resource_picture)\r
- })\r
- )\r
- \r
-class Pettanr.GroundPicture.TraceFromPanelPicture extends Pettanr.GroundPicture.TraceFromPicture\r
- \r
- trace: (panel_picture) ->\r
- @panel_picture(panel_picture)\r
- \r
- panel_picture: (panel_picture) ->\r
- Pettanr.Picture.retrieve(panel_picture.get('picture_id'), this, {\r
- success: (picture) => \r
- tracer = new Pettanr.GroundPicture.TraceFromPicture()\r
- @listenTo(tracer, 'trace', @success)\r
- tracer.trace(picture)\r
- })\r
- \r
- success: (resource_picture) ->\r
- @trigger('trace', resource_picture)\r
- \r
id: null\r
} \r
\r
- license_group: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.LicenseGroup, @get('license_group_id'))\r
- \r
- system_picture: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.SystemPicture, @get('system_picture_id'))\r
- \r
- symbol_option: () ->\r
- @get_parent('system_picture', this, {\r
- success: (system_picture) => \r
- @trigger('ready:symbol', system_picture.tmb_opt_img_tag())\r
- })\r
+ @trace_routes: () ->\r
+ {\r
+ symbol: ['system_picture']\r
+ }\r
\r
caption_with_group: () ->\r
@get_parent('license_group', this, {\r
artist_id: null\r
} \r
\r
- picture: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Picture, @get('picture_id'))\r
- \r
- artist: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Artist, @get('artist_id'))\r
- \r
is_visible: (operators = Pettanr.cache.operators) ->\r
@is_own(operators)\r
\r
picture: this\r
})\r
\r
- symbol_option: () ->\r
+ symbol_option: (context, options) ->\r
@retrieve(this, {\r
- success: (item) => \r
- @trigger('ready:symbol', item.tmb_opt_img_tag())\r
+ success: (symbol_item) => \r
+ options.success.call(context, symbol_item.to_symbol())\r
})\r
\r
- filer_caption: () ->\r
+ filer_caption: (context, options) ->\r
history = @history()\r
history.fetch({cache: true}).done =>\r
caption = if _.isEmpty(history.models)\r
else\r
head = _.first(history.models)\r
Pettanr.to_s(head.get('revision'))\r
- @trigger('ready:caption', caption)\r
+ options.success.call(context, caption)\r
\r
revision: () ->\r
new Pettanr.OriginalPicture.Head({original_picture: this})\r
publish: 0\r
} \r
\r
- author: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Author, @get('author_id'))\r
- \r
with_elements: () ->\r
new Pettanr.Panel.WithElements({id: @get('id')})\r
\r
height: picked_item.get('height')\r
}\r
\r
- picture: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Picture, @get('picture_id'))\r
- \r
- panel: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Panel, @get('panel_id'))\r
+ @trace_routes: () ->\r
+ {\r
+ resource_picture: ['picture', 'resource_picture_picture', 'resource_picture']\r
+ symbol: 'picture'\r
+ }\r
\r
@has_picture: () ->\r
true\r
picture: picture\r
})\r
\r
- symbol_option: () ->\r
- @get_parent('picture', this, {\r
- success: (picture) => \r
- @trigger('ready:symbol', picture.tmb_opt_img_tag())\r
- })\r
- \r
element_face: () ->\r
new Pettanr.Views.PanelPicture.ElementFace({element: this})\r
\r
initialize: (attr, options) ->\r
super(attr, options)\r
\r
-class Pettanr.PanelPicture.TraceFromPicture\r
- \r
- constructor: (options) ->\r
- _.extend(this, Backbone.Events)\r
- \r
- trace: (picture) ->\r
- @picture(picture)\r
- \r
- picture: (picture) ->\r
- resource_picture_picture_list = picture.has_one('resource_picture_picture')\r
- resource_picture_picture_list.open(() =>\r
- resource_picture_picture = resource_picture_picture_list.items()[0]\r
- resource_picture_picture.get_parent('resource_picture', this, {\r
- success: (resource_picture) => \r
- @trigger('trace', resource_picture)\r
- })\r
- )\r
- \r
-class Pettanr.PanelPicture.TraceFromGroundPicture extends Pettanr.PanelPicture.TraceFromPicture\r
- \r
- trace: (ground_picture) ->\r
- @ground_picture(ground_picture)\r
- \r
- ground_picture: (ground_picture) ->\r
- ground_picture.get_parent('picture', this, {\r
- success: (picture) => \r
- tracer = new Pettanr.PanelPicture.TraceFromPicture()\r
- @listenTo(tracer, 'trace', @success)\r
- tracer.trace(picture)\r
- })\r
- \r
- success: (resource_picture) ->\r
- @trigger('trace', resource_picture)\r
- \r
id: null\r
} \r
\r
+ @trace_routes: () ->\r
+ {\r
+ resource_picture: ['resource_picture_picture', 'resource_picture']\r
+ }\r
+ \r
is_visible: (operators = Pettanr.cache.operators) ->\r
return true\r
\r
ln = Pettanr.to_s(@license().get('caption'))\r
lgn + '[' + ln + ']'\r
\r
- symbol_option: () ->\r
- @tmb_opt_img_tag()\r
+ symbol_option: (context, options) ->\r
+ @retrieve(this, {\r
+ success: (symbol_item) => \r
+ options.success.call(context, symbol_item.to_symbol())\r
+ })\r
\r
is_enable: () ->\r
if @head().resource_picture()\r
id: null\r
} \r
\r
- original_picture: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.OriginalPicture, @get('original_picture_id'))\r
- \r
- picture: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Picture, @get('picture_id'))\r
- \r
- artist: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Artist, @get('artist_id'))\r
- \r
is_visible: (operators = Pettanr.cache.operators) ->\r
@is_user_visible(operators)\r
\r
ln = Pettanr.to_s(@license().get('caption'))\r
lgn + '[' + ln + ']'\r
\r
- symbol_option: () ->\r
+ symbol_option: (context, options) ->\r
@retrieve(this, {\r
- success: (picture) => \r
- @trigger('ready:symbol', picture.tmb_opt_img_tag())\r
+ success: (symbol_item) => \r
+ options.success.call(context, symbol_item.to_symbol())\r
})\r
\r
credit_icon_view: () ->\r
id: null\r
} \r
\r
- picture: () ->\r
- new Pettanr.Picture({id: @get('picture_id')})\r
+ @trace_routes: () ->\r
+ {\r
+ symbol: ['picture']\r
+ }\r
\r
is_visible: (operators = Pettanr.cache.operators) ->\r
true\r
\r
- symbol_option: () ->\r
- @get_parent('picture', this, {\r
- success: (picture) => \r
- @trigger('ready:symbol', picture.tmb_opt_img_tag())\r
- force: true\r
- })\r
- \r
initialize: (attr = {}, options = {}) ->\r
super(attr, options)\r
\r
visible: 0\r
} \r
\r
- author: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Author, @get('author_id'))\r
- \r
overwrite: (options) ->\r
operators = Pettanr.cache.operators\r
return false if not operators.author\r
)\r
Pettanr.Panel.licensed_pictures(panels)\r
\r
- scroll: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Scroll, @get('scroll_id'))\r
- \r
- panel: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Panel, @get('panel_id'))\r
- \r
has_panel: () ->\r
if @get('panel_id')\r
true\r
author_id: null\r
} \r
\r
- author: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Author, @get('author_id'))\r
- \r
overwrite: (options) ->\r
operators = Pettanr.cache.operators\r
return false if not operators.author\r
t: null\r
} \r
\r
- sheet: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Sheet, @get('sheet_id'))\r
- \r
- panel: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Panel, @get('panel_id'))\r
- \r
initialize: (attr = {}, options = {}) ->\r
super(attr, options)\r
\r
height: 100\r
} \r
\r
+ @trace_routes: () ->\r
+ {\r
+ speech_balloon: 'speech_balloon',\r
+ symbol: ['speech_balloon', 'speech_balloon_template', 'system_picture']\r
+ }\r
+ \r
pick: () ->\r
# \r
speech_balloon_template = @templates.speech_balloon_template\r
writing_format_module_name: writing_format.get('module_name'),\r
}\r
\r
- speech_balloon: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.SpeechBalloon, @get('speech_balloon_id'))\r
- \r
- writing_format: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.WritingFormat, @get('writing_format_id'))\r
- \r
@text_align_texts: () -> \r
['left', 'left', 'right', 'center']\r
\r
- symbol_option: () ->\r
- @get_parent('speech_balloon', this, {\r
- success: (speech_balloon) => \r
- speech_balloon.get_parent('speech_balloon_template', this, {\r
- success: (speech_balloon_template) => \r
- speech_balloon_template.get_parent('system_picture', this, {\r
- success: (system_picture) => \r
- @trigger('ready:symbol', system_picture.tmb_opt_img_tag())\r
- })\r
- })\r
- })\r
- \r
text_align_text: () ->\r
Pettanr.Speech.text_align_texts()[@get('text_align')]\r
\r
@boosts('read')\r
@render(@escape('content'))\r
\r
+ plain_scenario: () ->\r
+ @escape('content')\r
+ \r
initialize: (attr, options) ->\r
super(attr, options)\r
\r
speech_balloon_template_module_name: speech_balloon_template.get('module_name')\r
}\r
\r
- panel: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Panel, @get('panel_id'))\r
- \r
- speech_balloon_template: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.SpeechBalloonTemplate, @get('speech_balloon_template_id'))\r
+ @trace_routes: () ->\r
+ {\r
+ symbol: ['speech_balloon_template', 'system_picture'],\r
+ }\r
\r
@has_picture: () ->\r
false\r
\r
- symbol_option: () ->\r
- @get_parent('speech_balloon_template', this, {\r
- success: (speech_balloon_template) => \r
- speech_balloon_template.get_parent('system_picture', this, {\r
- success: (system_picture) => \r
- @trigger('ready:symbol', system_picture.tmb_opt_img_tag())\r
+ filer_caption: (context, options) ->\r
+ @get_child('balloon', this, {\r
+ success: (balloon) => \r
+ @get_child('speech', this, {\r
+ success: (speech) => \r
+ plain_scenario = @plain_scenario() + balloon.plain_scenario() + speech.plain_scenario()\r
+ options.success.call(context, plain_scenario)\r
})\r
})\r
\r
- \r
- filer_caption: () ->\r
- @retrieve(this, {\r
- success: (speech_balloon) => \r
- caption = speech_balloon.escape('caption')\r
- @trigger('ready:caption', caption)\r
- })\r
- \r
plain_scenario: () ->\r
- @get('caption')\r
+ @escape('caption')\r
\r
element_face: () ->\r
new Pettanr.Views.SpeechBalloon.ElementFace({element: this})\r
initialize: (attr, options) ->\r
super(attr, options)\r
\r
-class Pettanr.SpeechBalloon.TraceFromBalloon\r
- \r
- constructor: (options) ->\r
- _.extend(this, Backbone.Events)\r
- \r
- trace: (balloon) ->\r
- @balloon(balloon)\r
- \r
- balloon: (balloon) ->\r
- balloon.get_parent('speech_balloon', this, {\r
- success: (speech_balloon) => \r
- @trigger('trace', speech_balloon)\r
- })\r
- \r
-class Pettanr.SpeechBalloon.TraceFromSpeech\r
- \r
- constructor: (options) ->\r
- _.extend(this, Backbone.Events)\r
- \r
- trace: (speech) ->\r
- @speech(speech)\r
- \r
- speech: (speech) ->\r
- speech.get_parent('speech_balloon', this, {\r
- success: (speech_balloon) => \r
- @trigger('trace', speech_balloon)\r
- })\r
- \r
id: null\r
} \r
\r
- system_picture: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.SystemPicture, @get('system_picture_id'))\r
- \r
- symbol_option: () ->\r
- @get_parent('system_picture', this, {\r
- success: (system_picture) => \r
- @trigger('ready:symbol', system_picture.tmb_opt_img_tag())\r
- })\r
+ @trace_routes: () ->\r
+ {\r
+ symbol: ['system_picture']\r
+ }\r
\r
parsed_settings: () ->\r
JSON.parse(@get('settings'))\r
author_id: null\r
} \r
\r
- author: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Author, @get('author_id'))\r
- \r
overwrite: (options) ->\r
operators = Pettanr.cache.operators\r
return false if not operators.author\r
t: null\r
} \r
\r
- story: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Story, @get('story_id'))\r
- \r
- sheet: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Sheet, @get('sheet_id'))\r
- \r
has_sheet: () ->\r
if @get('sheet_id')\r
true\r
id: null\r
} \r
\r
- picture: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.Picture, @get('picture_id'))\r
- \r
filename: () ->\r
@get('id') + '.' + @get('ext')\r
\r
picture: this\r
})\r
\r
- symbol_option: () ->\r
+ symbol_option: (context, options) ->\r
@retrieve(this, {\r
- success: (picture) => \r
- @trigger('ready:symbol', picture.tmb_opt_img_tag())\r
+ success: (symbol_item) => \r
+ options.success.call(context, symbol_item.to_symbol())\r
})\r
\r
initialize: (attr = {}, options = {}) ->\r
defaults: {\r
} \r
\r
- author: () ->\r
- \r
- artist: () ->\r
- \r
initialize: (attr = {}, options = {}) ->\r
super(attr, options)\r
_.extend(this, Backbone.Events)\r
id: null\r
} \r
\r
- system_picture: () ->\r
- new Pettanr.Cache.Retriever(Pettanr.SystemPicture, @get('system_picture_id'))\r
- \r
- symbol_option: () ->\r
- @get_parent('system_picture', this, {\r
- success: (system_picture) => \r
- @trigger('ready:symbol', system_picture.tmb_opt_img_tag())\r
- })\r
+ @trace_routes: () ->\r
+ {\r
+ symbol: ['system_picture']\r
+ }\r
\r
initialize: (attr = {}, options = {}) ->\r
super(attr, options)\r
item = new this({id: id})\r
item.retrieve(context, options)\r
\r
+ @trace_routes: () ->\r
+ {}\r
+ \r
#InstanceMethods\r
\r
default_url: () ->\r
else\r
@item_name()\r
\r
+ get_association: (routes, context, options) ->\r
+ console.log 'get_association'\r
+ routes = [routes] if _.isString(routes)\r
+ console.log routes\r
+ route = routes.shift()\r
+ if _.isEmpty(routes)\r
+ # fetching terminate association. callback\r
+ console.log 'fetching terminate association'\r
+ cxt = options.context || context\r
+ @fetch_association(route, cxt, {\r
+ success: (association_item, options) =>\r
+ console.log 'success'\r
+ console.log association_item\r
+ console.log options\r
+ options.success.call(context, association_item)\r
+ context: context,\r
+ options: options\r
+ })\r
+ else\r
+ # fetching through associations\r
+ console.log 'fetching through associations'\r
+ @fetch_association(route, this, {\r
+ success: (association_item, options) =>\r
+ console.log 'success'\r
+ console.log association_item\r
+ console.log options\r
+ association_item.get_association(routes, this, options)\r
+ context: context,\r
+ options: options\r
+ })\r
+ \r
+ fetch_association: (name, context, options) =>\r
+ console.log context\r
+ console.log options\r
+ a = @my_class().my_manifest().associations\r
+ fetch_options = {\r
+ success: (association_item) =>\r
+ options.success.call(context, association_item, options.options)\r
+ }\r
+ if a.belongs_to[name]\r
+ console.log 'belongs_to'\r
+ console.log name\r
+ @get_parent(name, context, fetch_options)\r
+ else if a.has_many[name]\r
+ console.log 'has_many'\r
+ console.log name\r
+ @get_children(name, context, fetch_options)\r
+ else if a.has_one[name]\r
+ console.log 'has_one'\r
+ console.log name\r
+ @get_child(name, context, fetch_options)\r
+ else\r
+ console.error('association does not exist in model manifest')\r
+ \r
get_parent: (belongs_to_name, context, options = null) ->\r
m = Manifest.item_name_to_model(belongs_to_name)\r
retriever = new Pettanr.Cache.Retriever(m, @get(belongs_to_name + '_id'))\r
)\r
retriever.retrieve()\r
\r
+ get_child: (has_one_name, context, options = null) ->\r
+ list = @has_one(has_one_name)\r
+ list.open(context, {\r
+ success: (items) =>\r
+ callback = options.success\r
+ item = items[0]\r
+ callback.call(context, item)\r
+ })\r
+ \r
+ get_children: (has_many_name, context, options = null) ->\r
+ list = @has_many(has_many_name)\r
+ list.open(context, {\r
+ success: (items) =>\r
+ callback = options.success\r
+ callback.call(context, items)\r
+ })\r
+ \r
has_many: (has_many_name) ->\r
has_many_manifest = @my_class().my_manifest().associations.has_many[has_many_name]\r
action_name = has_many_manifest.list_action_name\r
controller_name, action_name, {id: @get('id')}\r
)\r
\r
+ trace_to: (trace_name, context, options) ->\r
+ routes = @my_class().trace_routes()[trace_name]\r
+ if !routes\r
+ console.error('no trace route')\r
+ return\r
+ @get_association(routes, this, {\r
+ success: (association) => \r
+ options.success.call(context, association)\r
+ })\r
+ \r
boosts: (level) ->\r
c = @my_class().my_peta().boost\r
_.each c, (boost_manifest, boost_name) =>\r
else\r
'none'\r
\r
+ symbol_option: (context, options) ->\r
+ @trace_to('symbol', this, {\r
+ success: (symbol_item) => \r
+ options.success.call(context, symbol_item.to_symbol())\r
+ })\r
+ \r
+ to_symbol: () ->\r
+ @tmb_opt_img_tag()\r
+ \r
icon_view: (half) ->\r
new Pettanr.Views[@my_class().singular()].Icon({item: this, half: half})\r
\r
@list = Locmare.ListGroup.list(\r
params['controller'], params['action'], params\r
)\r
- @list.open(() =>\r
- pager = Locmare.ListGroupModule.LibModule.Pager.factory(@list.page_status, params)\r
- filer = new Locmare.Filer({\r
- item_name: @list.item_name, \r
- items: @list.items(), \r
- pager: pager\r
- })\r
- @listenTo(filer, 'http_get', @http_get)\r
- this.$el.append(filer.render().el)\r
- )\r
+ @list.open(this, {\r
+ success: (items) => \r
+ pager = Locmare.ListGroupModule.LibModule.Pager.factory(@list.page_status, params)\r
+ filer = new Locmare.Filer({\r
+ item_name: @list.item_name, \r
+ items: items, \r
+ pager: pager\r
+ })\r
+ @listenTo(filer, 'http_get', @http_get)\r
+ this.$el.append(filer.render().el)\r
+ })\r
this\r
\r
http_get: (url) ->\r
@list = Locmare.ListGroup.list(\r
params['controller'], params['action'], params\r
)\r
- @list.open(() =>\r
- pager = Locmare.ListGroupModule.LibModule.Pager.factory(@list.page_status, params)\r
- filer = new Locmare.Filer({\r
- item_name: @list.item_name, \r
- items: @list.items(), \r
- pager: pager\r
- })\r
- @listenTo(filer, 'http_get', @http_get)\r
- this.$el.append(filer.render().el)\r
- )\r
+ @list.open(this, {\r
+ success: (items) => \r
+ pager = Locmare.ListGroupModule.LibModule.Pager.factory(@list.page_status, params)\r
+ filer = new Locmare.Filer({\r
+ item_name: @list.item_name, \r
+ items: items, \r
+ pager: pager\r
+ })\r
+ @listenTo(filer, 'http_get', @http_get)\r
+ this.$el.append(filer.render().el)\r
+ })\r
this\r
\r
http_get: (url) ->\r
@list = Locmare.ListGroup.list(\r
params['controller'], params['action'], params\r
)\r
- @list.open(() =>\r
- pager = Locmare.ListGroupModule.LibModule.Pager.factory(@list.page_status, params)\r
- _.each @list.items(), (panel) =>\r
- panel = panel.with_elements() # retake panel for 'with_elements' mode\r
- panel.fetch({cache: false}).done =>\r
- panel.attributes = panel.replaced_attributes()\r
- body = new Pettanr.Views.Panel.Body({\r
- panel: panel,\r
- spot: null\r
- })\r
- @trigger('ready', panel)\r
- this.$el.append(body.render().el)\r
- )\r
+ @list.open(this, {\r
+ success: (items) => \r
+ pager = Locmare.ListGroupModule.LibModule.Pager.factory(@list.page_status, params)\r
+ _.each items, (panel) =>\r
+ panel = panel.with_elements() # retake panel for 'with_elements' mode\r
+ panel.fetch({cache: false}).done =>\r
+ panel.attributes = panel.replaced_attributes()\r
+ body = new Pettanr.Views.Panel.Body({\r
+ panel: panel,\r
+ spot: null\r
+ })\r
+ @trigger('ready', panel)\r
+ this.$el.append(body.render().el)\r
+ })\r
this\r
\r
class Pettanr.Views.Author.ShowModule.Panels extends Pettanr.View\r
super(options)\r
@item = options.item\r
@panels_body = new Pettanr.Views.Author.ShowModule.PanelsBody({item: @item})\r
- @credits = new Pettanr.Views.Scroll.PlayModule.Credits({parent: this})\r
+ @credits = new Pettanr.Views.Common.Credits({parent: this})\r
\r
render: () ->\r
@listenTo(@panels_body, 'ready', @ready)\r
@trigger('ready', new_item)\r
else if @target_model.is_traceable(item.item_name())\r
# Trace\r
- tracer_class = @target_model['TraceFrom' + item.singular()]\r
- tracer = new tracer_class()\r
- @listenTo(tracer, 'trace', @trace)\r
- tracer.trace(item)\r
+ item.trace_to(item.my_class().pick_item_name(), this, {\r
+ success: (resource_picture) => \r
+ @dialog.http_get(resource_picture.show_url())\r
+ })\r
else if item.item_name() == @target_model.pick_item_name()\r
# Pick resource_picture to ground_picture\r
@listenTo(this, 'ready', @ready)\r
@dialog.stop()\r
@trigger('pick', new_item)\r
\r
- trace: (resource_picture) ->\r
- @dialog.http_get(resource_picture.show_url())\r
- \r
dock: () ->\r
@parent.dock()\r
\r
render: () ->\r
this.$el.html('')\r
if @is_own()\r
- resource_picture_list = @item.has_one('resource_picture')\r
- resource_picture_list.open(() =>\r
- @resource_picture = resource_picture_list.items()[0]\r
- if @resource_picture\r
- @stop_btn = new Tag.A({\r
- attr: {href: '/' + @resource_picture.destroy_url()}, \r
- content: I18n.t('original_pictures.index.stop')\r
+ @item.get_child('resource_picture', this, {\r
+ success: (@resource_picture) =>\r
+ if @resource_picture\r
+ @stop_btn = new Tag.A({\r
+ attr: {href: '/' + @resource_picture.destroy_url()}, \r
+ content: I18n.t('original_pictures.index.stop')\r
+ })\r
+ @listenTo(@stop_btn, 'click', @click_stop)\r
+ this.$el.append(@stop_btn.render().el)\r
+ @edit_icon = new Pettanr.Image.SymbolImg({\r
+ attr: {'src': @edit_img_file_name()}, \r
+ half: true\r
})\r
- @listenTo(@stop_btn, 'click', @click_stop)\r
- this.$el.append(@stop_btn.render().el)\r
- @edit_icon = new Pettanr.Image.SymbolImg({\r
- attr: {'src': @edit_img_file_name()}, \r
- half: true\r
- })\r
- @edit_btn = new Tag.A({\r
- attr: {href: '/' + @item.edit_url()}, \r
- content: @edit_icon.render().el\r
- })\r
- @remove_icon = new Pettanr.Image.SymbolImg({\r
- attr: {'src': @remove_img_file_name()}, \r
- half: true\r
- })\r
- @remove_btn = new Tag.A({\r
- attr: {href: '/' + @item.destroy_url()}, \r
- content: @remove_icon.render().el\r
- })\r
- @listenTo(@edit_btn, 'click', @click_edit)\r
- @listenTo(@remove_btn, 'click', @click_remove)\r
- this.$el.append(@edit_btn.render().el)\r
- this.$el.append(@remove_btn.render().el)\r
- )\r
+ @edit_btn = new Tag.A({\r
+ attr: {href: '/' + @item.edit_url()}, \r
+ content: @edit_icon.render().el\r
+ })\r
+ @remove_icon = new Pettanr.Image.SymbolImg({\r
+ attr: {'src': @remove_img_file_name()}, \r
+ half: true\r
+ })\r
+ @remove_btn = new Tag.A({\r
+ attr: {href: '/' + @item.destroy_url()}, \r
+ content: @remove_icon.render().el\r
+ })\r
+ @listenTo(@edit_btn, 'click', @click_edit)\r
+ @listenTo(@remove_btn, 'click', @click_remove)\r
+ this.$el.append(@edit_btn.render().el)\r
+ this.$el.append(@remove_btn.render().el)\r
+ })\r
this\r
\r
is_own: () ->\r
content: I18n.t('original_pictures.' + @item.state())\r
})\r
this.$el.append(@visible.render().el)\r
- resource_picture_list = @item.has_one('resource_picture')\r
- resource_picture_list.open(() =>\r
- @resource_picture = resource_picture_list.items()[0]\r
- if @resource_picture\r
- @credit = @resource_picture.credit_view(true)\r
- @listenTo(@credit, 'click:icon', @resource_picture_click)\r
- this.$el.append(@credit.render().el)\r
- )\r
+ @item.get_child('resource_picture', this, {\r
+ success: (@resource_picture) =>\r
+ if @resource_picture\r
+ @credit = @resource_picture.credit_view(true)\r
+ @listenTo(@credit, 'click:icon', @resource_picture_click)\r
+ this.$el.append(@credit.render().el)\r
+ })\r
@rb()\r
this\r
\r
render: () ->\r
@element.get_parent('picture', this, {\r
success: (@picture) =>\r
- @init_picture()\r
img_class = @img_class()\r
- @img = new img_class({\r
+ img = new img_class({\r
wrapper: this,\r
element: @element,\r
picture: @picture,\r
spot: @spot\r
})\r
@restyle()\r
- this.$el.html(@img.render().el)\r
+ this.$el.html(img.render().el)\r
+ @init_picture(img)\r
})\r
this\r
\r
- init_picture: () ->\r
+ init_picture: (img) ->\r
+ @img = img\r
\r
restyle: () ->\r
attr = {style: Pettanr.to_style(@style())}\r
@listenTo(@element, 'active', @active)\r
@listenTo(@element, 'inactive', @inactive)\r
\r
- init_picture: () ->\r
- img = @img\r
+ init_picture: (img) ->\r
+ super(img)\r
wrapper = this\r
this.$el.draggable {\r
stop: (event, ui) ->\r
elm.trigger('move')\r
}\r
elm = @element\r
- @img.$el.resizable {\r
+ img.$el.resizable {\r
stop: (event, ui) ->\r
resize_div = ui.element\r
panel_picture_div = wrapper.$el\r
@trigger('ready', new_item)\r
else if @target_model.is_traceable(item.item_name())\r
# Trace\r
- tracer_class = @target_model['TraceFrom' + item.singular()]\r
- tracer = new tracer_class()\r
- @listenTo(tracer, 'trace', @trace)\r
- tracer.trace(item)\r
+ item.trace_to(item.my_class().pick_item_name(), this, {\r
+ success: (resource_picture) => \r
+ @dialog.http_get(resource_picture.show_url())\r
+ })\r
else if item.item_name() == @target_model.pick_item_name()\r
# Pick resource_picture to panel_picture\r
@listenTo(this, 'ready', @ready)\r
@dialog.stop()\r
@trigger('pick', new_item)\r
\r
- trace: (resource_picture) ->\r
- @dialog.http_get(resource_picture.show_url())\r
- \r
dock: () ->\r
@parent.dock()\r
\r
continue_list = Locmare.ListGroup.list(\r
@list.list_group_name, @list.list_name, params\r
)\r
- continue_list.open(() =>\r
- _.each continue_list.items(), (scroll_panel) =>\r
- @items.push(scroll_panel)\r
- @panels.append_scroll_panel(scroll_panel)\r
- @list = continue_list\r
- continue_pager = Locmare.ListGroupModule.LibModule.PlayPager.factory(@list.page_status, params)\r
- @listenTo(continue_pager, 'page', @continue)\r
- @pager.$el.replaceWith(continue_pager.render().el)\r
- @pager = continue_pager\r
- if !@pager.hasNextPage()\r
- @appender.enable()\r
- )\r
+ continue_list.open(this, {\r
+ success: (next_page_items) =>\r
+ _.each next_page_items, (scroll_panel) =>\r
+ @items.push(scroll_panel)\r
+ @panels.append_scroll_panel(scroll_panel)\r
+ @list = continue_list\r
+ continue_pager = Locmare.ListGroupModule.LibModule.PlayPager.factory(@list.page_status, params)\r
+ @listenTo(continue_pager, 'page', @continue)\r
+ @pager.$el.replaceWith(continue_pager.render().el)\r
+ @pager = continue_pager\r
+ if !@pager.hasNextPage()\r
+ @appender.enable()\r
+ })\r
\r
class Pettanr.Views.Scroll.Play extends Pettanr.View\r
tagName: 'div'\r
if item.item_name() == @target_model.item_name()\r
# Inspire\r
@listenTo(this, 'ready', @ready)\r
- balloon_list = item.has_one('balloon')\r
- speech_list = item.has_one('speech')\r
- balloon_list.open(() =>\r
- balloon = balloon_list.items()[0]\r
- speech_list.open(() =>\r
- speech = speech_list.items()[0]\r
- new_item = new @target_model(item.attributes)\r
- new_item.unset('id', {silent: true})\r
- new_item.set({panel_id: @editor().item.get('id')}, {silent: true})\r
- balloon.unset('id', {silent: true})\r
- balloon.unset('speech_balloon_id', {silent: true})\r
- speech.unset('id', {silent: true})\r
- speech.unset('speech_balloon_id', {silent: true})\r
- new_item.boosts 'post'\r
- balloon.boosts 'post'\r
- speech.boosts 'post'\r
- new_item.set({balloon: balloon, speech: speech}, {silent: true})\r
- @trigger('ready', new_item)\r
- )\r
- )\r
+ item.get_child('balloon', this, {\r
+ success: (balloon) =>\r
+ item.get_child('speech', this, {\r
+ success: (speech) =>\r
+ new_item = new @target_model(item.attributes)\r
+ new_item.unset('id', {silent: true})\r
+ new_item.set({panel_id: @editor().item.get('id')}, {silent: true})\r
+ balloon.unset('id', {silent: true})\r
+ balloon.unset('speech_balloon_id', {silent: true})\r
+ speech.unset('id', {silent: true})\r
+ speech.unset('speech_balloon_id', {silent: true})\r
+ new_item.boosts 'post'\r
+ balloon.boosts 'post'\r
+ speech.boosts 'post'\r
+ new_item.set({balloon: balloon, speech: speech}, {silent: true})\r
+ @trigger('ready', new_item)\r
+ })\r
+ })\r
else if @target_model.is_traceable(item.item_name())\r
# Trace\r
- tracer_class = @target_model['TraceFrom' + item.singular()]\r
- tracer = new tracer_class()\r
- @listenTo(tracer, 'trace', @trace)\r
- tracer.trace(item)\r
+ item.trace_to(item.my_class().pick_item_name(), this, {\r
+ success: (pick_item) => \r
+ @dialog.http_get(pick_item.show_url())\r
+ })\r
else if item.item_name() == @target_model.pick_item_name()\r
# Pick\r
@listenTo(this, 'ready', @ready)\r
writing_format_list = Locmare.ListGroup.list(\r
'writing_formats', 'index', {}\r
)\r
- writing_format_list.open(() =>\r
- writing_format = writing_format_list.items()[0]\r
- templates = {\r
- speech_balloon_template: speech_balloon_template,\r
- writing_format: writing_format\r
- }\r
- new_item = new @target_model()\r
- new_item.templates = templates\r
- new_item.set(new_item.pick(), {silent: true})\r
- new_item.boosts 'post'\r
- new_item.supply_default()\r
- # prepare balloon\r
- balloon = new Pettanr.Balloon()\r
- balloon.templates = templates\r
- balloon.set(balloon.pick(), {silent: true})\r
- balloon.boosts 'post'\r
- balloon.supply_default()\r
- # prepare speech\r
- speech = new Pettanr.Speech()\r
- speech.templates = templates\r
- speech.set(speech.pick(), {silent: true})\r
- speech.boosts 'post'\r
- speech.supply_default()\r
- # join elements\r
- new_item.set({balloon: balloon, speech: speech}, {silent: true})\r
- @trigger('ready', new_item)\r
- )\r
+ writing_format_list.open(this, {\r
+ success: (writing_formats) => \r
+ writing_format = writing_formats[0]\r
+ templates = {\r
+ speech_balloon_template: speech_balloon_template,\r
+ writing_format: writing_format\r
+ }\r
+ new_item = new @target_model()\r
+ new_item.templates = templates\r
+ new_item.set(new_item.pick(), {silent: true})\r
+ new_item.boosts 'post'\r
+ new_item.supply_default()\r
+ # prepare balloon\r
+ balloon = new Pettanr.Balloon()\r
+ balloon.templates = templates\r
+ balloon.set(balloon.pick(), {silent: true})\r
+ balloon.boosts 'post'\r
+ balloon.supply_default()\r
+ # prepare speech\r
+ speech = new Pettanr.Speech()\r
+ speech.templates = templates\r
+ speech.set(speech.pick(), {silent: true})\r
+ speech.boosts 'post'\r
+ speech.supply_default()\r
+ # join elements\r
+ new_item.set({balloon: balloon, speech: speech}, {silent: true})\r
+ @trigger('ready', new_item)\r
+ })\r
\r
ready: (new_item) ->\r
@dialog.stop()\r
@trigger('pick', new_item)\r
\r
- trace: (speech_balloon) ->\r
- @dialog.http_get(speech_balloon.show_url())\r
- \r
dock: () ->\r
@parent.dock()\r
\r
list = Locmare.ListGroup.list(\r
'folders', 'index', params\r
)\r
- list.open(() =>\r
- if !_.isEmpty(list.items())\r
- @mydoc = list.items()[0]\r
- @add_mydoc()\r
- @create()\r
- )\r
+ list.open(this, {\r
+ success: (items) => \r
+ if !_.isEmpty(list.items())\r
+ @mydoc = list.items()[0]\r
+ @add_mydoc()\r
+ @create()\r
+ })\r
\r
create: () ->\r
params = {\r
list = Locmare.ListGroup.list(\r
'folders', 'index', params\r
)\r
- list.open(() =>\r
- if !_.isEmpty(list.items())\r
- @mynew = list.items()[0]\r
- @add_mynew()\r
- )\r
+ list.open(this, {\r
+ success: (items) => \r
+ if !_.isEmpty(list.items())\r
+ @mynew = list.items()[0]\r
+ @add_mynew()\r
+ })\r
\r
add_mydoc: () ->\r
mydoc_icon = new Pettanr.Views.User.Account.LinkedMydocIcon({item: @mydoc, half: true})\r
belongs_to: {\r
panel: {\r
}, \r
+ picture: {\r
+ }, \r
},\r
has_many: {\r
},\r
belongs_to: {\r
panel: {\r
}, \r
+ picture: {\r
+ }, \r
},\r
has_many: {\r
},\r
}, \r
},\r
has_many: {\r
+ panel_pictures: {\r
+ }, \r
+ ground_pictures: {\r
+ }, \r
},\r
has_one: {\r
resource_picture_picture: {\r
"type": "show"\r
},\r
"history": {\r
- "type": "show"\r
+ "type": "list",\r
+ "args": {}\r
},\r
"new": {\r
"type": "new"\r
"panel_picture": {\r
"associations": {\r
"belongs_to": {\r
- "panel": {}\r
+ "panel": {},\r
+ "picture": {}\r
},\r
"has_many": {}\r
},\r
"ground_picture": {\r
"associations": {\r
"belongs_to": {\r
- "panel": {}\r
+ "panel": {},\r
+ "picture": {}\r
},\r
"has_many": {}\r
},\r
"artist": {},\r
"system_picture": {}\r
},\r
- "has_many": {},\r
+ "has_many": {\r
+ "panel_pictures": {},\r
+ "ground_pictures": {}\r
+ },\r
"has_one": {\r
"resource_picture_picture": {}\r
}\r