From 45413b56b270334c13d2b9b02a03e3c51bfe2755 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 2 Nov 2015 14:53:34 +0100 Subject: [PATCH 1/2] Added missing super in constructor. --- .../app/controllers/_application_controller_form.coffee | 1 + .../app/controllers/_application_controller_table.coffee | 1 + 2 files changed, 2 insertions(+) diff --git a/app/assets/javascripts/app/controllers/_application_controller_form.coffee b/app/assets/javascripts/app/controllers/_application_controller_form.coffee index c29b98950..c9814a085 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_form.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_form.coffee @@ -1,5 +1,6 @@ class App.ControllerForm extends App.Controller constructor: (params) -> + super for key, value of params @[key] = value diff --git a/app/assets/javascripts/app/controllers/_application_controller_table.coffee b/app/assets/javascripts/app/controllers/_application_controller_table.coffee index 0aef456b8..95c4a45cb 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_table.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_table.coffee @@ -10,6 +10,7 @@ class App.ControllerTable extends App.Controller '.js-tableHead': 'tableHead' constructor: (params) -> + super for key, value of params @[key] = value From c8bb1d1d7340ba5d16cd82c22cdb542f064433c4 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 2 Nov 2015 16:39:56 +0100 Subject: [PATCH 2/2] Fixed naming issues with spine controller. --- .../app/controllers/_application_controller_table.coffee | 6 ++---- public/assets/tests/table.js | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_application_controller_table.coffee b/app/assets/javascripts/app/controllers/_application_controller_table.coffee index 95c4a45cb..affd66f6f 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_table.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_table.coffee @@ -11,8 +11,6 @@ class App.ControllerTable extends App.Controller constructor: (params) -> super - for key, value of params - @[key] = value # apply personal preferences data = @preferencesGet() @@ -109,7 +107,7 @@ class App.ControllerTable extends App.Controller new App.ControllerTable( el: element overview: ['time', 'area', 'level', 'browser', 'location', 'data'] - attributes: [ + attribute_list: [ { name: 'time', display: 'Time', tag: 'datetime' }, { name: 'area', display: 'Area', type: 'text' }, { name: 'level', display: 'Level', type: 'text' }, @@ -126,7 +124,7 @@ class App.ControllerTable extends App.Controller if !@model @model = {} overview = @overview || @model.configure_overview || [] - attributes = @attributes || @model.configure_attributes || {} + attributes = @attribute_list || @model.configure_attributes || {} attributes = App.Model.attributesGet(false, attributes) destroy = @model.configure_delete diff --git a/public/assets/tests/table.js b/public/assets/tests/table.js index 21ac31a4e..d9aaa7cfd 100644 --- a/public/assets/tests/table.js +++ b/public/assets/tests/table.js @@ -546,7 +546,7 @@ test( "table test 4", function() { new App.ControllerTable({ el: el, overview: ['name', 'data', 'active'], - attributes: [ + attribute_list: [ { name: 'name', display: 'Name', type: 'text', style: 'width: 10%' }, { name: 'data', display: 'Data', type: 'text' }, { name: 'active', display: 'Active', type: 'text' },