|
Hi all, I’m working on a plugin to display the number of projects and the number of LOC by language. I want to display the result in a global widget. My problem is on the management of the widget title. When I look the _widget_title.html.erb file, I see the title can be either the name of one filter or the name of the resource associated to the widget. But my widget is not a filter and is not associated with one resource. Is there another way to define the title because if I use directly this instruction : <div class="widget-title">Number of projects</div>', I have
spacing between the widget border and the title bloc :
Thanks. Regards, David FRANCOIS Think green - keep it on the screen. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. |
|
Hi David,
I've got too options for you: + It's not possible. + You can hack it anyway by adding this piece of code in your widget. Beware, this is really a hack and will sure be broken in any future version.
<script type="text/javascript"> var title=document.createElement('div'); title.setAttribute('class', 'widget-title'); title.setAttribute('className', 'widget-title');
title.appendChild(document.createTextNode('NICE TITLE')); var block=document.getElementById('block_<%= widget.id -%>'); block.insertBefore(title, block.firstChild) ;
</script> David. On 26 June 2012 13:51, Francois, David <[hidden email]> wrote:
-- David |
|
Hi,
Could you please create a JIRA issue in order to provide custom widget titles ? Thanks On 28 June 2012 09:37, David Gageot <[hidden email]> wrote: Hi David, |
|
Hi, JIRA issue created :
http://jira.codehaus.org/browse/SONAR-3628 Regards, David FRANCOIS De : Simon Brandhof [mailto:[hidden email]]
Hi, On 28 June 2012 09:37, David Gageot <[hidden email]> wrote: Hi David, I've got too options for you: + It's not possible. + You can hack it anyway by adding this piece of code in your widget. Beware, this is really a hack and will sure be broken in any future version. <script type="text/javascript"> var title=document.createElement('div'); title.setAttribute('class', 'widget-title'); title.setAttribute('className', 'widget-title'); title.appendChild(document.createTextNode('NICE TITLE')); var block=document.getElementById('block_<%=
widget.id -%>'); block.insertBefore(title, block.firstChild) ; </script> David. On 26 June 2012 13:51, Francois, David <[hidden email]> wrote: Hi all, I’m working on a plugin to display the number of projects and the number of LOC by language. I want to display the result in a global widget. My problem is on the management of the widget title. When I look the _widget_title.html.erb file, I see the title can be either the name of one filter or the
name of the resource associated to the widget. But my widget is not a filter and is not associated with one resource. Is there another way to define the title because if I use directly this instruction : <div
class="widget-title">Number of projects</div>', I have spacing between the widget border and the title bloc :
Thanks. Regards, David FRANCOIS
-- Think green - keep it on the screen. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. |
| Powered by Nabble | Edit this page |
