BoardInfo usability improved

main
Inga 🏳‍🌈 13 years ago
parent 3237d07553
commit 1491056d0c
  1. 2
      Builder/IISMainHandler/build.txt
  2. 9
      FLocal.IISHandler/TemplateEngine.cs
  3. 14
      FLocal.IISHandler/WebContext.cs
  4. 3
      Resources/FLocal/static/css/modern/blue.css
  5. 3
      Resources/FLocal/static/css/modern/high-contrast.css
  6. 37
      Resources/FLocal/templates/Modern/elems/BoardInfo.xslt

@ -111,7 +111,14 @@ namespace FLocal.IISHandler {
lock(this.locker) { lock(this.locker) {
if(!this.cache.ContainsKey(templateName)) { if(!this.cache.ContainsKey(templateName)) {
XslCompiledTransform xslt = new XslCompiledTransform(); XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load(FLocal.Common.Config.instance.dataDir + "Templates" + FLocal.Common.Config.instance.DirSeparator + templateName); var path = FLocal.Common.Config.instance.dataDir + "Templates" + FLocal.Common.Config.instance.DirSeparator + templateName;
try {
xslt.Load(path);
} catch(XsltCompileException) {
throw;
} catch(XsltException e) {
throw new Exception("Unable to load xslt file: " + path, e);
}
this.cache[templateName] = xslt; this.cache[templateName] = xslt;
} }
} }

@ -198,6 +198,15 @@ namespace FLocal.IISHandler {
} }
} }
private static readonly Type BaseType = (new object()).GetType();
private string getFullTypeName(Type type, int allowedIterations) {
if(allowedIterations <= 0 || type.BaseType == null || type.BaseType.FullName == BaseType.FullName || type.BaseType.FullName == type.FullName) {
return type.FullName;
} else {
return type.FullName + " : " + getFullTypeName(type.BaseType, allowedIterations-1);
}
}
public void LogError(Exception e) { public void LogError(Exception e) {
string dir; string dir;
if(e is AccessDeniedException) { if(e is AccessDeniedException) {
@ -218,7 +227,8 @@ namespace FLocal.IISHandler {
writer.WriteLine("Session: " + this.httprequest.Cookies[Config.instance.CookiesPrefix + "_session"].Value); writer.WriteLine("Session: " + this.httprequest.Cookies[Config.instance.CookiesPrefix + "_session"].Value);
} }
writer.WriteLine(); writer.WriteLine();
writer.WriteLine("Exception: " + e.GetType().FullName);
writer.WriteLine("Exception: " + getFullTypeName(e.GetType(), 20));
writer.WriteLine("Guid: " + e.GetGuid().ToString()); writer.WriteLine("Guid: " + e.GetGuid().ToString());
writer.WriteLine(e.Message); writer.WriteLine(e.Message);
if(e is FLocalException) { if(e is FLocalException) {
@ -226,6 +236,8 @@ namespace FLocal.IISHandler {
} else { } else {
writer.WriteLine(e.StackTrace); writer.WriteLine(e.StackTrace);
} }
writer.WriteLine("==============================");
writer.WriteLine(e.ToString());
} }
} }

@ -110,6 +110,9 @@ blockquote .quotecontent {
.metroicon-edit { .metroicon-edit {
background-image:url(/static/images/metro.icons/black/edit.png); background-image:url(/static/images/metro.icons/black/edit.png);
} }
.metroicon-i {
background-image:url(/static/images/metro.icons/black/i.png);
}
.metroicon-mail { .metroicon-mail {
background-image:url(/static/images/metro.icons/black/mail.png); background-image:url(/static/images/metro.icons/black/mail.png);
} }

@ -90,6 +90,9 @@ blockquote .quotecontent {
.metroicon-edit { .metroicon-edit {
background-image:url(/static/images/metro.icons/white/edit.png); background-image:url(/static/images/metro.icons/white/edit.png);
} }
.metroicon-i {
background-image:url(/static/images/metro.icons/white/i.png);
}
.metroicon-mail { .metroicon-mail {
background-image:url(/static/images/metro.icons/white/mail.png); background-image:url(/static/images/metro.icons/white/mail.png);
} }

@ -6,7 +6,7 @@
<xsl:if test="((position() mod $maxPerLine) = 1) and (position() != 1)"> <xsl:if test="((position() mod $maxPerLine) = 1) and (position() != 1)">
<br/> <br/>
</xsl:if> </xsl:if>
<div> <div style="clear:both">
<xsl:attribute name="class"> <xsl:attribute name="class">
<xsl:text>boardcontainer</xsl:text> <xsl:text>boardcontainer</xsl:text>
<xsl:if test="(hasNewPosts='true') and not(lastPostInfo/post/poster/user/id = /root/session/user/id)"> <xsl:if test="(hasNewPosts='true') and not(lastPostInfo/post/poster/user/id = /root/session/user/id)">
@ -25,30 +25,15 @@
</p> </p>
</xsl:if> </xsl:if>
</a> </a>
<p>Ňĺě: <xsl:value-of select="totalThreads"/></p>
<p>Ńîîáůĺíčé: <xsl:value-of select="totalPosts"/></p>
</div>
<xsl:if test="subBoards/board">
<div style="float:left;text-align:left;">
<xsl:attribute name="onmouseover">showChildren(this);</xsl:attribute>
<xsl:attribute name="onmouseout">hideChildren(this);</xsl:attribute>
<div default="default">
<a class="pseudolink">Ďîäđŕçäĺëű</a>
</div>
<div class="board_additionalcontainer" style="display:none">
<div class="board_additional" style="left:0px;">
<p>
<xsl:apply-templates select="subBoards/board"/>
</p>
</div>
</div> </div>
</div> <div style="float:right;clear:both;text-align:right;">
</xsl:if>
<div style="float:right;text-align:right;">
<xsl:attribute name="onmouseover">showChildren(this);</xsl:attribute> <xsl:attribute name="onmouseover">showChildren(this);</xsl:attribute>
<xsl:attribute name="onmouseout">hideChildren(this);</xsl:attribute> <xsl:attribute name="onmouseout">hideChildren(this);</xsl:attribute>
<div default="default"> <div default="default">
<a class="pseudolink">Číôîđěŕöč˙</a> <xsl:apply-templates select="lastPostInfo/post/postDate/date" mode="navigationImageFor">
<xsl:with-param name="src">i</xsl:with-param>
<xsl:with-param name="alt">Èíôîðìàöèÿ</xsl:with-param>
</xsl:apply-templates>
</div> </div>
<div class="board_additionalcontainer" style="display:none;"> <div class="board_additionalcontainer" style="display:none;">
<div class="board_additional" style="right:0px;"> <div class="board_additional" style="right:0px;">
@ -58,8 +43,18 @@
<br/> <br/>
<xsl:apply-templates select="administrator/user | moderators/user" mode="userLink"/> <xsl:apply-templates select="administrator/user | moderators/user" mode="userLink"/>
</p> </p>
<xsl:if test="subBoards/board">
<hr/>
<p>
<xsl:apply-templates select="subBoards/board"/>
</p>
</xsl:if>
</div>
</div> </div>
</div> </div>
<div class="boardcontainer_info">
<p>Òåì: <xsl:value-of select="totalThreads"/></p>
<p>Ñîîáùåíèé: <xsl:value-of select="totalPosts"/></p>
</div> </div>
</div> </div>
</xsl:template> </xsl:template>

Loading…
Cancel
Save