| 65 | * I'm managing dependencies using the [wiki:AnalyzePlugin Analyze plugin] and don't want to inundate the team with emails of its fixes. |
| 66 | |
| 67 | === Trigger quiet mode === |
| 68 | To help you remember to enter quiet mode for the above use cases (or similar ones), you can create trigger rules on DOM elements that will prompt you to enter or leave quiet mode (if you're not already in that state): |
| 69 | {{{ |
| 70 | [quiet] |
| 71 | 1.selector = #analyzebutton |
| 72 | 1.action = enter |
| 73 | |
| 74 | 2.selector = #batchmod_submit |
| 75 | 2.action = enter |
| 76 | 2.submit = true |
| 77 | |
| 78 | 3.selector = #propertyform[action*=ticket] .buttons input[name=submit] |
| 79 | 3.action = leave |
| 80 | 3.only_if = #comment:first=.+ |
| 81 | 3.submit = true |
| 82 | }}} |
| 83 | |
| 84 | The above example defines three trigger rules explained as follows: |
| 85 | 1. When the "Analyze.." button is clicked, prompt to enter quiet mode. |
| 86 | 1. When the "Batch Modify" button is clicked, prompt to enter quiet mode (and prevent the submission - but then they can submit again). |
| 87 | 1. When the "Batch Modify" button is clicked ''and'' there's some text in the comment field, then prompt to enter quiet mode (and prevent the submission - but then they can submit again). |
| 88 | |
| 89 | The {{{only_if}}} option can either be just a CSS selector or also include an expected regex value (e.g., the {{{=.+}}} above). If just a selector, then the selector must exist. If also an expected rege value, then the selected item's jQuery {{{val()}}} must match the expected value. |