X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=app%2Fassets%2Fjavascripts%2Fpettanr.js.coffee;h=05887fd1d8970b67dce26d1139c3dfa1ba04a068;hb=dbe1cc622a8fda2e7f24294b97dbd064c1cb197e;hp=93d72de957ece1965036d214c602989051908ea3;hpb=1faa2a7eb0cca883d62d7e7e36ad7e3a7530a6a2;p=pettanr%2Fpettanr.git diff --git a/app/assets/javascripts/pettanr.js.coffee b/app/assets/javascripts/pettanr.js.coffee index 93d72de9..05887fd1 100644 --- a/app/assets/javascripts/pettanr.js.coffee +++ b/app/assets/javascripts/pettanr.js.coffee @@ -77,9 +77,6 @@ class Pettanr @is_sns: () -> Manifest.manifest().magic_numbers.run_mode != 0 - @before_filter: (action_name, filter_action_names) -> - _.contains(filter_action_names, action_name) - class Pettanr.AppHelper @manifest: () -> Manifest.manifest @@ -113,36 +110,9 @@ class Pettanr else $.timeago(datetime) - - @cache = {} + @cache = null @credits = {} - class Pettanr.Dialog extends Backbone.View - - initialize: (options) -> - super(options) - - render: () -> - this.$el.html('') - this - - refresh: (body) -> - @listenTo(body, 'navigate', @navigate) - this.$el.html(body.render().el) - - fire: (params) -> - c = Pettanr[Pettanr.camelize(params['controller']) + 'Controller'] - controller = new c - controller.params = params - @listenTo(controller, 'ready', @refresh) - # ignore retitle message - # @listenTo(controller, 'retitle', @retitle) - controller[params['action']]() - - local_navigate: (url) -> - @router.local_navigate(url, true) - - #>> https://gist.github.com/davidjbeveridge/3813724 @xeach: (arr, func, index=0) -> if index < arr.length then [ func(arr[index], index), @xeach(arr, func, index + 1)... ] else []