From 160cfe90adb0a44dd3cdc02962cb5326d2a11585 Mon Sep 17 00:00:00 2001 From: yasushiito Date: Sun, 7 Sep 2014 19:03:18 +0900 Subject: [PATCH] fix profiler --- .../addons/circle_speech_balloons/init.js.coffee | 189 +++++++++++++++++++++ .../init.js.coffee | 132 ++++++++++++++ .../init.js.coffee | 132 ++++++++++++++ .../init.js.coffee | 132 ++++++++++++++ .../init.js.coffee | 132 ++++++++++++++ .../init.js.coffee | 132 ++++++++++++++ .../addons/pettanr_simple_format/init.js.coffee | 17 ++ .../pettanr_unknown_v01_licenses/init.js.coffee | 132 ++++++++++++++ .../addons/plain_speech_balloons/init.js.coffee | 183 ++++++++++++++++++++ .../addons/square_speech_balloons/init.js.coffee | 183 ++++++++++++++++++++ app/assets/javascripts/ap.js | 12 ++ .../javascripts/controllers/artists.js.coffee | 22 ++- .../javascripts/controllers/authors.js.coffee | 22 +++ .../javascripts/controllers/balloons.js.coffee | 28 +++ .../controllers/comic_stories.js.coffee | 31 ++++ .../javascripts/controllers/comics.js.coffee | 28 +++ .../controllers/ground_colors.js.coffee | 28 +++ .../controllers/ground_pictures.js.coffee | 28 +++ app/assets/javascripts/controllers/home.js.coffee | 18 ++ .../controllers/license_groups.js.coffee | 22 +++ .../javascripts/controllers/licenses.js.coffee | 28 +++ .../controllers/original_pictures.js.coffee | 25 +++ .../controllers/panel_pictures.js.coffee | 28 +++ .../javascripts/controllers/panels.js.coffee | 34 ++++ .../javascripts/controllers/pictures.js.coffee | 13 ++ .../controllers/resource_pictures.js.coffee | 19 +++ .../controllers/scroll_panels.js.coffee | 31 ++++ .../javascripts/controllers/scrolls.js.coffee | 14 +- .../javascripts/controllers/sheet_panels.js.coffee | 31 ++++ .../javascripts/controllers/sheets.js.coffee | 31 ++++ .../controllers/speech_balloon_templates.js.coffee | 28 +++ .../controllers/speech_balloons.js.coffee | 31 ++++ .../javascripts/controllers/speeches.js.coffee | 28 +++ .../javascripts/controllers/stories.js.coffee | 31 ++++ .../javascripts/controllers/story_sheets.js.coffee | 31 ++++ .../controllers/system_pictures.js.coffee | 22 +++ .../controllers/writing_formats.js.coffee | 25 +++ app/assets/javascripts/locmare/booster.js.coffee | 98 +++++++++++ .../javascripts/locmare/filer/header.js.coffee | 2 +- app/assets/javascripts/locmare/profiler.js.coffee | 2 +- .../locmare/profiler/association.js.coffee | 3 +- .../locmare/profiler/column/base.js.coffee | 26 +-- .../profiler/column/extend/extend_column.js.coffee | 42 ++++- .../javascripts/manifest/item/boost.js.coffee | 24 +++ app/assets/javascripts/models/balloon.js.coffee | 2 +- .../javascripts/models/comic_story.js.coffee | 2 + .../javascripts/models/ground_color.js.coffee | 2 + app/assets/javascripts/models/panel.js.coffee | 1 + app/assets/javascripts/models/sheet.js.coffee | 2 + .../javascripts/models/sheet_panel.js.coffee | 2 + app/assets/javascripts/models/story.js.coffee | 2 + .../javascripts/models/story_sheet.js.coffee | 2 + .../javascripts/models/writing_format.js.coffee | 2 + app/assets/javascripts/peta/item.js.coffee | 6 +- .../javascripts/peta/system_resource.js.coffee | 4 + app/assets/javascripts/pettanr.js.coffee | 2 +- app/assets/javascripts/routes.js.coffee | 8 + .../views/comic_stories/summary.js.coffee | 10 ++ .../javascripts/work/controllers.js.coffee.erb | 35 ++++ .../javascripts/work/list_groups.js.coffee.erb | 3 + app/controllers/balloons_controller.rb | 6 +- app/controllers/comic_stories_controller.rb | 2 +- app/controllers/home_controller.rb | 30 +++- app/controllers/scroll_panels_controller.rb | 2 +- app/controllers/speeches_controller.rb | 6 +- app/controllers/writing_formats_controller.rb | 14 +- app/models/balloon.rb | 4 +- app/models/folder.rb | 2 +- app/models/panel_picture.rb | 4 +- app/models/speech.rb | 4 +- app/views/top/index.html.erb | 4 + config/locales/pettanr.ja.yml | 24 +-- config/routes.rb | 2 + public/local_manifest.json | 4 + public/manifest.json | 23 +++ 75 files changed, 2406 insertions(+), 60 deletions(-) create mode 100644 app/assets/javascripts/addons/circle_speech_balloons/init.js.coffee create mode 100644 app/assets/javascripts/addons/pettanr_creative_commons_v30_licenses/init.js.coffee create mode 100644 app/assets/javascripts/addons/pettanr_pettan_commons_v01_licenses/init.js.coffee create mode 100644 app/assets/javascripts/addons/pettanr_pettan_protected_v01_licenses/init.js.coffee create mode 100644 app/assets/javascripts/addons/pettanr_pettan_public_v01_licenses/init.js.coffee create mode 100644 app/assets/javascripts/addons/pettanr_public_domain_v01_licenses/init.js.coffee create mode 100644 app/assets/javascripts/addons/pettanr_simple_format/init.js.coffee create mode 100644 app/assets/javascripts/addons/pettanr_unknown_v01_licenses/init.js.coffee create mode 100644 app/assets/javascripts/addons/plain_speech_balloons/init.js.coffee create mode 100644 app/assets/javascripts/addons/square_speech_balloons/init.js.coffee create mode 100644 app/assets/javascripts/locmare/booster.js.coffee create mode 100644 app/assets/javascripts/views/comic_stories/summary.js.coffee diff --git a/app/assets/javascripts/addons/circle_speech_balloons/init.js.coffee b/app/assets/javascripts/addons/circle_speech_balloons/init.js.coffee new file mode 100644 index 00000000..fa2fe9cc --- /dev/null +++ b/app/assets/javascripts/addons/circle_speech_balloons/init.js.coffee @@ -0,0 +1,189 @@ +class Pettanr.CircleSpeechBalloon + +class Pettanr.CircleSpeechBalloon.SpeechBalloon extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "circle_speech_balloons" + + baseName: () -> + "CircleSpeechBalloon" + + item_name: () -> + @base_name() + '/speech_balloon' + + table_name: () -> + @base_name() + '/speech_balloons' + + singular: () -> + @baseName() + '/SpeechBalloon' + + plural: () -> + @baseName() + '/SpeechBalloons' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/speech_balloons' + +class Pettanr.CircleSpeechBalloon.Balloon extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "circle_speech_balloons" + + baseName: () -> + "CircleSpeechBalloon" + + item_name: () -> + @base_name() + '/balloon' + + table_name: () -> + @base_name() + '/balloons' + + singular: () -> + @baseName() + '/Balloon' + + plural: () -> + @baseName() + '/Balloons' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/balloons' + +class Pettanr.CircleSpeechBalloon.Speech extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "circle_speech_balloons" + + baseName: () -> + "CircleSpeechBalloon" + + item_name: () -> + @base_name() + '/speech' + + table_name: () -> + @base_name() + '/speeches' + + singular: () -> + @baseName() + '/Speech' + + plural: () -> + @baseName() + '/Speeches' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/speeches' + +class Pettanr.CircleSpeechBalloon.SpeechBalloonModule + supply_default: () -> + super() + _this = this + sbt = @speech_balloon_template() + sbt.fetch().done -> + _this.speech_balloon_template_module_name = sbt.get('module_name') + + speech_balloon_extend: () -> + @new_speech_balloon() if not @sbex + @sbex + + speech_balloon_extend_setter: (params) -> + # load attributes + @sbex = new Pettanr.CircleSpeechBalloon.SpeechBalloon(params) + # no supply default params + + new_speech_balloon: (params = {}) -> + @sbex = new Pettanr.CircleSpeechBalloon.SpeechBalloon(params) + @sbex.supply_default() + +class Pettanr.CircleSpeechBalloon.BalloonModule + supply_default: () -> + super() + s = @parsed_settings()['all']['balloon'] + @set({ + x: 0, + y: 0, + width: @parsed_settings()['speech_balloon']['default_width'], + eight: @parsed_settings()['speech_balloon']['default_height'], + r: @parsed_settings()['speech_balloon']['default_r'] + }) + + balloon_extend: () -> + @new_balloon() if not @bex + @bex + + balloon_extend_setter: (params) -> + # load attributes + @bex = new Pettanr.CircleSpeechBalloon.Balloon(params) + # no supply default params + + new_balloon: (params = {}) -> + @bex = new Pettanr.CircleSpeechBalloon.Balloon(params) + @bex.supply_default() + + parsed_settings: () -> + return @parsed if @parsed + _this = this + sbt = @speech_balloon_template() + sbt.fetch().done -> + _this.parsed = sbt.parsed_settings() + + select_system_picture: () -> + tr = @get('r') % 360 + tr = 360 + tr if tr < 0 + offset = @r_step() / 2.0 + idx = Pettanr.to_i(((tr + offset) % 360) / @r_step()) + sid = @parsed_settings()[Pettanr.to_s(idx)]['balloon']['system_picture_id'] + @set('system_picture_id', sid) + sid + + r_step: () -> + @parsed_settings()['speech_balloon']['r_step'] + +class Pettanr.CircleSpeechBalloon.SpeechModule + supply_default: () -> + super() + s = @parsed_settings()['0']['speech'] + @set({ + x: s['x_rate'], + y: s['y_rate'], + width: s['width_rate'], + height: s['height_rate'], + quotes: '', + font_size: @parsed_settings()['speech_balloon']['default_font_size'], + text_align: @parsed_settings()['speech_balloon']['default_text_align'], + fore_color: @parsed_settings()['speech_balloon']['default_fore_color'], + }) + + speech_extend: () -> + @sex + + speech_extend_setter: (params) -> + # load attributes + @sex = new Pettanr.CircleSpeechBalloon.Speech(params) + # no supply default params + + new_speech: (params = {}) -> + @sex = new Pettanr.CircleSpeechBalloon.Speech(params) + @sex.supply_default() + + parsed_settings: () -> + return @parsed if @parsed + _this = this + sbt = @speech_balloon_template() + sbt.fetch().done -> + _this.parsed = sbt.parsed_settings() + + arrayed_quotes: () -> + q = if Pettanr.is_blank(@get('quotes')) + Pettanr.to_s(@parsed_settings()['speech_balloon']['quotes']) + else + @get('quotes') + q.split(' ') + diff --git a/app/assets/javascripts/addons/pettanr_creative_commons_v30_licenses/init.js.coffee b/app/assets/javascripts/addons/pettanr_creative_commons_v30_licenses/init.js.coffee new file mode 100644 index 00000000..744c17cd --- /dev/null +++ b/app/assets/javascripts/addons/pettanr_creative_commons_v30_licenses/init.js.coffee @@ -0,0 +1,132 @@ +class Pettanr.PettanrCreativeCommonsV30Licenses + new_attribute: (params = {}) -> + new PettanrCreativeCommonsV30Licenses.Attribute(params) + +class Pettanr.PettanrCreativeCommonsV30Licenses.License extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_creative_commons_v30_licenses" + + baseName: () -> + "PettanrCreativeCommonsV30Licenses" + + item_name: () -> + @base_name() + '/license' + + table_name: () -> + @base_name() + '/licenses' + + singular: () -> + @baseName() + '/License' + + plural: () -> + @baseName() + '/Licenses' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/licenses' + +class Pettanr.PettanrCreativeCommonsV30Licenses.CreditPicture extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_creative_commons_v30_licenses" + + baseName: () -> + "PettanrCreativeCommonsV30Licenses" + + item_name: () -> + @base_name() + '/credit_picture' + + table_name: () -> + @base_name() + '/credit_pictures' + + singular: () -> + @baseName() + '/CreditPicture' + + plural: () -> + @baseName() + '/CreditPictures' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/credit_pictures' + +class Pettanr.PettanrCreativeCommonsV30Licenses.Attribute extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_creative_commons_v30_licenses" + + baseName: () -> + "PettanrCreativeCommonsV30Licenses" + + item_name: () -> + @base_name() + '/attribute' + + table_name: () -> + @base_name() + '/attributes' + + singular: () -> + @baseName() + '/Attribute' + + plural: () -> + @baseName() + '/Attributes' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/attributes' + +class Pettanr.PettanrCreativeCommonsV30Licenses.LicenseModule + supply_default: () -> + super() + @license_group_classname = @license_group.get('classname') + + license_extend: () -> + @new_license() if not @lex + @lex + + license_extend_setter: (params) -> + # load attributes + @lex = new Pettanr.PettanrCreativeCommonsV30Licenses.License(params) + # no supply default params + + new_license: (params = {}) -> + @lex = new Pettanr.PettanrCreativeCommonsV30Licenses.License(params) + @lex.supply_default() + +class Pettanr.PettanrCreativeCommonsV30Licenses.CreditPictureModule + supply_default: () -> + super() + + credit_picture_extend: () -> + @new_credit_picture() if not @crex + @crex + + credit_picture_extend_setter: (params) -> + # load attributes + @crex = new Pettanr.PettanrCreativeCommonsV30Licenses.CreditPicture(params) + # no supply default params + + new_credit_picture: (params = {}) -> + @crex = new Pettanr.PettanrCreativeCommonsV30Licenses.CreditPicture(params) + @crex.supply_default() + +class Pettanr.PettanrCreativeCommonsV30Licenses.AttributeModule + supply_default: () -> + super() + + attribute_extend: () -> + @attrex + + attribute_extend_setter: (params) -> + # load attributes + @attrex = Pettanr.PettanrCreativeCommonsV30Licenses.new_attribute(params) + # no supply default params + diff --git a/app/assets/javascripts/addons/pettanr_pettan_commons_v01_licenses/init.js.coffee b/app/assets/javascripts/addons/pettanr_pettan_commons_v01_licenses/init.js.coffee new file mode 100644 index 00000000..9263d965 --- /dev/null +++ b/app/assets/javascripts/addons/pettanr_pettan_commons_v01_licenses/init.js.coffee @@ -0,0 +1,132 @@ +class Pettanr.PettanrPettanCommonsV01Licenses + new_attribute: (params = {}) -> + new Pettanr.PettanrPettanCommonsV01Licenses.Attribute(params) + +class Pettanr.PettanrPettanCommonsV01Licenses.License extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_pettan_commons_v01_licenses" + + baseName: () -> + "PettanrPettanCommonsV01Licenses" + + item_name: () -> + @base_name() + '/license' + + table_name: () -> + @base_name() + '/licenses' + + singular: () -> + @baseName() + '/License' + + plural: () -> + @baseName() + '/Licenses' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/licenses' + +class Pettanr.PettanrPettanCommonsV01Licenses.CreditPicture extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_pettan_commons_v01_licenses" + + baseName: () -> + "PettanrPettanCommonsV01Licenses" + + item_name: () -> + @base_name() + '/credit_picture' + + table_name: () -> + @base_name() + '/credit_pictures' + + singular: () -> + @baseName() + '/CreditPicture' + + plural: () -> + @baseName() + '/CreditPictures' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/credit_pictures' + +class Pettanr.PettanrPettanCommonsV01Licenses.Attribute extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_pettan_commons_v01_licenses" + + baseName: () -> + "PettanrPettanCommonsV01Licenses" + + item_name: () -> + @base_name() + '/attribute' + + table_name: () -> + @base_name() + '/attributes' + + singular: () -> + @baseName() + '/Attribute' + + plural: () -> + @baseName() + '/Attributes' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/attributes' +class Pettanr.PettanrPettanCommonsV01Licenses.LicenseModule + + supply_default: () -> + super() + @license_group_classname = @license_group.get('classname') + + license_extend: () -> + @new_license() if not @lex + @lex + + license_extend_setter: (params) -> + # load attributes + @lex = new Pettanr.PettanrPettanCommonsV01Licenses.License(params) + # no supply default params + + new_license: (params = {}) -> + @lex = new Pettanr.PettanrPettanCommonsV01Licenses.License(params) + @lex.supply_default() + +class Pettanr.PettanrPettanCommonsV01Licenses.CreditPictureModule + supply_default: () -> + super() + + credit_picture_extend: () -> + @new_credit_picture() if not @crex + @crex + + credit_picture_extend_setter: (params) -> + # load attributes + @crex = new Pettanr.PettanrPettanCommonsV01Licenses.CreditPicture(params) + # no supply default params + + new_credit_picture: (params = {}) -> + @crex = new Pettanr.PettanrPettanCommonsV01Licenses.CreditPicture(params) + @crex.supply_default() + +class Pettanr.PettanrPettanCommonsV01Licenses.AttributeModule + supply_default: () -> + super() + + attribute_extend: () -> + @attrex + + attribute_extend_setter: (params) -> + # load attributes + @attrex = Pettanr.PettanrPettanCommonsV01Licenses.new_attribute(params) + # no supply default params + diff --git a/app/assets/javascripts/addons/pettanr_pettan_protected_v01_licenses/init.js.coffee b/app/assets/javascripts/addons/pettanr_pettan_protected_v01_licenses/init.js.coffee new file mode 100644 index 00000000..ef00c3e2 --- /dev/null +++ b/app/assets/javascripts/addons/pettanr_pettan_protected_v01_licenses/init.js.coffee @@ -0,0 +1,132 @@ +class Pettanr.PettanrPettanProtectedV01Licenses + new_attribute: (params = {}) -> + new Pettanr.PettanrPettanProtectedV01Licenses.Attribute(params) + +class Pettanr.PettanrPettanProtectedV01Licenses.License extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_pettan_protected_v01_licenses" + + baseName: () -> + "PettanrPettanProtectedV01Licenses" + + item_name: () -> + @base_name() + '/license' + + table_name: () -> + @base_name() + '/licenses' + + singular: () -> + @baseName() + '/License' + + plural: () -> + @baseName() + '/Licenses' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/licenses' + +class Pettanr.PettanrPettanProtectedV01Licenses.CreditPicture extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_pettan_protected_v01_licenses" + + baseName: () -> + "PettanrPettanProtectedV01Licenses" + + item_name: () -> + @base_name() + '/credit_picture' + + table_name: () -> + @base_name() + '/credit_pictures' + + singular: () -> + @baseName() + '/CreditPicture' + + plural: () -> + @baseName() + '/CreditPictures' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/credit_pictures' + +class Pettanr.PettanrPettanProtectedV01Licenses.Attribute extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_pettan_protected_v01_licenses" + + baseName: () -> + "PettanrPettanProtectedV01Licenses" + + item_name: () -> + @base_name() + '/attribute' + + table_name: () -> + @base_name() + '/attributes' + + singular: () -> + @baseName() + '/Attribute' + + plural: () -> + @baseName() + '/Attributes' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/attributes' +class Pettanr.PettanrPettanProtectedV01Licenses.LicenseModule + + supply_default: () -> + super() + @license_group_classname = @license_group.get('classname') + + license_extend: () -> + @new_license() if not @lex + @lex + + license_extend_setter: (params) -> + # load attributes + @lex = new Pettanr.PettanrPettanProtectedV01Licenses.License(params) + # no supply default params + + new_license: (params = {}) -> + @lex = new Pettanr.PettanrPettanProtectedV01Licenses.License(params) + @lex.supply_default() + +class Pettanr.PettanrPettanProtectedV01Licenses.CreditPictureModule + supply_default: () -> + super() + + credit_picture_extend: () -> + @new_credit_picture() if not @crex + @crex + + credit_picture_extend_setter: (params) -> + # load attributes + @crex = new Pettanr.PettanrPettanProtectedV01Licenses.CreditPicture(params) + # no supply default params + + new_credit_picture: (params = {}) -> + @crex = new Pettanr.PettanrPettanProtectedV01Licenses.CreditPicture(params) + @crex.supply_default() + +class Pettanr.PettanrPettanProtectedV01Licenses.AttributeModule + supply_default: () -> + super() + + attribute_extend: () -> + @attrex + + attribute_extend_setter: (params) -> + # load attributes + @attrex = Pettanr.PettanrPettanProtectedV01Licenses.new_attribute(params) + # no supply default params + diff --git a/app/assets/javascripts/addons/pettanr_pettan_public_v01_licenses/init.js.coffee b/app/assets/javascripts/addons/pettanr_pettan_public_v01_licenses/init.js.coffee new file mode 100644 index 00000000..9fb4dcb8 --- /dev/null +++ b/app/assets/javascripts/addons/pettanr_pettan_public_v01_licenses/init.js.coffee @@ -0,0 +1,132 @@ +class Pettanr.PettanrPettanPublicV01Licenses + new_attribute: (params = {}) -> + new Pettanr.PettanrPettanPublicV01Licenses.Attribute(params) + +class Pettanr.PettanrPettanPublicV01Licenses.License extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_pettan_public_v01_licenses" + + baseName: () -> + "PettanrPettanPublicV01Licenses" + + item_name: () -> + @base_name() + '/license' + + table_name: () -> + @base_name() + '/licenses' + + singular: () -> + @baseName() + '/License' + + plural: () -> + @baseName() + '/Licenses' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/licenses' + +class Pettanr.PettanrPettanPublicV01Licenses.CreditPicture extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_pettan_public_v01_licenses" + + baseName: () -> + "PettanrPettanPublicV01Licenses" + + item_name: () -> + @base_name() + '/credit_picture' + + table_name: () -> + @base_name() + '/credit_pictures' + + singular: () -> + @baseName() + '/CreditPicture' + + plural: () -> + @baseName() + '/CreditPictures' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/credit_pictures' + +class Pettanr.PettanrPettanPublicV01Licenses.Attribute extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_pettan_public_v01_licenses" + + baseName: () -> + "PettanrPettanPublicV01Licenses" + + item_name: () -> + @base_name() + '/attribute' + + table_name: () -> + @base_name() + '/attributes' + + singular: () -> + @baseName() + '/Attribute' + + plural: () -> + @baseName() + '/Attributes' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/attributes' +class Pettanr.PettanrPettanPublicV01Licenses.LicenseModule + + supply_default: () -> + super() + @license_group_classname = @license_group.get('classname') + + license_extend: () -> + @new_license() if not @lex + @lex + + license_extend_setter: (params) -> + # load attributes + @lex = new Pettanr.PettanrPettanPublicV01Licenses.License(params) + # no supply default params + + new_license: (params = {}) -> + @lex = new Pettanr.PettanrPettanPublicV01Licenses.License(params) + @lex.supply_default() + +class Pettanr.PettanrPettanPublicV01Licenses.CreditPictureModule + supply_default: () -> + super() + + credit_picture_extend: () -> + @new_credit_picture() if not @crex + @crex + + credit_picture_extend_setter: (params) -> + # load attributes + @crex = new Pettanr.PettanrPettanPublicV01Licenses.CreditPicture(params) + # no supply default params + + new_credit_picture: (params = {}) -> + @crex = new Pettanr.PettanrPettanPublicV01Licenses.CreditPicture(params) + @crex.supply_default() + +class Pettanr.PettanrPettanPublicV01Licenses.AttributeModule + supply_default: () -> + super() + + attribute_extend: () -> + @attrex + + attribute_extend_setter: (params) -> + # load attributes + @attrex = Pettanr.PettanrPettanPublicV01Licenses.new_attribute(params) + # no supply default params + diff --git a/app/assets/javascripts/addons/pettanr_public_domain_v01_licenses/init.js.coffee b/app/assets/javascripts/addons/pettanr_public_domain_v01_licenses/init.js.coffee new file mode 100644 index 00000000..18356a01 --- /dev/null +++ b/app/assets/javascripts/addons/pettanr_public_domain_v01_licenses/init.js.coffee @@ -0,0 +1,132 @@ +class Pettanr.PettanrPublicDomainV01Licenses + new_attribute: (params = {}) -> + new Pettanr.PettanrPublicDomainV01Licenses.Attribute(params) + +class Pettanr.PettanrPublicDomainV01Licenses.License extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_public_domain_v01_licenses" + + baseName: () -> + "PettanrPublicDomainV01Licenses" + + item_name: () -> + @base_name() + '/license' + + table_name: () -> + @base_name() + '/licenses' + + singular: () -> + @baseName() + '/License' + + plural: () -> + @baseName() + '/Licenses' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/licenses' + +class Pettanr.PettanrPublicDomainV01Licenses.CreditPicture extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_public_domain_v01_licenses" + + baseName: () -> + "PettanrPublicDomainV01Licenses" + + item_name: () -> + @base_name() + '/credit_picture' + + table_name: () -> + @base_name() + '/credit_pictures' + + singular: () -> + @baseName() + '/CreditPicture' + + plural: () -> + @baseName() + '/CreditPictures' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/credit_pictures' + +class Pettanr.PettanrPublicDomainV01Licenses.Attribute extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_public_domain_v01_licenses" + + baseName: () -> + "PettanrPublicDomainV01Licenses" + + item_name: () -> + @base_name() + '/attribute' + + table_name: () -> + @base_name() + '/attributes' + + singular: () -> + @baseName() + '/Attribute' + + plural: () -> + @baseName() + '/Attributes' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/attributes' +class Pettanr.PettanrPublicDomainV01Licenses.LicenseModule + + supply_default: () -> + super() + @license_group_classname = @license_group.get('classname') + + license_extend: () -> + @new_license() if not @lex + @lex + + license_extend_setter: (params) -> + # load attributes + @lex = new Pettanr.PettanrPublicDomainV01Licenses.License(params) + # no supply default params + + new_license: (params = {}) -> + @lex = new Pettanr.PettanrPublicDomainV01Licenses.License(params) + @lex.supply_default() + +class Pettanr.PettanrPublicDomainV01Licenses.CreditPictureModule + supply_default: () -> + super() + + credit_picture_extend: () -> + @new_credit_picture() if not @crex + @crex + + credit_picture_extend_setter: (params) -> + # load attributes + @crex = new Pettanr.PettanrPublicDomainV01Licenses.CreditPicture(params) + # no supply default params + + new_credit_picture: (params = {}) -> + @crex = new Pettanr.PettanrPublicDomainV01Licenses.CreditPicture(params) + @crex.supply_default() + +class Pettanr.PettanrPublicDomainV01Licenses.AttributeModule + supply_default: () -> + super() + + attribute_extend: () -> + @attrex + + attribute_extend_setter: (params) -> + # load attributes + @attrex = Pettanr.PettanrPublicDomainV01Licenses.new_attribute(params) + # no supply default params + diff --git a/app/assets/javascripts/addons/pettanr_simple_format/init.js.coffee b/app/assets/javascripts/addons/pettanr_simple_format/init.js.coffee new file mode 100644 index 00000000..7830e816 --- /dev/null +++ b/app/assets/javascripts/addons/pettanr_simple_format/init.js.coffee @@ -0,0 +1,17 @@ +class Pettanr.PettanrSimpleFormat + +class Pettanr.PettanrSimpleFormat.RendererModule + + @escapeHTML = (t) -> + $("
").text(t).html() + + @render = (content) -> + text = PettanrSimpleFormat.escapeHTML(content) + start_tag = '

' + text = text.replace(/\r\n?/g, "\n") + text = text.replace(/\n\n+/g, "

") + text = text.replace(/\n/g, '\n
') + text = text.replace(/\<\/p\>\/g, "

\n\n

") + text = start_tag + text + "

" + return text + diff --git a/app/assets/javascripts/addons/pettanr_unknown_v01_licenses/init.js.coffee b/app/assets/javascripts/addons/pettanr_unknown_v01_licenses/init.js.coffee new file mode 100644 index 00000000..5a809cea --- /dev/null +++ b/app/assets/javascripts/addons/pettanr_unknown_v01_licenses/init.js.coffee @@ -0,0 +1,132 @@ +class Pettanr.PettanrUnknownV01Licenses + new_attribute: (params = {}) -> + new Pettanr.PettanrUnknownV01Licenses.Attribute(params) + +class Pettanr.PettanrUnknownV01Licenses.License extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_unknown_v01_licenses" + + baseName: () -> + "PettanrUnknownV01Licenses" + + item_name: () -> + @base_name() + '/license' + + table_name: () -> + @base_name() + '/licenses' + + singular: () -> + @baseName() + '/License' + + plural: () -> + @baseName() + '/Licenses' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/licenses' + +class Pettanr.PettanrUnknownV01Licenses.CreditPicture extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_unknown_v01_licenses" + + baseName: () -> + "PettanrUnknownV01Licenses" + + item_name: () -> + @base_name() + '/credit_picture' + + table_name: () -> + @base_name() + '/credit_pictures' + + singular: () -> + @baseName() + '/CreditPicture' + + plural: () -> + @baseName() + '/CreditPictures' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/credit_pictures' + +class Pettanr.PettanrUnknownV01Licenses.Attribute extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "pettanr_unknown_v01_licenses" + + baseName: () -> + "PettanrUnknownV01Licenses" + + item_name: () -> + @base_name() + '/attribute' + + table_name: () -> + @base_name() + '/attributes' + + singular: () -> + @baseName() + '/Attribute' + + plural: () -> + @baseName() + '/Attributes' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/attributes' +class Pettanr.PettanrUnknownV01Licenses.LicenseModule + + supply_default: () -> + super() + @license_group_classname = @license_group.get('classname') + + license_extend: () -> + @new_license() if not @lex + @lex + + license_extend_setter: (params) -> + # load attributes + @lex = new Pettanr.PettanrUnknownV01Licenses.License(params) + # no supply default params + + new_license: (params = {}) -> + @lex = new Pettanr.PettanrUnknownV01Licenses.License(params) + @lex.supply_default() + +class Pettanr.PettanrUnknownV01Licenses.CreditPictureModule + supply_default: () -> + super() + + credit_picture_extend: () -> + @new_credit_picture() if not @crex + @crex + + credit_picture_extend_setter: (params) -> + # load attributes + @crex = new Pettanr.PettanrUnknownV01Licenses.CreditPicture(params) + # no supply default params + + new_credit_picture: (params = {}) -> + @crex = new Pettanr.PettanrUnknownV01Licenses.CreditPicture(params) + @crex.supply_default() + +class Pettanr.PettanrUnknownV01Licenses.AttributeModule + supply_default: () -> + super() + + attribute_extend: () -> + @attrex + + attribute_extend_setter: (params) -> + # load attributes + @attrex = Pettanr.PettanrUnknownV01Licenses.new_attribute(params) + # no supply default params + diff --git a/app/assets/javascripts/addons/plain_speech_balloons/init.js.coffee b/app/assets/javascripts/addons/plain_speech_balloons/init.js.coffee new file mode 100644 index 00000000..4066d753 --- /dev/null +++ b/app/assets/javascripts/addons/plain_speech_balloons/init.js.coffee @@ -0,0 +1,183 @@ +class Pettanr.PlainSpeechBalloon + +class Pettanr.PlainSpeechBalloon.SpeechBalloon extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "plain_speech_balloons" + + baseName: () -> + "PlainSpeechBalloon" + + item_name: () -> + @base_name() + '/speech_balloon' + + table_name: () -> + @base_name() + '/speech_balloons' + + singular: () -> + @baseName() + '/SpeechBalloon' + + plural: () -> + @baseName() + '/SpeechBalloons' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/speech_balloons' + +class Pettanr.PlainSpeechBalloon.Balloon extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "plain_speech_balloons" + + baseName: () -> + "PlainSpeechBalloon" + + item_name: () -> + @base_name() + '/balloon' + + table_name: () -> + @base_name() + '/balloons' + + singular: () -> + @baseName() + '/Balloon' + + plural: () -> + @baseName() + '/Balloons' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/balloons' + +class Pettanr.PlainSpeechBalloon.Speech extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "plain_speech_balloons" + + baseName: () -> + "PlainSpeechBalloon" + + item_name: () -> + @base_name() + '/speech' + + table_name: () -> + @base_name() + '/speeches' + + singular: () -> + @baseName() + '/Speech' + + plural: () -> + @baseName() + '/Speeches' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/speeches' + +class Pettanr.PlainSpeechBalloon.SpeechBalloonModule + supply_default: () -> + super() + _this = this + sbt = @speech_balloon_template() + sbt.fetch().done -> + _this.speech_balloon_template_module_name = sbt.get('module_name') + + speech_balloon_extend: () -> + @new_speech_balloon() if not @sbex + @sbex + + speech_balloon_extend_setter: (params) -> + # load attributes + @sbex = new Pettanr.PlainSpeechBalloon.SpeechBalloon(params) + # no supply default params + + new_speech_balloon: (params = {}) -> + @sbex = new Pettanr.PlainSpeechBalloon.SpeechBalloon(params) + @sbex.supply_default() + +class Pettanr.PlainSpeechBalloon.BalloonModule + supply_default: () -> + super() + s = @parsed_settings()['all']['balloon'] + @set({ + x: 0, + y: 0, + width: @parsed_settings()['speech_balloon']['default_width'], + eight: @parsed_settings()['speech_balloon']['default_height'], + r: 0 + }) + + balloon_extend: () -> + @new_balloon() if not @bex + @bex + + balloon_extend_setter: (params) -> + # load attributes + @bex = new Pettanr.PlainSpeechBalloon.Balloon(params) + # no supply default params + + new_balloon: (params = {}) -> + @bex = new Pettanr.PlainSpeechBalloon.Balloon(params) + @bex.supply_default() + + parsed_settings: () -> + return @parsed if @parsed + _this = this + sbt = @speech_balloon_template() + sbt.fetch().done -> + _this.parsed = sbt.parsed_settings() + + select_system_picture: () -> + s = @parsed_settings()['all']['balloon'] + sid = s['system_picture_id'] + @set('system_picture_id', sid) + sid + +class Pettanr.PlainSpeechBalloon.SpeechModule + supply_default: () -> + super() + s = @parsed_settings()['all']['speech'] + @set({ + x: s['x_rate'], + y: s['y_rate'], + width: s['width_rate'], + height: s['height_rate'], + quotes: '', + font_size: @parsed_settings()['speech_balloon']['default_font_size'], + text_align: @parsed_settings()['speech_balloon']['default_text_align'], + fore_color: @parsed_settings()['speech_balloon']['default_fore_color'], + }) + + speech_extend: () -> + @sex + + speech_extend_setter: (params) -> + # load attributes + @sex = new Pettanr.PlainSpeechBalloon.Speech(params) + # no supply default params + + new_speech: (params = {}) -> + @sex = new Pettanr.PlainSpeechBalloon.Speech(params) + @sex.supply_default() + + parsed_settings: () -> + return @parsed if @parsed + _this = this + sbt = @speech_balloon_template() + sbt.fetch().done -> + _this.parsed = sbt.parsed_settings() + + arrayed_quotes: () -> + q = if Pettanr.is_blank(@get('quotes')) + Pettanr.to_s(@parsed_settings()['speech_balloon']['quotes']) + else + @get('quotes') + q.split(' ') + diff --git a/app/assets/javascripts/addons/square_speech_balloons/init.js.coffee b/app/assets/javascripts/addons/square_speech_balloons/init.js.coffee new file mode 100644 index 00000000..2648db81 --- /dev/null +++ b/app/assets/javascripts/addons/square_speech_balloons/init.js.coffee @@ -0,0 +1,183 @@ +class Pettanr.SquareSpeechBalloon + +class Pettanr.SquareSpeechBalloon.SpeechBalloon extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "square_speech_balloons" + + baseName: () -> + "SquareSpeechBalloon" + + item_name: () -> + @base_name() + '/speech_balloon' + + table_name: () -> + @base_name() + '/speech_balloons' + + singular: () -> + @baseName() + '/SpeechBalloon' + + plural: () -> + @baseName() + '/SpeechBalloons' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/speech_balloons' + +class Pettanr.SquareSpeechBalloon.Balloon extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "square_speech_balloons" + + baseName: () -> + "SquareSpeechBalloon" + + item_name: () -> + @base_name() + '/balloon' + + table_name: () -> + @base_name() + '/balloons' + + singular: () -> + @baseName() + '/Balloon' + + plural: () -> + @baseName() + '/Balloons' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/balloons' + +class Pettanr.SquareSpeechBalloon.Speech extends Backbone.Model + # OMG... this model is not petanized item + # it means that can't change name + base_name: () -> + "square_speech_balloons" + + baseName: () -> + "SquareSpeechBalloon" + + item_name: () -> + @base_name() + '/speech' + + table_name: () -> + @base_name() + '/speeches' + + singular: () -> + @baseName() + '/Speech' + + plural: () -> + @baseName() + '/Speeches' + + engine_name: () -> + @table_name() + + form_name: () -> + @engine_name() + '/speeches' + +class Pettanr.SquareSpeechBalloon.SpeechBalloonModule + supply_default: () -> + super() + _this = this + sbt = @speech_balloon_template() + sbt.fetch().done -> + _this.speech_balloon_template_module_name = sbt.get('module_name') + + speech_balloon_extend: () -> + @new_speech_balloon() if not @sbex + @sbex + + speech_balloon_extend_setter: (params) -> + # load attributes + @sbex = new Pettanr.SquareSpeechBalloon.SpeechBalloon(params) + # no supply default params + + new_speech_balloon: (params = {}) -> + @sbex = new Pettanr.SquareSpeechBalloon.SpeechBalloon(params) + @sbex.supply_default() + +class Pettanr.SquareSpeechBalloon.BalloonModule + supply_default: () -> + super() + s = @parsed_settings()['all']['balloon'] + @set({ + x: 0, + y: 0, + width: @parsed_settings()['speech_balloon']['default_width'], + eight: @parsed_settings()['speech_balloon']['default_height'], + r: 0 + }) + + balloon_extend: () -> + @new_balloon() if not @bex + @bex + + balloon_extend_setter: (params) -> + # load attributes + @bex = new Pettanr.SquareSpeechBalloon.Balloon(params) + # no supply default params + + new_balloon: (params = {}) -> + @bex = new Pettanr.SquareSpeechBalloon.Balloon(params) + @bex.supply_default() + + parsed_settings: () -> + return @parsed if @parsed + _this = this + sbt = @speech_balloon_template() + sbt.fetch().done -> + _this.parsed = sbt.parsed_settings() + + select_system_picture: () -> + s = @parsed_settings()['all']['balloon'] + sid = s['system_picture_id'] + @set('system_picture_id', sid) + sid + +class Pettanr.SquareSpeechBalloon.SpeechModule + supply_default: () -> + super() + s = @parsed_settings()['all']['speech'] + @set({ + x: s['x_rate'], + y: s['y_rate'], + width: s['width_rate'], + height: s['height_rate'], + quotes: '', + font_size: @parsed_settings()['speech_balloon']['default_font_size'], + text_align: @parsed_settings()['speech_balloon']['default_text_align'], + fore_color: @parsed_settings()['speech_balloon']['default_fore_color'] + }) + + speech_extend: () -> + @sex + + speech_extend_setter: (params) -> + # load attributes + @sex = new Pettanr.SquareSpeechBalloon.Speech(params) + # no supply default params + + new_speech: (params = {}) -> + @sex = new Pettanr.SquareSpeechBalloon.Speech(params) + @sex.supply_default() + + parsed_settings: () -> + return @parsed if @parsed + _this = this + sbt = @speech_balloon_template() + sbt.fetch().done -> + _this.parsed = sbt.parsed_settings() + + arrayed_quotes: () -> + q = if Pettanr.is_blank(@get('quotes')) + Pettanr.to_s(@parsed_settings()['speech_balloon']['quotes']) + else + @get('quotes') + q.split(' ') + diff --git a/app/assets/javascripts/ap.js b/app/assets/javascripts/ap.js index a91618a7..b399adb1 100644 --- a/app/assets/javascripts/ap.js +++ b/app/assets/javascripts/ap.js @@ -154,6 +154,7 @@ //= require ./local_manifest/bucket/member //= require ./local_manifest/bucket/form_field_name //= require ./locmare/locmare +//= require ./locmare/booster //= require ./locmare/filer //= require ./locmare/filer/header //= require ./locmare/filer/body @@ -248,6 +249,7 @@ //= require_directory ./views/authors //= require_directory ./views/balloons //= require_directory ./views/comics +//= require_directory ./views/comic_stories //= require_directory ./views/ground_colors //= require_directory ./views/ground_pictures //= require_directory ./views/licenses @@ -267,6 +269,16 @@ //= require_directory ./views/stories //= require_directory ./views/story_sheets //= require_directory ./views/system_pictures +//= require_directory ./addons/pettanr_creative_commons_v30_licenses +//= require_directory ./addons/pettanr_pettan_commons_v01_licenses +//= require_directory ./addons/pettanr_pettan_protected_v01_licenses +//= require_directory ./addons/pettanr_pettan_public_v01_licenses +//= require_directory ./addons/pettanr_public_domain_v01_licenses +//= require_directory ./addons/pettanr_unknown_v01_licenses +//= require_directory ./addons/circle_speech_balloons +//= require_directory ./addons/plain_speech_balloons +//= require_directory ./addons/square_speech_balloons +//= require_directory ./addons/pettanr_simple_format //= require ./pettanr/tags //= require ./pettanr/picture //= require ./pettanr/pettan_imager diff --git a/app/assets/javascripts/controllers/artists.js.coffee b/app/assets/javascripts/controllers/artists.js.coffee index 37b7bc19..07f9ded7 100644 --- a/app/assets/javascripts/controllers/artists.js.coffee +++ b/app/assets/javascripts/controllers/artists.js.coffee @@ -3,17 +3,25 @@ class Pettanr.ArtistsController extends Pettanr.AppController index: () -> @filer_list() - show: (params) -> + show_html: () -> - count: (params) -> + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() - new: (params) -> + count: () -> - edit: (params) -> + new: () -> - create: (params) -> + edit: () -> - update: (params) -> + create: () -> - destroy: (params) -> + update: () -> + + destroy: () -> diff --git a/app/assets/javascripts/controllers/authors.js.coffee b/app/assets/javascripts/controllers/authors.js.coffee index 7924cedf..4840e931 100644 --- a/app/assets/javascripts/controllers/authors.js.coffee +++ b/app/assets/javascripts/controllers/authors.js.coffee @@ -3,3 +3,25 @@ class Pettanr.AuthorsController extends Pettanr.AppController index: () -> @filer_list() + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/balloons.js.coffee b/app/assets/javascripts/controllers/balloons.js.coffee index 475389df..84152ead 100644 --- a/app/assets/javascripts/controllers/balloons.js.coffee +++ b/app/assets/javascripts/controllers/balloons.js.coffee @@ -3,3 +3,31 @@ class Pettanr.BalloonsController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_speech_balloon: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/comic_stories.js.coffee b/app/assets/javascripts/controllers/comic_stories.js.coffee index 600f07a7..1924c8b0 100644 --- a/app/assets/javascripts/controllers/comic_stories.js.coffee +++ b/app/assets/javascripts/controllers/comic_stories.js.coffee @@ -3,3 +3,34 @@ class Pettanr.ComicStoriesController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_comic: () -> + @filer_list() + + by_story: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/comics.js.coffee b/app/assets/javascripts/controllers/comics.js.coffee index 1a26b9a1..4a2df842 100644 --- a/app/assets/javascripts/controllers/comics.js.coffee +++ b/app/assets/javascripts/controllers/comics.js.coffee @@ -3,3 +3,31 @@ class Pettanr.ComicsController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_story: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/ground_colors.js.coffee b/app/assets/javascripts/controllers/ground_colors.js.coffee index 41b74afa..26d74f7a 100644 --- a/app/assets/javascripts/controllers/ground_colors.js.coffee +++ b/app/assets/javascripts/controllers/ground_colors.js.coffee @@ -3,3 +3,31 @@ class Pettanr.GroundColorsController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_panel: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/ground_pictures.js.coffee b/app/assets/javascripts/controllers/ground_pictures.js.coffee index 2a0cd99e..0713ca09 100644 --- a/app/assets/javascripts/controllers/ground_pictures.js.coffee +++ b/app/assets/javascripts/controllers/ground_pictures.js.coffee @@ -3,3 +3,31 @@ class Pettanr.GroundPicturesController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_panel: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/home.js.coffee b/app/assets/javascripts/controllers/home.js.coffee index 6695b38c..05501429 100644 --- a/app/assets/javascripts/controllers/home.js.coffee +++ b/app/assets/javascripts/controllers/home.js.coffee @@ -12,6 +12,9 @@ class Pettanr.HomeController extends Pettanr.AppController comics: () -> @filer_list() + comic_stories: () -> + @filer_list() + stories: () -> @filer_list() @@ -33,6 +36,12 @@ class Pettanr.HomeController extends Pettanr.AppController speech_balloons: () -> @filer_list() + balloons: () -> + @filer_list() + + speeches: () -> + @filer_list() + ground_pictures: () -> @filer_list() @@ -51,6 +60,9 @@ class Pettanr.HomeController extends Pettanr.AppController comics_count: () -> @list_count() + comic_stories_count: () -> + @list_count() + stories_count: () -> @list_count() @@ -72,6 +84,12 @@ class Pettanr.HomeController extends Pettanr.AppController speech_balloons_count: () -> @list_count() + balloons_count: () -> + @list_count() + + speeches_count: () -> + @list_count() + ground_pictures_count: () -> @list_count() diff --git a/app/assets/javascripts/controllers/license_groups.js.coffee b/app/assets/javascripts/controllers/license_groups.js.coffee index 12e62c90..cb2d47d0 100644 --- a/app/assets/javascripts/controllers/license_groups.js.coffee +++ b/app/assets/javascripts/controllers/license_groups.js.coffee @@ -3,3 +3,25 @@ class Pettanr.LicenseGroupsController extends Pettanr.AppController index: () -> @filer_list() + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/licenses.js.coffee b/app/assets/javascripts/controllers/licenses.js.coffee index cafc562b..31532291 100644 --- a/app/assets/javascripts/controllers/licenses.js.coffee +++ b/app/assets/javascripts/controllers/licenses.js.coffee @@ -3,3 +3,31 @@ class Pettanr.LicensesController extends Pettanr.AppController index: () -> @filer_list() + by_icense_group: () -> + @filer_list() + + by_system_picture: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/original_pictures.js.coffee b/app/assets/javascripts/controllers/original_pictures.js.coffee index f5140c04..cd548238 100644 --- a/app/assets/javascripts/controllers/original_pictures.js.coffee +++ b/app/assets/javascripts/controllers/original_pictures.js.coffee @@ -3,3 +3,28 @@ class Pettanr.OriginalPicturesController extends Pettanr.AppController index: () -> @filer_list() + history: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/panel_pictures.js.coffee b/app/assets/javascripts/controllers/panel_pictures.js.coffee index ed002292..6a4d0df4 100644 --- a/app/assets/javascripts/controllers/panel_pictures.js.coffee +++ b/app/assets/javascripts/controllers/panel_pictures.js.coffee @@ -3,3 +3,31 @@ class Pettanr.PanelPicturesController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_panel: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/panels.js.coffee b/app/assets/javascripts/controllers/panels.js.coffee index 9bca9e59..5e50281f 100644 --- a/app/assets/javascripts/controllers/panels.js.coffee +++ b/app/assets/javascripts/controllers/panels.js.coffee @@ -3,3 +3,37 @@ class Pettanr.PanelsController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_scroll: () -> + @filer_list() + + by_sheet: () -> + @filer_list() + + by_speech_balloon_template: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/pictures.js.coffee b/app/assets/javascripts/controllers/pictures.js.coffee index 71c9860a..3e74e33c 100644 --- a/app/assets/javascripts/controllers/pictures.js.coffee +++ b/app/assets/javascripts/controllers/pictures.js.coffee @@ -3,3 +3,16 @@ class Pettanr.PicturesController extends Pettanr.AppController index: () -> @filer_list() + by_artist: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + diff --git a/app/assets/javascripts/controllers/resource_pictures.js.coffee b/app/assets/javascripts/controllers/resource_pictures.js.coffee index 92c6cf92..c406dd6f 100644 --- a/app/assets/javascripts/controllers/resource_pictures.js.coffee +++ b/app/assets/javascripts/controllers/resource_pictures.js.coffee @@ -3,3 +3,22 @@ class Pettanr.ResourcePicturesController extends Pettanr.AppController index: () -> @filer_list() + by_artist: () -> + @filer_list() + + by_license_group: () -> + @filer_list() + + by_license: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + diff --git a/app/assets/javascripts/controllers/scroll_panels.js.coffee b/app/assets/javascripts/controllers/scroll_panels.js.coffee index 4d89e94f..b11bfd67 100644 --- a/app/assets/javascripts/controllers/scroll_panels.js.coffee +++ b/app/assets/javascripts/controllers/scroll_panels.js.coffee @@ -3,3 +3,34 @@ class Pettanr.ScrollPanelsController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_scroll: () -> + @filer_list() + + by_panel: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/scrolls.js.coffee b/app/assets/javascripts/controllers/scrolls.js.coffee index 341d1df5..ea966723 100644 --- a/app/assets/javascripts/controllers/scrolls.js.coffee +++ b/app/assets/javascripts/controllers/scrolls.js.coffee @@ -11,7 +11,7 @@ class Pettanr.ScrollsController extends Pettanr.AppController show_html: () -> - show: (params) -> + show: () -> @set_show() switch @params['format'] when 'prof' @@ -19,9 +19,15 @@ class Pettanr.ScrollsController extends Pettanr.AppController when 'html' @show_html() - count: (params) -> + count: () -> - new: (params) -> + new: () -> - edit: (params) -> + edit: () -> + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/sheet_panels.js.coffee b/app/assets/javascripts/controllers/sheet_panels.js.coffee index d5859929..246e5ab0 100644 --- a/app/assets/javascripts/controllers/sheet_panels.js.coffee +++ b/app/assets/javascripts/controllers/sheet_panels.js.coffee @@ -3,3 +3,34 @@ class Pettanr.SheetPanelsController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_sheet: () -> + @filer_list() + + by_panel: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/sheets.js.coffee b/app/assets/javascripts/controllers/sheets.js.coffee index 6e2455a6..59dfb20f 100644 --- a/app/assets/javascripts/controllers/sheets.js.coffee +++ b/app/assets/javascripts/controllers/sheets.js.coffee @@ -3,3 +3,34 @@ class Pettanr.SheetsController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_story: () -> + @filer_list() + + by_panel: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/speech_balloon_templates.js.coffee b/app/assets/javascripts/controllers/speech_balloon_templates.js.coffee index c88c30ed..75f5b14e 100644 --- a/app/assets/javascripts/controllers/speech_balloon_templates.js.coffee +++ b/app/assets/javascripts/controllers/speech_balloon_templates.js.coffee @@ -3,3 +3,31 @@ class Pettanr.SpeechBalloonTemplatesController extends Pettanr.AppController index: () -> @filer_list() + by_panel: () -> + @filer_list() + + by_system_picture: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/speech_balloons.js.coffee b/app/assets/javascripts/controllers/speech_balloons.js.coffee index 2f95c518..4de1ece6 100644 --- a/app/assets/javascripts/controllers/speech_balloons.js.coffee +++ b/app/assets/javascripts/controllers/speech_balloons.js.coffee @@ -3,3 +3,34 @@ class Pettanr.SpeechBalloonsController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_panel: () -> + @filer_list() + + by_speech_balloon_template: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/speeches.js.coffee b/app/assets/javascripts/controllers/speeches.js.coffee index 33396187..bab87b9d 100644 --- a/app/assets/javascripts/controllers/speeches.js.coffee +++ b/app/assets/javascripts/controllers/speeches.js.coffee @@ -3,3 +3,31 @@ class Pettanr.SpeechesController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_speech_balloon: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/stories.js.coffee b/app/assets/javascripts/controllers/stories.js.coffee index 726dcd93..556cd67f 100644 --- a/app/assets/javascripts/controllers/stories.js.coffee +++ b/app/assets/javascripts/controllers/stories.js.coffee @@ -3,3 +3,34 @@ class Pettanr.StoriesController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_comic: () -> + @filer_list() + + by_sheet: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/story_sheets.js.coffee b/app/assets/javascripts/controllers/story_sheets.js.coffee index 30dbdfb9..fa2d5e29 100644 --- a/app/assets/javascripts/controllers/story_sheets.js.coffee +++ b/app/assets/javascripts/controllers/story_sheets.js.coffee @@ -3,3 +3,34 @@ class Pettanr.StorySheetsController extends Pettanr.AppController index: () -> @filer_list() + by_author: () -> + @filer_list() + + by_story: () -> + @filer_list() + + by_sheet: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/system_pictures.js.coffee b/app/assets/javascripts/controllers/system_pictures.js.coffee index 6bf8c478..e9c2e6dc 100644 --- a/app/assets/javascripts/controllers/system_pictures.js.coffee +++ b/app/assets/javascripts/controllers/system_pictures.js.coffee @@ -3,3 +3,25 @@ class Pettanr.SystemPicturesController extends Pettanr.AppController index: () -> @filer_list() + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/controllers/writing_formats.js.coffee b/app/assets/javascripts/controllers/writing_formats.js.coffee index fba0d0cf..4eee0a4d 100644 --- a/app/assets/javascripts/controllers/writing_formats.js.coffee +++ b/app/assets/javascripts/controllers/writing_formats.js.coffee @@ -3,3 +3,28 @@ class Pettanr.WritingFormatsController extends Pettanr.AppController index: () -> @filer_list() + by_system_picture: () -> + @filer_list() + + show_html: () -> + + show: () -> + @set_show() + switch @params['format'] + when 'prof' + @show_prof() + when 'html' + @show_html() + + count: () -> + + new: () -> + + edit: () -> + + create: () -> + + update: () -> + + destroy: () -> + diff --git a/app/assets/javascripts/locmare/booster.js.coffee b/app/assets/javascripts/locmare/booster.js.coffee new file mode 100644 index 00000000..815acdf3 --- /dev/null +++ b/app/assets/javascripts/locmare/booster.js.coffee @@ -0,0 +1,98 @@ +class Locmare.Booster + constructor: (manifest, item) -> + @manifest = manifest + @item = item + # no check + # return false unless self.resource.enable? + if @is_extendable() + _.extend(@item, @extend_module().prototype) + if @has_extend_model() + @item[@manifest.setter_method_name](@parsed_settings()) + + # get template from system resource manifest + template_path_name: () -> + @template_manifest().template_items[@template_module_name()] + + # get template manifest from system resource manifest + template_manifest: () -> + Manifest.manifest().system_resources.templates[@manifest.template_name] + + model_name: () -> + @template_path_name() + '_' + @manifest.item_name_for_extend_model + + is_enable: () -> + if @template_manifest().template_items[@template_module_name()] + true + else + false + + # get template module name + # ex) attributes[hoge_module_name] -> 'Hoge' + template_module_name: () -> + @item.get(@manifest.column_name_for_template_module) + + settings: () -> + @item.get(@manifest.settings_column_name) + + # name space for template + # ex) 'Hoge' -> Hoge + template_module: () -> + Pettanr[@template_module_name()] + + is_extendable: () -> + if @template_module()[@manifest.extend_module_name] + true + else + false + + # extend module in engine + # ex) 'SpeechBalloonModule' -> CircleSpeechBalloon::SpeechBalloonModule + extend_module: () -> + @template_module()[@manifest.extend_module_name] + + has_extend_model: () -> + if not Pettanr.is_blank(@manifest.extend_model_class_name) + true + else + false + + # extend settings data model in engine + # ex) CircleSpeechBalloon::SpeechBalloon + extend_model: () -> + if @has_extend_model() + @template_module()[@manifest.extend_model_class_name] + else + null + + check_template: () -> + if Pettanr.is_blank(@item.get(@manifest.foreign_key)) + false + else + true + + # get template model + template_model: () -> + Manifest.manifest().models[@manifest.template_name].classify() + + # get extend instance + extend_item: () -> + if @extend_model() + @item[@manifest.getter_method_name]() + else + null + + parsed_settings: () -> + if Pettanr.is_blank(@settings()) + {} + else + JSON.parse(@settings()) + + update_settings: (new_settings) -> + @item[@manifest.setter_method_name](new_settings) + + supply_default: () -> + @extend_item().supply_default(@item) + + overwrite: () -> + @extend_item().overwrite(@item) + diff --git a/app/assets/javascripts/locmare/filer/header.js.coffee b/app/assets/javascripts/locmare/filer/header.js.coffee index 44f19a88..9f9da031 100644 --- a/app/assets/javascripts/locmare/filer/header.js.coffee +++ b/app/assets/javascripts/locmare/filer/header.js.coffee @@ -10,7 +10,7 @@ class Locmare.FilerModule.Header extends Backbone.View caption = Pettanr.AppHelper.t_m(@model().singular()) url = Pettanr.url(@model().table_name(), 'index', {}) linked_icon = new Pettanr.Tag.A({ - attr: {href: url}, handler_name: url, content: icon.render().el + attr: {href: '/' + url}, handler_name: url, content: icon.render().el }) linked_caption = new Pettanr.Tag.A({ attr: {href: '/' + url}, handler_name: url, content: caption diff --git a/app/assets/javascripts/locmare/profiler.js.coffee b/app/assets/javascripts/locmare/profiler.js.coffee index 55aac72c..e638ede3 100644 --- a/app/assets/javascripts/locmare/profiler.js.coffee +++ b/app/assets/javascripts/locmare/profiler.js.coffee @@ -4,13 +4,13 @@ class Locmare.Profiler extends Backbone.View @item_name = options.item_name @item = options.item # feasible show parsed extend data - @item.boosts 'post' @operators = options.operators @profiler_manifest = LocalManifest.manifest().profilers[@item_name] @template_dir = 'templates-profiler-' _this = this @item.fetch().done -> + _this.item.boosts 'post' _this.header = new Locmare.ProfilerModule.Header({profiler: _this}) _this.columns = new Locmare.ProfilerModule.Column({profiler: _this}) _this.associations = new Locmare.ProfilerModule.Association({'profiler': _this, association_manifest: _this.profiler_manifest.associations}) diff --git a/app/assets/javascripts/locmare/profiler/association.js.coffee b/app/assets/javascripts/locmare/profiler/association.js.coffee index 501af177..2793b231 100644 --- a/app/assets/javascripts/locmare/profiler/association.js.coffee +++ b/app/assets/javascripts/locmare/profiler/association.js.coffee @@ -9,10 +9,11 @@ class Locmare.ProfilerModule.Association extends Backbone.View @has_many = _.map @association_manifest.has_many, (list_manifest) => new Locmare.ProfilerModule.AssociationModule.HasMany({association: this, has_many_manifest: list_manifest}) @has_one = _.map @association_manifest.has_one, (list_manifest) => - new Locmare.ProfilerModule.AssociationModule.HasOne({association: this, has_one_manifest: list_manifestt}) + new Locmare.ProfilerModule.AssociationModule.HasOne({association: this, has_one_manifest: list_manifest}) @render() render: () -> + this.$el.html('') _this = this caption = new Pettanr.Tag.Div({class_name: 'caption', content: 'associations'}) this.$el.append(caption.render().el) diff --git a/app/assets/javascripts/locmare/profiler/column/base.js.coffee b/app/assets/javascripts/locmare/profiler/column/base.js.coffee index dcc8e322..dc6f5503 100644 --- a/app/assets/javascripts/locmare/profiler/column/base.js.coffee +++ b/app/assets/javascripts/locmare/profiler/column/base.js.coffee @@ -69,7 +69,7 @@ class Locmare.ProfilerModule.ColumnModule.DateValue extends Backbone.View this value: () -> - l(@column.value()) + l(@column.item().get(@column.column_name)) class Locmare.ProfilerModule.ColumnModule.JsonValue extends Backbone.View tagName: 'pre' @@ -82,7 +82,7 @@ class Locmare.ProfilerModule.ColumnModule.JsonValue extends Backbone.View this value: () -> - JSON.pretty_generate(JSON.parse(@column.value())) + JSON.stringify(JSON.parse(@column.item().get(@column.column_name)), 2) class Locmare.ProfilerModule.ColumnModule.ExtendValue extends Backbone.View tagName: 'div' @@ -93,7 +93,11 @@ class Locmare.ProfilerModule.ColumnModule.ExtendValue extends Backbone.View _this = this _.each @extend_settings().column_names, (extend_column_name) -> extend_column_manifest = _this.extend_settings().columns[extend_column_name] || {} - _this.columns[extend_column_name] = new Locmare.ProfilerModule.ColumnModule.ExtendModule.ExtendColumn({column: _this, extend_column_name: extend_column_name, extend_column_manifest: extend_column_manifest}) + _this.columns[extend_column_name] = new Locmare.ProfilerModule.ColumnModule.ExtendModule.ExtendColumn({ + column: _this, + extend_column_name: extend_column_name, + extend_column_manifest: extend_column_manifest + }) render: () -> _this = this @@ -102,25 +106,25 @@ class Locmare.ProfilerModule.ColumnModule.ExtendValue extends Backbone.View _this.$el.append(extend_column.render().el) this - - extend_columns: () -> + sorted_columns: () -> + _this = this _.map @extend_settings().column_names, (column_name) -> - @columns[column_name] + _this.columns[column_name] extend_settings: () -> - @template_model_profiler().extend_settings[self.booster.model_name] + @template_model_profiler().extend_settings[@booster().model_name()] template_model_profiler: () -> - LocalManifest.manifest.profilers[@template_model().item_name] + LocalManifest.manifest().profilers[@template_model().item_name()] template_model: () -> - @booster().template_model + @booster().template_model() extend_item: () -> - @booster.extend_item + @booster().extend_item() booster: () -> - @column.item().boosters[@column_manifest.boost_name] + @column.item().boosters[@column.column_manifest.boost_name] class Locmare.ProfilerModule.ColumnModule.NoteNone diff --git a/app/assets/javascripts/locmare/profiler/column/extend/extend_column.js.coffee b/app/assets/javascripts/locmare/profiler/column/extend/extend_column.js.coffee index 1a0a64ef..664db597 100644 --- a/app/assets/javascripts/locmare/profiler/column/extend/extend_column.js.coffee +++ b/app/assets/javascripts/locmare/profiler/column/extend/extend_column.js.coffee @@ -3,12 +3,50 @@ class Locmare.ProfilerModule.ColumnModule.ExtendModule.ExtendColumn extends Back @column = options.column # extend_column @extend_column_name = options.extend_column_name @extend_column_manifest = options.extend_column_manifest + c = @label_class() + @label = new c({extend_column: this}) + c = @value_class() + @value = new c({extend_column: this}) + + render: () -> + this.$el.html('') + this.$el.append(@label.render().el) + this.$el.append(@value.render().el) + this + + label_class: () -> + Locmare.ProfilerModule.ColumnModule.ExtendModule.Label + + value_class: () -> + Locmare.ProfilerModule.ColumnModule.ExtendModule.Value + +class Locmare.ProfilerModule.ColumnModule.ExtendModule.Label extends Backbone.View + tagName: 'span' + + initialize: (options) -> + @extend_column = options.extend_column + @column = @extend_column.column + + render: () -> + this.$el.html(@label()) + this label: () -> - Pettanr.AppHelper.t_a(@extend_item().singular(), @extend_column_name) + Pettanr.AppHelper.t_a(@column.extend_item().item_name(), @extend_column.extend_column_name) + +class Locmare.ProfilerModule.ColumnModule.ExtendModule.Value extends Backbone.View + tagName: 'span' + + initialize: (options) -> + @extend_column = options.extend_column + @column = @extend_column.column + + render: () -> + this.$el.html(@value()) + this value: () -> - @extend_item.get(@extend_column_name) + @extend_item().get(@extend_column.extend_column_name) extend_item: () -> @column.extend_item() diff --git a/app/assets/javascripts/manifest/item/boost.js.coffee b/app/assets/javascripts/manifest/item/boost.js.coffee index dce621fb..999f5969 100644 --- a/app/assets/javascripts/manifest/item/boost.js.coffee +++ b/app/assets/javascripts/manifest/item/boost.js.coffee @@ -2,7 +2,31 @@ class Manifest.ItemModule.Boost extends ManifestBase.NameValues set_default: () -> super() + @values['level'] ||= 'post' + @values['template_name'] ||= @name + @values['column_name_for_template_module'] ||= @values['template_name'] + '_module_name' + @values['settings_column_name'] ||= @name + '_settings' + @values['foreign_key'] ||= @values['template_name'] + '_id' init: () -> super() + @level = @values['level'] + @template_name = @values['template_name'] + @column_name_for_template_module = @values['column_name_for_template_module'] + @settings_column_name = @values['settings_column_name'] + @foreign_key = @values['foreign_key'] + + @values['item_name_for_extend_model'] ||= @template_name + @values['setter_method_name'] ||= @values['item_name_for_extend_model'] + '_extend_setter' + @values['getter_method_name'] ||= @values['item_name_for_extend_model'] + '_extend' + @extend_model_class_name = @values['extend_model_class_name'] + @item_name_for_extend_model = @values['item_name_for_extend_model'] + @setter_method_name = @values['setter_method_name'] + @getter_method_name = @values['getter_method_name'] + @extend_module_name = @values['extend_module_name'] + if not @extend_module_name + if @extend_model_class_name + @extend_module_name = @extend_model_class_name + 'Module' + else + ManifestBase.alert_undefined_message 'extend_module_name', @module_message() diff --git a/app/assets/javascripts/models/balloon.js.coffee b/app/assets/javascripts/models/balloon.js.coffee index 1c699347..572e66e3 100644 --- a/app/assets/javascripts/models/balloon.js.coffee +++ b/app/assets/javascripts/models/balloon.js.coffee @@ -19,7 +19,7 @@ class Pettanr.Balloon extends Peta.Element speech_balloon: () -> new Pettanr.SpeechBalloon({id: @get('speech_balloon_id')}) - url: () -> + r_url: () -> '/system_pictures/' + @system_picture().filename() symbol_option: (cb) -> diff --git a/app/assets/javascripts/models/comic_story.js.coffee b/app/assets/javascripts/models/comic_story.js.coffee index c2c6d6d3..bc504ee3 100644 --- a/app/assets/javascripts/models/comic_story.js.coffee +++ b/app/assets/javascripts/models/comic_story.js.coffee @@ -1,4 +1,6 @@ class Pettanr.ComicStory extends Peta.Leaf + url: '/comic_stories/' + @singular: () -> 'ComicStory' diff --git a/app/assets/javascripts/models/ground_color.js.coffee b/app/assets/javascripts/models/ground_color.js.coffee index 303398a8..93ee926e 100644 --- a/app/assets/javascripts/models/ground_color.js.coffee +++ b/app/assets/javascripts/models/ground_color.js.coffee @@ -1,4 +1,6 @@ class Pettanr.GroundColor extends Peta.Element + url: '/ground_colors/' + @singular: () -> 'GroundColor' diff --git a/app/assets/javascripts/models/panel.js.coffee b/app/assets/javascripts/models/panel.js.coffee index 06838966..1b386304 100644 --- a/app/assets/javascripts/models/panel.js.coffee +++ b/app/assets/javascripts/models/panel.js.coffee @@ -1,5 +1,6 @@ class Pettanr.Panel extends Peta.Root url: '/panels/' + @singular: () -> 'Panel' diff --git a/app/assets/javascripts/models/sheet.js.coffee b/app/assets/javascripts/models/sheet.js.coffee index 1a5ef074..58e66d6e 100644 --- a/app/assets/javascripts/models/sheet.js.coffee +++ b/app/assets/javascripts/models/sheet.js.coffee @@ -1,4 +1,6 @@ class Pettanr.Sheet extends Peta.Root + url: '/sheets/' + @singular: () -> 'Sheet' diff --git a/app/assets/javascripts/models/sheet_panel.js.coffee b/app/assets/javascripts/models/sheet_panel.js.coffee index 4a8b709e..a5204821 100644 --- a/app/assets/javascripts/models/sheet_panel.js.coffee +++ b/app/assets/javascripts/models/sheet_panel.js.coffee @@ -1,4 +1,6 @@ class Pettanr.SheetPanel extends Peta.Leaf + url: '/sheet_panels/' + @singular: () -> 'SheetPanel' diff --git a/app/assets/javascripts/models/story.js.coffee b/app/assets/javascripts/models/story.js.coffee index a67d8ae8..4d171704 100644 --- a/app/assets/javascripts/models/story.js.coffee +++ b/app/assets/javascripts/models/story.js.coffee @@ -1,4 +1,6 @@ class Pettanr.Story extends Peta.Binder + url: '/stories/' + @singular: () -> 'Story' diff --git a/app/assets/javascripts/models/story_sheet.js.coffee b/app/assets/javascripts/models/story_sheet.js.coffee index eb24b8c8..09f4290e 100644 --- a/app/assets/javascripts/models/story_sheet.js.coffee +++ b/app/assets/javascripts/models/story_sheet.js.coffee @@ -1,4 +1,6 @@ class Pettanr.StorySheet extends Peta.Leaf + url: '/story_sheets/' + @singular: () -> 'StorySheet' diff --git a/app/assets/javascripts/models/writing_format.js.coffee b/app/assets/javascripts/models/writing_format.js.coffee index ca7cd7b4..df2ad5e6 100644 --- a/app/assets/javascripts/models/writing_format.js.coffee +++ b/app/assets/javascripts/models/writing_format.js.coffee @@ -1,4 +1,6 @@ class Pettanr.WritingFormat extends Peta.Template + url: '/writing_formats/' + @singular: () -> 'WritingFormat' diff --git a/app/assets/javascripts/peta/item.js.coffee b/app/assets/javascripts/peta/item.js.coffee index 8fbb457b..aaad35ac 100644 --- a/app/assets/javascripts/peta/item.js.coffee +++ b/app/assets/javascripts/peta/item.js.coffee @@ -114,9 +114,11 @@ class Peta.Item extends Backbone.Model @item_name() boosts: (level) -> - _.each @my_class().my_peta().boost, (boost_name, boost_manifest) -> + _this = this + c = @my_class().my_peta().boost + _.each c, (boost_manifest, boost_name) -> next if level == 'read' and boost_manifest.level == 'post' - @boost boost_manifest + _this.boost boost_manifest boost: (boost_manifest) -> @boosters ||= {} diff --git a/app/assets/javascripts/peta/system_resource.js.coffee b/app/assets/javascripts/peta/system_resource.js.coffee index 1f243983..cf9c3c23 100644 --- a/app/assets/javascripts/peta/system_resource.js.coffee +++ b/app/assets/javascripts/peta/system_resource.js.coffee @@ -1 +1,5 @@ class Peta.SystemResource extends Peta.Item + + is_own: (operators) -> + operators.is_admin() + diff --git a/app/assets/javascripts/pettanr.js.coffee b/app/assets/javascripts/pettanr.js.coffee index e644594c..e7c4ccc6 100644 --- a/app/assets/javascripts/pettanr.js.coffee +++ b/app/assets/javascripts/pettanr.js.coffee @@ -85,7 +85,7 @@ class Pettanr constructor: (options) -> @action = options['action'] @params = options['params'] - @current_page = @params['page'] || 1 + @current_page = parseInt(@params['page']) || 1 @per_page = @params['page_size'] || 25 @window_size = 3 @counter = new Pettanr.CounterModel({}, {url: '/' + @action.counter_url(@params)}) diff --git a/app/assets/javascripts/routes.js.coffee b/app/assets/javascripts/routes.js.coffee index 1b45072d..acfaa444 100644 --- a/app/assets/javascripts/routes.js.coffee +++ b/app/assets/javascripts/routes.js.coffee @@ -59,11 +59,19 @@ class Pettanr.Router extends Backbone.Router else params['action'] = 'index' this.fire(params) + this['c'] = (controller, query_string) -> + params = this.parse_query_string(query_string) + params['controller'] = controller + params['format'] = 'html' + params['action'] = 'index' + this.fire(params) this.route('', 'home') this.route(':controller/:id/:action?*query_string', 'c_i_a') this.route(':controller/:id/:action', 'c_i_a') this.route(':controller/:id?*query_string', 'c_i') this.route(':controller/:id', 'c_i') + this.route(':controller?*query_string', 'c') + this.route(':controller', 'c') home: () -> params = {} diff --git a/app/assets/javascripts/views/comic_stories/summary.js.coffee b/app/assets/javascripts/views/comic_stories/summary.js.coffee new file mode 100644 index 00000000..1bf5ae0c --- /dev/null +++ b/app/assets/javascripts/views/comic_stories/summary.js.coffee @@ -0,0 +1,10 @@ +class Pettanr.Views.ComicStory.Summary extends Backbone.View + + initialize: (options) -> + super(options) + + render: () -> + this.$el.html('') + this.$el.append('-') + this + diff --git a/app/assets/javascripts/work/controllers.js.coffee.erb b/app/assets/javascripts/work/controllers.js.coffee.erb index cb685502..7472348f 100644 --- a/app/assets/javascripts/work/controllers.js.coffee.erb +++ b/app/assets/javascripts/work/controllers.js.coffee.erb @@ -728,6 +728,12 @@ param_id: 'suffix', }, }, + by_speech_balloon: { + type: 'list', + args: { + param_id: 'suffix', + }, + }, show: { type: 'show', }, @@ -764,6 +770,12 @@ param_id: 'suffix', }, }, + by_speech_balloon: { + type: 'list', + args: { + param_id: 'suffix', + }, + }, show: { type: 'show', }, @@ -1007,6 +1019,12 @@ param_id: 'suffix', }, }, + by_system_picture: { + type: 'list', + args: { + param_id: 'suffix', + }, + }, show: { type: 'show', }, @@ -1293,6 +1311,15 @@ counter_name: 'comics_count', }, }, + comic_stories: { + type: 'list', + args: { + item_name: 'comic_story', + list_name: 'private', + param_id: 'none', + counter_name: 'comic_stories_count', + }, + }, stories: { type: 'list', args: { @@ -1434,6 +1461,14 @@ param_id: 'none', }, }, + comic_stories_count: { + type: 'count', + args: { + item_name: 'comic_story', + list_name: 'private', + param_id: 'none', + }, + }, stories_count: { type: 'count', args: { diff --git a/app/assets/javascripts/work/list_groups.js.coffee.erb b/app/assets/javascripts/work/list_groups.js.coffee.erb index 1d21685f..86846610 100644 --- a/app/assets/javascripts/work/list_groups.js.coffee.erb +++ b/app/assets/javascripts/work/list_groups.js.coffee.erb @@ -343,6 +343,9 @@ public: { type: 'public', }, + private: { + type: 'private', + }, by_speech_balloon: { type: 'filter', }, diff --git a/app/controllers/balloons_controller.rb b/app/controllers/balloons_controller.rb index cb3a4e84..12da158b 100644 --- a/app/controllers/balloons_controller.rb +++ b/app/controllers/balloons_controller.rb @@ -4,7 +4,7 @@ class BalloonsController < ApplicationController before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy] else before_filter :authenticate_reader, :only => [ - :index, :show, :by_author, :count, :count_by_author + :index, :show, :by_author, :by_speech_balloon, :count, :count_by_author ] before_filter :authenticate_user, :only => [:new, :edit, :create, :update, :destroy] before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy] @@ -22,6 +22,10 @@ class BalloonsController < ApplicationController filer_list end + def by_speech_balloon + filer_list + end + def show_html_format format format.html { @item.boosts 'post' diff --git a/app/controllers/comic_stories_controller.rb b/app/controllers/comic_stories_controller.rb index 88b937b3..e79195dd 100644 --- a/app/controllers/comic_stories_controller.rb +++ b/app/controllers/comic_stories_controller.rb @@ -34,7 +34,7 @@ class ComicStoriesController < ApplicationController set_show respond_to do |format| show_prof_format format - format.json { render json: @item.comic_story_as_json(@operators.author) } + format.json { render json: @item.to_json } end end diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index e914d9a6..3ee6e97d 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,12 +1,12 @@ class HomeController < ApplicationController before_filter :authenticate_user, :only => [ :index, :show, :profile, :configure, :create_token, :delete_token, - :scrolls, :scroll_panels, :comics, :stories, :story_sheets, :sheets, :sheet_panels, :panels, :resource_pictures, :panel_pictures, :speech_balloons, :ground_pictures, :ground_colors, - :scrolls_count, :scroll_panels_count, :comics_count, :stories_count, :story_sheets_count, :sheets_count, :sheet_panels_count, :panels_count, :resource_pictures_count, :panel_pictures_count, :speech_balloons_count, :ground_pictures_count, :ground_colors_count + :scrolls, :scroll_panels, :comics, :comic_stories, :stories, :story_sheets, :sheets, :sheet_panels, :panels, :panel_pictures, :speech_balloons, :balloons, :speeches, :ground_pictures, :ground_colors, + :scrolls_count, :scroll_panels_count, :comics_count, :comic_stories_count, :stories_count, :story_sheets_count, :sheets_count, :sheet_panels_count, :panels_count, :resource_pictures_count, :panel_pictures_count, :speech_balloons_count, :balloons_count, :speeches_count, :ground_pictures_count, :ground_colors_count ] before_filter :authenticate_author, :only => [ - :scrolls, :scroll_panels, :comics, :stories, :story_sheets, :sheets, :sheet_panels, :panels, :panel_pictures, :speech_balloons, :ground_pictures, :ground_colors, - :scrolls_count, :scroll_panels_count, :comics_count, :stories_count, :story_sheets_count, :sheets_count, :sheet_panels_count, :panels_count, :resource_pictures_count, :panel_pictures_count, :speech_balloons_count, :ground_pictures_count, :ground_colors_count + :scrolls, :scroll_panels, :comics, :comic_stories, :stories, :story_sheets, :sheets, :sheet_panels, :panels, :panel_pictures, :speech_balloons, :balloons, :speeches, :ground_pictures, :ground_colors, + :scrolls_count, :scroll_panels_count, :comics_count, :comic_stories_count, :stories_count, :story_sheets_count, :sheets_count, :sheet_panels_count, :panels_count, :resource_pictures_count, :panel_pictures_count, :speech_balloons_count, :balloons_count, :speeches_count, :ground_pictures_count, :ground_colors_count ] before_filter :authenticate_artist, :only => [:resource_pictures] @@ -69,6 +69,10 @@ class HomeController < ApplicationController filer_list end + def comic_stories + filer_list + end + def stories filer_list end @@ -97,6 +101,14 @@ class HomeController < ApplicationController filer_list end + def balloons + filer_list + end + + def speeches + filer_list + end + def ground_pictures filer_list end @@ -121,6 +133,10 @@ class HomeController < ApplicationController list_count end + def comic_stories_count + list_count + end + def stories_count list_count end @@ -145,7 +161,11 @@ class HomeController < ApplicationController list_count end - def speech_balloons_count + def balloons_count + list_count + end + + def speeches_count list_count end diff --git a/app/controllers/scroll_panels_controller.rb b/app/controllers/scroll_panels_controller.rb index c11046a2..68a3c6d4 100644 --- a/app/controllers/scroll_panels_controller.rb +++ b/app/controllers/scroll_panels_controller.rb @@ -34,7 +34,7 @@ class ScrollPanelsController < ApplicationController set_show respond_to do |format| show_prof_format format - format.json { render json: @item.scroll_panel_as_json(@operators.author) } + format.json { render json: @item.to_json } end end diff --git a/app/controllers/speeches_controller.rb b/app/controllers/speeches_controller.rb index b4f2249f..658f270e 100644 --- a/app/controllers/speeches_controller.rb +++ b/app/controllers/speeches_controller.rb @@ -4,7 +4,7 @@ class SpeechesController < ApplicationController before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy] else before_filter :authenticate_reader, :only => [ - :index, :show, :by_author, :count, :count_by_author + :index, :show, :by_author, :by_speech_balloon, :count, :count_by_author ] before_filter :authenticate_user, :only => [:new, :edit, :create, :update, :destroy] before_filter :authenticate_author, :only => [:new, :edit, :create, :update, :destroy] @@ -23,6 +23,10 @@ class SpeechesController < ApplicationController filer_list end + def by_speech_balloon + filer_list + end + def show_html_format format format.html { @item.boosts 'post' diff --git a/app/controllers/writing_formats_controller.rb b/app/controllers/writing_formats_controller.rb index ab11f808..078566b8 100644 --- a/app/controllers/writing_formats_controller.rb +++ b/app/controllers/writing_formats_controller.rb @@ -2,11 +2,11 @@ class WritingFormatsController < ApplicationController if Manifest.manifest.magic_numbers['run_mode'] == 0 before_filter :authenticate_user, :only => [] else - before_filter :authenticate_reader, :only => [:index, :show, :count] + before_filter :authenticate_reader, :only => [:index, :by_system_picture, :show, :count, :count_by_system_picture] before_filter :authenticate_user, :only => [] end before_filter :authenticate_admin, :only => [:new, :create, :edit, :update, :destroy] - + def self.model WritingFormat end @@ -14,7 +14,11 @@ class WritingFormatsController < ApplicationController def index filer_list end - + + def by_system_picture + filer_list + end + def show_html_format format format.html { } @@ -33,6 +37,10 @@ class WritingFormatsController < ApplicationController list_count end + def count_by_system_picture + list_count + end + def new form_new end diff --git a/app/models/balloon.rb b/app/models/balloon.rb index 35f59712..1a42b2e1 100644 --- a/app/models/balloon.rb +++ b/app/models/balloon.rb @@ -16,7 +16,7 @@ class Balloon < Peta::Element # validates :caption, :presence => true validates :speech_balloon_template_settings, :boost => {:boost_name => :speech_balloon_template} - def attr_y + def y self.attributes['y'] end @@ -58,7 +58,7 @@ self.system_picture_id = 1 def style { 'width' => self.width.to_s + 'px','height' => self.height.to_s + 'px', - 'top' => self.attr_y.to_s + 'px','left' => self.x.to_s + 'px' + 'top' => self.y.to_s + 'px','left' => self.x.to_s + 'px' } end diff --git a/app/models/folder.rb b/app/models/folder.rb index 8db7f1d8..7b136310 100644 --- a/app/models/folder.rb +++ b/app/models/folder.rb @@ -144,7 +144,7 @@ class Folder < Peta::SystemResource mydocidx_speech_balloon = self.add_remote mydocidx, 'speech_balloons', 'home', 'speech_balloons' mydocidx_balloon = self.add_remote mydocidx, 'balloons', 'home', 'balloons' mydocidx_speech = self.add_remote mydocidx, 'speeches', 'home', 'speeches' - mydocidx_ground_picture = self.add_remote mydocidx, 'ground_pictures', 'home', '' + mydocidx_ground_picture = self.add_remote mydocidx, 'ground_pictures', 'home', 'ground_pictures' mydocidx_ground_color = self.add_remote mydocidx, 'ground_colors', 'home', 'ground_colors' mydocpic_original_picture = self.add_remote mydocpic, 'original_pictures' mydocidx_resource_picture = self.add_remote mydocidx, 'resource_pictures', 'home', 'resource_pictures' diff --git a/app/models/panel_picture.rb b/app/models/panel_picture.rb index e0da3dca..2aa3affb 100644 --- a/app/models/panel_picture.rb +++ b/app/models/panel_picture.rb @@ -26,7 +26,7 @@ class PanelPicture < Peta::Element self.attributes[self.pickup_column_name] end - def attr_y + def y self.attributes['y'] end @@ -75,7 +75,7 @@ class PanelPicture < Peta::Element end def opt_div_style - "top:#{self.attr_y}px; left:#{self.x}px; z-index:#{self.z}; position: absolute;" + "top:#{self.y}px; left:#{self.x}px; z-index:#{self.z}; position: absolute;" end def opt_img_tag spot = nil, opacity = 20 diff --git a/app/models/speech.rb b/app/models/speech.rb index f64b0021..1073cdf0 100644 --- a/app/models/speech.rb +++ b/app/models/speech.rb @@ -22,7 +22,7 @@ class Speech < Peta::Element @@text_align_texts = ['left', 'left', 'right', 'center'] - def attr_y + def y self.attributes['y'] end @@ -39,7 +39,7 @@ class Speech < Peta::Element def outer_style { - 'top' => self.attr_y, 'left' => self.x, + 'top' => self.y, 'left' => self.x, 'width' => self.width, 'height' => self.height } end diff --git a/app/views/top/index.html.erb b/app/views/top/index.html.erb index 54752c43..b8484083 100644 --- a/app/views/top/index.html.erb +++ b/app/views/top/index.html.erb @@ -1,8 +1,12 @@
diff --git a/config/locales/pettanr.ja.yml b/config/locales/pettanr.ja.yml index 7fea987e..82155a92 100644 --- a/config/locales/pettanr.ja.yml +++ b/config/locales/pettanr.ja.yml @@ -753,29 +753,33 @@ ja: not_author: 作品を公開するには作家登録 not_artist: 画像を公開するには絵師登録 scrolls: - title: 最近更新したスクロール + title: 最近使ったスクロール scroll_panels: - title: 最近更新したスクコマ + title: 最近使ったスクコマ comics: - title: 最近更新したコミック + title: 最近使ったコミック comic_stories: - title: 最近更新したコミスト + title: 最近使ったコミスト stories: - title: 最近更新したストーリー + title: 最近使ったストーリー story_sheets: - title: 最近更新したスト紙 + title: 最近使ったスト紙 sheets: - title: 最近更新した用紙 + title: 最近使った用紙 sheet_panels: - title: 最近更新した紙コマ + title: 最近使った紙コマ panels: - title: 最近更新したコマ + title: 最近使ったコマ resource_pictures: - title: 最近更新した素材 + title: 最近使った素材 panel_pictures: title: 最近使ったコマ絵 speech_balloons: title: 最近使ったフキダシ + balloons: + title: 最近使ったフキダシ枠 + speeches: + title: 最近使ったセリフ ground_pictures: title: 最近使った絵地 ground_colors: diff --git a/config/routes.rb b/config/routes.rb index 43915479..0bbf07d0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -286,6 +286,7 @@ Pettanr::Application.routes.draw do end member do get :by_author + get :by_speech_balloon get :count_by_author get :edit put :update @@ -299,6 +300,7 @@ Pettanr::Application.routes.draw do end member do get :by_author + get :by_speech_balloon get :count_by_author get :edit put :update diff --git a/public/local_manifest.json b/public/local_manifest.json index eab7a50d..3f97d6ab 100644 --- a/public/local_manifest.json +++ b/public/local_manifest.json @@ -343,6 +343,9 @@ "public": { "type": "public" }, + "private": { + "type": "private" + }, "by_speech_balloon": { "type": "filter" }, @@ -4202,6 +4205,7 @@ } }, "buckets": { + "folder": {}, "scroll": {}, "scroll_panel": {}, "comic": {}, diff --git a/public/manifest.json b/public/manifest.json index 975a3654..b315d000 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1213,6 +1213,12 @@ "param_id": "suffix" } }, + "by_system_picture": { + "type": "list", + "args": { + "param_id": "suffix" + } + }, "show": { "type": "show" }, @@ -1499,6 +1505,15 @@ "counter_name": "comics_count" } }, + "comic_stories": { + "type": "list", + "args": { + "item_name": "comic_story", + "list_name": "private", + "param_id": "none", + "counter_name": "comic_stories_count" + } + }, "stories": { "type": "list", "args": { @@ -1640,6 +1655,14 @@ "param_id": "none" } }, + "comic_stories_count": { + "type": "count", + "args": { + "item_name": "comic_story", + "list_name": "private", + "param_id": "none" + } + }, "stories_count": { "type": "count", "args": { -- 2.11.0