annotate static/js/tiny_mce/plugins/template/template.htm @ 318:c550933ff5b6

Fix a bug where you'd get an error when trying to delete a forum thread (topic does not exist). Apparently when you call topic.delete() the posts would get deleted, but the signal handler for each one would run, and it would try to update the topic's post count or something, but the topic was gone? Reworked the code a bit and explicitly delete the posts first. I also added a sync() call on the parent forum since post counts were not getting adjusted.
author Brian Neal <bgneal@gmail.com>
date Sat, 05 Feb 2011 21:46:52 +0000
parents 88b2b9cb8c1f
children
rev   line source
bgneal@312 1 <html xmlns="http://www.w3.org/1999/xhtml">
bgneal@312 2 <head>
bgneal@312 3 <title>{#template_dlg.title}</title>
bgneal@312 4 <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
bgneal@312 5 <script type="text/javascript" src="js/template.js"></script>
bgneal@312 6 <link href="css/template.css" rel="stylesheet" type="text/css" />
bgneal@312 7 </head>
bgneal@312 8 <body onresize="TemplateDialog.resize();">
bgneal@312 9 <form onsubmit="TemplateDialog.insert();return false;">
bgneal@312 10 <div id="frmbody">
bgneal@312 11 <div class="title">{#template_dlg.desc}</div>
bgneal@312 12 <div class="frmRow"><label for="tpath" title="{#template_dlg.select}">{#template_dlg.label}:</label>
bgneal@312 13 <select id="tpath" name="tpath" onchange="TemplateDialog.selectTemplate(this.options[this.selectedIndex].value, this.options[this.selectedIndex].text);" class="mceFocus">
bgneal@312 14 <option value="">{#template_dlg.select}...</option>
bgneal@312 15 </select>
bgneal@312 16 <span id="warning"></span></div>
bgneal@312 17 <div class="frmRow"><label for="tdesc">{#template_dlg.desc_label}:</label>
bgneal@312 18 <span id="tmpldesc"></span></div>
bgneal@312 19 <fieldset>
bgneal@312 20 <legend>{#template_dlg.preview}</legend>
bgneal@312 21 <iframe id="templatesrc" name="templatesrc" src="blank.htm" width="690" height="400" frameborder="0"></iframe>
bgneal@312 22 </fieldset>
bgneal@312 23 </div>
bgneal@312 24
bgneal@312 25 <div class="mceActionPanel">
bgneal@312 26 <input type="submit" id="insert" name="insert" value="{#insert}" />
bgneal@312 27 <input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
bgneal@312 28 </div>
bgneal@312 29 </form>
bgneal@312 30 </body>
bgneal@312 31 </html>