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("lastMessageDate", this.lastMessageDate.ToXml()),
new XElement("lastReadMessageId", this.lastReadMessageId), new XElement("lastReadMessageId", this.lastReadMessageId),
new XElement("afterLastRead", this.lastReadMessageId + 1), new XElement("afterLastRead", this.lastReadMessageId + 1),
new XElement("lastMessage", this.lastMessage.exportToXml(context)),
new XElement( new XElement(
"totalNewMessages", "totalNewMessages",
Config.instance.mainConnection.GetCountByConditions( Config.instance.mainConnection.GetCountByConditions(

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

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

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

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

@ -1,7 +1,91 @@
<?xml version="1.0" encoding="Windows-1251"?> <?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: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"> <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> <tr>
<xsl:choose> <xsl:choose>
<xsl:when test="position() mod 2 = 0"> <xsl:when test="position() mod 2 = 0">
@ -52,6 +136,7 @@
<xsl:apply-templates select="lastMessageDate/date" mode="dateTime"/> <xsl:apply-templates select="lastMessageDate/date" mode="dateTime"/>
</td> </td>
</tr> </tr>
-->
</xsl:template> </xsl:template>

Loading…
Cancel
Save