From 4c0318c68a5caf9befdb246430dbda2c2436df5d Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Sat, 24 Oct 2015 02:29:05 +0200 Subject: [PATCH 001/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2181839d01..5bd56c2a7f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: fb3833c47fafb8c6924016fb2174890b71c38ead + revision: c82b83ca4d06b47dff51fce146dd5b2432c92180 branch: release/4.2 specs: openproject-translations (4.2.9) From e2aed161370d33e962d0d160814991b6871b1f4e Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Mon, 26 Oct 2015 02:28:39 +0100 Subject: [PATCH 002/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5bd56c2a7f..a395ed67cc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: c82b83ca4d06b47dff51fce146dd5b2432c92180 + revision: 9e3afef177c5cbcb5b1f3e0e7160fe2adfb29f98 branch: release/4.2 specs: openproject-translations (4.2.9) From ffb5cd35c2b658baf0f3889f25a380db69c9386a Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Tue, 27 Oct 2015 02:28:59 +0100 Subject: [PATCH 003/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a395ed67cc..81e773d71f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 9e3afef177c5cbcb5b1f3e0e7160fe2adfb29f98 + revision: f870a182d989606962ad15c31d9a4919ad100bc3 branch: release/4.2 specs: openproject-translations (4.2.9) From 7ee77a338ecba498f10900a78e6eab4ec14da52a Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Wed, 28 Oct 2015 02:29:08 +0100 Subject: [PATCH 004/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 81e773d71f..1f01fca909 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: f870a182d989606962ad15c31d9a4919ad100bc3 + revision: a732a103b187ea37b5c9e58ae1280bf9d9d91f11 branch: release/4.2 specs: openproject-translations (4.2.9) From ca7430a5e525e4035088f0201a9e7949579cc7ae Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Thu, 29 Oct 2015 02:31:39 +0100 Subject: [PATCH 005/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 1f01fca909..ee8b26f5b0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: a732a103b187ea37b5c9e58ae1280bf9d9d91f11 + revision: 5ed2e8f740156a6c7cf0268f4b8be4cfd3265ef7 branch: release/4.2 specs: openproject-translations (4.2.9) From ca5e32a5170b06f679094ba42f8d4903a200070a Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Thu, 29 Oct 2015 14:48:37 +0100 Subject: [PATCH 006/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ee8b26f5b0..d2cf752a6e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 5ed2e8f740156a6c7cf0268f4b8be4cfd3265ef7 + revision: 39aa62274ff5198e0c73bdb0fe46633d531b9082 branch: release/4.2 specs: openproject-translations (4.2.9) From bb1572ca932420d8f151e86ac53df09a0cd6e046 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Thu, 29 Oct 2015 15:40:58 +0100 Subject: [PATCH 007/123] Adapt version to corresponding OpenProject core version. --- lib/open_project/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/open_project/version.rb b/lib/open_project/version.rb index a99e224f02..3c8e33ee31 100644 --- a/lib/open_project/version.rb +++ b/lib/open_project/version.rb @@ -33,7 +33,7 @@ module OpenProject module VERSION #:nodoc: MAJOR = 4 MINOR = 2 - PATCH = 9 + PATCH = 10 TINY = PATCH # Redmine compat # Used by semver to define the special version (if any). From 5b38b53ff8cc0d30d84a85bdeb1048b7fac56a2e Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Thu, 29 Oct 2015 16:15:15 +0100 Subject: [PATCH 008/123] Update reference to OpenProject-Translations --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index d2cf752a6e..bf7c77a952 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,10 +53,10 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 39aa62274ff5198e0c73bdb0fe46633d531b9082 + revision: df8ebeffdbcdd5b54b0ec6bc9651754faaec49ef branch: release/4.2 specs: - openproject-translations (4.2.9) + openproject-translations (4.2.10) crowdin-api (~> 0.2.4) mixlib-shellout (~> 2.1.0) rails (~> 3.2.14) From 959d7903bd0639b401094e4a7a5274810a961c53 Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Fri, 30 Oct 2015 02:28:49 +0100 Subject: [PATCH 009/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index bf7c77a952..3b46a88bc9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: df8ebeffdbcdd5b54b0ec6bc9651754faaec49ef + revision: b8624398d5b0d94ed6327062717609660317739b branch: release/4.2 specs: openproject-translations (4.2.10) From 9e14dae651db1c9b2a22ecf591f28741a153edef Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Sat, 31 Oct 2015 02:29:41 +0100 Subject: [PATCH 010/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3b46a88bc9..2c3f850b81 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: b8624398d5b0d94ed6327062717609660317739b + revision: 4c4d19fe34f0eb57655a5bc37d0aec2d8839e0f0 branch: release/4.2 specs: openproject-translations (4.2.10) From 556019da4f15e8d66db08866e1a781af1e8c617d Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Sun, 1 Nov 2015 02:29:52 +0100 Subject: [PATCH 011/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2c3f850b81..b0b6175c7d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 4c4d19fe34f0eb57655a5bc37d0aec2d8839e0f0 + revision: b103ec379df8f28437c0830f80766ccf8109c68e branch: release/4.2 specs: openproject-translations (4.2.10) From 7adae553b233916d03e10d17603100e9ef89e378 Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Tue, 3 Nov 2015 02:30:31 +0100 Subject: [PATCH 012/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index b0b6175c7d..0bda9e4456 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: b103ec379df8f28437c0830f80766ccf8109c68e + revision: f0639897db98a21834ded11d069df1a294593c0a branch: release/4.2 specs: openproject-translations (4.2.10) From 13ade9dedf0d59b1c74fa8ad36d864ae66c98fb9 Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Wed, 4 Nov 2015 02:29:04 +0100 Subject: [PATCH 013/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 0bda9e4456..ec5b9f5c6b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: f0639897db98a21834ded11d069df1a294593c0a + revision: 3565a665a0a5ebf2970722e5717cfdc5590a513a branch: release/4.2 specs: openproject-translations (4.2.10) From 2cfb0500fff32b928bb83df54ffe683601187829 Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Thu, 5 Nov 2015 02:30:31 +0100 Subject: [PATCH 014/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ec5b9f5c6b..25cf4d0fbe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 3565a665a0a5ebf2970722e5717cfdc5590a513a + revision: 268ec80fa342b526ae5914b86a6892a813a8821a branch: release/4.2 specs: openproject-translations (4.2.10) From 30057b9656a0152b9db1e30a179ef2fecfd975d0 Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Fri, 6 Nov 2015 02:28:56 +0100 Subject: [PATCH 015/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 25cf4d0fbe..47b74e93b7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 268ec80fa342b526ae5914b86a6892a813a8821a + revision: ba8169e5c4953b4ab4c6c0cfb120611b7a7febdb branch: release/4.2 specs: openproject-translations (4.2.10) From 893da3aafa5fb8e086bdda352e483cbb2fb134af Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Sat, 7 Nov 2015 02:31:55 +0100 Subject: [PATCH 016/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 47b74e93b7..ab02628c40 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: ba8169e5c4953b4ab4c6c0cfb120611b7a7febdb + revision: 99ca6056ad6464ddb6077a5c5743b5cf49adb65b branch: release/4.2 specs: openproject-translations (4.2.10) From 97f58465ccbf73d586990b949db6d866c8216deb Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Tue, 10 Nov 2015 02:29:05 +0100 Subject: [PATCH 017/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ab02628c40..721945cf5b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 99ca6056ad6464ddb6077a5c5743b5cf49adb65b + revision: 8ede59cc1b8937ed0bd9a2417bcc5e49962d838c branch: release/4.2 specs: openproject-translations (4.2.10) From 3c9d01328a1efc5aa0a700769c7d50a61e6f65bc Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Sat, 14 Nov 2015 02:32:42 +0100 Subject: [PATCH 018/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 721945cf5b..19b887dd3d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 8ede59cc1b8937ed0bd9a2417bcc5e49962d838c + revision: 143da40b5bd09df530ad852685b8c3ce339ef71e branch: release/4.2 specs: openproject-translations (4.2.10) From 0ca5f123ab5c22f56b3d958a51ce5f9cf71ec902 Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Wed, 18 Nov 2015 02:32:36 +0100 Subject: [PATCH 019/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 19b887dd3d..69504f27b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 143da40b5bd09df530ad852685b8c3ce339ef71e + revision: 4df7ec511a2fe3fd3d032b3cf0b5e49a0e77ab3a branch: release/4.2 specs: openproject-translations (4.2.10) From fff94a0034675741598891c547218ad6964a95bc Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Thu, 19 Nov 2015 02:28:59 +0100 Subject: [PATCH 020/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 69504f27b6..d362c3b485 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 4df7ec511a2fe3fd3d032b3cf0b5e49a0e77ab3a + revision: 8dadcaf275e71ef9d255122cfdd529d21c7b3778 branch: release/4.2 specs: openproject-translations (4.2.10) From b755ae53aae3795fb631e1387baac847f0a188fa Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Fri, 20 Nov 2015 02:29:05 +0100 Subject: [PATCH 021/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d362c3b485..79daec3c1a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 8dadcaf275e71ef9d255122cfdd529d21c7b3778 + revision: f39dc2e9a91070d376bce324af1e1a43a10fdab7 branch: release/4.2 specs: openproject-translations (4.2.10) From 0ea80c35714a00efeee4469b6b45e8946d2d59d7 Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Sat, 21 Nov 2015 02:28:58 +0100 Subject: [PATCH 022/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 79daec3c1a..4498e2f733 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: f39dc2e9a91070d376bce324af1e1a43a10fdab7 + revision: c24cf94355c411116cb6a9a91d09f5799ee30f98 branch: release/4.2 specs: openproject-translations (4.2.10) From 1d1b537e756ff5f11c9314336d68d5e9b95b6542 Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Tue, 24 Nov 2015 02:32:21 +0100 Subject: [PATCH 023/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4498e2f733..bc0cfab9b5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: c24cf94355c411116cb6a9a91d09f5799ee30f98 + revision: d722016f9399a9e2ce07a746937152b7c99394af branch: release/4.2 specs: openproject-translations (4.2.10) From 37b16e777ae3c629af63de93c488cdd30fd29605 Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Wed, 25 Nov 2015 02:30:28 +0100 Subject: [PATCH 024/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index bc0cfab9b5..8b0333291a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: d722016f9399a9e2ce07a746937152b7c99394af + revision: b29fd63fd69876bd09a7a759d95fe0a1bc824cd3 branch: release/4.2 specs: openproject-translations (4.2.10) From 420624264997bbea568a17b04f1c2b62e78ae7aa Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Thu, 26 Nov 2015 02:33:45 +0100 Subject: [PATCH 025/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 8b0333291a..3e2adbf77a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: b29fd63fd69876bd09a7a759d95fe0a1bc824cd3 + revision: 7c31ca466d923c4ec2917217a27503eeee035fbd branch: release/4.2 specs: openproject-translations (4.2.10) From 97c11aa7b7b1370a0cb0241553f6957bd0a478c2 Mon Sep 17 00:00:00 2001 From: Continuous Integration Date: Fri, 27 Nov 2015 02:28:59 +0100 Subject: [PATCH 026/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3e2adbf77a..e517c14ee9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 7c31ca466d923c4ec2917217a27503eeee035fbd + revision: b8d28a2e73397b9057057c4521433af32edf07bc branch: release/4.2 specs: openproject-translations (4.2.10) From 42ec7a2ece2b2af584f5c0383b79317b87c15d9d Mon Sep 17 00:00:00 2001 From: CI Date: Fri, 27 Nov 2015 16:14:53 +0000 Subject: [PATCH 027/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index e517c14ee9..3b5e564bac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: b8d28a2e73397b9057057c4521433af32edf07bc + revision: 33df7f8530219be0dd0b4fd04284b7152d658880 branch: release/4.2 specs: openproject-translations (4.2.10) From d378e8813e4961d3806c17169a0e8be677400b48 Mon Sep 17 00:00:00 2001 From: CI Date: Wed, 2 Dec 2015 00:43:16 +0000 Subject: [PATCH 028/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3b5e564bac..7da68e4062 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 33df7f8530219be0dd0b4fd04284b7152d658880 + revision: 4c2de90de9689c8fdd1c36ac5974238255151795 branch: release/4.2 specs: openproject-translations (4.2.10) From 3e47f81d428a61e7b8e7a77bddc55c1d03164135 Mon Sep 17 00:00:00 2001 From: CI Date: Fri, 4 Dec 2015 00:36:32 +0000 Subject: [PATCH 029/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7da68e4062..2b2117bc0a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 4c2de90de9689c8fdd1c36ac5974238255151795 + revision: adbb844267fcb92e188732823b00e1aacf38b317 branch: release/4.2 specs: openproject-translations (4.2.10) From 7cf2cb917977b968e63bcb5b4c91af545a785758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Tue, 8 Dec 2015 09:39:34 +0100 Subject: [PATCH 030/123] Use repoman URL provided by addon-repositories [ci skip] --- packaging/conf/configuration.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packaging/conf/configuration.yml b/packaging/conf/configuration.yml index 0c1264d6a0..f6973fff26 100644 --- a/packaging/conf/configuration.yml +++ b/packaging/conf/configuration.yml @@ -38,18 +38,20 @@ default: smtp_password: <%= ENV['SMTP_PASSWORD'] %> smtp_enable_starttls_auto: <%= ENV.fetch('SMTP_ENABLE_STARTTLS_AUTO') { "false" } %> attachments_storage_path: <%= ENV.fetch('ATTACHMENTS_STORAGE_PATH') { "/var/db/_APP_NAME_/files" } %> -<% if (ENV['GIT_REPOSITORIES'] || ENV['SVN_REPOSITORIES']).present? %> +<% git_configured = ENV['GIT_REPOSITORIES'].present? %> +<% svn_configured = ENV['SVN_REPOSITORIES'].present? %> +<% if git_configured || svn_configured %> scm: - <% if ENV['GIT_REPOSITORIES'].present? %> + <% if git_configured %> git: manages: <%= ENV['GIT_REPOSITORIES'] %> mode: 0770 group: <%= ENV['SERVER_GROUP'] %> <% end %> - <% if ENV['SVN_REPOSITORIES'].present? %> + <% if svn_configured %> subversion: # SVN uses Apache repository wrapper due to permission errors in multi-user operation - manages: http://127.0.0.1/repoman_svn + manages: <%= ENV['SVN_REPOMAN_URL'] %> # Do noot verify SSL certificates when SERVER_PROTOCOL is 'https'. # As we currently only support local repoman installations with packager, # this option is set to true by default. From 167196861223fd8bae6515a56ebf3cb29362905c Mon Sep 17 00:00:00 2001 From: CI Date: Sat, 12 Dec 2015 00:37:08 +0000 Subject: [PATCH 031/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2b2117bc0a..5f753ff851 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: adbb844267fcb92e188732823b00e1aacf38b317 + revision: f31f95d39249b9d1acfa890668e429dfb21d1591 branch: release/4.2 specs: openproject-translations (4.2.10) From b51eea24bde8cd0445aa02cd0a38ea1cd4223d73 Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Tue, 15 Dec 2015 11:58:34 +0100 Subject: [PATCH 032/123] use standard select in group by modal --- .../work_packages/modals/group_by.html | 50 +++++++++++-------- .../work-packages-modal-focus-spec.js | 2 +- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/frontend/app/templates/work_packages/modals/group_by.html b/frontend/app/templates/work_packages/modals/group_by.html index 98256d07bf..0ded037297 100644 --- a/frontend/app/templates/work_packages/modals/group_by.html +++ b/frontend/app/templates/work_packages/modals/group_by.html @@ -4,28 +4,36 @@

{{ ::I18n.t('js.label_group_by') }}

-
- - {{$select.selected.title}} - -
-
-
- - - -
- {{ ::I18n.t('js.work_packages.label_column_select') }} +
+
+ +
+
+ +
+
-
-
- - -
+ +
+ + +
+
diff --git a/frontend/tests/integration/specs/work-packages/work-packages-modal-focus-spec.js b/frontend/tests/integration/specs/work-packages/work-packages-modal-focus-spec.js index f209a41c37..90f3d3be23 100644 --- a/frontend/tests/integration/specs/work-packages/work-packages-modal-focus-spec.js +++ b/frontend/tests/integration/specs/work-packages/work-packages-modal-focus-spec.js @@ -61,7 +61,7 @@ describe('OpenProject', function() { element(by.css('#work-packages-settings-button')).click(); element(by.css('[ng-click="showGroupingModal($event)"]')).click(); browser.driver.switchTo().activeElement().getAttribute('id').then(function (elementId) { - expect(element(by.css('.ng-modal-window .select2-container input.ui-select-focusser')).getAttribute('id')) + expect(element(by.css('.ng-modal-window #selected_columns_new')).getAttribute('id')) .to.eventually.equal(elementId); }); }); From 83beb5370f9c4512472946f130a8826d26bd116a Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Wed, 16 Dec 2015 14:50:45 +0100 Subject: [PATCH 033/123] remove method=put from preview request --- frontend/app/ui_components/has-preview-directive.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/app/ui_components/has-preview-directive.js b/frontend/app/ui_components/has-preview-directive.js index a38fb2825f..10be9ebfe4 100644 --- a/frontend/app/ui_components/has-preview-directive.js +++ b/frontend/app/ui_components/has-preview-directive.js @@ -39,8 +39,7 @@ module.exports = function() { url: href, type: 'POST', data: angular.element('#' + id.replace(/(-preview)/g, '')).serialize() - .replace( - '_method=patch&', ''), + .replace(/_method=(patch|put)&/, ''), success: function(data) { angular.element(target).html(data); angular.element('html, body').animate({ From 651704f57267a648df36bf50fee6af4de39a94b4 Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Thu, 17 Dec 2015 10:54:26 +0100 Subject: [PATCH 034/123] hide empty attribute groups --- .../routes/controllers/work-package-show.controller.js | 1 + .../components/routes/partials/work-packages.show.html | 2 +- .../work-packages/controllers/wp-new.controller.js | 1 + .../wp-create-form/wp-create-form.directive.html | 2 +- .../wp-create-form/wp-full-create-form.directive.html | 2 +- frontend/app/templates/work_packages/tabs/overview.html | 2 +- .../controllers/details-tab-overview-controller.js | 1 + .../work_packages/helpers/work-package-display-helper.js | 8 +++++++- 8 files changed, 14 insertions(+), 5 deletions(-) diff --git a/frontend/app/components/routes/controllers/work-package-show.controller.js b/frontend/app/components/routes/controllers/work-package-show.controller.js index df55adbd9f..002a0758b7 100644 --- a/frontend/app/components/routes/controllers/work-package-show.controller.js +++ b/frontend/app/components/routes/controllers/work-package-show.controller.js @@ -263,6 +263,7 @@ function WorkPackageShowController($scope, $rootScope, $state, latestTab, workPa vm.workPackage = $scope.workPackage; vm.isGroupHideable = WorkPackagesDisplayHelper.isGroupHideable; + vm.isGroupEmpty = WorkPackagesDisplayHelper.isGroupEmpty; vm.isFieldHideable = WorkPackagesDisplayHelper.isFieldHideable; vm.getLabel = WorkPackagesDisplayHelper.getLabel; vm.isSpecified = WorkPackagesDisplayHelper.isSpecified; diff --git a/frontend/app/components/routes/partials/work-packages.show.html b/frontend/app/components/routes/partials/work-packages.show.html index 36ca4a73a1..1995b42599 100644 --- a/frontend/app/components/routes/partials/work-packages.show.html +++ b/frontend/app/components/routes/partials/work-packages.show.html @@ -108,7 +108,7 @@ -
+
diff --git a/frontend/app/components/work-packages/controllers/wp-new.controller.js b/frontend/app/components/work-packages/controllers/wp-new.controller.js index 1de9b8d754..1bc626d04c 100644 --- a/frontend/app/components/work-packages/controllers/wp-new.controller.js +++ b/frontend/app/components/work-packages/controllers/wp-new.controller.js @@ -54,6 +54,7 @@ function WorkPackageNewController($scope, vm.isGroupHideable = function(groups, group, wp) { return WorkPackagesDisplayHelper.isGroupHideable(groups, group, wp, vm.isFieldHideable); }; + vm.isGroupEmpty = WorkPackagesDisplayHelper.isGroupEmpty; vm.getLabel = WorkPackagesDisplayHelper.getLabel; vm.isSpecified = WorkPackagesDisplayHelper.isSpecified; vm.isEditable = WorkPackagesDisplayHelper.isEditable; diff --git a/frontend/app/components/work-packages/directives/wp-create-form/wp-create-form.directive.html b/frontend/app/components/work-packages/directives/wp-create-form/wp-create-form.directive.html index 9b2e7a2e8a..d5cecfdea5 100644 --- a/frontend/app/components/work-packages/directives/wp-create-form/wp-create-form.directive.html +++ b/frontend/app/components/work-packages/directives/wp-create-form/wp-create-form.directive.html @@ -19,7 +19,7 @@
diff --git a/frontend/app/components/work-packages/directives/wp-create-form/wp-full-create-form.directive.html b/frontend/app/components/work-packages/directives/wp-create-form/wp-full-create-form.directive.html index 8abcdf9478..d7141794d5 100644 --- a/frontend/app/components/work-packages/directives/wp-create-form/wp-full-create-form.directive.html +++ b/frontend/app/components/work-packages/directives/wp-create-form/wp-full-create-form.directive.html @@ -49,7 +49,7 @@
diff --git a/frontend/app/templates/work_packages/tabs/overview.html b/frontend/app/templates/work_packages/tabs/overview.html index e7768cc955..1c2eb80090 100644 --- a/frontend/app/templates/work_packages/tabs/overview.html +++ b/frontend/app/templates/work_packages/tabs/overview.html @@ -17,7 +17,7 @@
-
+
diff --git a/frontend/app/work_packages/controllers/details-tab-overview-controller.js b/frontend/app/work_packages/controllers/details-tab-overview-controller.js index 4ac87f59b8..33e62dc5b3 100644 --- a/frontend/app/work_packages/controllers/details-tab-overview-controller.js +++ b/frontend/app/work_packages/controllers/details-tab-overview-controller.js @@ -42,6 +42,7 @@ module.exports = function( vm.workPackage = $scope.workPackage; vm.isGroupHideable = WorkPackageDisplayHelper.isGroupHideable; + vm.isGroupEmpty = WorkPackageDisplayHelper.isGroupEmpty; vm.isFieldHideable = WorkPackageDisplayHelper.isFieldHideable; vm.getLabel = WorkPackageDisplayHelper.getLabel; vm.isSpecified = WorkPackageDisplayHelper.isSpecified; diff --git a/frontend/app/work_packages/helpers/work-package-display-helper.js b/frontend/app/work_packages/helpers/work-package-display-helper.js index 28c94e39f4..f96bf740b9 100644 --- a/frontend/app/work_packages/helpers/work-package-display-helper.js +++ b/frontend/app/work_packages/helpers/work-package-display-helper.js @@ -45,10 +45,15 @@ module.exports = function(WorkPackageFieldService, $window, $timeout) { } var group = _.find(groupedFields, {groupName: groupName}); var isHideable = typeof cb === 'undefined' ? isFieldHideable : cb; - return _.every(group.attributes, function(field) { + return group.attributes.length === 0 || _.every(group.attributes, function(field) { return isHideable(workPackage, field); }); }, + isGroupEmpty = function (groupedFields, groupName) { + var group = _.find(groupedFields, {groupName: groupName}); + + return group.attributes.length === 0 + }, isFieldHideable = function (workPackage, field) { if (!workPackage) { return true; @@ -116,6 +121,7 @@ module.exports = function(WorkPackageFieldService, $window, $timeout) { return { isGroupHideable: isGroupHideable, + isGroupEmpty: isGroupEmpty, isFieldHideable: isFieldHideable, isFieldHideableOnCreate: isFieldHideableOnCreate, isSpecified: isSpecified, From 1acfadd625d2b3c43cc3c2e987662ac46716b755 Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Thu, 17 Dec 2015 10:56:01 +0100 Subject: [PATCH 035/123] add missing class on work package attachments All other attribute groups (e.g. people, files) have that class. Without the class, the files section lacks an margin-top --- frontend/app/templates/work_packages/attachments-edit.html | 2 +- frontend/app/templates/work_packages/attachments.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/app/templates/work_packages/attachments-edit.html b/frontend/app/templates/work_packages/attachments-edit.html index 51b383cce7..e02ec0d556 100644 --- a/frontend/app/templates/work_packages/attachments-edit.html +++ b/frontend/app/templates/work_packages/attachments-edit.html @@ -1,4 +1,4 @@ -
+

diff --git a/frontend/app/templates/work_packages/attachments.html b/frontend/app/templates/work_packages/attachments.html index 4a8535b9ff..5a30a65d90 100644 --- a/frontend/app/templates/work_packages/attachments.html +++ b/frontend/app/templates/work_packages/attachments.html @@ -1,4 +1,4 @@ -
+

From f6f10b8efc7b702cd093e7fe65859051b4ff2dee Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Thu, 17 Dec 2015 11:31:03 +0100 Subject: [PATCH 036/123] refactor group hiding to have less code in the view --- .../routes/controllers/work-package-show.controller.js | 8 ++++++-- .../components/routes/partials/work-packages.show.html | 2 +- .../work-packages/controllers/wp-new.controller.js | 10 +++++++--- .../wp-create-form/wp-create-form.directive.html | 2 +- .../wp-create-form/wp-full-create-form.directive.html | 2 +- .../app/templates/work_packages/tabs/overview.html | 2 +- .../controllers/details-tab-overview-controller.js | 8 ++++++-- .../helpers/work-package-display-helper.js | 7 ++++++- 8 files changed, 29 insertions(+), 12 deletions(-) diff --git a/frontend/app/components/routes/controllers/work-package-show.controller.js b/frontend/app/components/routes/controllers/work-package-show.controller.js index 002a0758b7..9735a60fdd 100644 --- a/frontend/app/components/routes/controllers/work-package-show.controller.js +++ b/frontend/app/components/routes/controllers/work-package-show.controller.js @@ -262,8 +262,12 @@ function WorkPackageShowController($scope, $rootScope, $state, latestTab, workPa vm.hideEmptyFields = true; vm.workPackage = $scope.workPackage; - vm.isGroupHideable = WorkPackagesDisplayHelper.isGroupHideable; - vm.isGroupEmpty = WorkPackagesDisplayHelper.isGroupEmpty; + vm.shouldHideGroup = function(group) { + return WorkPackagesDisplayHelper.shouldHideGroup(vm.hideEmptyFields, + vm.groupedFields, + group, + vm.workPackage); + }; vm.isFieldHideable = WorkPackagesDisplayHelper.isFieldHideable; vm.getLabel = WorkPackagesDisplayHelper.getLabel; vm.isSpecified = WorkPackagesDisplayHelper.isSpecified; diff --git a/frontend/app/components/routes/partials/work-packages.show.html b/frontend/app/components/routes/partials/work-packages.show.html index 1995b42599..cff2d240af 100644 --- a/frontend/app/components/routes/partials/work-packages.show.html +++ b/frontend/app/components/routes/partials/work-packages.show.html @@ -108,7 +108,7 @@

-
+
diff --git a/frontend/app/components/work-packages/controllers/wp-new.controller.js b/frontend/app/components/work-packages/controllers/wp-new.controller.js index 1bc626d04c..cde77eca16 100644 --- a/frontend/app/components/work-packages/controllers/wp-new.controller.js +++ b/frontend/app/components/work-packages/controllers/wp-new.controller.js @@ -51,10 +51,14 @@ function WorkPackageNewController($scope, vm.loaderPromise = null; vm.isFieldHideable = WorkPackagesDisplayHelper.isFieldHideableOnCreate; - vm.isGroupHideable = function(groups, group, wp) { - return WorkPackagesDisplayHelper.isGroupHideable(groups, group, wp, vm.isFieldHideable); + vm.shouldHideGroup = function(group) { + return WorkPackagesDisplayHelper.shouldHideGroup(vm.hideEmptyFields, + vm.groupedFields, + group, + vm.workPackage, + vm.isFieldHideable); }; - vm.isGroupEmpty = WorkPackagesDisplayHelper.isGroupEmpty; + vm.getLabel = WorkPackagesDisplayHelper.getLabel; vm.isSpecified = WorkPackagesDisplayHelper.isSpecified; vm.isEditable = WorkPackagesDisplayHelper.isEditable; diff --git a/frontend/app/components/work-packages/directives/wp-create-form/wp-create-form.directive.html b/frontend/app/components/work-packages/directives/wp-create-form/wp-create-form.directive.html index d5cecfdea5..2ded8b86a1 100644 --- a/frontend/app/components/work-packages/directives/wp-create-form/wp-create-form.directive.html +++ b/frontend/app/components/work-packages/directives/wp-create-form/wp-create-form.directive.html @@ -19,7 +19,7 @@
diff --git a/frontend/app/components/work-packages/directives/wp-create-form/wp-full-create-form.directive.html b/frontend/app/components/work-packages/directives/wp-create-form/wp-full-create-form.directive.html index d7141794d5..ba571b5fc3 100644 --- a/frontend/app/components/work-packages/directives/wp-create-form/wp-full-create-form.directive.html +++ b/frontend/app/components/work-packages/directives/wp-create-form/wp-full-create-form.directive.html @@ -49,7 +49,7 @@
diff --git a/frontend/app/templates/work_packages/tabs/overview.html b/frontend/app/templates/work_packages/tabs/overview.html index 1c2eb80090..2f24f5fec9 100644 --- a/frontend/app/templates/work_packages/tabs/overview.html +++ b/frontend/app/templates/work_packages/tabs/overview.html @@ -17,7 +17,7 @@
-
+
diff --git a/frontend/app/work_packages/controllers/details-tab-overview-controller.js b/frontend/app/work_packages/controllers/details-tab-overview-controller.js index 33e62dc5b3..2f16517bfa 100644 --- a/frontend/app/work_packages/controllers/details-tab-overview-controller.js +++ b/frontend/app/work_packages/controllers/details-tab-overview-controller.js @@ -41,8 +41,12 @@ module.exports = function( vm.hideEmptyFields = true; vm.workPackage = $scope.workPackage; - vm.isGroupHideable = WorkPackageDisplayHelper.isGroupHideable; - vm.isGroupEmpty = WorkPackageDisplayHelper.isGroupEmpty; + vm.shouldHideGroup = function(group) { + return WorkPackageDisplayHelper.shouldHideGroup(vm.hideEmptyFields, + vm.groupedFields, + group, + vm.workPackage); + }; vm.isFieldHideable = WorkPackageDisplayHelper.isFieldHideable; vm.getLabel = WorkPackageDisplayHelper.getLabel; vm.isSpecified = WorkPackageDisplayHelper.isSpecified; diff --git a/frontend/app/work_packages/helpers/work-package-display-helper.js b/frontend/app/work_packages/helpers/work-package-display-helper.js index f96bf740b9..cf0cb9558f 100644 --- a/frontend/app/work_packages/helpers/work-package-display-helper.js +++ b/frontend/app/work_packages/helpers/work-package-display-helper.js @@ -52,7 +52,11 @@ module.exports = function(WorkPackageFieldService, $window, $timeout) { isGroupEmpty = function (groupedFields, groupName) { var group = _.find(groupedFields, {groupName: groupName}); - return group.attributes.length === 0 + return group.attributes.length === 0; + }, + shouldHideGroup = function(hideEmptyActive, groupedFields, groupName, workPackage, cb) { + return hideEmptyActive && isGroupHideable(groupedFields, groupName, workPackage, cb) || + !hideEmptyActive && isGroupEmpty(groupedFields, groupName); }, isFieldHideable = function (workPackage, field) { if (!workPackage) { @@ -122,6 +126,7 @@ module.exports = function(WorkPackageFieldService, $window, $timeout) { return { isGroupHideable: isGroupHideable, isGroupEmpty: isGroupEmpty, + shouldHideGroup: shouldHideGroup, isFieldHideable: isFieldHideable, isFieldHideableOnCreate: isFieldHideableOnCreate, isSpecified: isSpecified, From e3352f45eb457cee9ab13f082fbdc669ea7c6f3b Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Thu, 17 Dec 2015 11:49:22 +0100 Subject: [PATCH 037/123] Move routing to components --- frontend/app/components/common/routing.ts | 269 ++++++++++++++++++++++ frontend/app/openproject-app.js | 3 +- frontend/app/routing.js | 265 --------------------- 3 files changed, 270 insertions(+), 267 deletions(-) create mode 100644 frontend/app/components/common/routing.ts delete mode 100644 frontend/app/routing.js diff --git a/frontend/app/components/common/routing.ts b/frontend/app/components/common/routing.ts new file mode 100644 index 0000000000..70ff3ae600 --- /dev/null +++ b/frontend/app/components/common/routing.ts @@ -0,0 +1,269 @@ +// -- copyright +// OpenProject is a project management system. +// Copyright (C) 2012-2015 the OpenProject Foundation (OPF) +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See doc/COPYRIGHT.rdoc for more details. +// ++ + +angular + .module('openproject') + .config([ + '$stateProvider', + '$urlRouterProvider', + '$urlMatcherFactoryProvider', + function ($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider) { + + $urlRouterProvider.when('/work_packages/', '/work_packages'); + $urlMatcherFactoryProvider.strictMode(false); + + var panels = { + get watchers() { + return { + url: '/watchers', + template: '' + } + }, + + get activity() { + return { + url: '/activity', + template: '' + } + }, + + get activityDetails() { + var activity = this.activity; + activity.url = '#{activity_no:\d+}'; + + return activity; + } + }; + + $stateProvider + .state('work-packages', { + url: '', + abstract: true, + templateUrl: '/templates/work_packages.html', + controller: 'WorkPackagesController', + resolve: { + latestTab: function ($state) { + var stateName = 'work-packages.list.details.overview'; // the default tab + + return { + getStateName: function () { + return stateName; + }, + registerState: function () { + stateName = $state.current.name; + } + }; + } + } + }) + + .state('work-packages.new', { + url: '/{projects}/{projectPath}/work_packages/new?type&parent_id', + templateUrl: '/components/routes/partials/work-packages.new.html', + controllerAs: 'vm', + reloadOnSearch: false + }) + + .state('work-packages.copy', { + url: '/work_packages/{copiedFromWorkPackageId:[0-9]+}/copy', + templateUrl: '/components/routes/partials/work-packages.new.html' + }) + + .state('work-packages.edit', { + url: '/{projects}/{projectPath}/work_packages/{workPackageId}/edit', + params: { + projectPath: {value: null, squash: true}, + projects: {value: null, squash: true} + }, + + onEnter: function ($state, $stateParams, inplaceEditAll) { + inplaceEditAll.start(); + $state.go('work-packages.list.details.overview', $stateParams); + } + }) + + .state('work-packages.show', { + url: '/work_packages/{workPackageId:[0-9]+}?query_props', + templateUrl: '/components/routes/partials/work-packages.show.html', + controller: 'WorkPackageShowController', + controllerAs: 'vm', + resolve: { + workPackage: function (WorkPackageService, $stateParams) { + return WorkPackageService.getWorkPackage($stateParams.workPackageId); + }, + // TODO hack, get rid of latestTab in ShowController + latestTab: function ($state) { + var stateName = 'work-package.overview'; // the default tab + + return { + getStateName: function () { + return stateName; + }, + registerState: function () { + stateName = $state.current.name; + } + }; + } + }, + // HACK + // This is to avoid problems with the css depending on which page the + // browser starts from (deep-link). As we have CSS rules that change the + // layout drastically when on the show action (e.g. position: relative) + // and this should not be applied to the other states, we need to remove + // the trigger used in the CSS. The correct fix would be to alter the + // CSS. + onEnter: function ($state, $timeout) { + angular.element('body').addClass('action-show'); + + $timeout(function () { + if ($state.is('work-packages.show')) { + $state.go('work-packages.show.activity'); + } + }); + }, + + onExit: function () { + angular.element('body').removeClass('action-show'); + } + }) + .state('work-packages.show.activity', panels.activity) + .state('work-packages.show.activity.details', panels.activityDetails) + .state('work-packages.show.relations', { + url: '/relations', + templateUrl: '/templates/work_packages/tabs/relations.html' + }) + .state('work-packages.show.watchers', panels.watchers) + + .state('work-packages.list', { + url: '/{projects}/{projectPath}/work_packages?query_id&query_props', + controller: 'WorkPackagesListController', + templateUrl: '/components/routes/partials/work-packages.list.html', + params: { + // value: null makes the parameter optional + // squash: true avoids duplicate slashes when the paramter is not provided + projectPath: {value: null, squash: true}, + projects: {value: null, squash: true} + }, + reloadOnSearch: false, + // HACK + // This is to avoid problems with the css depending on which page the + // browser starts from (deep-link). As we have CSS rules that change the + // layout drastically when on the index action (e.g. position: absolute, + // heigt of footer, ...), and this should not be applied to the other + // states, we need to remove the trigger used in the CSS The correct fix + // would be to alter the CSS. + onEnter: function () { + angular.element('body').addClass('action-index'); + }, + onExit: function () { + angular.element('body').removeClass('action-index'); + } + }) + .state('work-packages.list.new', { + url: '/create_new?type&parent_id', + templateUrl: '/components/routes/partials/work-packages.list.new.html', + reloadOnSearch: false + }) + .state('work-packages.list.copy', { + url: '/details/{copiedFromWorkPackageId:[0-9]+}/copy', + templateUrl: '/components/routes/partials/work-packages.list.new.html', + reloadOnSearch: false + }) + .state('work-packages.list.details', { + url: '/details/{workPackageId:[0-9]+}', + templateUrl: '/components/routes/partials/work-packages.list.details.html', + controller: 'WorkPackageDetailsController', + reloadOnSearch: false, + resolve: { + workPackage: function (WorkPackageService, $stateParams) { + return WorkPackageService.getWorkPackage($stateParams.workPackageId); + } + } + }) + .state('work-packages.list.details.overview', { + url: '/overview', + controller: 'DetailsTabOverviewController', + templateUrl: '/templates/work_packages/tabs/overview.html', + controllerAs: 'vm', + }) + .state('work-packages.list.details.activity', panels.activity) + .state('work-packages.list.details.activity.details', panels.activityDetails) + .state('work-packages.list.details.relations', { + url: '/relations', + templateUrl: '/templates/work_packages/tabs/relations.html', + }) + .state('work-packages.list.details.watchers', panels.watchers); + }]) + + .run([ + '$location', + '$rootElement', + '$browser', + '$rootScope', + '$state', + function ($location, $rootElement, $browser, $rootScope, $state) { + // Our application is still a hybrid one, meaning most routes are still + // handled by Rails. As such, we disable the default link-hijacking that + // Angular's HTML5-mode turns on. + $rootElement.off('click'); + $rootElement.on('click', 'a[data-ui-route]', function (event) { + if (!jQuery('body').has('div[ui-view]').length) { + return; + } + if (event.ctrlKey || event.metaKey || event.which === 2) { + return; + } + + // NOTE: making use of event delegation, thus jQuery-only. + var elm = jQuery(event.target); + var absHref = elm.prop('href'); + var rewrittenUrl = $location.$$rewrite(absHref); + + if (absHref && !elm.attr('target') && + rewrittenUrl && !event.isDefaultPrevented()) { + + event.preventDefault(); + if (rewrittenUrl !== $browser.url()) { + // update location manually + $location.$$parse(rewrittenUrl); + $rootScope.$apply(); + // hack to work around FF6 bug 684208 when scenario runner clicks on links + //noinspection TypeScriptUnresolvedVariable + window.angular['ff-684208-preventDefault'] = true; + } + } + }); + + $rootScope.$on('$stateChangeStart', function (event, toState, toParams) { + if (!toParams.projects && toParams.projectPath) { + toParams.projects = 'projects'; + $state.go(toState, toParams); + } + }); + } + ]); diff --git a/frontend/app/openproject-app.js b/frontend/app/openproject-app.js index 6464fe2963..a9c7f594b2 100644 --- a/frontend/app/openproject-app.js +++ b/frontend/app/openproject-app.js @@ -296,7 +296,6 @@ require('./helpers'); require('./layout'); require('./messages'); require('./models'); -require('./routing'); require('./services'); require('./time_entries'); require('./timelines'); @@ -308,5 +307,5 @@ requireTemplate.keys().forEach(requireTemplate); require('!ngtemplate?module=openproject.templates!html!angular-busy/angular-busy.html'); -var requireComponent = require.context('./components/', true, /^((?!\.(test|spec)).)*\.(js|html)$/); +var requireComponent = require.context('./components/', true, /^((?!\.(test|spec)).)*\.(js|ts|html)$/); requireComponent.keys().forEach(requireComponent); diff --git a/frontend/app/routing.js b/frontend/app/routing.js deleted file mode 100644 index 14fac1b410..0000000000 --- a/frontend/app/routing.js +++ /dev/null @@ -1,265 +0,0 @@ -//-- copyright -// OpenProject is a project management system. -// Copyright (C) 2012-2015 the OpenProject Foundation (OPF) -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License version 3. -// -// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: -// Copyright (C) 2006-2013 Jean-Philippe Lang -// Copyright (C) 2010-2013 the ChiliProject Team -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -// -// See doc/COPYRIGHT.rdoc for more details. -//++ - -angular.module('openproject') - -.config([ - '$stateProvider', - '$urlRouterProvider', - '$urlMatcherFactoryProvider', - function($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider) { - - $urlRouterProvider.when('/work_packages/', '/work_packages'); - $urlMatcherFactoryProvider.strictMode(false); - - var panels = { - get watchers() { - return { - url: '/watchers', - template: '' - } - }, - - get activity() { - return { - url: '/activity', - template: '' - } - }, - - get activityDetails() { - var activity = this.activity; - activity.url = '#{activity_no:\d+}'; - - return activity; - } - }; - - $stateProvider - .state('work-packages', { - url: '', - abstract: true, - templateUrl: '/templates/work_packages.html', - controller: 'WorkPackagesController', - resolve: { - latestTab: function($state) { - var stateName = 'work-packages.list.details.overview'; // the default tab - - return { - getStateName: function() { - return stateName; - }, - registerState: function() { - stateName = $state.current.name; - } - }; - } - } - }) - - .state('work-packages.new', { - url: '/{projects}/{projectPath}/work_packages/new?type&parent_id', - templateUrl: '/components/routes/partials/work-packages.new.html', - controllerAs: 'vm', - reloadOnSearch: false - }) - - .state('work-packages.copy', { - url: '/work_packages/{copiedFromWorkPackageId:[0-9]+}/copy', - templateUrl: '/components/routes/partials/work-packages.new.html' - }) - - .state('work-packages.edit', { - url: '/{projects}/{projectPath}/work_packages/{workPackageId}/edit', - params: { - projectPath: { value: null, squash: true }, - projects: { value: null, squash: true } - }, - - onEnter: function ($state, $stateParams, inplaceEditAll) { - inplaceEditAll.start(); - $state.go('work-packages.list.details.overview', $stateParams); - } - }) - - .state('work-packages.show', { - url: '/work_packages/{workPackageId:[0-9]+}?query_props', - templateUrl: '/components/routes/partials/work-packages.show.html', - controller: 'WorkPackageShowController', - controllerAs: 'vm', - resolve: { - workPackage: function(WorkPackageService, $stateParams) { - return WorkPackageService.getWorkPackage($stateParams.workPackageId); - }, - // TODO hack, get rid of latestTab in ShowController - latestTab: function($state) { - var stateName = 'work-package.overview'; // the default tab - - return { - getStateName: function() { - return stateName; - }, - registerState: function() { - stateName = $state.current.name; - } - }; - } - }, - // HACK - // This is to avoid problems with the css depending on which page the - // browser starts from (deep-link). As we have CSS rules that change the - // layout drastically when on the show action (e.g. position: relative) - // and this should not be applied to the other states, we need to remove - // the trigger used in the CSS. The correct fix would be to alter the - // CSS. - onEnter: function($state, $timeout){ - angular.element('body').addClass('action-show'); - - $timeout(function () { - if ($state.is('work-packages.show')) { - $state.go('work-packages.show.activity'); - } - }); - }, - - onExit: function(){ - angular.element('body').removeClass('action-show'); - } - }) - .state('work-packages.show.activity', panels.activity) - .state('work-packages.show.activity.details', panels.activityDetails) - .state('work-packages.show.relations', { - url: '/relations', - templateUrl: '/templates/work_packages/tabs/relations.html' - }) - .state('work-packages.show.watchers', panels.watchers) - - .state('work-packages.list', { - url: '/{projects}/{projectPath}/work_packages?query_id&query_props', - controller: 'WorkPackagesListController', - templateUrl: '/components/routes/partials/work-packages.list.html', - params: { - // value: null makes the parameter optional - // squash: true avoids duplicate slashes when the paramter is not provided - projectPath: { value: null, squash: true }, - projects: { value: null, squash: true } - }, - reloadOnSearch: false, - // HACK - // This is to avoid problems with the css depending on which page the - // browser starts from (deep-link). As we have CSS rules that change the - // layout drastically when on the index action (e.g. position: absolute, - // heigt of footer, ...), and this should not be applied to the other - // states, we need to remove the trigger used in the CSS The correct fix - // would be to alter the CSS. - onEnter: function(){ - angular.element('body').addClass('action-index'); - }, - onExit: function(){ - angular.element('body').removeClass('action-index'); - } - }) - .state('work-packages.list.new', { - url: '/create_new?type&parent_id', - templateUrl: '/components/routes/partials/work-packages.list.new.html', - reloadOnSearch: false - }) - .state('work-packages.list.copy', { - url: '/details/{copiedFromWorkPackageId:[0-9]+}/copy', - templateUrl: '/components/routes/partials/work-packages.list.new.html', - reloadOnSearch: false - }) - .state('work-packages.list.details', { - url: '/details/{workPackageId:[0-9]+}', - templateUrl: '/components/routes/partials/work-packages.list.details.html', - controller: 'WorkPackageDetailsController', - reloadOnSearch: false, - resolve: { - workPackage: function(WorkPackageService, $stateParams) { - return WorkPackageService.getWorkPackage($stateParams.workPackageId); - } - } - }) - .state('work-packages.list.details.overview', { - url: '/overview', - controller: 'DetailsTabOverviewController', - templateUrl: '/templates/work_packages/tabs/overview.html', - controllerAs: 'vm', - }) - .state('work-packages.list.details.activity', panels.activity) - .state('work-packages.list.details.activity.details', panels.activityDetails) - .state('work-packages.list.details.relations', { - url: '/relations', - templateUrl: '/templates/work_packages/tabs/relations.html', - }) - .state('work-packages.list.details.watchers', panels.watchers); -}]) - -.run([ - '$location', - '$rootElement', - '$browser', - '$rootScope', - '$state', - function($location, $rootElement, $browser, $rootScope, $state) { - // Our application is still a hybrid one, meaning most routes are still - // handled by Rails. As such, we disable the default link-hijacking that - // Angular's HTML5-mode turns on. - $rootElement.off('click'); - $rootElement.on('click', 'a[data-ui-route]', function(event) { - if (!jQuery('body').has('div[ui-view]').length) { return; } - if (event.ctrlKey || event.metaKey || event.which === 2) { return; } - - // NOTE: making use of event delegation, thus jQuery-only. - var elm = jQuery(event.target); - var absHref = elm.prop('href'); - var rewrittenUrl = $location.$$rewrite(absHref); - - if (absHref && !elm.attr('target') && - rewrittenUrl && - !event.isDefaultPrevented()) { - - event.preventDefault(); - if (rewrittenUrl !== $browser.url()) { - // update location manually - $location.$$parse(rewrittenUrl); - $rootScope.$apply(); - // hack to work around FF6 bug 684208 when scenario runner clicks on links - window.angular['ff-684208-preventDefault'] = true; - } - } - }); - - $rootScope.$on('$stateChangeStart', function(event, toState, toParams){ - if (!toParams.projects && toParams.projectPath) { - toParams.projects = 'projects'; - $state.go(toState, toParams); - } - }); - } -]); From bee210995cf81a7750d3dd89504ae8360ae9b7b5 Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Thu, 17 Dec 2015 11:52:34 +0100 Subject: [PATCH 038/123] Remove annotations in routing configuration --- frontend/app/components/common/routing.ts | 413 +++++++++++----------- 1 file changed, 201 insertions(+), 212 deletions(-) diff --git a/frontend/app/components/common/routing.ts b/frontend/app/components/common/routing.ts index 70ff3ae600..36783ecc32 100644 --- a/frontend/app/components/common/routing.ts +++ b/frontend/app/components/common/routing.ts @@ -28,242 +28,231 @@ angular .module('openproject') - .config([ - '$stateProvider', - '$urlRouterProvider', - '$urlMatcherFactoryProvider', - function ($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider) { + .config(function ($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider) { + $urlRouterProvider.when('/work_packages/', '/work_packages'); + $urlMatcherFactoryProvider.strictMode(false); - $urlRouterProvider.when('/work_packages/', '/work_packages'); - $urlMatcherFactoryProvider.strictMode(false); - - var panels = { - get watchers() { - return { - url: '/watchers', - template: '' - } - }, + var panels = { + get watchers() { + return { + url: '/watchers', + template: '' + } + }, - get activity() { - return { - url: '/activity', - template: '' - } - }, + get activity() { + return { + url: '/activity', + template: '' + } + }, - get activityDetails() { - var activity = this.activity; - activity.url = '#{activity_no:\d+}'; + get activityDetails() { + var activity = this.activity; + activity.url = '#{activity_no:\d+}'; - return activity; - } - }; + return activity; + } + }; - $stateProvider - .state('work-packages', { - url: '', - abstract: true, - templateUrl: '/templates/work_packages.html', - controller: 'WorkPackagesController', - resolve: { - latestTab: function ($state) { - var stateName = 'work-packages.list.details.overview'; // the default tab + $stateProvider + .state('work-packages', { + url: '', + abstract: true, + templateUrl: '/templates/work_packages.html', + controller: 'WorkPackagesController', + resolve: { + latestTab: function ($state) { + var stateName = 'work-packages.list.details.overview'; // the default tab - return { - getStateName: function () { - return stateName; - }, - registerState: function () { - stateName = $state.current.name; - } - }; - } + return { + getStateName: function () { + return stateName; + }, + registerState: function () { + stateName = $state.current.name; + } + }; } - }) - - .state('work-packages.new', { - url: '/{projects}/{projectPath}/work_packages/new?type&parent_id', - templateUrl: '/components/routes/partials/work-packages.new.html', - controllerAs: 'vm', - reloadOnSearch: false - }) + } + }) - .state('work-packages.copy', { - url: '/work_packages/{copiedFromWorkPackageId:[0-9]+}/copy', - templateUrl: '/components/routes/partials/work-packages.new.html' - }) + .state('work-packages.new', { + url: '/{projects}/{projectPath}/work_packages/new?type&parent_id', + templateUrl: '/components/routes/partials/work-packages.new.html', + controllerAs: 'vm', + reloadOnSearch: false + }) - .state('work-packages.edit', { - url: '/{projects}/{projectPath}/work_packages/{workPackageId}/edit', - params: { - projectPath: {value: null, squash: true}, - projects: {value: null, squash: true} - }, + .state('work-packages.copy', { + url: '/work_packages/{copiedFromWorkPackageId:[0-9]+}/copy', + templateUrl: '/components/routes/partials/work-packages.new.html' + }) - onEnter: function ($state, $stateParams, inplaceEditAll) { - inplaceEditAll.start(); - $state.go('work-packages.list.details.overview', $stateParams); - } - }) + .state('work-packages.edit', { + url: '/{projects}/{projectPath}/work_packages/{workPackageId}/edit', + params: { + projectPath: {value: null, squash: true}, + projects: {value: null, squash: true} + }, - .state('work-packages.show', { - url: '/work_packages/{workPackageId:[0-9]+}?query_props', - templateUrl: '/components/routes/partials/work-packages.show.html', - controller: 'WorkPackageShowController', - controllerAs: 'vm', - resolve: { - workPackage: function (WorkPackageService, $stateParams) { - return WorkPackageService.getWorkPackage($stateParams.workPackageId); - }, - // TODO hack, get rid of latestTab in ShowController - latestTab: function ($state) { - var stateName = 'work-package.overview'; // the default tab + onEnter: function ($state, $stateParams, inplaceEditAll) { + inplaceEditAll.start(); + $state.go('work-packages.list.details.overview', $stateParams); + } + }) - return { - getStateName: function () { - return stateName; - }, - registerState: function () { - stateName = $state.current.name; - } - }; - } + .state('work-packages.show', { + url: '/work_packages/{workPackageId:[0-9]+}?query_props', + templateUrl: '/components/routes/partials/work-packages.show.html', + controller: 'WorkPackageShowController', + controllerAs: 'vm', + resolve: { + workPackage: function (WorkPackageService, $stateParams) { + return WorkPackageService.getWorkPackage($stateParams.workPackageId); }, - // HACK - // This is to avoid problems with the css depending on which page the - // browser starts from (deep-link). As we have CSS rules that change the - // layout drastically when on the show action (e.g. position: relative) - // and this should not be applied to the other states, we need to remove - // the trigger used in the CSS. The correct fix would be to alter the - // CSS. - onEnter: function ($state, $timeout) { - angular.element('body').addClass('action-show'); + // TODO hack, get rid of latestTab in ShowController + latestTab: function ($state) { + var stateName = 'work-package.overview'; // the default tab - $timeout(function () { - if ($state.is('work-packages.show')) { - $state.go('work-packages.show.activity'); + return { + getStateName: function () { + return stateName; + }, + registerState: function () { + stateName = $state.current.name; } - }); - }, - - onExit: function () { - angular.element('body').removeClass('action-show'); + }; } - }) - .state('work-packages.show.activity', panels.activity) - .state('work-packages.show.activity.details', panels.activityDetails) - .state('work-packages.show.relations', { - url: '/relations', - templateUrl: '/templates/work_packages/tabs/relations.html' - }) - .state('work-packages.show.watchers', panels.watchers) + }, + // HACK + // This is to avoid problems with the css depending on which page the + // browser starts from (deep-link). As we have CSS rules that change the + // layout drastically when on the show action (e.g. position: relative) + // and this should not be applied to the other states, we need to remove + // the trigger used in the CSS. The correct fix would be to alter the + // CSS. + onEnter: function ($state, $timeout) { + angular.element('body').addClass('action-show'); - .state('work-packages.list', { - url: '/{projects}/{projectPath}/work_packages?query_id&query_props', - controller: 'WorkPackagesListController', - templateUrl: '/components/routes/partials/work-packages.list.html', - params: { - // value: null makes the parameter optional - // squash: true avoids duplicate slashes when the paramter is not provided - projectPath: {value: null, squash: true}, - projects: {value: null, squash: true} - }, - reloadOnSearch: false, - // HACK - // This is to avoid problems with the css depending on which page the - // browser starts from (deep-link). As we have CSS rules that change the - // layout drastically when on the index action (e.g. position: absolute, - // heigt of footer, ...), and this should not be applied to the other - // states, we need to remove the trigger used in the CSS The correct fix - // would be to alter the CSS. - onEnter: function () { - angular.element('body').addClass('action-index'); - }, - onExit: function () { - angular.element('body').removeClass('action-index'); - } - }) - .state('work-packages.list.new', { - url: '/create_new?type&parent_id', - templateUrl: '/components/routes/partials/work-packages.list.new.html', - reloadOnSearch: false - }) - .state('work-packages.list.copy', { - url: '/details/{copiedFromWorkPackageId:[0-9]+}/copy', - templateUrl: '/components/routes/partials/work-packages.list.new.html', - reloadOnSearch: false - }) - .state('work-packages.list.details', { - url: '/details/{workPackageId:[0-9]+}', - templateUrl: '/components/routes/partials/work-packages.list.details.html', - controller: 'WorkPackageDetailsController', - reloadOnSearch: false, - resolve: { - workPackage: function (WorkPackageService, $stateParams) { - return WorkPackageService.getWorkPackage($stateParams.workPackageId); + $timeout(function () { + if ($state.is('work-packages.show')) { + $state.go('work-packages.show.activity'); } - } - }) - .state('work-packages.list.details.overview', { - url: '/overview', - controller: 'DetailsTabOverviewController', - templateUrl: '/templates/work_packages/tabs/overview.html', - controllerAs: 'vm', - }) - .state('work-packages.list.details.activity', panels.activity) - .state('work-packages.list.details.activity.details', panels.activityDetails) - .state('work-packages.list.details.relations', { - url: '/relations', - templateUrl: '/templates/work_packages/tabs/relations.html', - }) - .state('work-packages.list.details.watchers', panels.watchers); - }]) + }); + }, - .run([ - '$location', - '$rootElement', - '$browser', - '$rootScope', - '$state', - function ($location, $rootElement, $browser, $rootScope, $state) { - // Our application is still a hybrid one, meaning most routes are still - // handled by Rails. As such, we disable the default link-hijacking that - // Angular's HTML5-mode turns on. - $rootElement.off('click'); - $rootElement.on('click', 'a[data-ui-route]', function (event) { - if (!jQuery('body').has('div[ui-view]').length) { - return; + onExit: function () { + angular.element('body').removeClass('action-show'); } - if (event.ctrlKey || event.metaKey || event.which === 2) { - return; + }) + .state('work-packages.show.activity', panels.activity) + .state('work-packages.show.activity.details', panels.activityDetails) + .state('work-packages.show.relations', { + url: '/relations', + templateUrl: '/templates/work_packages/tabs/relations.html' + }) + .state('work-packages.show.watchers', panels.watchers) + + .state('work-packages.list', { + url: '/{projects}/{projectPath}/work_packages?query_id&query_props', + controller: 'WorkPackagesListController', + templateUrl: '/components/routes/partials/work-packages.list.html', + params: { + // value: null makes the parameter optional + // squash: true avoids duplicate slashes when the paramter is not provided + projectPath: {value: null, squash: true}, + projects: {value: null, squash: true} + }, + reloadOnSearch: false, + // HACK + // This is to avoid problems with the css depending on which page the + // browser starts from (deep-link). As we have CSS rules that change the + // layout drastically when on the index action (e.g. position: absolute, + // heigt of footer, ...), and this should not be applied to the other + // states, we need to remove the trigger used in the CSS The correct fix + // would be to alter the CSS. + onEnter: function () { + angular.element('body').addClass('action-index'); + }, + onExit: function () { + angular.element('body').removeClass('action-index'); + } + }) + .state('work-packages.list.new', { + url: '/create_new?type&parent_id', + templateUrl: '/components/routes/partials/work-packages.list.new.html', + reloadOnSearch: false + }) + .state('work-packages.list.copy', { + url: '/details/{copiedFromWorkPackageId:[0-9]+}/copy', + templateUrl: '/components/routes/partials/work-packages.list.new.html', + reloadOnSearch: false + }) + .state('work-packages.list.details', { + url: '/details/{workPackageId:[0-9]+}', + templateUrl: '/components/routes/partials/work-packages.list.details.html', + controller: 'WorkPackageDetailsController', + reloadOnSearch: false, + resolve: { + workPackage: function (WorkPackageService, $stateParams) { + return WorkPackageService.getWorkPackage($stateParams.workPackageId); + } } + }) + .state('work-packages.list.details.overview', { + url: '/overview', + controller: 'DetailsTabOverviewController', + templateUrl: '/templates/work_packages/tabs/overview.html', + controllerAs: 'vm', + }) + .state('work-packages.list.details.activity', panels.activity) + .state('work-packages.list.details.activity.details', panels.activityDetails) + .state('work-packages.list.details.relations', { + url: '/relations', + templateUrl: '/templates/work_packages/tabs/relations.html', + }) + .state('work-packages.list.details.watchers', panels.watchers); + }) - // NOTE: making use of event delegation, thus jQuery-only. - var elm = jQuery(event.target); - var absHref = elm.prop('href'); - var rewrittenUrl = $location.$$rewrite(absHref); + .run(function ($location, $rootElement, $browser, $rootScope, $state) { + // Our application is still a hybrid one, meaning most routes are still + // handled by Rails. As such, we disable the default link-hijacking that + // Angular's HTML5-mode turns on. + $rootElement.off('click'); + $rootElement.on('click', 'a[data-ui-route]', function (event) { + if (!jQuery('body').has('div[ui-view]').length) { + return; + } + if (event.ctrlKey || event.metaKey || event.which === 2) { + return; + } - if (absHref && !elm.attr('target') && - rewrittenUrl && !event.isDefaultPrevented()) { + // NOTE: making use of event delegation, thus jQuery-only. + var elm = jQuery(event.target); + var absHref = elm.prop('href'); + var rewrittenUrl = $location.$$rewrite(absHref); - event.preventDefault(); - if (rewrittenUrl !== $browser.url()) { - // update location manually - $location.$$parse(rewrittenUrl); - $rootScope.$apply(); - // hack to work around FF6 bug 684208 when scenario runner clicks on links - //noinspection TypeScriptUnresolvedVariable - window.angular['ff-684208-preventDefault'] = true; - } - } - }); + if (absHref && !elm.attr('target') && + rewrittenUrl && !event.isDefaultPrevented()) { - $rootScope.$on('$stateChangeStart', function (event, toState, toParams) { - if (!toParams.projects && toParams.projectPath) { - toParams.projects = 'projects'; - $state.go(toState, toParams); + event.preventDefault(); + if (rewrittenUrl !== $browser.url()) { + // update location manually + $location.$$parse(rewrittenUrl); + $rootScope.$apply(); + // hack to work around FF6 bug 684208 when scenario runner clicks on links + //noinspection TypeScriptUnresolvedVariable + window.angular['ff-684208-preventDefault'] = true; } - }); + } + }); + + $rootScope.$on('$stateChangeStart', function (event, toState, toParams) { + if (!toParams.projects && toParams.projectPath) { + toParams.projects = 'projects'; + $state.go(toState, toParams); + } + }); } - ]); + ); From 665095e465decf4717e5813529ebf5dd0b63c4a7 Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Thu, 17 Dec 2015 11:54:33 +0100 Subject: [PATCH 039/123] Use $window service instead of plain window object in configuration --- frontend/app/components/common/routing.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/app/components/common/routing.ts b/frontend/app/components/common/routing.ts index 36783ecc32..98efe24ad4 100644 --- a/frontend/app/components/common/routing.ts +++ b/frontend/app/components/common/routing.ts @@ -215,7 +215,7 @@ angular .state('work-packages.list.details.watchers', panels.watchers); }) - .run(function ($location, $rootElement, $browser, $rootScope, $state) { + .run(function ($location, $rootElement, $browser, $rootScope, $state, $window) { // Our application is still a hybrid one, meaning most routes are still // handled by Rails. As such, we disable the default link-hijacking that // Angular's HTML5-mode turns on. @@ -242,8 +242,7 @@ angular $location.$$parse(rewrittenUrl); $rootScope.$apply(); // hack to work around FF6 bug 684208 when scenario runner clicks on links - //noinspection TypeScriptUnresolvedVariable - window.angular['ff-684208-preventDefault'] = true; + $window.angular['ff-684208-preventDefault'] = true; } } }); From b16dff4681ea7c666fe83770491c547a1522398b Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Thu, 17 Dec 2015 12:06:10 +0100 Subject: [PATCH 040/123] Replace function keyword with arrow syntax --- frontend/app/components/common/routing.ts | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/frontend/app/components/common/routing.ts b/frontend/app/components/common/routing.ts index 98efe24ad4..242d22ffca 100644 --- a/frontend/app/components/common/routing.ts +++ b/frontend/app/components/common/routing.ts @@ -28,7 +28,7 @@ angular .module('openproject') - .config(function ($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider) { + .config(($stateProvider, $urlRouterProvider, $urlMatcherFactoryProvider) => { $urlRouterProvider.when('/work_packages/', '/work_packages'); $urlMatcherFactoryProvider.strictMode(false); @@ -62,14 +62,14 @@ angular templateUrl: '/templates/work_packages.html', controller: 'WorkPackagesController', resolve: { - latestTab: function ($state) { + latestTab: ($state) => { var stateName = 'work-packages.list.details.overview'; // the default tab return { - getStateName: function () { + getStateName: () => { return stateName; }, - registerState: function () { + registerState: () => { stateName = $state.current.name; } }; @@ -96,7 +96,7 @@ angular projects: {value: null, squash: true} }, - onEnter: function ($state, $stateParams, inplaceEditAll) { + onEnter: ($state, $stateParams, inplaceEditAll) => { inplaceEditAll.start(); $state.go('work-packages.list.details.overview', $stateParams); } @@ -108,18 +108,18 @@ angular controller: 'WorkPackageShowController', controllerAs: 'vm', resolve: { - workPackage: function (WorkPackageService, $stateParams) { + workPackage: (WorkPackageService, $stateParams) => { return WorkPackageService.getWorkPackage($stateParams.workPackageId); }, // TODO hack, get rid of latestTab in ShowController - latestTab: function ($state) { + latestTab: ($state) => { var stateName = 'work-package.overview'; // the default tab return { - getStateName: function () { + getStateName: () => { return stateName; }, - registerState: function () { + registerState: () => { stateName = $state.current.name; } }; @@ -132,17 +132,17 @@ angular // and this should not be applied to the other states, we need to remove // the trigger used in the CSS. The correct fix would be to alter the // CSS. - onEnter: function ($state, $timeout) { + onEnter: ($state, $timeout) => { angular.element('body').addClass('action-show'); - $timeout(function () { + $timeout(() => { if ($state.is('work-packages.show')) { $state.go('work-packages.show.activity'); } }); }, - onExit: function () { + onExit: () => { angular.element('body').removeClass('action-show'); } }) @@ -172,10 +172,10 @@ angular // heigt of footer, ...), and this should not be applied to the other // states, we need to remove the trigger used in the CSS The correct fix // would be to alter the CSS. - onEnter: function () { + onEnter: () => { angular.element('body').addClass('action-index'); }, - onExit: function () { + onExit: () => { angular.element('body').removeClass('action-index'); } }) @@ -195,7 +195,7 @@ angular controller: 'WorkPackageDetailsController', reloadOnSearch: false, resolve: { - workPackage: function (WorkPackageService, $stateParams) { + workPackage: (WorkPackageService, $stateParams) => { return WorkPackageService.getWorkPackage($stateParams.workPackageId); } } @@ -215,12 +215,12 @@ angular .state('work-packages.list.details.watchers', panels.watchers); }) - .run(function ($location, $rootElement, $browser, $rootScope, $state, $window) { + .run(($location, $rootElement, $browser, $rootScope, $state, $window) => { // Our application is still a hybrid one, meaning most routes are still // handled by Rails. As such, we disable the default link-hijacking that // Angular's HTML5-mode turns on. $rootElement.off('click'); - $rootElement.on('click', 'a[data-ui-route]', function (event) { + $rootElement.on('click', 'a[data-ui-route]', (event) => { if (!jQuery('body').has('div[ui-view]').length) { return; } @@ -247,7 +247,7 @@ angular } }); - $rootScope.$on('$stateChangeStart', function (event, toState, toParams) { + $rootScope.$on('$stateChangeStart', (event, toState, toParams) => { if (!toParams.projects && toParams.projectPath) { toParams.projects = 'projects'; $state.go(toState, toParams); From 9375bdb9c01f4602d79e50ac715920210b6abdcd Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Wed, 16 Dec 2015 09:48:41 +0100 Subject: [PATCH 041/123] use standard select for sort by modal --- config/locales/js-en.yml | 6 +++- .../work_packages/modals/sorting.html | 26 ++++++++--------- .../controllers/dialogs/sorting.js | 28 +++++++++++++------ .../work-packages-modal-focus-spec.js | 2 +- .../controllers/dialogs/sorting-modal-test.js | 8 ++---- spec/features/support/work_package_table.rb | 5 ++-- 6 files changed, 43 insertions(+), 32 deletions(-) diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml index 0e72c753dc..131faa9610 100644 --- a/config/locales/js-en.yml +++ b/config/locales/js-en.yml @@ -64,6 +64,11 @@ en: description_subwork_package: "Sub work package of" filter: noneElement: "(none)" + sorting: + criteria: + one: "First sorting criteria" + two: "Second sorting criteria" + three: "Third sorting criteria" general_text_no: "no" general_text_yes: "yes" general_text_No: "No" @@ -360,7 +365,6 @@ en: label_filter_add: "Add filter" label_options: "Options" label_column_multiselect: "Combined dropdown field: Select with arrow keys, confirm selection with enter, delete with backspace" - label_column_select: "Status - Combined dropdown field: Selection with auto-completion." message_error_during_bulk_delete: An error occurred while trying to delete work packages. message_successful_bulk_delete: Successfully deleted work packages. create: diff --git a/frontend/app/templates/work_packages/modals/sorting.html b/frontend/app/templates/work_packages/modals/sorting.html index 8006a12c64..d05512380b 100644 --- a/frontend/app/templates/work_packages/modals/sorting.html +++ b/frontend/app/templates/work_packages/modals/sorting.html @@ -8,17 +8,20 @@ -
- {{ ::I18n.t('js.work_packages.label_column_select') }} -
-
  • +
    • @@ -53,7 +53,7 @@
  • -
  • +
  • diff --git a/frontend/app/components/routing/views/work-packages.show.html b/frontend/app/components/routing/views/work-packages.show.html index 04de1c73b0..310b020c39 100644 --- a/frontend/app/components/routing/views/work-packages.show.html +++ b/frontend/app/components/routing/views/work-packages.show.html @@ -19,7 +19,7 @@
  • -
  • +
    • @@ -46,7 +46,7 @@
  • -
  • +
  • -
  • +
    • @@ -53,7 +53,7 @@
  • -
  • +
  • diff --git a/frontend/app/components/routing/views/work-packages.show.html b/frontend/app/components/routing/views/work-packages.show.html index 310b020c39..092ac0d28f 100644 --- a/frontend/app/components/routing/views/work-packages.show.html +++ b/frontend/app/components/routing/views/work-packages.show.html @@ -19,7 +19,7 @@
  • -
  • +
    • @@ -46,7 +46,7 @@
  • -
  • +
  • -
  • +
    • @@ -53,7 +53,7 @@
  • -
  • +
  • diff --git a/frontend/app/components/routing/views/work-packages.show.html b/frontend/app/components/routing/views/work-packages.show.html index 092ac0d28f..0347ba07c6 100644 --- a/frontend/app/components/routing/views/work-packages.show.html +++ b/frontend/app/components/routing/views/work-packages.show.html @@ -19,7 +19,7 @@
  • -
  • +
    • @@ -46,7 +46,7 @@
  • -
  • +
  • -
  • +
  • diff --git a/frontend/app/components/routing/views/work-packages.show.html b/frontend/app/components/routing/views/work-packages.show.html index 3fded05e7b..b195f26bac 100644 --- a/frontend/app/components/routing/views/work-packages.show.html +++ b/frontend/app/components/routing/views/work-packages.show.html @@ -51,9 +51,9 @@ ng-disabled="!actionsAvailable || editAll.state" has-dropdown-menu target="ShowMoreDropdownMenu" - locals="permittedActions,actionsAvailable,triggerMoreMenuAction"> - - + locals="permittedActions,actionsAvailable,triggerMoreMenuAction" + title="{{I18n.t('js.button_more')}}"> + From f5409f54d3bad59944b1f15ced3bebd507d3befb Mon Sep 17 00:00:00 2001 From: Magdalena Kafka Date: Tue, 22 Dec 2015 12:24:26 +0100 Subject: [PATCH 100/123] Use burger icon for usermenu on mobile --- app/assets/stylesheets/layout/_top_menu_mobile.sass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/layout/_top_menu_mobile.sass b/app/assets/stylesheets/layout/_top_menu_mobile.sass index 390a627d8b..178bf0ef7a 100644 --- a/app/assets/stylesheets/layout/_top_menu_mobile.sass +++ b/app/assets/stylesheets/layout/_top_menu_mobile.sass @@ -66,18 +66,22 @@ padding: 0 position: relative text-indent: -10000px - width: 54px + width: 68px &:after + content: "\e0d0" !important display: block + font-size: 1.5rem !important position: absolute right: 20px text-indent: 0 - top: 22px + top: 16px z-index: 1000 + ul width: 100vw + box-shadow: 1px 1px 4px #cccccc + border: solid 1px rgba(0, 0, 0, 0.2) li max-width: none From 30c363f249c1ad571100c8dec2c227c3c79215f4 Mon Sep 17 00:00:00 2001 From: Magdalena Kafka Date: Tue, 22 Dec 2015 14:16:25 +0100 Subject: [PATCH 101/123] Fix position of jstEditor on mobile since the wiki toolbar is hidden --- app/assets/stylesheets/layout/_base_mobile.sass | 2 +- app/assets/stylesheets/layout/_work_package_mobile.sass | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/layout/_base_mobile.sass b/app/assets/stylesheets/layout/_base_mobile.sass index 1084225838..e1cc60b388 100644 --- a/app/assets/stylesheets/layout/_base_mobile.sass +++ b/app/assets/stylesheets/layout/_base_mobile.sass @@ -67,4 +67,4 @@ display: none !important .jstElements - visibility: hidden !important + display: none diff --git a/app/assets/stylesheets/layout/_work_package_mobile.sass b/app/assets/stylesheets/layout/_work_package_mobile.sass index e248c685f5..e20ef9babd 100644 --- a/app/assets/stylesheets/layout/_work_package_mobile.sass +++ b/app/assets/stylesheets/layout/_work_package_mobile.sass @@ -123,6 +123,11 @@ .attributes-key-value--key padding: 0 !important + // Reset margin for mobile, since the wiki toolbar is hidden on mobile + .inplace-edit.attribute-description + .inplace-edit--write + margin-top: 0 + div[class*='work-packages--details--'] width: 100% From 1fee89b629edf75c05f64fb1847d369277dd21d7 Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Tue, 22 Dec 2015 17:34:23 +0100 Subject: [PATCH 102/123] Remove date range picker in mobile view --- .../edit-date-range/edit-date-range.directive.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/app/components/inplace-edit/directives/field-edit/edit-date-range/edit-date-range.directive.js b/frontend/app/components/inplace-edit/directives/field-edit/edit-date-range/edit-date-range.directive.js index bdba104080..1c822cb942 100644 --- a/frontend/app/components/inplace-edit/directives/field-edit/edit-date-range/edit-date-range.directive.js +++ b/frontend/app/components/inplace-edit/directives/field-edit/edit-date-range/edit-date-range.directive.js @@ -30,7 +30,7 @@ angular .module('openproject.inplace-edit') .directive('inplaceEditorDateRange', inplaceEditorDateRange); -function inplaceEditorDateRange($timeout, TimezoneService, WorkPackageFieldService, +function inplaceEditorDateRange($timeout, $window, TimezoneService, WorkPackageFieldService, EditableFieldsState, Datepicker, inplaceEditAll) { return { @@ -154,9 +154,12 @@ function inplaceEditorDateRange($timeout, TimezoneService, WorkPackageFieldServi } }); - datepicker.setState($window.innerWidth > 680); + startDatepicker.setState($window.innerWidth > 680); + endDatepicker.setState($window.innerWidth > 680); + angular.element($window).on('resize', function () { - datepicker.setState($window.innerWidth > 680); + startDatepicker.setState($window.innerWidth > 680); + endDatepicker.setState($window.innerWidth > 680); }); } }; From e6d65886a3a647fb98e95f4c2009f590b751b5f5 Mon Sep 17 00:00:00 2001 From: Magdalena Kafka Date: Tue, 22 Dec 2015 17:11:37 +0100 Subject: [PATCH 103/123] Fix wp list view for mobile --- .../layout/_work_package_mobile.sass | 27 +++++++++++++++++++ .../routing/views/work-packages.list.html | 2 +- .../components/selectable_title.html | 2 +- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/layout/_work_package_mobile.sass b/app/assets/stylesheets/layout/_work_package_mobile.sass index e20ef9babd..5829a74f7f 100644 --- a/app/assets/stylesheets/layout/_work_package_mobile.sass +++ b/app/assets/stylesheets/layout/_work_package_mobile.sass @@ -160,3 +160,30 @@ margin: 0 !important padding: 8px 0 !important font-size: 1rem + + // Work packages list view + + .work-packages--page-container + .toolbar + padding: 0 + + .title-container + max-width: 40% + overflow: hidden + + span + display: block + + a span span + overflow: hidden + text-overflow: ellipsis + white-space: nowrap + + > .work-packages--split-view + display: block + + .work-packages--list-table-area + position: relative + + .work-packages--list + padding-bottom: 55px diff --git a/frontend/app/components/routing/views/work-packages.list.html b/frontend/app/components/routing/views/work-packages.list.html index 096ce162af..495fab5ed4 100644 --- a/frontend/app/components/routing/views/work-packages.list.html +++ b/frontend/app/components/routing/views/work-packages.list.html @@ -11,7 +11,7 @@ -
  • +
  • diff --git a/frontend/app/templates/components/selectable_title.html b/frontend/app/templates/components/selectable_title.html index 1c9e2bcf95..96694d537d 100644 --- a/frontend/app/templates/components/selectable_title.html +++ b/frontend/app/templates/components/selectable_title.html @@ -4,10 +4,10 @@ - {{ selectedTitle | characters:50 }} {{ I18n.t('js.toolbar.search_query_title') }} + {{ selectedTitle | characters:50 }}
  • From 39fd3b46c60d9506a7177e967d7ef19a9c479730 Mon Sep 17 00:00:00 2001 From: Magdalena Kafka Date: Tue, 22 Dec 2015 17:38:49 +0100 Subject: [PATCH 104/123] Remove min-width from dropdowns on mobile * add missing media query --- .../stylesheets/layout/_drop_down_mobile.sass | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/layout/_drop_down_mobile.sass b/app/assets/stylesheets/layout/_drop_down_mobile.sass index 3a4c741a4c..f498ca9db9 100644 --- a/app/assets/stylesheets/layout/_drop_down_mobile.sass +++ b/app/assets/stylesheets/layout/_drop_down_mobile.sass @@ -30,9 +30,12 @@ // https://github.com/plapier/jquery-dropdown // (dual MIT/GPL-Licensed) +@include breakpoint(680px down) + .dropdown .dropdown-menu, + .toolbar .legacy-actions-more + LI > A, + LABEL + padding: 8px 13px 8px 10px -.dropdown .dropdown-menu, -.toolbar .legacy-actions-more - LI > A, - LABEL - padding: 8px 13px 8px 10px + .dropdown .dropdown-menu + min-width: 0 From 698d0d5342f61929a2072edccb83c5f202b56630 Mon Sep 17 00:00:00 2001 From: Magdalena Kafka Date: Tue, 22 Dec 2015 17:51:57 +0100 Subject: [PATCH 105/123] Adjust space around WP ID on mobile --- app/assets/stylesheets/layout/_work_package_mobile.sass | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/assets/stylesheets/layout/_work_package_mobile.sass b/app/assets/stylesheets/layout/_work_package_mobile.sass index 5829a74f7f..b58ef68b44 100644 --- a/app/assets/stylesheets/layout/_work_package_mobile.sass +++ b/app/assets/stylesheets/layout/_work_package_mobile.sass @@ -33,6 +33,7 @@ overflow: visible .toolbar-container + margin-bottom: 4px min-height: 0 .work-packages--show-view @@ -123,6 +124,11 @@ .attributes-key-value--key padding: 0 !important + .work-packages--panel-inner > .attributes-group:first-child + .attributes-group--header + border-bottom: none + padding-top: 4px + // Reset margin for mobile, since the wiki toolbar is hidden on mobile .inplace-edit.attribute-description .inplace-edit--write From a3f4c8378dd537910b62829a74df3eb592f2bba9 Mon Sep 17 00:00:00 2001 From: Magdalena Kafka Date: Tue, 22 Dec 2015 18:17:46 +0100 Subject: [PATCH 106/123] Fix widget boxes on mobile --- app/assets/stylesheets/content/_widget_box.sass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/stylesheets/content/_widget_box.sass b/app/assets/stylesheets/content/_widget_box.sass index 4727a93a2b..d02f9d2cb2 100644 --- a/app/assets/stylesheets/content/_widget_box.sass +++ b/app/assets/stylesheets/content/_widget_box.sass @@ -124,3 +124,8 @@ $widget-box--enumeration-width: 20px //necessary for correct alignment even with long texts width: calc(100% - #{$widget-box--enumeration-width}) +@include breakpoint(680px down) + .widget-boxes + &.-flex + .widget-box + flex-basis: 100% From 56a2204fafb835c0a0d33a23df7be3d8a1702ca0 Mon Sep 17 00:00:00 2001 From: Magdalena Kafka Date: Tue, 22 Dec 2015 22:18:34 +0100 Subject: [PATCH 107/123] Hide account and admin link in usermenu on mobile --- config/initializers/menus.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config/initializers/menus.rb b/config/initializers/menus.rb index b8085cb58d..9ec7cde5b7 100644 --- a/config/initializers/menus.rb +++ b/config/initializers/menus.rb @@ -68,9 +68,11 @@ end Redmine::MenuManager.map :account_menu do |menu| menu.push :administration, { controller: '/admin', action: 'projects' }, + html: { class: 'hidden-for-mobile'}, if: Proc.new { User.current.admin? } menu.push :my_account, { controller: '/my', action: 'account' }, + html: { class: 'hidden-for-mobile'}, if: Proc.new { User.current.logged? } menu.push :logout, :signout_path, if: Proc.new { User.current.logged? } From f9ded3091f9fd29b79b0eefca9d5b66c33256cfc Mon Sep 17 00:00:00 2001 From: Magdalena Kafka Date: Tue, 22 Dec 2015 22:26:44 +0100 Subject: [PATCH 108/123] Fix homescreen links on mobile view --- app/assets/stylesheets/specific/homescreen.sass | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/assets/stylesheets/specific/homescreen.sass b/app/assets/stylesheets/specific/homescreen.sass index 8e8316f12c..2cea9b580e 100644 --- a/app/assets/stylesheets/specific/homescreen.sass +++ b/app/assets/stylesheets/specific/homescreen.sass @@ -61,3 +61,13 @@ margin-bottom: 10px font-size: 3rem color: $homescreen-footer-icon-color + +@include breakpoint(680px down) + .homescreen--links + padding: 20px + flex-wrap: wrap + + .homescreen--links--item + flex: auto + margin: 20px 0 + width: 50% From ba0fbffaa0c3bab89ac19ca2d433c7eded4d5a74 Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Wed, 23 Dec 2015 17:00:51 +0100 Subject: [PATCH 109/123] Implement responsiveView service --- .../edit-date-range.directive.js | 16 ++-- .../edit-date/edit-date.directive.js | 10 +-- .../responsive-view.service.test.ts | 83 +++++++++++++++++++ .../responsive/responsive-view.service.ts | 46 ++++++++++ frontend/app/openproject-app.js | 4 +- frontend/karma.conf.js | 2 +- 6 files changed, 146 insertions(+), 15 deletions(-) create mode 100644 frontend/app/components/responsive/responsive-view.service.test.ts create mode 100644 frontend/app/components/responsive/responsive-view.service.ts diff --git a/frontend/app/components/inplace-edit/directives/field-edit/edit-date-range/edit-date-range.directive.js b/frontend/app/components/inplace-edit/directives/field-edit/edit-date-range/edit-date-range.directive.js index 1c822cb942..1fb6175636 100644 --- a/frontend/app/components/inplace-edit/directives/field-edit/edit-date-range/edit-date-range.directive.js +++ b/frontend/app/components/inplace-edit/directives/field-edit/edit-date-range/edit-date-range.directive.js @@ -30,8 +30,8 @@ angular .module('openproject.inplace-edit') .directive('inplaceEditorDateRange', inplaceEditorDateRange); -function inplaceEditorDateRange($timeout, $window, TimezoneService, WorkPackageFieldService, - EditableFieldsState, Datepicker, inplaceEditAll) { +function inplaceEditorDateRange($timeout, TimezoneService, WorkPackageFieldService, + EditableFieldsState, Datepicker, inplaceEditAll, responsiveView) { return { restrict: 'E', @@ -40,7 +40,7 @@ function inplaceEditorDateRange($timeout, $window, TimezoneService, WorkPackageF templateUrl: '/components/inplace-edit/directives/field-edit/edit-date-range/' + 'edit-date-range.directive.html', - controller: function() {}, + controller: angular.noop, controllerAs: 'customEditorController', link: function(scope, element) { @@ -154,12 +154,12 @@ function inplaceEditorDateRange($timeout, $window, TimezoneService, WorkPackageF } }); - startDatepicker.setState($window.innerWidth > 680); - endDatepicker.setState($window.innerWidth > 680); + startDatepicker.setState(!responsiveView.isSmall()); + endDatepicker.setState(!responsiveView.isSmall()); - angular.element($window).on('resize', function () { - startDatepicker.setState($window.innerWidth > 680); - endDatepicker.setState($window.innerWidth > 680); + responsiveView.onResize(function () { + startDatepicker.setState(!responsiveView.isSmall()); + endDatepicker.setState(!responsiveView.isSmall()); }); } }; diff --git a/frontend/app/components/inplace-edit/directives/field-edit/edit-date/edit-date.directive.js b/frontend/app/components/inplace-edit/directives/field-edit/edit-date/edit-date.directive.js index bd18954f73..adb9e52144 100644 --- a/frontend/app/components/inplace-edit/directives/field-edit/edit-date/edit-date.directive.js +++ b/frontend/app/components/inplace-edit/directives/field-edit/edit-date/edit-date.directive.js @@ -30,7 +30,7 @@ angular .module('openproject.inplace-edit') .directive('inplaceEditorDate', inplaceEditorDate); -function inplaceEditorDate($timeout, $window, inplaceEditAll, TimezoneService, Datepicker) { +function inplaceEditorDate($timeout, inplaceEditAll, TimezoneService, Datepicker, responsiveView) { var parseISODate = TimezoneService.parseISODate, customDateFormat = 'YYYY-MM-DD', customFormattedDate = function(date) { @@ -45,7 +45,7 @@ function inplaceEditorDate($timeout, $window, inplaceEditAll, TimezoneService, D templateUrl: '/components/inplace-edit/directives/field-edit/edit-date/' + 'edit-date.directive.html', - controller: function() {}, + controller: angular.noop, controllerAs: 'customEditorController', link: function(scope, element) { @@ -95,9 +95,9 @@ function inplaceEditorDate($timeout, $window, inplaceEditAll, TimezoneService, D } }); - datepicker.setState($window.innerWidth > 680); - angular.element($window).on('resize', function () { - datepicker.setState($window.innerWidth > 680); + datepicker.setState(!responsiveView.isSmall()); + responsiveView.onResize(function () { + datepicker.setState(!responsiveView.isSmall()); }); } }; diff --git a/frontend/app/components/responsive/responsive-view.service.test.ts b/frontend/app/components/responsive/responsive-view.service.test.ts new file mode 100644 index 0000000000..c7758acef5 --- /dev/null +++ b/frontend/app/components/responsive/responsive-view.service.test.ts @@ -0,0 +1,83 @@ +// -- copyright +// OpenProject is a project management system. +// Copyright (C) 2012-2015 the OpenProject Foundation (OPF) +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See doc/COPYRIGHT.rdoc for more details. +// ++ + +import {ResponsiveView} from './responsive-view.service'; + +var expect = chai.expect; + +describe('responsiveView service', () => { + describe('isSmall method', () => { + var responsiveView; + var $window = { + innerWidth: 0 + }; + + beforeEach(() => { + angular.mock.module('openproject.responsive', ($provide) => { + $provide.value('$window', $window); + }); + + angular.mock.inject((_responsiveView_: ResponsiveView) => { + responsiveView = _responsiveView_; + $window.innerWidth = responsiveView.small; + }); + }); + + it('should return true if the window size is less than the "small" value', () => { + $window.innerWidth -= 10; + expect(responsiveView.isSmall()).to.be.true; + }); + + it('should return false if the window width is greater than the "small" value', () => { + $window.innerWidth += 10; + expect(responsiveView.isSmall()).to.be.false; + }) + }); + + describe('onResize method', () => { + var responsiveView, $window; + + beforeEach(() => { + angular.mock.module('openproject.responsive'); + + angular.mock.inject((_responsiveView_:ResponsiveView, _$window_:ng.IWindowService) => { + responsiveView = _responsiveView_; + $window = _$window_; + }); + }); + + it('should execute the given callback', () => { + var callback = sinon.stub(); + + responsiveView.onResize(callback); + angular.element($window).trigger('resize'); + + expect(callback.calledOnce).to.be.true; + }); + }); +}); diff --git a/frontend/app/components/responsive/responsive-view.service.ts b/frontend/app/components/responsive/responsive-view.service.ts new file mode 100644 index 0000000000..7bc676573b --- /dev/null +++ b/frontend/app/components/responsive/responsive-view.service.ts @@ -0,0 +1,46 @@ +// -- copyright +// OpenProject is a project management system. +// Copyright (C) 2012-2015 the OpenProject Foundation (OPF) +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See doc/COPYRIGHT.rdoc for more details. +// ++ + +export class ResponsiveView { + + public small: number = 680; + + constructor(public $window: ng.IWindowService) {} + + public isSmall(): boolean { + return this.$window.innerWidth <= this.small; + } + + public onResize(callback) { + angular.element(this.$window).on('resize', callback); + } +} + +angular + .module('openproject.responsive') + .service('responsiveView', ResponsiveView); diff --git a/frontend/app/openproject-app.js b/frontend/app/openproject-app.js index a9c7f594b2..c2e0fd4434 100644 --- a/frontend/app/openproject-app.js +++ b/frontend/app/openproject-app.js @@ -176,6 +176,7 @@ angular.module('openproject.templates', []); // refactoring angular.module('openproject.inplace-edit', []); angular.module('openproject.wpButtons', ['ui.router']); +angular.module('openproject.responsive', []); // main app var openprojectApp = angular.module('openproject', [ @@ -198,7 +199,8 @@ var openprojectApp = angular.module('openproject', [ 'openproject.templates', 'monospaced.elastic', 'openproject.inplace-edit', - 'openproject.wpButtons' + 'openproject.wpButtons', + 'openproject.responsive' ]); window.appBasePath = jQuery('meta[name=app_base_path]').attr('content') || diff --git a/frontend/karma.conf.js b/frontend/karma.conf.js index 0cb6f5665b..b98fbc45f2 100644 --- a/frontend/karma.conf.js +++ b/frontend/karma.conf.js @@ -101,7 +101,7 @@ module.exports = function(config) { sourceMap: false, target: 'ES5', module: 'commonjs', - noImplicitAny: true, + noImplicitAny: false, noResolve: true, removeComments: true, concatenateOutput: false From 5ac28fdd87681e3ed0672fc72f5b6113934e14b8 Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Thu, 24 Dec 2015 16:47:21 +0100 Subject: [PATCH 110/123] Delete example service --- .../example/example.service.test.ts | 37 ------------------- .../app/components/example/example.service.ts | 37 ------------------- 2 files changed, 74 deletions(-) delete mode 100644 frontend/app/components/example/example.service.test.ts delete mode 100644 frontend/app/components/example/example.service.ts diff --git a/frontend/app/components/example/example.service.test.ts b/frontend/app/components/example/example.service.test.ts deleted file mode 100644 index 3a89d2ef95..0000000000 --- a/frontend/app/components/example/example.service.test.ts +++ /dev/null @@ -1,37 +0,0 @@ -// -- copyright -// OpenProject is a project management system. -// Copyright (C) 2012-2015 the OpenProject Foundation (OPF) -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License version 3. -// -// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: -// Copyright (C) 2006-2013 Jean-Philippe Lang -// Copyright (C) 2010-2013 the ChiliProject Team -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -// -// See doc/COPYRIGHT.rdoc for more details. -// ++ - -import {ExampleService} from './example.service' - -var expect = chai.expect; - -describe.only('Example', () => { - it('is just an example', () => { - expect(true).to.be.true; - }) -}); diff --git a/frontend/app/components/example/example.service.ts b/frontend/app/components/example/example.service.ts deleted file mode 100644 index 9d8cf3bfb3..0000000000 --- a/frontend/app/components/example/example.service.ts +++ /dev/null @@ -1,37 +0,0 @@ -//-- copyright -// OpenProject is a project management system. -// Copyright (C) 2012-2015 the OpenProject Foundation (OPF) -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License version 3. -// -// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: -// Copyright (C) 2006-2013 Jean-Philippe Lang -// Copyright (C) 2010-2013 the ChiliProject Team -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 2 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -// -// See doc/COPYRIGHT.rdoc for more details. -//++ - -export class ExampleService { - -} - -angular.module('openproject.example', []); - -angular - .module('openproject.example') - .service(ExampleService); From 0aa4fcfa210007d71a36f724ea5aca69a7812aff Mon Sep 17 00:00:00 2001 From: CI Date: Fri, 25 Dec 2015 00:36:54 +0000 Subject: [PATCH 111/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 36c8827490..67d468e5d7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 335c83ea80c72a2b9c29a2bec241663db0678755 + revision: aebe1c9fd6f1b14e700aa15b008beee2e0386c3f branch: release/4.2 specs: openproject-translations (4.2.10) From 58d28bc8e7b079caf4bdf4c78e85c20a8ffc9482 Mon Sep 17 00:00:00 2001 From: CI Date: Sun, 27 Dec 2015 00:47:42 +0000 Subject: [PATCH 112/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 907ba6c8ca..73df70d51c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -45,7 +45,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: ca90e90acecf5e499560c5233d2c02a7dfb4e07f + revision: f9ac57b6300c038cb631ae63a5465eb08a31b733 branch: release/5.0 specs: openproject-translations (5.0.8) From d2254ea0690efc86b4b0e8891d40b82bb2d5dfa0 Mon Sep 17 00:00:00 2001 From: CI Date: Mon, 28 Dec 2015 00:36:45 +0000 Subject: [PATCH 113/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 67d468e5d7..4a82bcf0c6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -53,7 +53,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: aebe1c9fd6f1b14e700aa15b008beee2e0386c3f + revision: 4913f251d655098a25c741b1f0c7201301b47df6 branch: release/4.2 specs: openproject-translations (4.2.10) From 437eacec2c8201177dd194cf22585cf8aa2ffca1 Mon Sep 17 00:00:00 2001 From: CI Date: Thu, 31 Dec 2015 00:36:50 +0000 Subject: [PATCH 114/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 73df70d51c..ac46395cc1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -45,7 +45,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: f9ac57b6300c038cb631ae63a5465eb08a31b733 + revision: 1fc8e6eeda08995dcad38740af77f71ae4a963ba branch: release/5.0 specs: openproject-translations (5.0.8) From 57829e75eb28aa7b8fd9e6656df8a8a5eed36a5c Mon Sep 17 00:00:00 2001 From: CI Date: Mon, 4 Jan 2016 00:46:53 +0000 Subject: [PATCH 115/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index ac46395cc1..c8b0c7427d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -45,7 +45,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 1fc8e6eeda08995dcad38740af77f71ae4a963ba + revision: 17e80849e22e80712acb6b47ae2fa8c86bd0af7e branch: release/5.0 specs: openproject-translations (5.0.8) From 8320623d244a9fa9fdd232a3ae183663f18a9bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Mon, 4 Jan 2016 11:58:04 +0100 Subject: [PATCH 116/123] Bump nokogiri https://groups.google.com/forum/#!topic/ruby-security-ann/aSbgDiwb24s --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 6a26f3a536..ce7e3d32f4 100644 --- a/Gemfile +++ b/Gemfile @@ -135,7 +135,7 @@ gem 'rack', '~>1.4.7' gem 'i18n', '~> 0.6.8' # see https://groups.google.com/forum/#!topic/ruby-security-ann/pLrh6DUw998 -gem 'nokogiri', '~> 1.6.6' +gem 'nokogiri', '~> 1.6.7' gem 'carrierwave', '~> 0.10.0' gem 'fog', '~> 1.23.0', require: "fog/aws/storage" diff --git a/Gemfile.lock b/Gemfile.lock index 4a82bcf0c6..8b4af619cd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -284,7 +284,7 @@ GEM treetop (~> 1.4.8) method_source (0.8.2) mime-types (1.25.1) - mini_portile (0.6.2) + mini_portile2 (2.0.0) minisyntax (0.2.3) mixlib-shellout (2.1.0) multi_json (1.11.0) @@ -295,8 +295,8 @@ GEM net-scp (1.2.1) net-ssh (>= 2.6.5) net-ssh (2.9.2) - nokogiri (1.6.6.2) - mini_portile (~> 0.6.0) + nokogiri (1.6.7.1) + mini_portile2 (~> 2.0.0.rc2) non-stupid-digest-assets (1.0.4) object-daddy (1.1.1) oj (2.11.4) @@ -535,7 +535,7 @@ DEPENDENCIES multi_json (~> 1.11.0) mysql2 (~> 0.3.11) net-ldap (~> 0.8.0) - nokogiri (~> 1.6.6) + nokogiri (~> 1.6.7) non-stupid-digest-assets object-daddy (~> 1.1.0) oj (~> 2.11.4) From 67e06ee2b2657a10e653ce8b3b7b9fe69aaa9049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Tue, 5 Jan 2016 12:03:29 +0100 Subject: [PATCH 117/123] Remove double escaping With OpenProject 5.0, we moved to Open3 pseudo-shell, which no longer requires escaping seperate arguments (unless the whole command is passed as a single string, which will result in an actual shell that would require escaping). The `shell_quote` functionality was still used though and causes issues with remote subversion passwords, which will be improperly escaped. --- lib/open_project/scm/adapters/local_client.rb | 6 +----- lib/open_project/scm/adapters/subversion.rb | 11 ++--------- .../scm/adapters/subversion_adapter_spec.rb | 3 +-- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/lib/open_project/scm/adapters/local_client.rb b/lib/open_project/scm/adapters/local_client.rb index 6104465ea6..45d6773fef 100644 --- a/lib/open_project/scm/adapters/local_client.rb +++ b/lib/open_project/scm/adapters/local_client.rb @@ -121,10 +121,6 @@ module OpenProject ((client_version <=> v) >= 0) || (client_version.empty? && options[:unknown]) end - def shell_quote(str) - Shellwords.escape(str) - end - def supports_cat? true end @@ -135,7 +131,7 @@ module OpenProject def target(path = '') base = path.match(/\A\//) ? root_url : url - shell_quote("#{base}/#{path}".gsub(/[?<>\*]/, '')) + "#{base}/#{path}".gsub(/[?<>\*]/, '') end ## diff --git a/lib/open_project/scm/adapters/subversion.rb b/lib/open_project/scm/adapters/subversion.rb index fefe1e0579..f102ef5ebc 100644 --- a/lib/open_project/scm/adapters/subversion.rb +++ b/lib/open_project/scm/adapters/subversion.rb @@ -222,8 +222,8 @@ module OpenProject # --non-interactive avoid prompts def build_svn_cmd(args) if @login.present? - args.push('--username', shell_quote(@login)) - args.push('--password', shell_quote(@password)) if @password.present? + args.push('--username', @login) + args.push('--password', @password) if @password.present? end args.push('--no-auth-cache', '--non-interactive') @@ -301,13 +301,6 @@ module OpenProject end end - def target(path = '') - base = path.match(/\A\//) ? root_url : url - uri = "#{base}/#{path}" - URI.escape(URI.escape(uri), '[]') - # shell_quote(uri.gsub(/[?<>\*]/, '')) - end - ## # Builds the full git arguments from the parameters # and return the executed stdout as a string diff --git a/spec/lib/open_project/scm/adapters/subversion_adapter_spec.rb b/spec/lib/open_project/scm/adapters/subversion_adapter_spec.rb index c69025d506..6a57442ed7 100644 --- a/spec/lib/open_project/scm/adapters/subversion_adapter_spec.rb +++ b/spec/lib/open_project/scm/adapters/subversion_adapter_spec.rb @@ -121,8 +121,7 @@ describe OpenProject::Scm::Adapters::Subversion do idx = svn_cmd.index('--password') expect(idx).not_to be_nil - expect(svn_cmd[idx + 1]) - .to eq("VG\\%\\'\\;rm\\ -rf\\ /\\;\\},Y\\\\^m\\\\\\+DuE,vJP/9") + expect(password) end end end From e334af14884e2d2de90918fc9338b6f6903e23d3 Mon Sep 17 00:00:00 2001 From: CI Date: Wed, 6 Jan 2016 00:47:55 +0000 Subject: [PATCH 118/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index fe91fe4e4b..be4afdfafc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -45,7 +45,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 17e80849e22e80712acb6b47ae2fa8c86bd0af7e + revision: 0ba01bbfd750b8e717a1df7d6516c5ba2fa545d6 branch: release/5.0 specs: openproject-translations (5.0.8) From 66e4ece075757d6c4a39a9457f0a38a9d5274ea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Wed, 6 Jan 2016 10:39:41 +0100 Subject: [PATCH 119/123] Avoid rendering as link when id is null The `assigned_to` column was renders with a link to the resource `/users/null` when no assignee is set. --- .../wp-table/directives/wp-column/wp-column.directive.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/app/components/wp-table/directives/wp-column/wp-column.directive.js b/frontend/app/components/wp-table/directives/wp-column/wp-column.directive.js index c29e09c85c..8611969ac4 100644 --- a/frontend/app/components/wp-table/directives/wp-column/wp-column.directive.js +++ b/frontend/app/components/wp-table/directives/wp-column/wp-column.directive.js @@ -80,7 +80,10 @@ function WorkPackageColumnController($scope, PathHelper, WorkPackagesHelper) { setDisplayText(getFormattedColumnValue()); if (vm.column.meta_data.link.display) { - displayDataAsLink(WorkPackagesHelper.getColumnDataId(vm.workPackage, vm.column)); + var id = WorkPackagesHelper.getColumnDataId(vm.workPackage, vm.column) + if (id) { + displayDataAsLink(id); + } } else { setCustomDisplayType(); } From b7040e096049936e70e5a95a52b7795e22b5fc2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Wed, 6 Jan 2016 14:05:06 +0100 Subject: [PATCH 120/123] Remove role="grid" from tables As described in https://community.openproject.org/work_packages/20429/activity#activity-19, the role 'grid' effectively blocks impaired users from detecting input elements in cells of those tables. --- app/assets/stylesheets/content/_table.lsg | 4 ++-- app/views/admin/plugins.html.erb | 2 +- app/views/admin/projects.html.erb | 2 +- app/views/auth_sources/index.html.erb | 2 +- app/views/boards/index.html.erb | 2 +- app/views/boards/show.html.erb | 2 +- app/views/custom_fields/_tab.html.erb | 2 +- app/views/enumerations/index.html.erb | 2 +- app/views/groups/_memberships.html.erb | 2 +- app/views/groups/_users.html.erb | 2 +- app/views/groups/index.html.erb | 2 +- app/views/members/index.html.erb | 2 +- app/views/my/access_token.html.erb | 2 +- app/views/my/blocks/_timelog.html.erb | 2 +- app/views/planning_element_type_colors/index.html.erb | 2 +- app/views/project_associations/index.html.erb | 2 +- app/views/project_types/index.html.erb | 2 +- app/views/projects/form/_activities.html.erb | 2 +- app/views/projects/form/_types.html.erb | 2 +- app/views/projects/settings/_boards.html.erb | 2 +- app/views/projects/settings/_categories.html.erb | 2 +- app/views/projects/settings/_versions.html.erb | 2 +- app/views/reportings/index.html.erb | 2 +- app/views/repositories/_dir_list.html.erb | 2 +- app/views/repositories/_revisions.html.erb | 2 +- app/views/repositories/committers.html.erb | 2 +- app/views/roles/index.html.erb | 2 +- app/views/roles/report.html.erb | 2 +- app/views/statuses/index.html.erb | 2 +- app/views/time_entries/reports/show.html.erb | 2 +- app/views/timelog/_list.html.erb | 2 +- app/views/types/index.html.erb | 2 +- app/views/users/_memberships.html.erb | 2 +- app/views/users/index.html.erb | 2 +- app/views/wiki/history.html.erb | 2 +- app/views/work_packages/_list_simple.html.erb | 2 +- app/views/work_packages/reports/_report.html.erb | 2 +- app/views/workflows/_form.html.erb | 2 +- app/views/workflows/index.html.erb | 2 +- 39 files changed, 40 insertions(+), 40 deletions(-) diff --git a/app/assets/stylesheets/content/_table.lsg b/app/assets/stylesheets/content/_table.lsg index 6a13330093..7e3b2314b9 100644 --- a/app/assets/stylesheets/content/_table.lsg +++ b/app/assets/stylesheets/content/_table.lsg @@ -6,7 +6,7 @@ ```
    - +
    @@ -113,7 +113,7 @@
    +
    diff --git a/app/views/admin/plugins.html.erb b/app/views/admin/plugins.html.erb index bf2af89181..acf462f060 100644 --- a/app/views/admin/plugins.html.erb +++ b/app/views/admin/plugins.html.erb @@ -31,7 +31,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if @plugins.any? %>
    -
    +
    diff --git a/app/views/admin/projects.html.erb b/app/views/admin/projects.html.erb index 89990f781c..62538a9460 100644 --- a/app/views/admin/projects.html.erb +++ b/app/views/admin/projects.html.erb @@ -65,7 +65,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if @projects.any? %>
    -
    +
    diff --git a/app/views/auth_sources/index.html.erb b/app/views/auth_sources/index.html.erb index 1f2b662018..b10fc19cfd 100644 --- a/app/views/auth_sources/index.html.erb +++ b/app/views/auth_sources/index.html.erb @@ -40,7 +40,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if @auth_sources.any? %>
    -
    +
    diff --git a/app/views/boards/index.html.erb b/app/views/boards/index.html.erb index b0b6fa29e0..73ded2b0e7 100644 --- a/app/views/boards/index.html.erb +++ b/app/views/boards/index.html.erb @@ -30,7 +30,7 @@ See doc/COPYRIGHT.rdoc for more details. <%= toolbar title: l(:label_board_plural) %>
    -
    +
    diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb index ba81badf10..86d957ea1d 100644 --- a/app/views/boards/show.html.erb +++ b/app/views/boards/show.html.erb @@ -70,7 +70,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if @topics.any? %>
    -
    +
    diff --git a/app/views/custom_fields/_tab.html.erb b/app/views/custom_fields/_tab.html.erb index e5a5259d07..1e9b84375f 100644 --- a/app/views/custom_fields/_tab.html.erb +++ b/app/views/custom_fields/_tab.html.erb @@ -30,7 +30,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if (@custom_fields_by_type[tab[:name]] || []).any? %>
    -
    +
    diff --git a/app/views/enumerations/index.html.erb b/app/views/enumerations/index.html.erb index b0389ca071..89f6ed2db7 100644 --- a/app/views/enumerations/index.html.erb +++ b/app/views/enumerations/index.html.erb @@ -34,7 +34,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if enumerations.any? %>
    -
    +
    diff --git a/app/views/groups/_memberships.html.erb b/app/views/groups/_memberships.html.erb index d1c6c185ec..0a3764c7b9 100644 --- a/app/views/groups/_memberships.html.erb +++ b/app/views/groups/_memberships.html.erb @@ -34,7 +34,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if @group.memberships.any? %>
    -
    +
    diff --git a/app/views/groups/_users.html.erb b/app/views/groups/_users.html.erb index 4a2083410c..ec3fc780d9 100644 --- a/app/views/groups/_users.html.erb +++ b/app/views/groups/_users.html.erb @@ -32,7 +32,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if @group.users.any? %>
    -
    +
    diff --git a/app/views/groups/index.html.erb b/app/views/groups/index.html.erb index 0253cf79fe..7d74a8cd6a 100644 --- a/app/views/groups/index.html.erb +++ b/app/views/groups/index.html.erb @@ -39,7 +39,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if @groups.any? %>
    -
    +
    diff --git a/app/views/members/index.html.erb b/app/views/members/index.html.erb index 5fad67b6a1..a92bd7b216 100644 --- a/app/views/members/index.html.erb +++ b/app/views/members/index.html.erb @@ -44,7 +44,7 @@ See doc/COPYRIGHT.rdoc for more details. <% authorized = authorize_for('members', 'update') %>
    -
    +
    diff --git a/app/views/my/access_token.html.erb b/app/views/my/access_token.html.erb index ba7f7fb81c..cbef5aacac 100644 --- a/app/views/my/access_token.html.erb +++ b/app/views/my/access_token.html.erb @@ -37,7 +37,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if has_tokens? %>
    -
    +
    diff --git a/app/views/my/blocks/_timelog.html.erb b/app/views/my/blocks/_timelog.html.erb index 3a99f61378..4443001937 100644 --- a/app/views/my/blocks/_timelog.html.erb +++ b/app/views/my/blocks/_timelog.html.erb @@ -51,7 +51,7 @@ entries_by_day = entries.group_by(&:spent_on) <% if entries.any? %>
    -
    +
    diff --git a/app/views/planning_element_type_colors/index.html.erb b/app/views/planning_element_type_colors/index.html.erb index 92dc958660..103f9bf5b5 100644 --- a/app/views/planning_element_type_colors/index.html.erb +++ b/app/views/planning_element_type_colors/index.html.erb @@ -41,7 +41,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if @colors.any? %>
    -
    +
    diff --git a/app/views/project_associations/index.html.erb b/app/views/project_associations/index.html.erb index 554f51d2a1..9fb0a9106c 100644 --- a/app/views/project_associations/index.html.erb +++ b/app/views/project_associations/index.html.erb @@ -52,7 +52,7 @@ See doc/COPYRIGHT.rdoc for more details.
    -
    +
    diff --git a/app/views/project_types/index.html.erb b/app/views/project_types/index.html.erb index 8b4aa5f053..f9d0ce899c 100644 --- a/app/views/project_types/index.html.erb +++ b/app/views/project_types/index.html.erb @@ -41,7 +41,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if @project_types.any? %>
    -
    +
    diff --git a/app/views/projects/form/_activities.html.erb b/app/views/projects/form/_activities.html.erb index 05a534ac19..3187106026 100644 --- a/app/views/projects/form/_activities.html.erb +++ b/app/views/projects/form/_activities.html.erb @@ -32,7 +32,7 @@ See doc/COPYRIGHT.rdoc for more details.
    -
    +
    diff --git a/app/views/projects/form/_types.html.erb b/app/views/projects/form/_types.html.erb index 40fb7c2e8b..594465be5b 100644 --- a/app/views/projects/form/_types.html.erb +++ b/app/views/projects/form/_types.html.erb @@ -44,7 +44,7 @@ See doc/COPYRIGHT.rdoc for more details.
    -
    +
    diff --git a/app/views/projects/settings/_boards.html.erb b/app/views/projects/settings/_boards.html.erb index 2f85613e6a..4f687b4dcb 100644 --- a/app/views/projects/settings/_boards.html.erb +++ b/app/views/projects/settings/_boards.html.erb @@ -34,7 +34,7 @@ See doc/COPYRIGHT.rdoc for more details.
    -
    +
    diff --git a/app/views/projects/settings/_categories.html.erb b/app/views/projects/settings/_categories.html.erb index 557907dc91..dc2b1ba5a9 100644 --- a/app/views/projects/settings/_categories.html.erb +++ b/app/views/projects/settings/_categories.html.erb @@ -33,7 +33,7 @@ See doc/COPYRIGHT.rdoc for more details.
    -
    +
    diff --git a/app/views/projects/settings/_versions.html.erb b/app/views/projects/settings/_versions.html.erb index 6575b35f60..fb76121454 100644 --- a/app/views/projects/settings/_versions.html.erb +++ b/app/views/projects/settings/_versions.html.erb @@ -33,7 +33,7 @@ See doc/COPYRIGHT.rdoc for more details.
    -
    +
    diff --git a/app/views/reportings/index.html.erb b/app/views/reportings/index.html.erb index f8e866369c..8ec6bbc6a7 100644 --- a/app/views/reportings/index.html.erb +++ b/app/views/reportings/index.html.erb @@ -42,7 +42,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if @reportings.any? %>
    -
    +
    diff --git a/app/views/repositories/_dir_list.html.erb b/app/views/repositories/_dir_list.html.erb index 4c1f3270cc..f62a6322ef 100644 --- a/app/views/repositories/_dir_list.html.erb +++ b/app/views/repositories/_dir_list.html.erb @@ -28,7 +28,7 @@ See doc/COPYRIGHT.rdoc for more details. ++#%>
    -
    +
    diff --git a/app/views/repositories/_revisions.html.erb b/app/views/repositories/_revisions.html.erb index c7312181bd..35825a1782 100644 --- a/app/views/repositories/_revisions.html.erb +++ b/app/views/repositories/_revisions.html.erb @@ -30,7 +30,7 @@ See doc/COPYRIGHT.rdoc for more details. <%= form_tag({controller: '/repositories', action: 'diff', project_id: @project, path: to_path_param(path)}, method: :get) do %>
    -
    +
    diff --git a/app/views/repositories/committers.html.erb b/app/views/repositories/committers.html.erb index 65c3862e28..9dd80fd481 100644 --- a/app/views/repositories/committers.html.erb +++ b/app/views/repositories/committers.html.erb @@ -34,7 +34,7 @@ See doc/COPYRIGHT.rdoc for more details. <%= form_tag({}) do %>
    -
    +
    diff --git a/app/views/roles/index.html.erb b/app/views/roles/index.html.erb index 1e87004fa7..e0ef9cd9b6 100644 --- a/app/views/roles/index.html.erb +++ b/app/views/roles/index.html.erb @@ -41,7 +41,7 @@ See doc/COPYRIGHT.rdoc for more details. <%= render partial: 'layouts/action_menu_specific' %>
    -
    +
    diff --git a/app/views/roles/report.html.erb b/app/views/roles/report.html.erb index 3f167c0eba..a1a5d8e5fd 100644 --- a/app/views/roles/report.html.erb +++ b/app/views/roles/report.html.erb @@ -32,7 +32,7 @@ See doc/COPYRIGHT.rdoc for more details.
    -
    +
    diff --git a/app/views/statuses/index.html.erb b/app/views/statuses/index.html.erb index e424bff451..ee7d846f79 100644 --- a/app/views/statuses/index.html.erb +++ b/app/views/statuses/index.html.erb @@ -48,7 +48,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if @statuses.any? %>
    -
    +
    <% if WorkPackage.use_status_for_done_ratio? %> diff --git a/app/views/time_entries/reports/show.html.erb b/app/views/time_entries/reports/show.html.erb index 741cfe38c2..1ebd300bb3 100644 --- a/app/views/time_entries/reports/show.html.erb +++ b/app/views/time_entries/reports/show.html.erb @@ -84,7 +84,7 @@ See doc/COPYRIGHT.rdoc for more details. <% unless @hours.empty? %>
    -
    +
    <% @criterias.each do |criteria| %> diff --git a/app/views/timelog/_list.html.erb b/app/views/timelog/_list.html.erb index ca2af0a270..238521ff0b 100644 --- a/app/views/timelog/_list.html.erb +++ b/app/views/timelog/_list.html.erb @@ -29,7 +29,7 @@ See doc/COPYRIGHT.rdoc for more details.
    -
    +
    diff --git a/app/views/types/index.html.erb b/app/views/types/index.html.erb index a848886a5c..23dc207f5c 100644 --- a/app/views/types/index.html.erb +++ b/app/views/types/index.html.erb @@ -40,7 +40,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if @types.any? %>
    -
    +
    diff --git a/app/views/users/_memberships.html.erb b/app/views/users/_memberships.html.erb index 483d160ba0..63f9b617f2 100644 --- a/app/views/users/_memberships.html.erb +++ b/app/views/users/_memberships.html.erb @@ -34,7 +34,7 @@ See doc/COPYRIGHT.rdoc for more details. <% if @user.memberships.any? %>
    -
    +
    diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 5e57ff8395..9d7dc94d40 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -72,7 +72,7 @@ See doc/COPYRIGHT.rdoc for more details.
    -
    +
    diff --git a/app/views/wiki/history.html.erb b/app/views/wiki/history.html.erb index 8bff8ad55a..5fbc8889f9 100644 --- a/app/views/wiki/history.html.erb +++ b/app/views/wiki/history.html.erb @@ -31,7 +31,7 @@ See doc/COPYRIGHT.rdoc for more details. <%= form_tag({action: "diff"}, method: :get) do %>
    -
    +
    diff --git a/app/views/work_packages/_list_simple.html.erb b/app/views/work_packages/_list_simple.html.erb index 51644ffa2d..313bb84eaa 100644 --- a/app/views/work_packages/_list_simple.html.erb +++ b/app/views/work_packages/_list_simple.html.erb @@ -30,7 +30,7 @@ See doc/COPYRIGHT.rdoc for more details. <%= form_tag({}) do %>
    -
    +
    diff --git a/app/views/work_packages/reports/_report.html.erb b/app/views/work_packages/reports/_report.html.erb index f04b2dec76..cb6a64d2f0 100644 --- a/app/views/work_packages/reports/_report.html.erb +++ b/app/views/work_packages/reports/_report.html.erb @@ -36,7 +36,7 @@ See doc/COPYRIGHT.rdoc for more details. <% column_names = report.statuses.map(&:name) + [l(:label_open_work_packages), l(:label_closed_work_packages), l(:label_total)] %>
    -
    +
    <% column_names.each do |name| %> diff --git a/app/views/workflows/_form.html.erb b/app/views/workflows/_form.html.erb index a04b789d29..2e5da40809 100644 --- a/app/views/workflows/_form.html.erb +++ b/app/views/workflows/_form.html.erb @@ -28,7 +28,7 @@ See doc/COPYRIGHT.rdoc for more details. ++#%>
    -
    +
    diff --git a/app/views/workflows/index.html.erb b/app/views/workflows/index.html.erb index 556ac11736..ba60532de2 100644 --- a/app/views/workflows/index.html.erb +++ b/app/views/workflows/index.html.erb @@ -32,7 +32,7 @@ See doc/COPYRIGHT.rdoc for more details.
    -
    +
    From 541b2c1d2a0ed21b87a8a80ffa6745ab167d5dc0 Mon Sep 17 00:00:00 2001 From: CI Date: Thu, 7 Jan 2016 00:48:10 +0000 Subject: [PATCH 121/123] Update reference to OpenProject-Translations --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index be4afdfafc..f103242543 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -45,7 +45,7 @@ GIT GIT remote: https://github.com/opf/openproject-translations.git - revision: 0ba01bbfd750b8e717a1df7d6516c5ba2fa545d6 + revision: 0df034a911406c75f21db87cf1c0a99af80430ae branch: release/5.0 specs: openproject-translations (5.0.8) From c688e7b9396acaacb498bdc32712c973116ff226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Mon, 4 Jan 2016 10:50:40 +0100 Subject: [PATCH 122/123] Include OP-related packager postinstall The addon-openproject started to bloat due to a number of rake tasks with environment becoming a necessity. As any of these rake tasks load the environment, which may take up to 10 seconds, we should strive to include the relevant logic into OpenProject where possible. --- lib/tasks/packager.rake | 102 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 lib/tasks/packager.rake diff --git a/lib/tasks/packager.rake b/lib/tasks/packager.rake new file mode 100644 index 0000000000..06fd317ac5 --- /dev/null +++ b/lib/tasks/packager.rake @@ -0,0 +1,102 @@ +#-- encoding: UTF-8 +#-- copyright +# OpenProject is a project management system. +# Copyright (C) 2012-2015 the OpenProject Foundation (OPF) +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See doc/COPYRIGHT.rdoc for more details. +#++ + +require 'open3' +namespace :packager do + + def shell_setup(cmd, raise_on_error: true) + out_and_err, status = Open3.capture2e(ENV['APP_NAME'], *cmd) + + if status.exitstatus != 0 && raise_on_error + raise "Aborting packager setup due to error in installation. Output: #{out_and_err}" + end + end + + + task postinstall: [:environment, 'setup:relative_root', 'setup:scm'] do + + # Persist configuration + Setting.sys_api_enabled = 1 + Setting.sys_api_key = ENV['SYS_API_KEY'] + Setting.protocol = ENV['SERVER_PROTOCOL'] + Setting.host_name = ENV['SERVER_HOSTNAME'] + + # Run customization step, if it is defined. + # Use to define custom postinstall steps required after each configure, + # or to configure products. + if Rake::Task.task_defined?('packager:customize') + Rake::Task['packager:customize'].invoke + end + end + + namespace :setup do + task :relative_root do + old_relative_root = ENV['RAILS_RELATIVE_URL_ROOT'] || '' + relative_root = ENV['SERVER_PATH_PREFIX'] || '/' + + if relative_root != '/' || "#{old_relative_root}/" != relative_root + # Rails expects relative root not to have a trailing slash, + # but most of our packager setup scripts require it, thus remove it here. + new_root = relative_root.chomp('/') + + shell_setup(['config:set', "RAILS_RELATIVE_URL_ROOT=#{new_root}"]) + ENV['RAILS_RELATIVE_URL_ROOT'] = new_root + + # Need to re-compile assets due to changed paths + Rake::Task['assets:precompile'].invoke + FileUtils.chmod_R 'a+r', "#{ENV['APP_HOME']}/public/assets/" + end + end + + task :scm do + svn_path = ENV['SVN_REPOSITORIES'] || '' + git_path = ENV['GIT_REPOSITORIES'] || '' + + base_url = URI::HTTP.build(protocol: ENV['SERVER_PROTOCOL'], host: ENV['SERVER_HOSTNAME']) + prefix = ENV['SERVER_PATH_PREFIX'] + + checkout_data = Setting.repository_checkout_data + if svn_path.present? + # migrate previous repositories with reposman to managed + Rake::Task['scm:migrate:managed'].invoke("file://#{svn_path}") + checkout_data['subversion'] = { 'enabled' => 1, 'base_url' => URI.join(base_url, prefix, 'svn') } + end + + if git_path.present? + checkout_data['git'] = { 'enabled' => 1, 'base_url' => URI.join(base_url, prefix, 'git') } + end + + Setting.repository_checkout_data = checkout_data + + # Output any remnants of existing repositories in the currently + # configured paths of Git and Subversion. + Rake::Task['scm:find_unassociated'].invoke + end + end +end From 83e6bc8ff8c32fe8ac297de114af955e2d24390b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Thu, 7 Jan 2016 15:23:27 +0100 Subject: [PATCH 123/123] Configure relative root in before_postinstall --- lib/tasks/packager.rake | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/lib/tasks/packager.rake b/lib/tasks/packager.rake index 06fd317ac5..7fa9a162ee 100644 --- a/lib/tasks/packager.rake +++ b/lib/tasks/packager.rake @@ -38,8 +38,21 @@ namespace :packager do end end - - task postinstall: [:environment, 'setup:relative_root', 'setup:scm'] do + ## + # Allow scripts to run before environment is loaded + task before_postinstall: ['setup:relative_root'] + + # + # Allow scripts to run with environment loaded once, + # avoids to load the environment multiple times + task postinstall: [:environment, 'setup:scm'] do + + # Precompile assets when requested + if ENV['REBUILD_ASSETS'] == 'true' + Rake::Task['assets:precompile'].invoke + FileUtils.chmod_R 'a+r', "#{ENV['APP_HOME']}/public/assets/" + shell_setup(['config:set', 'REBUILD_ASSETS="false"']) + end # Persist configuration Setting.sys_api_enabled = 1 @@ -66,11 +79,7 @@ namespace :packager do new_root = relative_root.chomp('/') shell_setup(['config:set', "RAILS_RELATIVE_URL_ROOT=#{new_root}"]) - ENV['RAILS_RELATIVE_URL_ROOT'] = new_root - - # Need to re-compile assets due to changed paths - Rake::Task['assets:precompile'].invoke - FileUtils.chmod_R 'a+r', "#{ENV['APP_HOME']}/public/assets/" + shell_setup(['config:set', 'REBUILD_ASSETS="true"']) end end