← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16049: Enabling custom style from login page

 

------------------------------------------------------------
revno: 16049
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-07-09 11:26:23 +0200
message:
  Enabling custom style from login page
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java	2014-07-09 09:08:45 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java	2014-07-09 09:26:23 +0000
@@ -99,7 +99,10 @@
     // Custom style
     // -------------------------------------------------------------------------
 
-    @RequestMapping( value = "/style", method = RequestMethod.GET )
+    /**
+     * The style/external mapping enables style to be reached from login page / before authentication.
+     */
+    @RequestMapping( value = { "/style", "/style/external" }, method = RequestMethod.GET )
     public void getCustomStyle( HttpServletResponse response, Writer writer )
         throws IOException
     {

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm	2014-07-09 07:48:02 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm	2014-07-09 09:26:23 +0000
@@ -9,7 +9,7 @@
         <script type="text/javascript" src="login.js"></script>
         <link type="text/css" rel="stylesheet" href="../css/widgets.css">
         <link type="text/css" rel="stylesheet" href="../css/login.css">
-        <link type="text/css" rel="stylesheet" href="../../api/files/style" />
+        <link type="text/css" rel="stylesheet" href="../../api/files/style/external" />
     </head>
     <body>
     	<h1 style="display:none">$!encoder.htmlEncode( ${applicationTitle} )</h1>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml	2014-07-09 09:08:45 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml	2014-07-09 09:26:23 +0000
@@ -23,7 +23,7 @@
   <sec:http pattern="/dhis-web-commons/css/**" security="none" />
   <sec:http pattern="/dhis-web-commons/flags/**" security="none" />
   <sec:http pattern="/dhis-web-commons/fonts/**" security="none" />
-  <sec:http pattern="/api/files/style" security="none" />
+  <sec:http pattern="/api/files/style/external" security="none" />
   <sec:http pattern="/external-static/**" security="none" />
   <sec:http pattern="/favicon.ico" security="none" />