X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=app%2Fassets%2Fjavascripts%2Fviews%2Fsheets%2Fplay.js.coffee;h=5d20e34cdb353889fda156d9480fcb2e4e8f600b;hb=aef339be852b4910225c5c9b8798df77bdbc9a9e;hp=3bce7426f59520eab949abf9648df96328e0f73f;hpb=083cd052b6a10be6ddb3534307176f8c415952a8;p=pettanr%2Fpettanr.git diff --git a/app/assets/javascripts/views/sheets/play.js.coffee b/app/assets/javascripts/views/sheets/play.js.coffee index 3bce7426..5d20e34c 100644 --- a/app/assets/javascripts/views/sheets/play.js.coffee +++ b/app/assets/javascripts/views/sheets/play.js.coffee @@ -16,7 +16,6 @@ class Pettanr.Views.Sheet.PlayModule.Footer extends Backbone.View initialize: (options) -> @panel = options.panel @sheet_panel = options.sheet_panel - @operators = options.operators render: () -> this.$el.html('') @@ -36,7 +35,7 @@ class Pettanr.Views.Sheet.PlayModule.Footer extends Backbone.View ) this.$el.append(Pettanr.AppHelper.distance_of_time_in_words_to_now(@sheet_panel.get('updated_at'))) # - if @panel.is_own(@operators) + if @panel.is_own() this.$el.append('') this @@ -68,7 +67,6 @@ class Pettanr.Views.Sheet.PlayModule.Panel extends Backbone.View initialize: (options) -> @sheet_panel = options.sheet_panel - @operators = options.operators clear: () -> this.$el.html('') @@ -84,14 +82,12 @@ class Pettanr.Views.Sheet.PlayModule.Panel extends Backbone.View this.$el.html('') body = new Pettanr.Views.Panel.Body({ panel: @panel, - operators: @operators, spot: null }) this.$el.append(body.render().el) footer = new Pettanr.Views.Panel.Footer({ sheet_panel: sheet_panel, panel: @panel, - operators: @operators }) this.$el.append(footer.render().el) this.credits.push(@panel.licensed_pictures()) @@ -104,7 +100,6 @@ class Pettanr.Views.Sheet.PlayModule.Panels extends Backbone.View @parent = options.parent @items = options.items @credits = options.credits - @operators = options.operators render: () -> this.$el.html('') @@ -112,7 +107,6 @@ class Pettanr.Views.Sheet.PlayModule.Panels extends Backbone.View return if not sheet_panel.has_panel() panel_view = new Pettanr.Views.Sheet.PlayModule.Panel({ sheet_panel: sheet_panel, - operators: @operators, }) this.$el.append(panel_view.render().el) this @@ -123,7 +117,6 @@ class Pettanr.Views.Sheet.PlayModule.Body extends Backbone.View initialize: (options) -> @parent = options.parent @list = options.list - @operators = options.operators @items = @list.items() if @items.length < 1 @render_empty() @@ -143,7 +136,6 @@ class Pettanr.Views.Sheet.PlayModule.Body extends Backbone.View parent: this, items: @items, credits: credits, - operators: @operators }) this.$el.append(panels.render().el) this.$el.append(credits.render().el) @@ -159,13 +151,11 @@ class Pettanr.Views.Sheet.Play extends Backbone.View initialize: (options) -> @item = options.item @list = options.list - @operators = options.operators icon_url = Pettanr.url(@item.table_name(), 'show', {id: @item.get('id')}) caption_url = Pettanr.url(@item.table_name(), 'play', {id: @item.get('id')}) prof_url = Pettanr.url(@item.table_name(), 'show', {id: @item.get('id'), format: 'prof'}) @header = new Pettanr.Views.Sheet.PlayModule.Header({ item: @item, - operators: @operators, caption: @item.get('caption'), icon_url: icon_url, caption_url: caption_url, @@ -175,15 +165,14 @@ class Pettanr.Views.Sheet.Play extends Backbone.View @body = new Pettanr.Views.Sheet.PlayModule.Body({ parent: this, list: @list, - operators: @operators }) - @owner = new Pettanr.Views.Sheet.PlayModule.Owner({item: @item, operators: @operators}) + @owner = new Pettanr.Views.Sheet.PlayModule.Owner({item: @item}) render: () -> this.$el.html('') this.$el.append(@header.render().el) this.$el.append(@author.render().el) this.$el.append(@body.render().el) - this.$el.append(@owner.render().el) if @item.is_own(@operators) + this.$el.append(@owner.render().el) if @item.is_own() this