OSDN Git Service

redraw page title
authoryasushiito <yas@pen-chan.jp>
Thu, 9 Oct 2014 23:24:20 +0000 (08:24 +0900)
committeryasushiito <yas@pen-chan.jp>
Thu, 9 Oct 2014 23:24:20 +0000 (08:24 +0900)
42 files changed:
app/assets/javascripts/controllers/artists.js.coffee
app/assets/javascripts/controllers/authors.js.coffee
app/assets/javascripts/controllers/balloons.js.coffee
app/assets/javascripts/controllers/comic_stories.js.coffee
app/assets/javascripts/controllers/comics.js.coffee
app/assets/javascripts/controllers/folders.js.coffee
app/assets/javascripts/controllers/ground_colors.js.coffee
app/assets/javascripts/controllers/ground_pictures.js.coffee
app/assets/javascripts/controllers/home.js.coffee
app/assets/javascripts/controllers/license_groups.js.coffee
app/assets/javascripts/controllers/licenses.js.coffee
app/assets/javascripts/controllers/original_picture_license_groups.js.coffee
app/assets/javascripts/controllers/original_picture_licenses.js.coffee
app/assets/javascripts/controllers/original_pictures.js.coffee
app/assets/javascripts/controllers/panel_pictures.js.coffee
app/assets/javascripts/controllers/panels.js.coffee
app/assets/javascripts/controllers/pictures.js.coffee
app/assets/javascripts/controllers/resource_pictures.js.coffee
app/assets/javascripts/controllers/scroll_panels.js.coffee
app/assets/javascripts/controllers/scrolls.js.coffee
app/assets/javascripts/controllers/sheet_panels.js.coffee
app/assets/javascripts/controllers/sheets.js.coffee
app/assets/javascripts/controllers/speech_balloon_templates.js.coffee
app/assets/javascripts/controllers/speech_balloons.js.coffee
app/assets/javascripts/controllers/speeches.js.coffee
app/assets/javascripts/controllers/stories.js.coffee
app/assets/javascripts/controllers/story_sheets.js.coffee
app/assets/javascripts/controllers/system_pictures.js.coffee
app/assets/javascripts/controllers/writing_formats.js.coffee
app/assets/javascripts/locmare/filer/body/file_body/file_item/caption/default/link/action.js.coffee
app/assets/javascripts/locmare/filer/body/file_body/file_item/symbol/default/link/action.js.coffee
app/assets/javascripts/main.js.coffee
app/assets/javascripts/manifest/controller/action/base.js.coffee
app/assets/javascripts/pettanr.js.coffee
app/assets/javascripts/work/controllers.js.coffee.erb
app/controllers/scroll_panels_controller.rb
app/controllers/scrolls_controller.rb
app/controllers/top_controller.rb
app/views/layouts/ap.html.erb
app/views/layouts/application.html.erb
config/routes.rb
public/manifest.json

index d6e869c..769a3d6 100644 (file)
@@ -1,15 +1,19 @@
 class Pettanr.ArtistsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
-    view = new Pettanr.Views.Artist.Show({\r
-      el: "#pettanr",\r
-      item: @item,\r
-      operators: @operators\r
-    })\r
-    view.render()\r
+    _this = this\r
+    @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('title'))\r
+      view = new Pettanr.Views.Artist.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
@@ -22,9 +26,11 @@ class Pettanr.ArtistsController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index fbdfedb..94cf317 100644 (file)
@@ -1,15 +1,19 @@
 class Pettanr.AuthorsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
-    view = new Pettanr.Views.Author.Show({\r
-      el: "#pettanr",\r
-      item: @item,\r
-      operators: @operators\r
-    })\r
-    view.render()\r
+    _this = this\r
+    @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('name'))\r
+      view = new Pettanr.Views.Author.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
@@ -22,9 +26,11 @@ class Pettanr.AuthorsController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index 847b42a..0731262 100644 (file)
@@ -1,15 +1,19 @@
 class Pettanr.BalloonsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_speech_balloon: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
+    @redraw_title(@params)\r
     _this = this\r
     @item.fetch({cache: true}).done ->\r
       view = new Pettanr.Views.Balloon.Show({\r
index bae8ec8..f1686b9 100644 (file)
@@ -1,18 +1,31 @@
 class Pettanr.ComicStoriesController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_comic: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_story: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
+    @redraw_title(@params)\r
+    _this = this\r
+    @item.fetch({cache: true}).done ->\r
+      view = new Pettanr.Views.ComicStory.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
@@ -25,9 +38,11 @@ class Pettanr.ComicStoriesController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index a0e3c60..4db24e9 100644 (file)
@@ -1,17 +1,21 @@
 class Pettanr.ComicsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_story: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
     _this = this\r
     @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('title'))\r
       view = new Pettanr.Views.Comic.Show({\r
         el: "#pettanr",\r
         item: _this.item,\r
@@ -30,9 +34,11 @@ class Pettanr.ComicsController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index 57f5cb7..ddafdb2 100644 (file)
@@ -1,9 +1,11 @@
 class Pettanr.FoldersController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   root: () ->\r
+    @redraw_title(@params)\r
     @set_model()\r
     @item = new Pettanr.Folder.Root()\r
     _this = this\r
@@ -13,6 +15,7 @@ class Pettanr.FoldersController extends Pettanr.AppController
   show_html_format: (format) -> \r
   \r
   children_html: () -> \r
+    @redraw_title(@params, @item.get('name'))\r
     collection = new Pettanr.Folder.Children({id: @item.get('id')})\r
     collection.fetch({cache: true}).done ->\r
       f = new Locmare.Filer({\r
@@ -25,12 +28,12 @@ class Pettanr.FoldersController extends Pettanr.AppController
   \r
   show: () ->\r
     console.log(@params)\r
-    id = @params['id']\r
     if @params['format'] == 'prof'\r
       @set_show()\r
+      @item = new Pettanr.FolderWatch({id: @params['id']})  # replace refference item\r
       @show_prof()\r
     else\r
-      @item = new Pettanr.FolderWatch({id: id})\r
+      @item = new Pettanr.FolderWatch({id: @params['id']})\r
       _this = this\r
       @item.fetch({cache: true}).done () ->\r
         if _this.item.is_remote()\r
@@ -46,8 +49,10 @@ class Pettanr.FoldersController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
index ec50f36..daaf943 100644 (file)
@@ -1,17 +1,21 @@
 class Pettanr.GroundColorsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_panel: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
     _this = this\r
     @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('caption'))\r
       view = new Pettanr.Views.GroundColor.Show({\r
         el: "#pettanr",\r
         item: _this.item,\r
index 365c8cb..53e311b 100644 (file)
@@ -1,17 +1,22 @@
 class Pettanr.GroundPicturesController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_panel: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
+    @redraw_title(@params)\r
     _this = this\r
     @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('caption'))\r
       view = new Pettanr.Views.GroundPicture.Show({\r
         el: "#pettanr",\r
         item: _this.item,\r
index 7cb466f..9a8aeea 100644 (file)
@@ -9,51 +9,67 @@ class Pettanr.HomeController extends Pettanr.AppController
     view.render()\r
   \r
   scrolls: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   scroll_panels: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   comics: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   comic_stories: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   stories: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   story_sheets: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   sheets: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   sheet_panels: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   panels: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   panel_pictures: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   speech_balloons: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   balloons: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   speeches: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   ground_pictures: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   ground_colors: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   resource_pictures: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   scrolls_count: () ->\r
index 470fe91..2794e6f 100644 (file)
@@ -1,15 +1,19 @@
 class Pettanr.LicenseGroupsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
-    view = new Pettanr.Views.LicenseGroup.Show({\r
-      el: "#pettanr",\r
-      item: @item,\r
-      operators: @operators\r
-    })\r
-    view.render()\r
+    _this = this\r
+    @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('caption'))\r
+      view = new Pettanr.Views.LicenseGroup.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
@@ -22,9 +26,11 @@ class Pettanr.LicenseGroupsController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index 0a343e2..032dcca 100644 (file)
@@ -1,21 +1,27 @@
 class Pettanr.LicensesController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_icense_group: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_system_picture: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
-    view = new Pettanr.Views.License.Show({\r
-      el: "#pettanr",\r
-      item: @item,\r
-      operators: @operators\r
-    })\r
-    view.render()\r
+    _this = this\r
+    @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('caption'))\r
+      view = new Pettanr.Views.License.Show({\r
+        el: "#pettanr",\r
+        item: @item,\r
+        operators: @operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
@@ -28,9 +34,11 @@ class Pettanr.LicensesController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index 64f71e5..96ab794 100644 (file)
@@ -1,5 +1,6 @@
 class Pettanr.OriginalPictureLicenseGroupsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
index f2e4a2d..0845c9d 100644 (file)
@@ -1,5 +1,6 @@
 class Pettanr.OriginalPictureLicensesController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
index ebb48fc..5648e68 100644 (file)
@@ -1,17 +1,22 @@
 class Pettanr.OriginalPicturesController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   history: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
-    view = new Pettanr.Views.OriginalPicture.Show({\r
-      el: "#pettanr",\r
-      item: @item,\r
-      operators: @operators\r
-    })\r
+    _this = this\r
+    @redraw_title(@params)\r
+    @item.fetch({cache: true}).done ->\r
+      view = new Pettanr.Views.OriginalPicture.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
     view.render()\r
   \r
   show: () ->\r
index d2f9332..d20aec9 100644 (file)
@@ -1,17 +1,21 @@
 class Pettanr.PanelPicturesController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_panel: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
     _this = this\r
     @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('caption'))\r
       view = new Pettanr.Views.PanelPicture.Show({\r
         el: "#pettanr",\r
         item: _this.item,\r
index 906723b..e352755 100644 (file)
@@ -1,24 +1,30 @@
 class Pettanr.PanelsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_scroll: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_sheet: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_speech_balloon_template: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () ->\r
     _this = this\r
     @item = new Pettanr.Panel({id: @item.get('id')}, {with_elements: true}) # retake panel for 'with_elements' mode\r
     @item.fetch({cache: false}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('caption'))\r
       view = new Pettanr.Views.Panel.Show({\r
         el: "#pettanr",\r
         panel: _this.item,\r
@@ -39,9 +45,11 @@ class Pettanr.PanelsController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index 2b397b3..6aade7f 100644 (file)
@@ -1,18 +1,23 @@
 class Pettanr.PicturesController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_artist: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
-    view = new Pettanr.Views.Picture.Show({\r
-      el: "#pettanr",\r
-      item: @item,\r
-      operators: @operators\r
-    })\r
-    view.render()\r
+    @redraw_title(@params)\r
+    _this = this\r
+    @item.fetch({cache: true}).done ->\r
+      view = new Pettanr.Views.Picture.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
index 55871e4..f8c8dd0 100644 (file)
@@ -1,24 +1,31 @@
 class Pettanr.ResourcePicturesController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_artist: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_license_group: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_license: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
-    view = new Pettanr.Views.ResourcePicture.Show({\r
-      el: "#pettanr",\r
-      item: @item,\r
-      operators: @operators\r
-    })\r
-    view.render()\r
+    @redraw_title(@params)\r
+    _this = this\r
+    @item.fetch({cache: true}).done ->\r
+      view = new Pettanr.Views.ResourcePicture.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
index 2efc6cf..cac28e6 100644 (file)
@@ -1,18 +1,31 @@
 class Pettanr.ScrollPanelsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_scroll: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_panel: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
+    @redraw_title(@params)\r
+    _this = this\r
+    @item.fetch({cache: true}).done ->\r
+      view = new Pettanr.Views.ScrollPanel.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
@@ -22,12 +35,18 @@ class Pettanr.ScrollPanelsController extends Pettanr.AppController
       when 'html'\r
         @show_html()\r
   \r
+  play: () ->\r
+    @set_play()\r
+    @play_list()\r
+  \r
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index 3e634fc..5d55685 100644 (file)
@@ -1,17 +1,21 @@
 class Pettanr.ScrollsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_panel: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
     _this = this\r
     @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('title'))\r
       view = new Pettanr.Views.Scroll.Show({\r
         el: "#pettanr",\r
         item: _this.item,\r
@@ -27,12 +31,18 @@ class Pettanr.ScrollsController extends Pettanr.AppController
       when 'html'\r
         @show_html()\r
   \r
+  play: () ->\r
+    @set_play()\r
+    @play_list()\r
+  \r
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index 8ba848e..3c0eb38 100644 (file)
@@ -1,18 +1,31 @@
 class Pettanr.SheetPanelsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_sheet: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_panel: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
+    @redraw_title(@params)\r
+    _this = this\r
+    @item.fetch({cache: true}).done ->\r
+      view = new Pettanr.Views.SheetPanel.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
@@ -25,9 +38,11 @@ class Pettanr.SheetPanelsController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index c086fa8..530f6f8 100644 (file)
@@ -1,20 +1,25 @@
 class Pettanr.SheetsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_story: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_panel: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
     _this = this\r
     @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('caption'))\r
       view = new Pettanr.Views.Sheet.Show({\r
         el: "#pettanr",\r
         item: _this.item,\r
@@ -33,9 +38,11 @@ class Pettanr.SheetsController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index ce6fd02..9fadbe1 100644 (file)
@@ -1,21 +1,27 @@
 class Pettanr.SpeechBalloonTemplatesController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_panel: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_system_picture: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
-    view = new Pettanr.Views.SpeechBalloonTemplate.Show({\r
-      el: "#pettanr",\r
-      item: @item,\r
-      operators: @operators\r
-    })\r
-    view.render()\r
+    _this = this\r
+    @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('caption'))\r
+      view = new Pettanr.Views.SpeechBalloonTemplate.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
@@ -28,9 +34,11 @@ class Pettanr.SpeechBalloonTemplatesController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index 90c210e..40b34e7 100644 (file)
@@ -1,20 +1,25 @@
 class Pettanr.SpeechBalloonsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_panel: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_speech_balloon_template: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
     _this = this\r
     @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('caption'))\r
       view = new Pettanr.Views.SpeechBalloon.Show({\r
         el: "#pettanr",\r
         item: _this.item,\r
index a8c257c..7895a58 100644 (file)
@@ -1,15 +1,19 @@
 class Pettanr.SpeechesController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_speech_balloon: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
+    @redraw_title(@params)\r
     _this = this\r
     @item.fetch({cache: true}).done ->\r
       view = new Pettanr.Views.Speech.Show({\r
index c6cda6f..bbaf39c 100644 (file)
@@ -1,20 +1,25 @@
 class Pettanr.StoriesController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_comic: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_sheet: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
     _this = this\r
     @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('title'))\r
       view = new Pettanr.Views.Story.Show({\r
         el: "#pettanr",\r
         item: _this.item,\r
@@ -33,9 +38,11 @@ class Pettanr.StoriesController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index 3911c96..c856481 100644 (file)
@@ -1,18 +1,31 @@
 class Pettanr.StorySheetsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_author: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_story: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_sheet: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
+    @redraw_title(@params)\r
+    _this = this\r
+    @item.fetch({cache: true}).done ->\r
+      view = new Pettanr.Views.StorySheet.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
@@ -25,9 +38,11 @@ class Pettanr.StorySheetsController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index f1d0c9a..a323e49 100644 (file)
@@ -1,15 +1,19 @@
 class Pettanr.SystemPicturesController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
-    view = new Pettanr.Views.SystemPicture.Show({\r
-      el: "#pettanr",\r
-      item: @item,\r
-      operators: @operators\r
-    })\r
-    view.render()\r
+    _this = this\r
+    @redraw_title(@params)\r
+    @item.fetch({cache: true}).done ->\r
+      view = new Pettanr.Views.SystemPicture.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
index 2027da2..f33bc55 100644 (file)
@@ -1,18 +1,23 @@
 class Pettanr.WritingFormatsController extends Pettanr.AppController\r
   \r
   index: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   by_system_picture: () ->\r
+    @redraw_title(@params)\r
     @filer_list()\r
   \r
   show_html: () -> \r
-    view = new Pettanr.Views.WritingFormat.Show({\r
-      el: "#pettanr",\r
-      item: @item,\r
-      operators: @operators\r
-    })\r
-    view.render()\r
+    _this = this\r
+    @item.fetch({cache: true}).done ->\r
+      _this.redraw_title(_this.params, _this.item.get('caption'))\r
+      view = new Pettanr.Views.WritingFormat.Show({\r
+        el: "#pettanr",\r
+        item: _this.item,\r
+        operators: _this.operators\r
+      })\r
+      view.render()\r
   \r
   show: () ->\r
     @set_show()\r
@@ -25,9 +30,11 @@ class Pettanr.WritingFormatsController extends Pettanr.AppController
   count: () ->\r
   \r
   new: () ->\r
+    @redraw_title(@params)\r
     @form_new()\r
   \r
   edit: () ->\r
+    @redraw_title(@params)\r
     @form_edit()\r
   \r
   create: () ->\r
index f7ed6a6..22868eb 100644 (file)
@@ -9,9 +9,6 @@ class Locmare.FilerModule.BodyModule.FileBodyModule.FileItemModule.CaptionItemCo
     this.$el.html(@default_caption.face.render().el)\r
     this\r
   \r
-  js_url: () ->\r
-    "javascript:void(0)"\r
-  \r
   url: () ->\r
     controller = Manifest.manifest().controllers[@item.table_name()]\r
     action = controller.actions[@my_manifest.action_name]\r
index e3c8c52..81e42b3 100644 (file)
@@ -9,9 +9,6 @@ class Locmare.FilerModule.BodyModule.FileBodyModule.FileItemModule.SymbolItemCol
     this.$el.html(@default_symbol.face.render().el)\r
     this\r
   \r
-  js_url: () ->\r
-    "javascript:void(0)"\r
-  \r
   url: () ->\r
     controller = Manifest.manifest().controllers[@item.table_name()]\r
     action = controller.actions[@my_manifest.action_name]\r
index ba88f21..b8b207f 100644 (file)
@@ -3,10 +3,11 @@ $ ->
     interpolate: /\<\&\=(.+?)\&\>/g,\r
     evaluate: /\<\&(.+?)\&\>/g\r
   }\r
-  I18n.defaultLocale = 'ja'\r
-  I18n.locale = 'ja'\r
+  locale = $("html").attr('lang')\r
+  I18n.defaultLocale = locale\r
+  I18n.locale = locale\r
   I18n.fallbacks = true\r
-  jQuery.timeago.settings.lang = 'ja'\r
+  jQuery.timeago.settings.lang = locale\r
   Backbone.fetchCache.localStorage = false\r
   loaded_manifest = null\r
   loaded_local_manifest = null\r
index 4c6886f..8dc8be2 100644 (file)
@@ -20,7 +20,7 @@ class Manifest.ControllerModule.ActionModule.Base extends ManifestBase.TypeNameA
       ''\r
   \r
   encode_url: (action_name, params) ->\r
-    c = @parent.name\r
+    c = Manifest.manifest().models[@item_name].table_name\r
     a = if action_name == 'index' or action_name == 'show' or action_name == 'destroy'\r
       ''\r
     else\r
index 0ad5f44..966bcb5 100644 (file)
@@ -143,6 +143,28 @@ class Pettanr
       )\r
       false\r
     \r
+    set_play: () ->\r
+      @set_list()\r
+      @binder_controller = Manifest.manifest().controllers[@params['controller']]\r
+      @binder_model = Manifest.manifest().models[@binder_controller.item_name]\r
+      @binder_model_class = @binder_model.classify()\r
+      @item = new @binder_model_class({id: @params['id']})\r
+    \r
+    play_list: () ->\r
+      _this = this\r
+      opt = {\r
+        id: @params['id'], \r
+        offset: @params['offset'], \r
+        count: @params['count'], \r
+        page: @params['page'], \r
+        page_size: @params['page_size']\r
+      }\r
+      @item.fetch({cache: true}).done ->\r
+        _this.list.open(_this.operators, opt, _this.my_action, {}, (page_status) ->\r
+          console.log _this.list.models\r
+        )\r
+        false\r
+    \r
     show_prof: () ->\r
       _this = this\r
       @item.fetch({cache: true}).done ->\r
@@ -153,6 +175,7 @@ class Pettanr
           operators: _this.operators\r
         })\r
         $("#pettanr").html(profiler.render().el)\r
+        _this.redraw_title(_this.params)\r
     \r
     set_new: () ->\r
       @set_model()\r
@@ -187,6 +210,11 @@ class Pettanr
     form_edit: () ->\r
       @set_edit()\r
     \r
+    redraw_title: (params, str = null) ->\r
+      t = str || I18n.t(params['controller'] + '.' + params['action'] + '.title')\r
+      site_caption = Manifest.manifest().magic_numbers.profile.users.caption\r
+      $(document).attr('title', t + ' - ' + site_caption)\r
+    \r
   class Pettanr.FilerRender\r
     constructor: (item_name, list_result, pager_type, operators) ->\r
       @item_name = item_name\r
index 77638f7..7754d28 100644 (file)
@@ -62,7 +62,9 @@
         type: 'list',\r
         args: {\r
           item_name: 'scroll_panel',\r
-          list_name: 'play',\r
+          list_name: 'by_scroll',\r
+          order: 't',\r
+          direction: 'asc'\r
         },\r
       },\r
       show: {\r
           param_id: 'suffix',\r
         },\r
       },\r
+      play: {\r
+        type: 'list',\r
+        args: {\r
+        },\r
+      },\r
       show: {\r
         type: 'show',\r
       },\r
       count_by_author: {\r
         type: 'count',\r
       },\r
+      count_play: {\r
+        type: 'count',\r
+      },\r
       new: {\r
         type: 'new',\r
       },\r
index 68a3c6d..dc94d9b 100644 (file)
@@ -4,7 +4,7 @@ class ScrollPanelsController < ApplicationController
     before_filter :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
   else
     before_filter :authenticate_reader, :only => [
-      :index, :show, :by_panel, :by_scroll, :by_author, :count, :count_by_panel, :count_by_scroll, :count_by_author
+      :index, :show, :by_panel, :by_scroll, :by_author, :play, :count, :count_by_panel, :count_by_scroll, :count_by_author, :play
     ]
     before_filter :authenticate_user, :only => [:new, :create, :edit, :update, :destroy]
     before_filter :authenticate_author, :only => [:new, :create, :edit, :update, :destroy]
@@ -30,6 +30,10 @@ class ScrollPanelsController < ApplicationController
     filer_list
   end
   
+  def play
+    filer_list
+  end
+  
   def show
     set_show
     respond_to do |format|
@@ -54,6 +58,10 @@ class ScrollPanelsController < ApplicationController
     list_count
   end
   
+  def count_play
+    list_count
+  end
+  
   def new
     form_new
   end
index 62dd4b3..6e459b7 100644 (file)
@@ -70,6 +70,10 @@ class ScrollsController < ApplicationController
     list_count
   end
   
+  def count_play
+    list_count
+  end
+  
   def new
     form_new
   end
index f7b646c..37b4ada 100644 (file)
@@ -10,7 +10,7 @@ class TopController < ApplicationController
   
   def index
     respond_to do |format|
-      format.html { render layout: 'application' }
+      format.html { render layout: 'ap' }
     end
   end
   
index 8f92977..27b7e5c 100644 (file)
@@ -1,11 +1,10 @@
 <!DOCTYPE html>\r
-<html>\r
+<html lang="<%= I18n.locale -%>">\r
 <head>\r
   <title>\r
     ap - <%= h(manifest.magic_numbers['profile']['users']['caption']) %>\r
   </title>\r
   <%= stylesheet_link_tag "test" %>\r
-  <%= javascript_include_tag "application" %>\r
   <%= javascript_include_tag "ap" %>\r
   <%# raw panel_editor_javascript_include_tags %>\r
   <%= csrf_meta_tags %>\r
index 0cb2c2a..ffac6e3 100644 (file)
@@ -1,5 +1,5 @@
 <!DOCTYPE html>\r
-<html>\r
+<html lang="<%= I18n.locale -%>">\r
 <head>\r
   <title>\r
     <% if @page_title %>\r
@@ -10,7 +10,7 @@
     - <%= h(manifest.magic_numbers['profile']['users']['caption']) %>\r
   </title>\r
   <%= stylesheet_link_tag "test" %>\r
-  <%= javascript_include_tag "ap" %>\r
+  <%= javascript_include_tag "application" %>\r
   <%= csrf_meta_tags %>\r
 </head>\r
 <body>\r
index 0bbf07d..dcca394 100644 (file)
@@ -45,6 +45,7 @@ Pettanr::Application.routes.draw do
       get :by_panel
       get :count_by_author
       get :count_by_panel
+      get :count_play
       get :play
       get :edit
       put :update
@@ -66,9 +67,11 @@ Pettanr::Application.routes.draw do
       get :by_panel
       get :by_scroll
       get :by_author
+      get :play
       get :count_by_panel
       get :count_by_scroll
       get :count_by_author
+      get :count_play
       get :edit
       put :update
       delete :destroy
index 9bc5eb9..2aeb845 100644 (file)
         "count_by_panel": {\r
           "type": "count"\r
         },\r
+        "count_play": {\r
+          "type": "count"\r
+        },\r
         "new": {\r
           "type": "new"\r
         },\r
             "param_id": "suffix"\r
           }\r
         },\r
+        "play": {\r
+          "type": "list",\r
+          "args": {\r
+          }\r
+        },\r
         "show": {\r
           "type": "show"\r
         },\r
         "count_by_author": {\r
           "type": "count"\r
         },\r
+        "count_play": {\r
+          "type": "count"\r
+        },\r
         "new": {\r
           "type": "new"\r
         },\r