* will produce:
* {@literal<pre>}{@literal<code>}This code
* spans on 2 lines{@literal</code>}{@literal</pre>}
+ *
+ * @since 2.14
*/
class HtmlMultilineCodeChannel extends RegexChannel<MarkdownOutput> {
SECTION=Navigation::SECTION_CONFIGURATION
- def full_help
+ def help
end
end
\ No newline at end of file
+++ /dev/null
-<div class="note" style="text-align: right; float: right;">
- (<a onclick="window.open(this.href,'markdown','height=800,width=900,scrollbars=1,resizable=1');return false;"
- href="<%= url_for :controller => 'markdown', :action => 'full_help', :layout => 'false' -%>"><%= message('more') -%></a>)
-</div>
-<div style="min-width: 100px">
-<h3><%= message('help_tips') -%> </h3>
-<br/>
-<table>
- <tr>
- <td>*<%= message('bold') -%>*</td>
- <td class="sep"></td>
- <td><b><%= message('bold') -%></b></td>
- </tr>
- <tr>
- <td>``<%= message('code') -%>``</td>
- <td class="sep"></td>
- <td><code><%= message('code') -%></code></td>
- </tr>
- <tr>
- <td colspan="3">* <%= message('bulleted_point') -%></td>
- </tr>
-</table>
-</div>
\ No newline at end of file
--- /dev/null
+<div style="min-width: 100px">
+<h3><a onclick="window.open(this.href,'markdown','height=350,width=520,scrollbars=1,resizable=1');return false;"
+ href="<%= url_for :controller => 'markdown', :action => 'help', :layout => 'false' -%>"><%= message('help_tips') -%></a></h3>
+<table>
+ <tr>
+ <td>*<%= message('bold') -%>*</td>
+ </tr>
+ <tr>
+ <td>``<%= message('code') -%>``</td>
+ </tr>
+ <tr>
+ <td>* <%= message('bulleted_point') -%></td>
+ </tr>
+</table>
+</div>
\ No newline at end of file
+++ /dev/null
-<div id="markdown-full-help" style="width:500px">
-<h2>Markdown syntax</h2>
-
-<br/>
-
-<h3>Format text</h3>
-
-<pre class="code">
-*This text will be bold*
-</pre>
-
-<pre class="code">
-* Item 1
-* Item 2
-* Item 3
-</pre>
-
-<pre class="code">
-http://www.google.com is automatically transformed into a link.
-</pre>
-
-<h3>Code</h3>
-
-<pre class="code">
-Please check ``Lists#newArrayList()`` method.
-</pre>
-
-<pre class="code">
-``java
-public void foo() {
- // do some logic here
-}
-``
-</pre>
-
-</div>
\ No newline at end of file
--- /dev/null
+<div id="markdown-full-help" style="width:500px">
+ <h2 class="spacer-bottom">Markdown Syntax</h2>
+
+ <table class="width100 table table-bordered spacer-bottom">
+ <thead>
+ <tr>
+ <th>Write :</th>
+ <th>To display :</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr class="even">
+ <td>*this text is bold*</td>
+ <td><b>this text is bold</b></td>
+ </tr>
+ <tr class="odd">
+ <td>http://sonarsource.org</td>
+ <td><a href="http://sonarsource.org">http://sonarsource.org</a></td>
+ </tr>
+ <tr class="even">
+ <td valign="top">* bulleted point</td>
+ <td class="discussionComment">
+ <ul>
+ <li>bulleted point</li>
+ </ul>
+ </td>
+ </tr>
+ <tr class="odd">
+ <td valign="top">``Lists#newArrayList()``</td>
+ <td><code>Lists#newArrayList()</code></td>
+ </tr>
+ <tr class="even">
+ <td valign="top">
+ ``<br>
+ // code on multiple lines<br>
+ public void foo() {<br>
+ // do some logic here<br>
+ }<br>
+ ``
+ </td>
+ <td valign="top"><pre style="border: 1px dashed #DDD;padding: 5px;color: #444;font-size: 12px;">
+ <code>
+// code on multiple lines
+public void foo() {
+ // do some logic here
+}
+ </code>
+ </pre>
+ </td>
+ </tr>
+ </tbody>
+</table>
</td>
<td class="sep"></td>
<td style="vertical-align:top;width: 90px">
- <%= render :partial => 'markdown/help' -%>
+ <%= render :partial => 'markdown/tips' -%>
</td>
</tr>
</table>
</td>
<td class="sep"></td>
<td style="vertical-align:top;width: 90px">
- <%= render :partial => 'markdown/help' -%>
+ <%= render :partial => 'markdown/tips' -%>
</td>
</tr>
</table>
</div>
- <div class="discussionComment first" id="vBody<%= violation.id -%>">
+ <div class="discussionComment first">
<div id="vMsg<%= violation.id -%>">
<%= violation.html_message || ' ' -%>
</div>
</div>
- <div class="discussionComment" id="reviewForm<%= violation.id -%>" style="display:none"></div>
-
<%
if violation.review
violation.review.comments.each_with_index do |review_comment, comment_index|
end
%>
<% if current_user %>
- <div class="vFooter">
+ <div class="vActions" id="vActions<%= violation.id -%>">
<%= link_to_function message('reviews.comment'), "sCF(#{violation.id})", :name => 'bComment', :class => 'link-action spacer-right' -%>
<% unless violation.review && violation.review.resolved? %>
<% unless violation.switched_off? && violation.review && violation.review.resolved? %>
<div class="dropdown">
- <a href="#" class="link-action link-more" onclick="$('vActions<%= violation.id -%>').toggle();return false;"><%= message('more_actions') -%></a>
- <ul style="display: none" class="dropdown-menu" id="vActions<%= violation.id -%>" onmouseout="this.hide();" onmouseover="this.show();">
+ <a href="#" class="link-action link-more" onclick="$('more<%= violation.id -%>').toggle();return false;"><%= message('more_actions') -%></a>
+ <ul style="display: none" class="dropdown-menu" id="more<%= violation.id -%>" onmouseout="this.hide();" onmouseover="this.show();">
<% if !violation.switched_off? %>
<li><%= link_to_function (violation.review && violation.review.resolved? ? message('reviews.reopen') : message('reviews.resolved')),
"sCStF(#{violation.id})", :name => (violation.review && violation.review.resolved? ? 'bReopen' : 'bResolved') -%></li>
<% end %>
</div>
<% end %>
+ <div class="discussionComment" id="reviewForm<%= violation.id -%>" style="display:none"></div>
</div>
</div>
\ No newline at end of file
</td>
<td class="sep"></td>
<td style="vertical-align:top;width: 90px">
- <%= render :partial => 'markdown/help' -%>
+ <%= render :partial => 'markdown/tips' -%>
</td>
</tr>
</table>
</td>
<td class="sep"></td>
<td style="vertical-align:top;width: 90px">
- <%= render :partial => 'markdown/help' -%>
+ <%= render :partial => 'markdown/tips' -%>
</td>
</tr>
</table>
</td>
<td class="sep"></td>
<td style="vertical-align:top;width: 90px">
- <%= render :partial => 'markdown/help' -%>
+ <%= render :partial => 'markdown/tips' -%>
</td>
</tr>
</table>
</td>
<td class="sep"></td>
<td style="vertical-align:top;width: 90px">
- <%= render :partial => 'markdown/help' -%>
+ <%= render :partial => 'markdown/tips' -%>
</td>
</tr>
</table>
</td>
<td class="sep"></td>
<td style="vertical-align:top;width: 90px">
- <%= render :partial => 'markdown/help' -%>
+ <%= render :partial => 'markdown/tips' -%>
</td>
</tr>
</table>
</td>
<td class="sep"></td>
<td style="vertical-align:top;width: 90px">
- <%= render :partial => 'markdown/help' -%>
+ <%= render :partial => 'markdown/tips' -%>
</td>
</tr>
</table>
onkeyup="if (this.value=='') $('<%= submit_active_note_update_button_id -%>').disabled=true; else $('<%= submit_active_note_update_button_id -%>').disabled=false;"><%= h(note.plain_text) if note -%></textarea>
</td>
<td class="markdown-help">
- <%= render :partial => 'markdown/help' -%>
+ <%= render :partial => 'markdown/tips' -%>
</td>
</tr>
<tr>
<textarea name="text" id="<%= note_textarea_id -%>" rows="10" style="width:100%"><%= h(note.plain_text) if note -%></textarea>
</td>
<td class="markdown-help nowrap">
- <%= render :partial => 'markdown/help' -%>
+ <%= render :partial => 'markdown/tips' -%>
</td>
</tr>
<tr>
}
function hideMoreViolationActions(violation_id) {
- var popup = $('vActions' + violation_id);
+ var popup = $('more' + violation_id);
if (popup != null) {
popup.hide();
}
asynchronous:true,
evalScripts:true,
onComplete:function (request) {
- $('vBody' + violation_id).remove();
+ $('vActions' + violation_id).remove();
$('reviewForm' + violation_id).show();
$('commentText' + violation_id).focus();
}
asynchronous:true,
evalScripts:true,
onComplete:function (request) {
- $('vBody' + violation_id).remove();
+ $('vActions' + violation_id).remove();
$('reviewForm' + violation_id).show();
$('selectSeverity' + violation_id).focus();
}
asynchronous:true,
evalScripts:true,
onComplete:function (request) {
- $('vBody' + violation_id).remove();
+ $('vActions' + violation_id).remove();
$('reviewForm' + violation_id).show();
$('commentText' + violation_id).focus();
}
asynchronous:true,
evalScripts:true,
onComplete:function (request) {
- $('vBody' + violation_id).remove();
+ $('vActions' + violation_id).remove();
$('reviewForm' + violation_id).show();
$('commentText' + violation_id).focus();
}
asynchronous:true,
evalScripts:true,
onComplete:function (request) {
- $('vBody' + violation_id).remove();
+ $('vActions' + violation_id).remove();
$('reviewForm' + violation_id).show();
$('assignee_login').focus();
}
asynchronous:true,
evalScripts:true,
onComplete:function (request) {
- $('vBody' + violation_id).remove();
+ $('vActions' + violation_id).remove();
$('reviewForm' + violation_id).show();
$('action_plan').focus();
}
vertical-align: text-bottom;
}
-div.vFooter {
+div.vActions {
padding: 5px 10px;
border-top: 1px solid #DDD;
background-color: #EFEFEF;
vertical-align: bottom;
}
-div.discussion {
+.discussion {
width: 100%;
border: 1px solid #DDDDDD;
}
border-top: none;
}
-div.discussionComment {
+.discussionComment {
background-color: #EFEFEF;
border-top: 1px solid #DDDDDD;
line-height: 1.5em;
padding: 5px 10px;
}
-div.discussionComment h4 {
+.discussionComment h4 {
font-size: 90%;
margin-bottom: 2px;
}
-div.discussionComment h4 img {
+.discussionComment h4 img {
vertical-align: sub;
}
-div.discussionComment li {
+.discussionComment li {
list-style: square inside;
}
+.discussionComment pre {
+ padding: 10px;
+ border: 1px dashed #DDD;
+ color: #444;
+ font-size: 12px;
+}
div.comment-excerpt {
background-color: transparent;