stable

Clone or download

Read-only

fix: request #41082 tracker FlamingParrot styles should be loaded only where needed

How to test: - Go to an SVN repository's settings > Notifications. - Tracker FlamingParrot styles should not be loaded on the page. - Add any notification (it does not matter). Then click on Delete button. The popover to confirm deletion should have padding in its content, it should not be glued to its borders. - Go to a Tracker's administration > Hamburger menu "≡" > Time tracking - The administration page should be styled, there should not be a margin between the content and the header and sidebar. Why? The fix in 2481453e0e1b3ee1a266d6c8da107cf23b513207 was causing the very bad side-effect of loading Tracker FlamingParrot styles on _every_ FlamingParrot page, ever. It works with two events: cssFile() event is fired on every page, Tracker plugin handles it, and fires another event TRACKER_EVENT_INCLUDE_CSS_FILE. If somebody responds to that second event (in our case timetrackingPlugin does) and sets the parameter to true (it always does), then tracker will include its style. The problem is that timetrackingPlugin _always_ sets it true, regardless of the page. The original issue was probably caused by 890789271ba923ce0e95075309f6b2ad2f17ff7f. As it changed the way the styles are built, the administration could have been overlooked, but the same stylesheet also had rules for it. In order to fix the problem, we make the Admin controller load the stylesheet too. It's not necessary but we also rearrange some rules to drop linter disables. Change-Id: I5d83fb1f9a21d6f760ea2dc9346308e2859decf5

Modified Files

Name
M plugins/timetracking/include/Timetracking/Admin/AdminController.php +13 −3 Go to diff View file
M plugins/timetracking/include/timetrackingPlugin.php +0 −6 Go to diff View file
M plugins/timetracking/scripts/timetracking-tab-styles/themes/style.scss +5 −7 Go to diff View file