From d8b3a9096225d2c7a15fa07d08617acee110e657 Mon Sep 17 00:00:00 2001 From: ernjvr Date: Wed, 8 Aug 2018 08:37:56 +0200 Subject: [PATCH] ui: insert plugin css files before custom.css file (#2784) In the index.html file, the reference to the custom.css file is made on the last line of the tag. The plugins.js file appends a list of CSS files to the tag dynamically, consequently placing them after the custom.css file and overriding it. Expected Behaviour: The plugins.js file must insert the list of CSS files before the custom.css file so that it does not get overridden. Actual Behaviour: The plugins.js file appends a list of CSS files to the tag dynamically, consequently placing them after the custom.css file and overriding it. To Reproduce: Log in to the Cloudstack UI using your favourite browser. Use your browser's development tool to view the HTML elements of the index.html loaded in memory. Expand the element and review the list of CSS elements. Notice that the list of module and plugins CSS files is appended after the custom.css file. --- ui/scripts/plugins.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/scripts/plugins.js b/ui/scripts/plugins.js index 82d92429a7d..e6a126e6426 100644 --- a/ui/scripts/plugins.js +++ b/ui/scripts/plugins.js @@ -32,7 +32,7 @@ href: path }); - $('html head').append($link); + $('html head > link:last').before($link); } };