X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=app%2Fassets%2Fjavascripts%2Flocmare%2Ffiler%2Fbody%2Ffile_body%2Ffile_item%2Fcaption%2Fdefault.js.coffee;h=60cce29f82560925bb3c57dbc2f439122db3e9a2;hb=c4fc0258365dccdd39e18629bb5d8e5873c658fc;hp=e122aac4d0472e52f69fe1bbc49659626af784c2;hpb=787b560f1977baa1786c35a4d6ff91369bc8dc72;p=pettanr%2Fpettanr.git diff --git a/app/assets/javascripts/locmare/filer/body/file_body/file_item/caption/default.js.coffee b/app/assets/javascripts/locmare/filer/body/file_body/file_item/caption/default.js.coffee index e122aac4..60cce29f 100644 --- a/app/assets/javascripts/locmare/filer/body/file_body/file_item/caption/default.js.coffee +++ b/app/assets/javascripts/locmare/filer/body/file_body/file_item/caption/default.js.coffee @@ -6,13 +6,16 @@ class Locmare.FilerModule.BodyModule.FileBodyModule.FileItemModule.CaptionItemCo @link = m.LinkFactory.factory this, @my_manifest.link, @item render: () -> - if @my_manifest.link.type == 'none' - this.$el.html(@face.render().el) - else + if @has_link() this.$el.html(@link.render().el) @delegateEvents({'click .face': 'show'}) + else + this.$el.html(@face.el) this + has_link: () -> + @my_manifest.link.type != 'none' + show: () -> window.router.navigate(@link.url(), true); return false