[ 
https://issues.apache.org/jira/browse/FELIX-1015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731106#action_12731106
 ] 

Felix Meschberger commented on FELIX-1015:
------------------------------------------

Thanks for the feedback.

I will commit a slightly modified version, where the HEADER stuff is not part 
of the branding but instead of the AbstractWebConsole plugin.

Rather the contents of the HEADER will be structured such that CSS will be able 
to tweak how the lead is rendered.

> Hardcoded HTML Header/Footer in AbstractWebConsolePlugin
> --------------------------------------------------------
>
>                 Key: FELIX-1015
>                 URL: https://issues.apache.org/jira/browse/FELIX-1015
>             Project: Felix
>          Issue Type: Sub-task
>          Components: Web Console
>    Affects Versions: webconsole-1.2.8
>            Reporter: Thomas Diesler
>            Assignee: Felix Meschberger
>         Attachments: branding.patch, branding2.patch, 
> FELIX-1015-fmeschbe.patch
>
>
> Instead of 
>     private static final String HEADER = "<?xml version=\"1.0\" 
> encoding=\"UTF-8\" ?>"
>         + "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" 
> \"xhtml1-transitional.dtd\">"
>         + "<html xmlns=\"http://www.w3.org/1999/xhtml\";>"
>         + "<head>"
>         + "<meta http-equiv=\"Content-Type\" content=\"text/html; utf-8\">"
>         + "<link rel=\"icon\" href=\"{6}/res/imgs/favicon.ico\">"
>         + "<title>{0} - {2}</title>"
>         + "<script src=\"{5}/res/ui/jquery-1.3.2.min.js\" 
> language=\"JavaScript\"></script>"
>         + "<script src=\"{5}/res/ui/jquery.tablesorter-2.0.3.min.js\" 
> language=\"JavaScript\"></script>"
>         + "<script src=\"{5}/res/ui/admin.js\" 
> language=\"JavaScript\"></script>"
>         + "<script src=\"{5}/res/ui/ui.js\" language=\"JavaScript\"></script>"
>         + "<script language=\"JavaScript\">"
>         + "appRoot = \"{5}\";"
>         + "pluginRoot = appRoot + \"/{6}\";"
>         + "</script>"
>         + "<link href=\"{5}/res/ui/admin.css\" rel=\"stylesheet\" 
> type=\"text/css\">"
>         + "</head>"
>         + "<body>"
>         + "<div id=\"main\">"
>         + "<div id=\"lead\">"
>         + "<h1>"
>         + "{0}<br>{2}"
>         + "</h1>"
>         + "<p>"
>         + "<a target=\"_blank\" href=\"{3}\" title=\"{1}\"><img 
> src=\"{5}/res/imgs/logo.png\" width=\"165\" height=\"63\" border=\"0\"></a>"
>         + "</p>" + "</div>";
> we propose 
>     protected String getHeader()
>     {
>        String HEADER = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
>         + "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" 
> \"xhtml1-transitional.dtd\">"
>         + "<html xmlns=\"http://www.w3.org/1999/xhtml\";>"
>         + "<head>"
>         + "<meta http-equiv=\"Content-Type\" content=\"text/html; utf-8\">"
>         + "<link rel=\"icon\" href=\"{6}/res/imgs/favicon.ico\">"
>         + "<title>{0} - {2}</title>"
>         + "<script src=\"{5}/res/ui/jquery-1.3.2.min.js\" 
> language=\"JavaScript\"></script>"
>         + "<script src=\"{5}/res/ui/jquery.tablesorter-2.0.3.min.js\" 
> language=\"JavaScript\"></script>"
>         + "<script src=\"{5}/res/ui/admin.js\" 
> language=\"JavaScript\"></script>"
>         + "<script src=\"{5}/res/ui/ui.js\" language=\"JavaScript\"></script>"
>         + "<script language=\"JavaScript\">"
>         + "appRoot = \"{5}\";"
>         + "pluginRoot = appRoot + \"/{6}\";"
>         + "</script>"
>         + "<link href=\"{5}/res/ui/admin.css\" rel=\"stylesheet\" 
> type=\"text/css\">"
>         + "</head>"
>         + "<body>"
>         + "<div id=\"main\">"
>         + "<div id=\"lead\">"
>         + "<h1>"
>         + "{0}<br>{2}"
>         + "</h1>"
>         + "<p>"
>         + "<a target=\"_blank\" href=\"{3}\" title=\"{1}\"><img 
> src=\"{5}/res/imgs/logo.png\" width=\"165\" height=\"63\" border=\"0\"></a>"
>         + "</p>" + "</div>";
>        return HEADER;
>     }
> -------------
>     protected PrintWriter startResponse( HttpServletRequest request, 
> HttpServletResponse response ) throws IOException
>     {
>         ...
>         String header = MessageFormat.format( getHeader(), new Object[]
>     }
>     protected void endResponse( HttpServletRequest request, PrintWriter pw )
>     {
>         pw.println( "</body>" );
>         pw.println( "</html>" );
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to