<li class="coding-rules-detail-property">{{severityIcon severity}} {{t "severity" severity}}</li>
<li class="coding-rules-detail-property"><i class="icon-lang"></i> {{language}}</li>
<li class="coding-rules-detail-property"><i class="icon-calendar"></i> {{fCreationDate}}</li>
- <li class="coding-rules-detail-property"><i class="icon-tags"></i> {{join tags ', '}}</li>
+ <li class="coding-rules-detail-property coding-rules-detail-tag-list">
+ <i class="icon-tags"></i>
+ {{join tags ', '}}
+ <a class="link-action coding-rules-detail-tags-change">{{t 'change'}}</a>
+ </li>
+ <li class="coding-rules-detail-property coding-rules-detail-tag-edit">
+ <input class="coding-rules-detail-tag-input" type="text" value="{{join tags ','}}">
+ <a class="link-action coding-rules-detail-tag-edit-done">{{t 'done'}}</a>
+ </li>
</ul>
<div class="coding-rules-detail-description rule-desc">{{{description}}}</div>
- {{#if extra}}
- <div class="coding-rules-detail-description coding-rules-detail-description-extra rule-desc">{{{extra}}}</div>
- {{/if}}
+
+ <div class="coding-rules-detail-description coding-rules-detail-description-extra">
+ <div id="coding-rules-detail-description-extra">
+ {{#if extra}}<div class="rule-desc">{{{extra}}}</div>{{/if}}
+ <a class="link-action" id="coding-rules-detail-extend-description">{{t 'coding_rules.extend_description'}}</a>
+ </div>
+
+ <div id="coding-rules-detail-extend-description-form" class="admin">
+ <table class="width100 table">
+ <tbody>
+ <tr>
+ <td class="width100" colspan="2">
+ <textarea id="coding-rules-detail-extend-description-text" rows="4" style="width: 100%;">{{extraRaw}}</textarea>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <button id="coding-rules-detail-extend-description-submit">{{t 'coding_rules.extend_description'}}</button>
+ <a id="coding-rules-detail-extend-description-cancel" class="action">{{t 'cancel'}}</a>
+ </td>
+ <td class="right">
+ <%= render :partial => 'markdown/tips' -%>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id="coding-rules-detail-extend-description-spinner">
+ <i class="spinner"></i>
+ </div>
+ </div>
<table class="data zebra coding-rules-detail-parameters">
<thead>
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode=" " d="" horiz-adv-x="512" />
+<glyph unicode="" d="M188.16 24.020h135.926v659.763h-135.926v-659.763zM324.106 770.557c0 5.632-4.608 10.24-10.24 10.24h-115.466c-5.632 0-10.24-4.608-10.24-10.24v-76.749h135.946v76.749zM188.16-62.662c0-5.622 4.608-10.24 10.24-10.24h115.466c5.632 0 10.24 4.618 10.24 10.24v76.749h-135.946v-76.749zM812.329 78.292l163.809 30.618-96.625 517.059-163.82-30.618 96.635-517.059zM850.278 782.497c-1.044 5.54-6.42 9.216-11.96 8.182l-143.688-26.86c-5.55-1.034-9.226-6.41-8.202-11.94l27.423-146.668 163.83 30.618-27.402 146.668zM839.506-67.157c1.034-5.54 6.4-9.216 11.94-8.202l143.718 26.89c5.53 1.034 9.216 6.42 8.192 11.94l-25.364 135.7-163.85-30.638 25.364-135.69zM498.35 732.28h-139.95c-5.632 0-10.24-4.608-10.24-10.24v-784.701c0-5.622 4.608-10.24 10.24-10.24h139.95c5.632 0 10.24 4.618 10.24 10.24v784.701c0 5.632-4.608 10.24-10.24 10.24zM486.83 196.267h-116.91v235.52h116.91v-235.52zM16.65 84.6h142.060v642.662h-142.060v-642.662zM158.72 861.181c0 5.632-4.608 10.24-10.24 10.24h-121.6c-5.632 0-10.24-4.608-10.24-10.24v-123.884h142.080v123.884zM16.64-62.662c0-5.622 4.608-10.24 10.24-10.24h121.6c5.632 0 10.24 4.618 10.24 10.24v137.329h-142.080v-137.329zM558.981 82.941l141.865 7.332-33.167 641.812-141.865-7.332 33.167-641.812zM660.777 865.809c-0.287 5.622-5.13 9.994-10.752 9.708l-121.436-6.287c-5.622-0.287-9.994-5.13-9.697-10.752l6.39-123.72 141.885 7.332-6.39 123.72zM566.569-64.136c0.287-5.612 5.14-9.984 10.762-9.697l121.436 6.277c5.622 0.297 9.984 5.14 9.687 10.752l-7.086 137.155-141.885-7.332 7.086-137.155z" />
<glyph unicode="" d="M438.857 865.524q119.429 0 220.286-58.857t159.714-159.714 58.857-220.286-58.857-220.286-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857zM512 152.953v108.571q0 8-5.143 13.429t-12.571 5.429h-109.714q-7.429 0-13.143-5.714t-5.714-13.143v-108.571q0-7.429 5.714-13.143t13.143-5.714h109.714q7.429 0 12.571 5.429t5.143 13.429zM510.857 349.524l10.286 354.857q0 6.857-5.714 10.286-5.714 4.571-13.714 4.571h-125.714q-8 0-13.714-4.571-5.714-3.429-5.714-10.286l9.714-354.857q0-5.714 5.714-10t13.714-4.286h105.714q8 0 13.429 4.286t6 10z" />
<glyph unicode="" d="M733.714 427.238q0 15.429-10.286 25.714l-258.857 258.857q-10.286 10.286-25.714 10.286t-25.714-10.286l-258.857-258.857q-10.286-10.286-10.286-25.714t10.286-25.714l52-52q10.286-10.286 25.714-10.286t25.714 10.286l108 108v-286.857q0-14.857 10.857-25.714t25.714-10.857h73.143q14.857 0 25.714 10.857t10.857 25.714v286.857l108-108q10.857-10.857 25.714-10.857t25.714 10.857l52 52q10.286 10.286 10.286 25.714zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="" d="M665.714 287.81l58.286 58.286q10.857 10.857 10.857 25.714t-10.857 25.714l-259.429 259.429q-10.857 10.857-25.714 10.857t-25.714-10.857l-259.429-259.429q-10.857-10.857-10.857-25.714t10.857-25.714l58.286-58.286q10.857-10.857 25.714-10.857t25.714 10.857l175.429 175.429 175.429-175.429q10.857-10.857 25.714-10.857t25.714 10.857zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="" d="M464.571 196.381l259.429 259.429q10.857 10.857 10.857 25.714t-10.857 25.714l-58.286 58.286q-10.857 10.857-25.714 10.857t-25.714-10.857l-175.429-175.429-175.429 175.429q-10.857 10.857-25.714 10.857t-25.714-10.857l-58.286-58.286q-10.857-10.857-10.857-25.714t10.857-25.714l259.429-259.429q10.857-10.857 25.714-10.857t25.714 10.857zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="" d="M733.714 426.096q0 15.429-10.286 25.714l-52 52q-10.286 10.286-25.714 10.286t-25.714-10.286l-108-108v286.857q0 14.857-10.857 25.714t-25.714 10.857h-73.143q-14.857 0-25.714-10.857t-10.857-25.714v-286.857l-108 108q-10.857 10.857-25.714 10.857t-25.714-10.857l-52-52q-10.286-10.286-10.286-25.714t10.286-25.714l258.857-258.857q10.286-10.286 25.714-10.286t25.714 10.286l258.857 258.857q10.286 10.286 10.286 25.714zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
+<glyph unicode="" d="M950.857 568.953q0-12.571-14.857-27.429l-207.429-202.286 49.143-285.714q0.571-4 0.571-11.429 0-12-6-20.286t-17.429-8.286q-10.857 0-22.857 6.857l-256.571 134.857-256.571-134.857q-12.571-6.857-22.857-6.857-12 0-18 8.286t-6 20.286q0 3.429 1.143 11.429l49.143 285.714-208 202.286q-14.286 15.429-14.286 27.429 0 21.143 32 26.286l286.857 41.714 128.571 260q10.857 23.429 28 23.429t28-23.429l128.571-260 286.857-41.714q32-5.143 32-26.286z" horiz-adv-x="951" />
<glyph unicode="" d="M954.857 615.238q0-22.857-16-38.857l-491.429-491.429q-16-16-38.857-16t-38.857 16l-284.571 284.571q-16 16-16 38.857t16 38.857l77.714 77.714q16 16 38.857 16t38.857-16l168-168.571 374.857 375.429q16 16 38.857 16t38.857-16l77.714-77.714q16-16 16-38.857z" />
+<glyph unicode="" d="M741.714 183.238q0-22.857-16-38.857l-77.714-77.714q-16-16-38.857-16t-38.857 16l-168 168-168-168q-16-16-38.857-16t-38.857 16l-77.714 77.714q-16 16-16 38.857t16 38.857l168 168-168 168q-16 16-16 38.857t16 38.857l77.714 77.714q16 16 38.857 16t38.857-16l168-168 168 168q16 16 38.857 16t38.857-16l77.714-77.714q16-16 16-38.857t-16-38.857l-168-168 168-168q16-16 16-38.857z" horiz-adv-x="805" />
<glyph unicode="" d="M438.857 737.524q-84.571 0-156-41.714t-113.143-113.143-41.714-156 41.714-156 113.143-113.143 156-41.714 156 41.714 113.143 113.143 41.714 156-41.714 156-113.143 113.143-156 41.714zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="" d="M585.143 426.667q0-60.571-42.857-103.429t-103.429-42.857-103.429 42.857-42.857 103.429 42.857 103.429 103.429 42.857 103.429-42.857 42.857-103.429zM438.857 737.524q-84.571 0-156-41.714t-113.143-113.143-41.714-156 41.714-156 113.143-113.143 156-41.714 156 41.714 113.143 113.143 41.714 156-41.714 156-113.143 113.143-156 41.714zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="" d="M438.857 115.81v621.714q-84.571 0-156-41.714t-113.143-113.143-41.714-156 41.714-156 113.143-113.143 156-41.714zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="" d="M804.571 407.238v-181.714q0-68-48.286-116.286t-116.286-48.286h-475.429q-68 0-116.286 48.286t-48.286 116.286v475.429q0 68 48.286 116.286t116.286 48.286h475.429q36 0 66.857-14.286 8.571-4 10.286-13.143 1.714-9.714-5.143-16.571l-28-28q-5.714-5.714-13.143-5.714-1.714 0-5.143 1.143-13.143 3.429-25.714 3.429h-475.429q-37.714 0-64.571-26.857t-26.857-64.571v-475.429q0-37.714 26.857-64.571t64.571-26.857h475.429q37.714 0 64.571 26.857t26.857 64.571v145.143q0 7.429 5.143 12.571l36.571 36.571q5.714 5.714 13.143 5.714 3.429 0 6.857-1.714 11.429-4.571 11.429-16.571zM936.571 686.667l-465.143-465.143q-13.714-13.714-32.571-13.714t-32.571 13.714l-245.714 245.714q-13.714 13.714-13.714 32.571t13.714 32.571l62.857 62.857q13.714 13.714 32.571 13.714t32.571-13.714l150.286-150.286 369.714 369.714q13.714 13.714 32.571 13.714t32.571-13.714l62.857-62.857q13.714-13.714 13.714-32.571t-13.714-32.571z" horiz-adv-x="951" />
<glyph unicode="" d="M656.571 297.524q0 14.857-10.857 25.714l-103.429 103.429 103.429 103.429q10.857 10.857 10.857 25.714 0 15.429-10.857 26.286l-51.429 51.429q-10.857 10.857-26.286 10.857-14.857 0-25.714-10.857l-103.429-103.429-103.429 103.429q-10.857 10.857-25.714 10.857-15.429 0-26.286-10.857l-51.429-51.429q-10.857-10.857-10.857-26.286 0-14.857 10.857-25.714l103.429-103.429-103.429-103.429q-10.857-10.857-10.857-25.714 0-15.429 10.857-26.286l51.429-51.429q10.857-10.857 26.286-10.857 14.857 0 25.714 10.857l103.429 103.429 103.429-103.429q10.857-10.857 25.714-10.857 15.429 0 26.286 10.857l51.429 51.429q10.857 10.857 10.857 26.286zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="" d="M512 152.381v109.714q0 8-5.143 13.143t-13.143 5.143h-109.714q-8 0-13.143-5.143t-5.143-13.143v-109.714q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143zM658.286 536.381q0 50.286-31.714 93.143t-79.143 66.286-97.143 23.429q-138.857 0-212-121.714-8.571-13.714 4.571-24l75.429-57.143q4-3.429 10.857-3.429 9.143 0 14.286 6.857 30.286 38.857 49.143 52.571 19.429 13.714 49.143 13.714 27.429 0 48.857-14.857t21.429-33.714q0-21.714-11.429-34.857t-38.857-25.714q-36-16-66-49.429t-30-71.714v-20.571q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143q0 10.857 12.286 28.286t31.143 28.286q18.286 10.286 28 16.286t26.286 20 25.429 27.429 16 34.571 7.143 46.286zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
+<glyph unicode="" d="M585.143 152.381v91.429q0 8-5.143 13.143t-13.143 5.143h-54.857v292.571q0 8-5.143 13.143t-13.143 5.143h-182.857q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h54.857v-182.857h-54.857q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h256q8 0 13.143 5.143t5.143 13.143zM512 664.381v91.429q0 8-5.143 13.143t-13.143 5.143h-109.714q-8 0-13.143-5.143t-5.143-13.143v-91.429q0-8 5.143-13.143t13.143-5.143h109.714q8 0 13.143 5.143t5.143 13.143zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="" d="M626.857 322.096l-83.429-83.429q-5.714-5.714-13.143-5.714t-13.143 5.714l-78.286 78.286-78.286-78.286q-5.714-5.714-13.143-5.714t-13.143 5.714l-83.429 83.429q-5.714 5.714-5.714 13.143t5.714 13.143l78.286 78.286-78.286 78.286q-5.714 5.714-5.714 13.143t5.714 13.143l83.429 83.429q5.714 5.714 13.143 5.714t13.143-5.714l78.286-78.286 78.286 78.286q5.714 5.714 13.143 5.714t13.143-5.714l83.429-83.429q5.714-5.714 5.714-13.143t-5.714-13.143l-78.286-78.286 78.286-78.286q5.714-5.714 5.714-13.143t-5.714-13.143zM749.714 426.667q0 84.571-41.714 156t-113.143 113.143-156 41.714-156-41.714-113.143-113.143-41.714-156 41.714-156 113.143-113.143 156-41.714 156 41.714 113.143 113.143 41.714 156zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="" d="M669.143 474.096l-241.143-241.143q-10.857-10.857-25.714-10.857t-25.714 10.857l-168 168q-10.857 10.857-10.857 25.714t10.857 25.714l58.286 58.286q10.857 10.857 25.714 10.857t25.714-10.857l84-84 157.143 157.143q10.857 10.857 25.714 10.857t25.714-10.857l58.286-58.286q10.857-10.857 10.857-25.714t-10.857-25.714zM749.714 426.667q0 84.571-41.714 156t-113.143 113.143-156 41.714-156-41.714-113.143-113.143-41.714-156 41.714-156 113.143-113.143 156-41.714 156 41.714 113.143 113.143 41.714 156zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="" d="M749.714 428.381q0 92-49.714 168.571l-430.857-430.286q78.286-50.857 169.714-50.857 63.429 0 120.857 24.857t99.143 66.571 66.286 99.714 24.571 121.429zM178.857 257.524l431.429 430.857q-77.143 52-171.429 52-84.571 0-156-41.714t-113.143-113.714-41.714-156.571q0-92.571 50.857-170.857zM877.714 428.381q0-89.714-34.857-171.429t-93.429-140.571-140-93.714-170.571-34.857-170.571 34.857-140 93.714-93.429 140.571-34.857 171.429 34.857 171.143 93.429 140.286 140 93.714 170.571 34.857 170.571-34.857 140-93.714 93.429-140.286 34.857-171.143z" />
+<glyph unicode="" d="M877.714 426.667v-73.143q0-30.286-18.571-51.714t-48.286-21.429h-402.286l167.429-168q21.714-20.571 21.714-51.429t-21.714-51.429l-42.857-43.429q-21.143-21.143-51.429-21.143-29.714 0-52 21.143l-372 372.571q-21.143 21.143-21.143 51.429 0 29.714 21.143 52l372 371.429q21.714 21.714 52 21.714 29.714 0 51.429-21.714l42.857-42.286q21.714-21.714 21.714-52t-21.714-52l-167.429-167.429h402.286q29.714 0 48.286-21.429t18.571-51.714z" />
+<glyph unicode="" d="M841.143 390.096q0-30.857-21.143-52l-372-372q-22.286-21.143-52-21.143-29.143 0-51.429 21.143l-42.857 42.857q-21.714 21.714-21.714 52t21.714 52l167.429 167.429h-402.286q-29.714 0-48.286 21.429t-18.571 51.714v73.143q0 30.286 18.571 51.714t48.286 21.429h402.286l-167.429 168q-21.714 20.571-21.714 51.429t21.714 51.429l42.857 42.857q21.714 21.714 51.429 21.714 30.286 0 52-21.714l372-372q21.143-20 21.143-51.429z" />
+<glyph unicode="" d="M920.571 383.81q0-29.143-21.143-51.429l-42.857-42.857q-21.714-21.714-52-21.714-30.857 0-51.429 21.714l-168 167.429v-402.286q0-29.714-21.429-48.286t-51.714-18.571h-73.143q-30.286 0-51.714 18.571t-21.429 48.286v402.286l-168-167.429q-20.571-21.714-51.429-21.714t-51.429 21.714l-42.857 42.857q-21.714 21.714-21.714 51.429 0 30.286 21.714 52l372 372q20 21.143 51.429 21.143 30.857 0 52-21.143l372-372q21.143-22.286 21.143-52z" horiz-adv-x="951" />
+<glyph unicode="" d="M920.571 463.238q0-30.286-21.143-51.429l-372-372.571q-22.286-21.143-52-21.143-30.286 0-51.429 21.143l-372 372.571q-21.714 20.571-21.714 51.429 0 30.286 21.714 52l42.286 42.857q22.286 21.143 52 21.143 30.286 0 51.429-21.143l168-168v402.286q0 29.714 21.714 51.429t51.429 21.714h73.143q29.714 0 51.429-21.714t21.714-51.429v-402.286l168 168q21.143 21.143 51.429 21.143 29.714 0 52-21.143l42.857-42.857q21.143-22.286 21.143-52z" horiz-adv-x="951" />
+<glyph unicode="" d="M804.571 518.096v-109.714q0-22.857-16-38.857t-38.857-16h-237.714v-237.714q0-22.857-16-38.857t-38.857-16h-109.714q-22.857 0-38.857 16t-16 38.857v237.714h-237.714q-22.857 0-38.857 16t-16 38.857v109.714q0 22.857 16 38.857t38.857 16h237.714v237.714q0 22.857 16 38.857t38.857 16h109.714q22.857 0 38.857-16t16-38.857v-237.714h237.714q22.857 0 38.857-16t16-38.857z" horiz-adv-x="805" />
<glyph unicode="" d="M73.143-12.19h164.571v164.571h-164.571v-164.571zM274.286-12.19h182.857v164.571h-182.857v-164.571zM73.143 188.953h164.571v182.857h-164.571v-182.857zM274.286 188.953h182.857v182.857h-182.857v-182.857zM73.143 408.381h164.571v164.571h-164.571v-164.571zM493.714-12.19h182.857v164.571h-182.857v-164.571zM274.286 408.381h182.857v164.571h-182.857v-164.571zM713.143-12.19h164.571v164.571h-164.571v-164.571zM493.714 188.953h182.857v182.857h-182.857v-182.857zM292.571 682.667v164.571q0 7.429-5.429 12.857t-12.857 5.429h-36.571q-7.429 0-12.857-5.429t-5.429-12.857v-164.571q0-7.429 5.429-12.857t12.857-5.429h36.571q7.429 0 12.857 5.429t5.429 12.857zM713.143 188.953h164.571v182.857h-164.571v-182.857zM493.714 408.381h182.857v164.571h-182.857v-164.571zM713.143 408.381h164.571v164.571h-164.571v-164.571zM731.429 682.667v164.571q0 7.429-5.429 12.857t-12.857 5.429h-36.571q-7.429 0-12.857-5.429t-5.429-12.857v-164.571q0-7.429 5.429-12.857t12.857-5.429h36.571q7.429 0 12.857 5.429t5.429 12.857zM950.857 719.238v-731.429q0-29.714-21.714-51.429t-51.429-21.714h-804.571q-29.714 0-51.429 21.714t-21.714 51.429v731.429q0 29.714 21.714 51.429t51.429 21.714h73.143v54.857q0 37.714 26.857 64.571t64.571 26.857h36.571q37.714 0 64.571-26.857t26.857-64.571v-54.857h219.429v54.857q0 37.714 26.857 64.571t64.571 26.857h36.571q37.714 0 64.571-26.857t26.857-64.571v-54.857h73.143q29.714 0 51.429-21.714t21.714-51.429z" horiz-adv-x="951" />
+<glyph unicode="" d="M1024 426.667q0-99.429-68.571-183.714t-186.286-133.143-257.143-48.857q-40 0-82.857 4.571-113.143-100-262.857-138.286-28-8-65.143-12.571-9.714-1.143-17.429 5.143t-10 16.571v0.571q-1.714 2.286-0.286 6.857t1.143 5.714 2.571 5.429l3.429 5.143t4 4.857 4.571 5.143q4 4.571 17.714 19.714t19.714 21.714 17.714 22.571 18.571 29.143 15.429 33.714 14.857 43.429q-89.714 50.857-141.429 125.714t-51.714 160.571q0 74.286 40.571 142t109.143 116.857 163.429 78 198.857 28.857q139.429 0 257.143-48.857t186.286-133.143 68.571-183.714z" />
+<glyph unicode="" d="M950.857 591.238v-402.286q0-52.571-37.714-90.286t-90.286-37.714h-694.857q-52.571 0-90.286 37.714t-37.714 90.286v548.571q0 52.571 37.714 90.286t90.286 37.714h182.857q52.571 0 90.286-37.714t37.714-90.286v-18.286h384q52.571 0 90.286-37.714t37.714-90.286z" horiz-adv-x="951" />
<glyph unicode="" d="M512 426.667q0 60.571-42.857 103.429t-103.429 42.857-103.429-42.857-42.857-103.429 42.857-103.429 103.429-42.857 103.429 42.857 42.857 103.429zM950.857 134.096q0 29.714-21.714 51.429t-51.429 21.714-51.429-21.714-21.714-51.429q0-30.286 21.429-51.714t51.714-21.429 51.714 21.429 21.429 51.714zM950.857 719.238q0 29.714-21.714 51.429t-51.429 21.714-51.429-21.714-21.714-51.429q0-30.286 21.429-51.714t51.714-21.429 51.714 21.429 21.429 51.714zM731.429 478.667v-105.714q0-5.714-4-11.143t-9.143-6l-88.571-13.714q-6.286-20-18.286-43.429 19.429-27.429 51.429-65.714 4-5.714 4-11.429 0-6.857-4-10.857-13.143-17.143-47.143-51.143t-44.857-34q-6.286 0-12 4l-65.714 51.429q-21.143-10.857-44-17.714-6.286-61.714-13.143-88.571-4-13.714-17.143-13.714h-106.286q-6.286 0-11.429 4.286t-5.714 10l-13.143 87.429q-19.429 5.714-42.857 17.714l-67.429-50.857q-4-4-11.429-4-6.286 0-12 4.571-82.286 76-82.286 91.429 0 5.143 4 10.857 5.714 8 23.429 30.286t26.857 34.857q-13.143 25.143-20 46.857l-86.857 13.714q-5.714 0.571-9.714 5.429t-4 11.143v105.714q0 5.714 4 11.143t9.143 6l88.571 13.714q6.286 20 18.286 43.429-19.429 27.429-51.429 65.714-4 6.286-4 11.429 0 6.857 4 11.429 12.571 17.143 46.857 50.857t45.143 33.714q6.286 0 12-4l65.714-51.429q19.429 10.286 44 18.286 6.286 61.714 13.143 88 4 13.714 17.143 13.714h106.286q6.286 0 11.429-4.286t5.714-10l13.143-87.429q19.429-5.714 42.857-17.714l67.429 50.857q4.571 4 11.429 4 6.286 0 12-4.571 82.286-76 82.286-91.429 0-5.143-4-10.857-6.857-9.143-24-30.857t-25.714-34.286q13.143-27.429 19.429-46.857l86.857-13.143q5.714-1.143 9.714-6t4-11.143zM1097.143 174.096v-80q0-9.143-85.143-17.714-6.857-15.429-17.143-29.714 29.143-64.571 29.143-78.857 0-2.286-2.286-4-69.714-40.571-70.857-40.571-4.571 0-26.286 26.857t-29.714 38.857q-11.429-1.143-17.143-1.143t-17.143 1.143q-8-12-29.714-38.857t-26.286-26.857q-1.143 0-70.857 40.571-2.286 1.714-2.286 4 0 14.286 29.143 78.857-10.286 14.286-17.143 29.714-85.143 8.571-85.143 17.714v80q0 9.143 85.143 17.714 7.429 16.571 17.143 29.714-29.143 64.571-29.143 78.857 0 2.286 2.286 4 2.286 1.143 20 11.429t33.714 19.429 17.143 9.143q4.571 0 26.286-26.571t29.714-38.571q11.429 1.143 17.143 1.143t17.143-1.143q29.143 40.571 52.571 64l3.429 1.143q2.286 0 70.857-40 2.286-1.714 2.286-4 0-14.286-29.143-78.857 9.714-13.143 17.143-29.714 85.143-8.571 85.143-17.714zM1097.143 759.238v-80q0-9.143-85.143-17.714-6.857-15.429-17.143-29.714 29.143-64.571 29.143-78.857 0-2.286-2.286-4-69.714-40.571-70.857-40.571-4.571 0-26.286 26.857t-29.714 38.857q-11.429-1.143-17.143-1.143t-17.143 1.143q-8-12-29.714-38.857t-26.286-26.857q-1.143 0-70.857 40.571-2.286 1.714-2.286 4 0 14.286 29.143 78.857-10.286 14.286-17.143 29.714-85.143 8.571-85.143 17.714v80q0 9.143 85.143 17.714 7.429 16.571 17.143 29.714-29.143 64.571-29.143 78.857 0 2.286 2.286 4 2.286 1.143 20 11.429t33.714 19.429 17.143 9.143q4.571 0 26.286-26.571t29.714-38.571q11.429 1.143 17.143 1.143t17.143-1.143q29.143 40.571 52.571 64l3.429 1.143q2.286 0 70.857-40 2.286-1.714 2.286-4 0-14.286-29.143-78.857 9.714-13.143 17.143-29.714 85.143-8.571 85.143-17.714z" horiz-adv-x="1097" />
+<glyph unicode="" d="M832 243.81q0 22.857-16 38.857l-118.857 118.857q-16 16-38.857 16-24 0-41.143-18.286 1.714-1.714 10.857-10.571t12.286-12.286 8.571-10.857 7.429-14.571 2-15.714q0-22.857-16-38.857t-38.857-16q-8.571 0-15.714 2t-14.571 7.429-10.857 8.571-12.286 12.286-10.571 10.857q-18.857-17.714-18.857-41.714 0-22.857 16-38.857l117.714-118.286q15.429-15.429 38.857-15.429 22.857 0 38.857 14.857l84 83.429q16 16 16 38.286zM430.286 646.667q0 22.857-16 38.857l-117.714 118.286q-16 16-38.857 16-22.286 0-38.857-15.429l-84-83.429q-16-16-16-38.286 0-22.857 16-38.857l118.857-118.857q15.429-15.429 38.857-15.429 24 0 41.143 17.714-1.714 1.714-10.857 10.571t-12.286 12.286-8.571 10.857-7.429 14.571-2 15.714q0 22.857 16 38.857t38.857 16q8.571 0 15.714-2t14.571-7.429 10.857-8.571 12.286-12.286 10.571-10.857q18.857 17.714 18.857 41.714zM941.714 243.81q0-68.571-48.571-116l-84-83.429q-47.429-47.429-116-47.429-69.143 0-116.571 48.571l-117.714 118.286q-47.429 47.429-47.429 116 0 70.286 50.286 119.429l-50.286 50.286q-49.143-50.286-118.857-50.286-68.571 0-116.571 48l-118.857 118.857q-48 48-48 116.571t48.571 116l84 83.429q47.429 47.429 116 47.429 69.143 0 116.571-48.571l117.714-118.286q47.429-47.429 47.429-116 0-70.286-50.286-119.429l50.286-50.286q49.143 50.286 118.857 50.286 68.571 0 116.571-48l118.857-118.857q48-48 48-116.571z" horiz-adv-x="951" />
+<glyph unicode="" d="M969.143 719.238q22.857 0 38.857-16t16-38.857v-694.857q0-22.857-16-38.857t-38.857-16h-548.571q-22.857 0-38.857 16t-16 38.857v164.571h-310.857q-22.857 0-38.857 16t-16 38.857v384q0 22.857 11.429 50.286t27.429 43.429l233.143 233.143q16 16 43.429 27.429t50.286 11.429h237.714q22.857 0 38.857-16t16-38.857v-187.429q38.857 22.857 73.143 22.857h237.714zM658.286 597.524l-170.857-170.857h170.857v170.857zM292.571 816.953l-170.857-170.857h170.857v170.857zM404.571 447.238l180.571 180.571v237.714h-219.429v-237.714q0-22.857-16-38.857t-38.857-16h-237.714v-365.714h292.571v146.286q0 22.857 11.429 50.286t27.429 43.429zM950.857-12.19v658.286h-219.429v-237.714q0-22.857-16-38.857t-38.857-16h-237.714v-365.714h512z" />
<glyph unicode="" d="M585.143 536.381q0-14.857-10.857-25.714l-256-256q-10.857-10.857-25.714-10.857t-25.714 10.857l-256 256q-10.857 10.857-10.857 25.714t10.857 25.714 25.714 10.857h512q14.857 0 25.714-10.857t10.857-25.714z" horiz-adv-x="585" />
<glyph unicode="" d="M585.143 243.81q0-14.857-10.857-25.714t-25.714-10.857h-512q-14.857 0-25.714 10.857t-10.857 25.714 10.857 25.714l256 256q10.857 10.857 25.714 10.857t25.714-10.857l256-256q10.857-10.857 10.857-25.714z" horiz-adv-x="585" />
<glyph unicode="" d="M365.714 682.667v-512q0-14.857-10.857-25.714t-25.714-10.857-25.714 10.857l-256 256q-10.857 10.857-10.857 25.714t10.857 25.714l256 256q10.857 10.857 25.714 10.857t25.714-10.857 10.857-25.714z" horiz-adv-x="366" />
<glyph unicode="" d="M329.143 426.667q0-14.857-10.857-25.714l-256-256q-10.857-10.857-25.714-10.857t-25.714 10.857-10.857 25.714v512q0 14.857 10.857 25.714t25.714 10.857 25.714-10.857l256-256q10.857-10.857 10.857-25.714z" horiz-adv-x="366" />
+<glyph unicode="" d="M585.143 262.096v-36.571q0-8-5.143-13.143t-13.143-5.143h-402.286q-8 0-13.143 5.143t-5.143 13.143v36.571q0 8 5.143 13.143t13.143 5.143h402.286q8 0 13.143-5.143t5.143-13.143zM585.143 408.381v-36.571q0-8-5.143-13.143t-13.143-5.143h-402.286q-8 0-13.143 5.143t-5.143 13.143v36.571q0 8 5.143 13.143t13.143 5.143h402.286q8 0 13.143-5.143t5.143-13.143zM73.143 60.953h585.143v438.857h-237.714q-22.857 0-38.857 16t-16 38.857v237.714h-292.571v-731.429zM438.857 572.953h214.857q-5.714 16.571-12.571 23.429l-178.857 178.857q-6.857 6.857-23.429 12.571v-214.857zM731.429 554.667v-512q0-22.857-16-38.857t-38.857-16h-621.714q-22.857 0-38.857 16t-16 38.857v768q0 22.857 16 38.857t38.857 16h365.714q22.857 0 50.286-11.429t43.429-27.429l178.286-178.286q16-16 27.429-43.429t11.429-50.286z" horiz-adv-x="731" />
<glyph unicode="" d="M648 324.381q-21.143-69.143-78.857-111.429t-130.286-42.286-130.286 42.286-78.857 111.429q-4.571 14.286 2.286 27.714t21.714 18q14.286 4.571 27.714-2.286t18-21.714q14.286-45.714 52.857-74t86.571-28.286 86.571 28.286 52.857 74q4.571 14.857 18.286 21.714t28 2.286 21.143-18 2.286-27.714zM365.714 572.953q0-30.286-21.429-51.714t-51.714-21.429-51.714 21.429-21.429 51.714 21.429 51.714 51.714 21.429 51.714-21.429 21.429-51.714zM658.286 572.953q0-30.286-21.429-51.714t-51.714-21.429-51.714 21.429-21.429 51.714 21.429 51.714 51.714 21.429 51.714-21.429 21.429-51.714zM804.571 426.667q0 74.286-29.143 142t-78 116.571-116.571 78-142 29.143-142-29.143-116.571-78-78-116.571-29.143-142 29.143-142 78-116.571 116.571-78 142-29.143 142 29.143 116.571 78 78 116.571 29.143 142zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="" d="M648 236.381q4.571-14.286-2.286-27.714t-21.143-18-28 2.286-18.286 21.714q-14.286 45.714-52.857 74t-86.571 28.286-86.571-28.286-52.857-74q-4.571-14.857-18-21.714t-27.714-2.286q-14.857 4.571-21.714 18t-2.286 27.714q21.143 69.143 78.857 111.429t130.286 42.286 130.286-42.286 78.857-111.429zM365.714 572.953q0-30.286-21.429-51.714t-51.714-21.429-51.714 21.429-21.429 51.714 21.429 51.714 51.714 21.429 51.714-21.429 21.429-51.714zM658.286 572.953q0-30.286-21.429-51.714t-51.714-21.429-51.714 21.429-21.429 51.714 21.429 51.714 51.714 21.429 51.714-21.429 21.429-51.714zM804.571 426.667q0 74.286-29.143 142t-78 116.571-116.571 78-142 29.143-142-29.143-116.571-78-78-116.571-29.143-142 29.143-142 78-116.571 116.571-78 142-29.143 142 29.143 116.571 78 78 116.571 29.143 142zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
<glyph unicode="" d="M658.286 316.953q0-14.857-10.857-25.714t-25.714-10.857h-365.714q-14.857 0-25.714 10.857t-10.857 25.714 10.857 25.714 25.714 10.857h365.714q14.857 0 25.714-10.857t10.857-25.714zM365.714 572.953q0-30.286-21.429-51.714t-51.714-21.429-51.714 21.429-21.429 51.714 21.429 51.714 51.714 21.429 51.714-21.429 21.429-51.714zM658.286 572.953q0-30.286-21.429-51.714t-51.714-21.429-51.714 21.429-21.429 51.714 21.429 51.714 51.714 21.429 51.714-21.429 21.429-51.714zM804.571 426.667q0 74.286-29.143 142t-78 116.571-116.571 78-142 29.143-142-29.143-116.571-78-78-116.571-29.143-142 29.143-142 78-116.571 116.571-78 142-29.143 142 29.143 116.571 78 78 116.571 29.143 142zM877.714 426.667q0-119.429-58.857-220.286t-159.714-159.714-220.286-58.857-220.286 58.857-159.714 159.714-58.857 220.286 58.857 220.286 159.714 159.714 220.286 58.857 220.286-58.857 159.714-159.714 58.857-220.286z" />
+<glyph unicode="" d="M164.571 97.524q0 22.857-16 38.857t-38.857 16-38.857-16-16-38.857 16-38.857 38.857-16 38.857 16 16 38.857zM164.571 755.81q0 22.857-16 38.857t-38.857 16-38.857-16-16-38.857 16-38.857 38.857-16 38.857 16 16 38.857zM530.286 682.667q0 22.857-16 38.857t-38.857 16-38.857-16-16-38.857 16-38.857 38.857-16 38.857 16 16 38.857zM585.143 682.667q0-29.714-14.857-55.143t-40-39.714q-1.143-164-129.143-236.571-38.857-21.714-116-46.286-73.143-22.857-96.857-40.571t-23.714-57.143v-14.857q25.143-14.286 40-39.714t14.857-55.143q0-45.714-32-77.714t-77.714-32-77.714 32-32 77.714q0 29.714 14.857 55.143t40 39.714v468.571q-25.143 14.286-40 39.714t-14.857 55.143q0 45.714 32 77.714t77.714 32 77.714-32 32-77.714q0-29.714-14.857-55.143t-40-39.714v-284q30.857 14.857 88 32.571 31.429 9.714 50 16.857t40.286 17.714 33.714 22.571 23.143 29.143 16 39.714 4.857 52.286q-25.143 14.286-40 39.714t-14.857 55.143q0 45.714 32 77.714t77.714 32 77.714-32 32-77.714z" horiz-adv-x="585" />
</font></defs></svg>
\ No newline at end of file
'apply': 'Apply'
'bulk_change': 'Bulk Change'
'cancel': 'Cancel'
+ 'change': 'Change'
+ 'done': 'Done'
'moreCriteria': '+ More Criteria'
'search_verb': 'Search'
'update': 'Update'
'coding_rules.activate_quality_profile': 'Activate Quality Profile'
'coding_rules.bulk_change': 'Bulk Change'
+ 'coding_rules.extend_description': 'Extend Description'
'coding_rules.deactivate_quality_profile': 'Deactivate'
'coding_rules.found': 'Found'
'coding_rules.new_search': 'New Search'
'coding_rules.page': 'Coding Rules'
'coding_rules.quality_profiles': 'Quality Profiles'
'coding_rules._rules': 'rule(s)'
+ 'coding_rules.select_tag': 'Select Tag'
'coding_rules.filters.availableSince': 'Available Since'
'coding_rules.filters.description': 'Description'
public int[][] getMatrix() { /* ... */ } // Compliant
</pre>'''
extra: '''<p>This note is here <b>only for test purposes</b>.</p>'''
+ extraRaw: '''This note is here *only for test purposes*.'''
qualityProfiles: [
{
+ # POST /api/codingrules/extend_description
+ jQuery.mockjax
+ url: "#{baseUrl}/api/codingrules/extend_description"
+ responseText: JSON.stringify
+ extra: '''<p>This note is here <i>only for test purposes</i>.</p>'''
+ extraRaw: '''This note is here *only for test purposes*.'''
+
+
# POST /api/codingrules/bulk_change
jQuery.mockjax
url: "#{baseUrl}/api/codingrules/bulk_change"
+ # POST /api/codingrules/set_tags
+ jQuery.mockjax
+ url: "#{baseUrl}/api/codingrules/set_tags"
+
+
# GET /api/qualityprofiles/list
jQuery.mockjax
url: "#{baseUrl}/api/qualityprofiles/list"
'apply': 'Apply',
'bulk_change': 'Bulk Change',
'cancel': 'Cancel',
+ 'change': 'Change',
+ 'done': 'Done',
'moreCriteria': '+ More Criteria',
'search_verb': 'Search',
'update': 'Update',
'severity.INFO': 'Info',
'coding_rules.activate_quality_profile': 'Activate Quality Profile',
'coding_rules.bulk_change': 'Bulk Change',
+ 'coding_rules.extend_description': 'Extend Description',
'coding_rules.deactivate_quality_profile': 'Deactivate',
'coding_rules.found': 'Found',
'coding_rules.new_search': 'New Search',
'coding_rules.page': 'Coding Rules',
'coding_rules.quality_profiles': 'Quality Profiles',
'coding_rules._rules': 'rule(s)',
+ 'coding_rules.select_tag': 'Select Tag',
'coding_rules.filters.availableSince': 'Available Since',
'coding_rules.filters.description': 'Description',
'coding_rules.filters.in_quality_profile': 'In Quality Profile',
],
description: '<p>\nAccording to the Java Language Specification:\n</p>\n\n<pre>For compatibility with older versions of the Java SE platform,\nthe declaration of a method that returns an array is allowed to place (some or all of)\nthe empty bracket pairs that form the declaration of the array type after\nthe formal parameter list. This obsolescent syntax should not be used in new code.\n</pre>\n\n<p>The following code snippet illustrates this rule:</p>\n\n<pre>public int getVector()[] { /* ... */ } // Non-Compliant\n\npublic int[] getVector() { /* ... */ } // Compliant\n\npublic int[] getMatrix()[] { /* ... */ } // Non-Compliant\n\npublic int[][] getMatrix() { /* ... */ } // Compliant\n</pre>',
extra: '<p>This note is here <b>only for test purposes</b>.</p>',
+ extraRaw: 'This note is here *only for test purposes*.',
qualityProfiles: [
{
name: 'SonarWay',
}
})
});
+ jQuery.mockjax({
+ url: "" + baseUrl + "/api/codingrules/extend_description",
+ responseText: JSON.stringify({
+ extra: '<p>This note is here <i>only for test purposes</i>.</p>',
+ extraRaw: 'This note is here *only for test purposes*.'
+ })
+ });
jQuery.mockjax({
url: "" + baseUrl + "/api/codingrules/bulk_change"
});
+ jQuery.mockjax({
+ url: "" + baseUrl + "/api/codingrules/set_tags"
+ });
jQuery.mockjax({
url: "" + baseUrl + "/api/qualityprofiles/list",
responseText: JSON.stringify({
'backbone.marionette',
'common/handlebars-extensions'
], (
- Marionette,
+ Marionette
) ->
class CodingRulesDetailView extends Marionette.ItemView
template: getTemplate '#coding-rules-detail-template'
+ ui:
+ tagsChange: '.coding-rules-detail-tags-change'
+ tagInput: '.coding-rules-detail-tag-input'
+ tagsEdit: '.coding-rules-detail-tag-edit'
+ tagsEditDone: '.coding-rules-detail-tag-edit-done'
+ tagsList: '.coding-rules-detail-tag-list'
+
+ descriptionExtra: '#coding-rules-detail-description-extra'
+ extendDescriptionLink: '#coding-rules-detail-extend-description'
+ extendDescriptionForm: '#coding-rules-detail-extend-description-form'
+ extendDescriptionSubmit: '#coding-rules-detail-extend-description-submit'
+ extendDescriptionText: '#coding-rules-detail-extend-description-text'
+ extendDescriptionSpinner: '#coding-rules-detail-extend-description-spinner'
+ cancelExtendDescription: '#coding-rules-detail-extend-description-cancel'
+
+
+ events:
+ 'click @ui.tagsChange': 'changeTags'
+ 'click @ui.tagsEditDone': 'editDone'
+
+ 'click @ui.extendDescriptionLink': 'showExtendDescriptionForm'
+ 'click @ui.cancelExtendDescription': 'hideExtendDescriptionForm'
+ 'click @ui.extendDescriptionSubmit': 'submitExtendDescription'
+
+
onRender: ->
+ @ui.tagInput.select2
+ tags: _.difference @options.app.tags, @model.get 'tags'
+ width: '500px'
+ @ui.tagsEdit.hide()
+
+ @ui.extendDescriptionForm.hide()
+ @ui.extendDescriptionSpinner.hide()
+
qp = @options.app.getActiveQualityProfile()
@$('.coding-rules-detail-quality-profile').first().addClass 'active' if qp?
+
+
+ changeTags: ->
+ @ui.tagsEdit.show()
+ @ui.tagsList.hide()
+
+
+ editDone: ->
+ @ui.tagsEdit.html '<i class="spinner"></i>'
+ tags = @ui.tagInput.val()
+ jQuery.ajax
+ type: 'POST'
+ url: "#{baseUrl}/api/codingrules/set_tags"
+ data: tags: tags
+ .done =>
+ @model.set 'tags', tags.split ','
+ @render()
+
+
+ showExtendDescriptionForm: ->
+ @ui.descriptionExtra.hide()
+ @ui.extendDescriptionForm.show()
+
+
+ hideExtendDescriptionForm: ->
+ @ui.descriptionExtra.show()
+ @ui.extendDescriptionForm.hide()
+
+
+ submitExtendDescription: ->
+ @ui.extendDescriptionForm.hide()
+ @ui.extendDescriptionSpinner.show()
+ jQuery.ajax
+ type: 'POST'
+ url: "#{baseUrl}/api/codingrules/extend_description"
+ dataType: 'json'
+ data: text: @ui.extendDescriptionText.val()
+ .done (r) =>
+ @model.set extra: r.extra, extraRaw: r.extraRaw
+ @render()
\ No newline at end of file
CodingRulesDetailView.prototype.template = getTemplate('#coding-rules-detail-template');
+ CodingRulesDetailView.prototype.ui = {
+ tagsChange: '.coding-rules-detail-tags-change',
+ tagInput: '.coding-rules-detail-tag-input',
+ tagsEdit: '.coding-rules-detail-tag-edit',
+ tagsEditDone: '.coding-rules-detail-tag-edit-done',
+ tagsList: '.coding-rules-detail-tag-list',
+ descriptionExtra: '#coding-rules-detail-description-extra',
+ extendDescriptionLink: '#coding-rules-detail-extend-description',
+ extendDescriptionForm: '#coding-rules-detail-extend-description-form',
+ extendDescriptionSubmit: '#coding-rules-detail-extend-description-submit',
+ extendDescriptionText: '#coding-rules-detail-extend-description-text',
+ extendDescriptionSpinner: '#coding-rules-detail-extend-description-spinner',
+ cancelExtendDescription: '#coding-rules-detail-extend-description-cancel'
+ };
+
+ CodingRulesDetailView.prototype.events = {
+ 'click @ui.tagsChange': 'changeTags',
+ 'click @ui.tagsEditDone': 'editDone',
+ 'click @ui.extendDescriptionLink': 'showExtendDescriptionForm',
+ 'click @ui.cancelExtendDescription': 'hideExtendDescriptionForm',
+ 'click @ui.extendDescriptionSubmit': 'submitExtendDescription'
+ };
+
CodingRulesDetailView.prototype.onRender = function() {
var qp;
+ this.ui.tagInput.select2({
+ tags: _.difference(this.options.app.tags, this.model.get('tags')),
+ width: '500px'
+ });
+ this.ui.tagsEdit.hide();
+ this.ui.extendDescriptionForm.hide();
+ this.ui.extendDescriptionSpinner.hide();
qp = this.options.app.getActiveQualityProfile();
if (qp != null) {
return this.$('.coding-rules-detail-quality-profile').first().addClass('active');
}
};
+ CodingRulesDetailView.prototype.changeTags = function() {
+ this.ui.tagsEdit.show();
+ return this.ui.tagsList.hide();
+ };
+
+ CodingRulesDetailView.prototype.editDone = function() {
+ var tags,
+ _this = this;
+ this.ui.tagsEdit.html('<i class="spinner"></i>');
+ tags = this.ui.tagInput.val();
+ return jQuery.ajax({
+ type: 'POST',
+ url: "" + baseUrl + "/api/codingrules/set_tags",
+ data: {
+ tags: tags
+ }
+ }).done(function() {
+ _this.model.set('tags', tags.split(','));
+ return _this.render();
+ });
+ };
+
+ CodingRulesDetailView.prototype.showExtendDescriptionForm = function() {
+ this.ui.descriptionExtra.hide();
+ return this.ui.extendDescriptionForm.show();
+ };
+
+ CodingRulesDetailView.prototype.hideExtendDescriptionForm = function() {
+ this.ui.descriptionExtra.show();
+ return this.ui.extendDescriptionForm.hide();
+ };
+
+ CodingRulesDetailView.prototype.submitExtendDescription = function() {
+ var _this = this;
+ this.ui.extendDescriptionForm.hide();
+ this.ui.extendDescriptionSpinner.show();
+ return jQuery.ajax({
+ type: 'POST',
+ url: "" + baseUrl + "/api/codingrules/extend_description",
+ dataType: 'json',
+ data: {
+ text: this.ui.extendDescriptionText.val()
+ }
+ }).done(function(r) {
+ _this.model.set({
+ extra: r.extra,
+ extraRaw: r.extraRaw
+ });
+ return _this.render();
+ });
+ };
+
return CodingRulesDetailView;
})(Marionette.ItemView);
display: inline-block;
vertical-align: middle;
font-size: 13px;
+ height: 22px;
+ line-height: 22px;
+}
+.coding-rules-detail-property .select2-search-field {
+ line-height: 1;
}
.coding-rules-detail-property + .coding-rules-detail-property {
margin-left: 20px;
}
+.coding-rules-detail-tag + .coding-rules-detail-tag {
+ margin-left: 10px;
+}
+.coding-rules-detail-tag-delete {
+ position: relative;
+ top: -1px;
+ transition: all 0.3s ease;
+}
+.coding-rules-detail-tag-delete:hover,
+.coding-rules-detail-tag-delete:focus {
+ color: #d4333f;
+}
+.coding-rules-detail-tag-add {
+ transition: all 0.3s ease;
+}
+.coding-rules-detail-tag-add:hover,
+.coding-rules-detail-tag-add:focus {
+ color: #85bb43;
+}
+.coding-rules-detail-tag + .coding-rules-detail-tags-change {
+ margin-left: 15px;
+}
+.coding-rules-detail-add-tag-box {
+ position: absolute;
+ width: 200px;
+ padding: 10px;
+ border: 1px solid #e1e1e1;
+ background-color: #fff;
+}
+.coding-rules-detail-add-tag-list-item {
+ padding: 3px 0;
+}
+.coding-rules-detail-add-tag-list-item input[type=text] {
+ width: 120px;
+}
.coding-rules-detail-description {
margin: 20px 0;
padding-left: 10px;
display: inline-block;
vertical-align: middle;
font-size: @baseFontSize;
+ height: 22px;
+ line-height: 22px;
+
+ .select2-search-field { line-height: 1; }
}
.coding-rules-detail-property + .coding-rules-detail-property {
margin-left: 2 * @navigatorPadding;
}
+.coding-rules-detail-tag + .coding-rules-detail-tag {
+ margin-left: @navigatorPadding;
+}
+
+.coding-rules-detail-tag-delete {
+ position: relative;
+ top: -1px;
+ .trans;
+
+ &:hover, &:focus { color: @red; }
+}
+
+.coding-rules-detail-tag-add {
+ .trans;
+
+ &:hover, &:focus { color: @green; }
+}
+
+.coding-rules-detail-tag + .coding-rules-detail-tags-change {
+ margin-left: 1.5 * @navigatorPadding;
+}
+
+.coding-rules-detail-add-tag-box {
+ position: absolute;
+ width: 200px;
+ padding: @navigatorPadding;
+ border: 1px solid @navigatorBorderLightColor;
+ background-color: #fff;
+}
+
+.coding-rules-detail-add-tag-list-item {
+ padding: 3px 0;
+
+ input[type=text] { width: 120px; }
+}
+
.coding-rules-detail-description {
margin: 2 * @navigatorPadding 0;
padding-left: @navigatorPadding;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
+a[class^="icon-"],
+a[class*=" icon-"] {
+ text-decoration: none !important;
+}
/*
* Severity
*/
font-size: 14px;
line-height: 12px;
}
-/*
- * Resolution
- */
-.icon-resolution-fixed:before {
- content: "\f05d";
- color: #444444;
- font-size: 14px;
-}
-.icon-resolution-false-positive:before {
- content: "\f05c";
- color: #444444;
- font-size: 14px;
-}
-.icon-resolution-removed:before {
- content: "\f05e";
- color: #444444;
- font-size: 14px;
-}
/*
* Alert
*/
color: #4b9fd5;
font-size: 16px;
}
+/*
+ * Qualifier
+ */
+.icon-qualifier-dir:before {
+ content: "\f07b";
+ font-size: 16px;
+}
+.icon-qualifier-fil:before {
+ content: "\f0f6";
+ font-size: 16px;
+}
+.icon-qualifier-lib:before {
+ content: "\e600";
+ font-size: 16px;
+}
/*
* Common
*/
content: "\f073";
font-size: 14px;
}
+.icon-favorite:before {
+ content: "\f005";
+ color: #ff9900;
+ font-size: 16px;
+}
+.icon-not-favorite:before {
+ content: "\f005";
+ color: #cdcdcd;
+ font-size: 16px;
+}
+.icon-help:before {
+ content: "\f059";
+ color: #4b9fd5;
+ font-size: 16px;
+}
+.icon-info:before {
+ content: "\f05a";
+ color: #4b9fd5;
+ font-size: 16px;
+}
+.icon-uniF060:before {
+ content: "\f060";
+}
+.icon-uniF061:before {
+ content: "\f061";
+}
+.icon-uniF062:before {
+ content: "\f062";
+}
+.icon-uniF063:before {
+ content: "\f063";
+}
+.icon-comment:before {
+ content: "\f075";
+}
+.icon-delete:before {
+ content: "\f00d";
+}
+.icon-compare:before {
+ content: "\f0c5";
+}
+.icon-link:before {
+ content: "\f0c1";
+}
+.icon-inheritance:before {
+ content: "\f126";
+}
+.icon-plus:before {
+ content: "\f067";
+}
/*
* Spinner
*/
-moz-osx-font-smoothing: grayscale;
}
+a[class^="icon-"], a[class*=" icon-"] {
+ text-decoration: none !important;
+}
+
/*
* Severity
.icon-severity-4:before {
content: "\f000";
color: @severityBlockerColor;
- font-size: @iconFontSize;
+ font-size: @iconSmallFontSize;
}
.icon-severity-critical:before,
.icon-severity-3:before {
content: "\f001";
color: @severityCriticalColor;
- font-size: @iconFontSize;
+ font-size: @iconSmallFontSize;
}
.icon-severity-major:before,
.icon-severity-2:before {
content: "\f002";
color: @severityMajorColor;
- font-size: @iconFontSize;
+ font-size: @iconSmallFontSize;
}
.icon-severity-minor:before,
.icon-severity-1:before {
content: "\f003";
color: @severityMinorColor;
- font-size: @iconFontSize;
+ font-size: @iconSmallFontSize;
}
.icon-severity-info:before,
.icon-severity-0:before {
content: "\f004";
color: @severityInfoColor;
- font-size: @iconFontSize;
+ font-size: @iconSmallFontSize;
}
.icon-status-open:before {
content: "\f010";
color: @statusOpenColor;
- font-size: @iconFontSize;
+ font-size: @iconSmallFontSize;
line-height: @iconLineHeight;
}
.icon-status-confirmed:before {
content: "\f011";
color: @statusConfirmedColor;
- font-size: @iconFontSize;
+ font-size: @iconSmallFontSize;
line-height: @iconLineHeight;
}
.icon-status-reopened:before {
content: "\f012";
color: @statusReopenedColor;
- font-size: @iconFontSize;
+ font-size: @iconSmallFontSize;
line-height: @iconLineHeight;
}
.icon-status-resolved:before {
content: "\f013";
color: @statusResolvedColor;
- font-size: @iconFontSize;
+ font-size: @iconSmallFontSize;
line-height: @iconLineHeight;
}
.icon-status-closed:before {
content: "\f014";
color: @statusClosedColor;
- font-size: @iconFontSize;
+ font-size: @iconSmallFontSize;
line-height: @iconLineHeight;
}
-/*
- * Resolution
- */
-
-.icon-resolution-fixed:before {
- content: "\f05d";
- color: @resolutionFixedColor;
- font-size: @iconFontSize;
-}
-.icon-resolution-false-positive:before {
- content: "\f05c";
- color: @resolutionFalsePositiveColor;
- font-size: @iconFontSize;
-}
-.icon-resolution-removed:before {
- content: "\f05e";
- color: @resolutionRemovedColor;
- font-size: @iconFontSize;
-}
-
-
/*
* Alert
*/
.icon-alert-ok:before {
content: "\f013";
color: @green;
- font-size: @iconFontSize + 2px;
+ font-size: @iconFontSize;
}
.icon-alert-warn:before {
content: "\f000";
color: @orange;
- font-size: @iconFontSize + 2px;
+ font-size: @iconFontSize;
}
.icon-alert-error:before {
content: "\f057";
color: @red;
- font-size: @iconFontSize + 2px;
+ font-size: @iconFontSize;
}
.icon-alert-none:before {
content: "\f059";
color: @blue;
- font-size: @iconFontSize + 2px;
+ font-size: @iconFontSize;
+}
+
+
+/*
+ * Qualifier
+ */
+
+.icon-qualifier-dir:before {
+ content: "\f07b";
+ font-size: @iconFontSize;
+}
+.icon-qualifier-fil:before {
+ content: "\f0f6";
+ font-size: @iconFontSize;
+}
+.icon-qualifier-lib:before {
+ content: "\e600";
+ font-size: @iconFontSize;
}
}
.icon-lang:before {
content: "\f024";
- font-size: @iconFontSize;
+ font-size: @iconSmallFontSize;
}
.icon-quality-profile:before {
content: "\f022";
- font-size: @iconFontSize;
+ font-size: @iconSmallFontSize;
}
.icon-tags:before {
content: "\f02c";
- font-size: @iconFontSize;
+ font-size: @iconSmallFontSize;
}
.icon-calendar:before {
position: relative;
top: -0.1em;
content: "\f073";
+ font-size: @iconSmallFontSize;
+}
+.icon-favorite:before {
+ content: "\f005";
+ color: @orange;
font-size: @iconFontSize;
}
+.icon-not-favorite:before {
+ content: "\f005";
+ color: @darkGrey;
+ font-size: @iconFontSize;
+}
+.icon-help:before {
+ content: "\f059";
+ color: @blue;
+ font-size: @iconFontSize;
+}
+.icon-info:before {
+ content: "\f05a";
+ color: @blue;
+ font-size: @iconFontSize;
+}
+.icon-uniF060:before {
+ content: "\f060";
+}
+.icon-uniF061:before {
+ content: "\f061";
+}
+.icon-uniF062:before {
+ content: "\f062";
+}
+.icon-uniF063:before {
+ content: "\f063";
+}
+.icon-comment:before {
+ content: "\f075";
+}
+.icon-delete:before {
+ content: "\f00d";
+}
+.icon-compare:before {
+ content: "\f0c5";
+}
+.icon-link:before {
+ content: "\f0c1";
+}
+.icon-inheritance:before {
+ content: "\f126";
+}
+.icon-plus:before {
+ content: "\f067";
+}
/*
* Icons
*/
-@iconFontSize: 14px;
+@iconSmallFontSize: 14px;
+@iconFontSize: 16px;
@iconLineHeight: 12px;
@severityBlockerColor: @red;