This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.11
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.11 by this push:
     new d8b3a90  ui: insert plugin css files before custom.css file (#2784)
d8b3a90 is described below

commit d8b3a9096225d2c7a15fa07d08617acee110e657
Author: ernjvr <[email protected]>
AuthorDate: Wed Aug 8 08:37:56 2018 +0200

    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 <head> tag.
    The plugins.js file appends a list of CSS files to the <head> 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 <head> 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 <head> element and review the list of CSS <link> 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 82d9242..e6a126e6 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);
         }
     };
 

Reply via email to