New conversations page in modern design

main
Inga 🏳‍🌈 14 years ago
parent dc2df3cd63
commit 8ad07b9ac0
  1. 2
      Builder/IISMainHandler/build.txt
  2. 1
      Common/dataobjects/PMConversation.cs
  3. 24
      static/css/modern/global.css
  4. 9
      static/css/modern/iefixes.css
  5. 10
      static/css/modern/penartur.css
  6. 35
      templates/Modern/Conversations.xslt
  7. 85
      templates/Modern/elems/ConversationInfo.xslt

@ -123,6 +123,7 @@ namespace FLocal.Common.dataobjects {
new XElement("lastMessageDate", this.lastMessageDate.ToXml()),
new XElement("lastReadMessageId", this.lastReadMessageId),
new XElement("afterLastRead", this.lastReadMessageId + 1),
new XElement("lastMessage", this.lastMessage.exportToXml(context)),
new XElement(
"totalNewMessages",
Config.instance.mainConnection.GetCountByConditions(

@ -180,10 +180,10 @@ a.external {
background-repeat:no-repeat;
background-position:right center;
}
.threadscontainer {
.threadscontainer, .conversationscontainer {
vertical-align:top;
}
.threadcontainer {
.threadcontainer, .conversationcontainer {
vertical-align:top;
display:inline-block;
width:17em;
@ -192,30 +192,36 @@ a.external {
margin:5pt;
position:relative;
}
.threadcontainer .avatar, .threadcontainer .userbar_avatar {
.threadcontainer .avatar, .threadcontainer .userbar_avatar,
.conversationcontainer .avatar, .conversationcontainer .userbar_avatar {
max-height:3em;
max-width:4em;
}
.threadcontainer .userbarcontainer {
.threadcontainer .userbarcontainer, .conversationcontainer .userbarcontainer {
max-width:4em;
}
.threadcontainer .userbar_additional {
.threadcontainer .userbar_additional, .conversationcontainer .userbar_additional {
font-size:1em;
}
.threadcontainer_title {
font-size:1.1em;
.threadcontainer_title, .conversationcontainer_title {
font-weight:normal;
margin:0px;
height:3.5em;
overflow:hidden;
}
.threadcontainer_additionalcontainer {
.threadcontainer_title {
font-size:1.1em;
}
.conversationcontainer_title {
font-size:1.5em;
}
.threadcontainer_additionalcontainer, .conversationcontainer_additionalcontainer {
height:0px;
max-height:0px;
overflow:visible;
position:relative;
}
.threadcontainer_additional {
.threadcontainer_additional, .conversationcontainer_additional {
position:absolute;
padding:5pt;
width:15em;

@ -18,17 +18,18 @@
width:0px;
max-width:0px;
}
.threadcontainer {
.threadcontainer, .conversationcontainer {
display:inline;
}
.threadcontainer .avatar, .threadcontainer .userbar_avatar {
.threadcontainer .avatar, .threadcontainer .userbar_avatar,
.conversationcontainer .avatar, .conversationcontainer .userbar_avatar {
height:expression((this.scrollHeight >= 45) ? '45px' : 'auto');
width:expression((this.scrollWidth >= 60) ? '60px' : 'auto');
}
.threadcontainer .userbarcontainer {
.threadcontainer .userbarcontainer, .conversationcontainer .userbarcontainer {
width:expression((this.scrollWidth >= 60) ? '60px' : 'auto');
}
.threadcontainer_additionalcontainer {
.threadcontainer_additionalcontainer, .conversationcontainer_additionalcontainer {
width:0px;
max-width:0px;
}

@ -31,19 +31,19 @@ blockquote {
.boardscontainer {
background-color:#101010;
}
.boardcontainer, .threadcontainer {
.boardcontainer, .threadcontainer, .conversationcontainer {
background-color:#202020;
}
.boardcontainer:hover, .threadcontainer:hover {
.boardcontainer:hover, .threadcontainer:hover, .conversationcontainer:hover {
background-color:#303030;
}
.boardcontainer.updated, .threadcontainer.updated {
.boardcontainer.updated, .threadcontainer.updated, .conversationcontainer.updated {
background-color:#502800;
}
.boardcontainer.updated:hover, .threadcontainer.updated:hover {
.boardcontainer.updated:hover, .threadcontainer.updated:hover, .conversationcontainer.updated:hover {
background-color:#684000;
}
.board_additional, .threadcontainer_additional {
.board_additional, .threadcontainer_additional, .conversationcontainer_additional {
background-color:#1C281C;
}

@ -6,30 +6,17 @@
<xsl:template name="isLiteEnabled">true</xsl:template>
<xsl:template name="isRssEnabled">true</xsl:template>
<xsl:template name="specific">
<table width="95%" align="center" class="tablesurround">
<tr>
<td>
<table cellpadding="3" cellspacing="1" width="100%" class="tableborders">
<tr>
<td align="left" nowrap="nowrap" width="75%" class="tdheader">Ñîáåñåäíèê</td>
<td nowrap="nowrap" width="5%" class="tdheader" align="center">Ïîñòîâ</td>
<td nowrap="nowrap" width="20%" class="tdheader" align="center">Ïîñëåäíåå</td>
</tr>
<!-- BEGIN POST LOOP DO NOT DELETE -->
<xsl:apply-templates select="conversations/conversation"/>
<!-- END OF LOOP -->
<tr class="tdheader">
<td colspan="3">
<font class="onbody">
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="conversations/pageOuter" mode="withCurrent"/>
</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="conversations/pageOuter" mode="withCurrent"/>
</div>
<div id="conversationsContainer">
<xsl:apply-templates select="conversations/conversation"/>
</div>
<div>
<xsl:text>ñòðàíèöû:</xsl:text>
<xsl:apply-templates select="conversations/pageOuter" mode="withCurrent"/>
</div>
</xsl:template>
</xsl:stylesheet>

@ -1,7 +1,91 @@
<?xml version="1.0" encoding="Windows-1251"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:import href="UserInfoBar.xslt"/>
<xsl:template match="conversation">
<div>
<xsl:attribute name="class">
<xsl:text>conversationcontainer</xsl:text>
<xsl:if test="totalNewMessages and totalNewMessages!='0'">
<xsl:text> updated</xsl:text>
</xsl:if>
</xsl:attribute>
<xsl:attribute name="style">
<xsl:text>z-index:</xsl:text>
<xsl:value-of select="1000-position()"/>
</xsl:attribute>
<div class="userbarcontainer" style="float:left">
<xsl:apply-templates select="interlocutor/account/user" mode="userInfoBar"/>
</div>
<h4 class="conversationcontainer_title">
<a>
<xsl:attribute name="href">
<xsl:text>/My/Conversations/Conversation/</xsl:text>
<xsl:value-of select="interlocutor/account/id"/>
<xsl:text>/</xsl:text>
<xsl:if test="afterLastRead&lt;=lastMessageId">
<xsl:text>p</xsl:text>
<xsl:value-of select="afterLastRead"/>
</xsl:if>
</xsl:attribute>
<xsl:value-of select="lastMessage/message/title"/>
</a>
</h4>
<div>
<xsl:attribute name="style">
<xsl:variable name="rawHotness">
<xsl:call-template name="log2">
<xsl:with-param name="number">
<xsl:value-of select="totalMessages"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="hotness">
<xsl:choose>
<xsl:when test="$rawHotness &lt; 0">0</xsl:when>
<xsl:when test="$rawHotness &gt; 12">12</xsl:when>
<xsl:otherwise><xsl:value-of select="$rawHotness"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:text>position:absolute;text-align:right;right:0px;bottom:0px;padding:2pt 5pt 0pt 5pt;</xsl:text>
<xsl:text>background-color:rgb(</xsl:text>
<xsl:value-of select="round($hotness*21.25)"/>
<xsl:text>,0,</xsl:text>
<xsl:value-of select="255-round($hotness*21.25)"/>
<xsl:text>)</xsl:text>
</xsl:attribute>
<xsl:attribute name="onmouseover">showChildren(this);</xsl:attribute>
<xsl:attribute name="onmouseout">hideChildren(this);</xsl:attribute>
<div default="default" style="z-index:1;">
<a class="pseudolink" style="color:black;">?</a>
</div>
<div class="conversationcontainer_additionalcontainer" style="display:none;">
<div class="conversationcontainer_additional" style="right:-5pt;">
<p>
<xsl:text>Ñîîáùåíèé: </xsl:text>
<xsl:value-of select="totalMessages"/>
<xsl:if test="totalNewMessages and totalNewMessages!='0'">
<font class="new"><i>(<xsl:value-of select="totalNewPosts"/>)</i></font>
</xsl:if>
</p>
<p>
<xsl:text>Ïîñëåäíåå: </xsl:text>
<xsl:apply-templates select="lastMessageDate/date" mode="dateTime"/>
</p>
<xsl:if test="pageOuter/isEmpty='false'">
<p>
<xsl:text>Ñòðàíèöû: </xsl:text>
<xsl:apply-templates select="pageOuter" mode="withoutCurrent">
<xsl:with-param name="baseLink">/My/Conversations/Conversation/<xsl:value-of select="interlocutor/account/id"/>/</xsl:with-param>
</xsl:apply-templates>
</p>
</xsl:if>
</div>
</div>
</div>
</div>
<!--
<tr>
<xsl:choose>
<xsl:when test="position() mod 2 = 0">
@ -52,6 +136,7 @@
<xsl:apply-templates select="lastMessageDate/date" mode="dateTime"/>
</td>
</tr>
-->
</xsl:template>

Loading…
Cancel
Save