From 563fe51f662724ad1753011306224650f68d68e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Fri, 11 Mar 2016 14:59:07 +0100 Subject: [PATCH] Register costObject as an editable field --- frontend/app/openproject-costs-app.js | 8 ++++++++ lib/open_project/costs/patches/query_patch.rb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/app/openproject-costs-app.js b/frontend/app/openproject-costs-app.js index 36cc9ba86e..c701e2368c 100644 --- a/frontend/app/openproject-costs-app.js +++ b/frontend/app/openproject-costs-app.js @@ -33,6 +33,14 @@ localeFiles.keys().forEach(function(localeFile) { I18n.addTranslations(locale, localeFiles(localeFile)[locale]); }); +// Register Budget as select inline edit +angular + .module('openproject') + .run(['wpEditField', function(wpEditField) { + wpEditField.extendFieldType('select', ['Budget']); + }]); + + // main app var openprojectCostsApp = angular.module('openproject'); diff --git a/lib/open_project/costs/patches/query_patch.rb b/lib/open_project/costs/patches/query_patch.rb index f6eaca8cb1..ab9f5b3c10 100644 --- a/lib/open_project/costs/patches/query_patch.rb +++ b/lib/open_project/costs/patches/query_patch.rb @@ -57,7 +57,7 @@ module OpenProject::Costs::Patches::QueryPatch # Same as typing in the class base.class_eval do - add_available_column(QueryColumn.new(:cost_object_subject)) + add_available_column(QueryColumn.new(:cost_object)) add_available_column(CurrencyQueryColumn.new( :material_costs,