- Appended to comment:
drh added on 2008-11-26 02:40:03:
Preview button similar to what is described above was added to the default ticket configuration by check-in 6bcff72d23. Existing repositories will want to import these changes. The easiest way to do this after upgrading the fossil executable to version 6bcff72d23 or later is to go toSetup -> Tickets -> Edit_Ticket_Page
And there select "Revert To Default"
- Change resolution to "Fixed"
- Change status to "Fixed"
- Change comment to "The preview is especially needed on the Comments section where the user is allowed to enter wiki - which might not be rendered as expected. There already is a Preview on the "New Ticket" page. It should not be that much trouble to add the same to the "Edit Ticket" page. <hr><i>kkinnell added on 2008-11-25 20:22:28:</i><br> Here is a "cut & paste" patch for version dec2c22d9d. Setup->Tickets->Edit Ticket Page Copy the default html, and paste it into a file. Copy the patch text below, and paste it into a different file. Run "<code>patch -c <i>default file</i> <u>patch file</u></code>" Then clear out the html in the text area on the Edit Ticket Page and cut&paste the patched text. The changes just adding buttons and connecting them to display areas, but it's easier to explain it in <i>diff -c</i> than it is in English. :) <nowiki><pre> *** distedit.th1 2008-11-25 14:06:08.000000000 -0600 --- prvwedit.th1 2008-11-25 14:03:41.000000000 -0600 *************** *** 60,65 **** --- 60,66 ---- wrap="virtual" class="wikiedit">$<comment></textarea><br> <input type="hidden" name="eall" value="1"> <input type="submit" name="aonlybtn" value="Append Remark"> + <input type="submit" name="prevw1btn" value="Preview"> <th1>enable_output [expr {!$eall}]</th1> Append Remark from <input type="text" name="username" value="$<username>" size="30">:<br> *************** *** 67,73 **** --- 68,92 ---- wrap="virtual" class="wikiedit">$<cmappnd></textarea><br> <th1>enable_output [expr {[hascap w] && !$eall}]</th1> <input type="submit" name="eallbtn" value="Edit All"> + <input type="submit" name="prevw2btn" value="Preview"> <th1>enable_output 1</th1> + + <th1>enable_output [info exists prevw1btn]</th1> + <tr><td colspan="2"> + Description Preview:<br><hr> + <th1>wiki $comment</th1> + <hr> + </td></tr> + <th1>enable_output 1</th1> + + <th1>enable_output [info exists prevw2btn]</th1> + <tr><td colspan="2"> + Description Preview:<br><hr> + <th1>wiki $cmappnd</th1> + <hr> + </td></tr> + <th1>enable_output 1</th1> + </td></tr> <tr><td align="right"></td><td> <input type="submit" name="submit" value="Submit Changes"> </pre></nowiki> Hrm. I wish I'd had the preview before I submitted this; I would've realized I need to change all of those '<' chars into '&lt;' sequences."
- Appended to comment:
kkinnell added on 2008-11-25 20:22:28:
Here is a "cut & paste" patch for version dec2c22d9d.Setup->Tickets->Edit Ticket Page
Copy the default html, and paste it into a file.
Copy the patch text below, and paste it into a different file.
Run "
patch -c default file patch file
"Then clear out the html in the text area on the Edit Ticket Page and cut&paste the patched text.
The changes just adding buttons and connecting them to display areas, but it's easier to explain it in diff -c than it is in English. :)
*** distedit.th1 2008-11-25 14:06:08.000000000 -0600 --- prvwedit.th1 2008-11-25 14:03:41.000000000 -0600 *************** *** 60,65 **** --- 60,66 ---- wrap="virtual" class="wikiedit">$<comment></textarea>
HTH
<input type="hidden" name="eall" value="1"> <input type="submit" name="aonlybtn" value="Append Remark"> + <input type="submit" name="prevw1btn" value="Preview"> <th1>enable_output [expr {!$eall}]</th1> Append Remark from <input type="text" name="username" value="$<username>" size="30">:
*************** *** 67,73 **** --- 68,92 ---- wrap="virtual" class="wikiedit">$<cmappnd></textarea>
<th1>enable_output [expr {[hascap w] && !$eall}]</th1> <input type="submit" name="eallbtn" value="Edit All"> + <input type="submit" name="prevw2btn" value="Preview"> <th1>enable_output 1</th1> + + <th1>enable_output [info exists prevw1btn]</th1> + + Description Preview:
+ <th1>wiki $comment</th1> +
+ + <th1>enable_output 1</th1> + + <th1>enable_output [info exists prevw2btn]</th1> + + Description Preview:
+ <th1>wiki $cmappnd</th1> +
+ + <th1>enable_output 1</th1> + <input type="submit" name="submit" value="Submit Changes"> - Change resolution to "Drive_By_Patch"
- Change severity to "Minor"
- Change comment to "The preview is especially needed on the Comments section where the user is allowed to enter wiki - which might not be rendered as expected. There already is a Preview on the "New Ticket" page. It should not be that much trouble to add the same to the "Edit Ticket" page."
- Change status to "Open"
- Change title to "Need a "Preview" button when editing a ticket"
- Change type to "Feature_Request"