Fixed a critical bug with posts preview

main
Inga 🏳‍🌈 14 years ago
parent 679b411285
commit 6d67359ce5
  1. 2
      Builder/IISMainHandler/build.txt
  2. 2
      IISMainHandler/handlers/response/AbstractNewMessageHandler.cs
  3. 4
      templates/Full/NewThread.xslt
  4. 9
      templates/Full/PostReply.xslt
  5. 2
      templates/Full/elems/TextEditor.xslt

@ -14,7 +14,7 @@ namespace FLocal.IISHandler.handlers.response {
protected override IEnumerable<XElement> getSpecificData(WebContext context) { protected override IEnumerable<XElement> getSpecificData(WebContext context) {
var result = new List<XElement>(); var result = new List<XElement>();
if(context.httprequest.Form.AllKeys.Contains("title")) { if(context.httprequest.Form.AllKeys.Contains("title")) {
result.Add(new XElement("title", context.httprequest.Form["title"])); result.Add(new XElement("newTitle", context.httprequest.Form["title"]));
} }
if(context.httprequest.Form.AllKeys.Contains("Body")) { if(context.httprequest.Form.AllKeys.Contains("Body")) {
result.Add(new XElement("bodyUBB", context.httprequest.Form["Body"])); result.Add(new XElement("bodyUBB", context.httprequest.Form["Body"]));

@ -36,7 +36,9 @@
<br/> <br/>
<xsl:text>Òåìà: </xsl:text> <xsl:text>Òåìà: </xsl:text>
<br/> <br/>
<input type="text" tabindex="1" name="title" maxlength="70" class="formboxes" size="60"/> <input type="text" tabindex="1" name="title" maxlength="70" class="formboxes" size="60">
<xsl:attribute name="value"><xsl:value-of select="newTitle"/></xsl:attribute>
</input>
<span class="small">Ñëîé ñîîáùåíèÿ:</span> <span class="small">Ñëîé ñîîáùåíèÿ:</span>
<select class="formboxes" name="layerId"> <select class="formboxes" name="layerId">
<xsl:apply-templates select="layers"> <xsl:apply-templates select="layers">

@ -37,17 +37,20 @@
<xsl:text>Òåìà: </xsl:text> <xsl:text>Òåìà: </xsl:text>
<br/> <br/>
<input type="text" tabindex="1" name="title" maxlength="70" class="formboxes" size="60"> <input type="text" tabindex="1" name="title" maxlength="70" class="formboxes" size="60">
<xsl:attribute name="value">
<xsl:choose> <xsl:choose>
<xsl:when test="newTitle and (newTitle != '')">
<xsl:value-of select="newTitle"/>
</xsl:when>
<xsl:when test="substring(post/title, 1, 4)='Re: '"> <xsl:when test="substring(post/title, 1, 4)='Re: '">
<xsl:attribute name="value"><xsl:value-of select="post/title"/></xsl:attribute> <xsl:value-of select="post/title"/>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:attribute name="value">
<xsl:text>Re: </xsl:text> <xsl:text>Re: </xsl:text>
<xsl:value-of select="post/title"/> <xsl:value-of select="post/title"/>
</xsl:attribute>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:attribute>
</input> </input>
<span class="small">Ñëîé ñîîáùåíèÿ:</span> <span class="small">Ñëîé ñîîáùåíèÿ:</span>
<select class="formboxes" name="layerId"> <select class="formboxes" name="layerId">

@ -276,7 +276,7 @@ function insertInBody(str) {
<xsl:attribute name="src">/static/images/message-normal-read.gif</xsl:attribute> <xsl:attribute name="src">/static/images/message-normal-read.gif</xsl:attribute>
</img> </img>
</a> </a>
<b class="separate"><xsl:value-of select="title"/></b> <b class="separate"><xsl:value-of select="newTitle"/></b>
<br /> <br />
<font class="small" style="padding-left:2em"><xsl:apply-templates select="postDate/date" mode="dateTime"/></font> <font class="small" style="padding-left:2em"><xsl:apply-templates select="postDate/date" mode="dateTime"/></font>
</td> </td>

Loading…
Cancel
Save