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
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
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
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
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
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
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
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
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
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
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
\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
count: () ->\r
\r
new: () ->\r
+ @redraw_title(@params)\r
@form_new()\r
\r
edit: () ->\r
+ @redraw_title(@params)\r
@form_edit()\r
\r
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
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
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
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
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
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
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
class Pettanr.OriginalPictureLicenseGroupsController extends Pettanr.AppController\r
\r
index: () ->\r
+ @redraw_title(@params)\r
@filer_list()\r
\r
class Pettanr.OriginalPictureLicensesController extends Pettanr.AppController\r
\r
index: () ->\r
+ @redraw_title(@params)\r
@filer_list()\r
\r
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
''\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
)\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
operators: _this.operators\r
})\r
$("#pettanr").html(profiler.render().el)\r
+ _this.redraw_title(_this.params)\r
\r
set_new: () ->\r
@set_model()\r
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
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
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]
filer_list
end
+ def play
+ filer_list
+ end
+
def show
set_show
respond_to do |format|
list_count
end
+ def count_play
+ list_count
+ end
+
def new
form_new
end
list_count
end
+ def count_play
+ list_count
+ end
+
def new
form_new
end
def index
respond_to do |format|
- format.html { render layout: 'application' }
+ format.html { render layout: 'ap' }
end
end
<!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
<!DOCTYPE html>\r
-<html>\r
+<html lang="<%= I18n.locale -%>">\r
<head>\r
<title>\r
<% if @page_title %>\r
- <%= 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
get :by_panel
get :count_by_author
get :count_by_panel
+ get :count_play
get :play
get :edit
put :update
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
"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