1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

First try of redesign

This commit is contained in:
Tim Düsterhus 2011-12-15 18:55:44 +01:00
parent 966a4f57d3
commit bb1fd6e82c
2 changed files with 140 additions and 148 deletions

View File

@ -57,6 +57,10 @@ if (typeof TimWolla.WCF == 'undefined') TimWolla.WCF = {};
event.preventDefault(); event.preventDefault();
this.submit($(event.target)); this.submit($(event.target));
}, this)); }, this));
$('button').click(function (event) {
window.location.href = $(event.target).attr('value');
});
}, },
/** /**
* Changes the chat-room. * Changes the chat-room.

View File

@ -8,7 +8,6 @@
<style type="text/css"> <style type="text/css">
#chatBox { #chatBox {
padding: 0; padding: 0;
background-color: #D8E7F5;
} }
#chatBox > div { #chatBox > div {
@ -19,27 +18,7 @@
text-align: left; text-align: left;
} }
#chatRoomContent { aside {
margin: auto;
padding: 1px 10px 10px;
background-color: #FFFFFF;
width: 68%;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
.chatSidebar.left {
float: left;
margin-left: -1px;
}
.chatSidebar.right {
float: right;
margin-right: -1px;
}
.chatSidebar {
overflow: auto; overflow: auto;
padding: 0 1px 0 0; padding: 0 1px 0 0;
width: 190px; width: 190px;
@ -52,38 +31,23 @@
display: block; display: block;
} }
.chatSidebar h2 { aside h2 {
background-image: url({icon}arrowDown{/icon}); margin: auto;
text-align: center;
font-size: 130%; font-size: 130%;
padding: 7px 25px 7px 35px;
background-position: 15px center;
background-repeat: no-repeat;
background-size: 16px auto;
color: #336699; color: #336699;
cursor: default; cursor: default;
font-weight: bold; font-weight: bold;
margin-top: 5px; margin-top: 5px;
} }
.chatSidebar ul li a { aside ul li a {
color: #6699CC; color: #6699CC;
display: block; display: block;
padding: 5px 25px 7px 35px; padding: 5px 25px 7px 35px;
text-shadow: 0 1px 0 #FFFFFF; text-shadow: 0 1px 0 #FFFFFF;
} }
.chatSidebar ul li.activeMenuItem a {
color: #336699;
font-weight: bold;
}
.chatSidebar.left ul li.activeMenuItem, .chatSidebar.right ul li.activeMenuItem .bgFix {
background-color: #FFFFFF;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
margin-right: -1px;
overflow: hidden;
}
#topic, #smileyList, #chatOptions { #topic, #smileyList, #chatOptions {
padding: 5px; padding: 5px;
} }
@ -102,40 +66,32 @@
#chatForm { #chatForm {
margin-top: 15px; margin-top: 15px;
white-space: nowrap; white-space: nowrap;
margin-right: 34px;
margin-top: 10px; margin-top: 10px;
height: 28px;
} }
#chatForm .inputImage {
height: 100%;
margin-bottom: -8px;
}
#chatOptions { #chatOptions {
display: inline-block; display: inline-block;
} }
#chatUserList > ul > li > .bgFix a { #chatUserList > li > .bgFix a {
background-image: url({icon size='S'}arrowRight{/icon}); background-image: url({icon size='S'}arrowRight{/icon});
background-position: 15px center; background-position: 15px center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 16px auto; background-size: 16px auto;
} }
#chatUserList > ul > li.activeMenuItem > .bgFix a { #chatUserList > li.activeMenuItem > .bgFix a {
background-image: url({icon size='S'}arrowDown{/icon}); background-image: url({icon size='S'}arrowDown{/icon});
} }
.chatSidebar .chatUserMenu li a { #chatUserList .chatUserMenu li a {
margin-left: 30px !important; margin-left: 30px !important;
} }
.chatUserMenu { #chatUserList .chatUserMenu {
display: none; display: none;
} }
#chatUserList > ul li a { #chatUserList > li a {
margin-left: 20px; margin-left: 20px;
} }
@ -169,10 +125,6 @@
background-image: url({icon size='S'}toLeft1{/icon}); background-image: url({icon size='S'}toLeft1{/icon});
} }
.chatSidebar a {
outline: none;
}
.ajaxLoad { .ajaxLoad {
background-position: right center; background-position: right center;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -186,38 +138,62 @@
</head> </head>
<body id="tpl{$templateName|ucfirst}"> <body id="tpl{$templateName|ucfirst}">
{include file='header' sandbox=false} <a id="top"></a>
<!-- HEADER -->
<header class="mainHeading"> <header id="pageHeader" class="pageHeader">
<img src="{icon size='L'}chat1{/icon}" alt="" /> <div>
<hgroup> {hascontent}
<h1>{lang}wcf.chat.title{/lang}</h1> <!-- top menu -->
</hgroup> <nav id="topMenu" class="topMenu">
</header>
<div class="tabMenuContainer">
<nav class="tabMenu">
<ul>
<li class="ui-state-active"><a href="{link controller="Chat"}{/link}" title="{lang}wcf.chat.title{/lang}">{lang}wcf.chat.title{/lang}</a></li>
<li><a href="{link controller="Chat" action="Log"}{/link}" title="{lang}wcf.chat.protocol{/lang}">{lang}wcf.chat.protocol{/lang}</a></li>
</ul>
</nav>
<section id="chatBox" class="border tabMenuContent hidden">
<div> <div>
<aside id="chatRoomList" class="chatSidebar left">
<h2>{lang}wcf.chat.rooms{/lang}</h2>
<ul> <ul>
{foreach from=$rooms item='roomListRoom'} {content}{event name='topMenu'}{/content}
<li{if $roomListRoom->roomID == $room->roomID} class="activeMenuItem"{/if}>
<a href="{link controller='Chat' object=$roomListRoom}{/link}" class="chatRoom">{$roomListRoom}</a>
</li>
{/foreach}
</ul> </ul>
</aside> </div>
<aside id="chatUserList" class="chatSidebar right"> </nav>
<h2>{lang}wcf.chat.users{/lang}</h2> <!-- /top menu -->
{/hascontent}
<!-- logo -->
<div id="logo" class="logo">
<!-- clickable area -->
<a href="{link controller='Index'}{/link}">
<!-- *** insert header logo here -->
</a>
<!-- /clickable area -->
<!-- search area -->
{event name='searchArea'}
<!-- /search area -->
</div>
<!-- /logo -->
<!-- main menu -->
{include file='mainMenu'}
<!-- /main menu -->
<!-- header navigation -->
<nav class="headerNavigation">
<div>
<ul> <ul>
<li id="toBottomLink" class="toBottomLink"><a href="#bottom" title="{lang}wcf.global.scrollDown{/lang}" class="balloonTooltip"><img src="{icon size='S'}toBottom{/icon}" alt="" /> <span class="invisible">{lang}wcf.global.scrollDown{/lang}</span></a></li>
{event name='headerNavigation'}
</ul>
</div>
</nav>
<!-- /header navigation -->
</div>
</header>
<!-- /HEADER -->
<!-- MAIN -->
<div id="main" class="main right">
<div>
<aside class="sidebar">
<button title="{lang}wcf.chat.title{/lang}" value="{link controller="Chat"}{/link}">{lang}wcf.chat.title{/lang}</button>
<button title="{lang}wcf.chat.protocol{/lang}" value="{link controller="Chat" action="Log"}{/link}">{lang}wcf.chat.protocol{/lang}</button>
<h2>{lang}wcf.chat.users{/lang}</h2>
<ul id="chatUserList">
{section name=user start=1 loop=11} {section name=user start=1 loop=11}
<li id="user-{$user}" class="chatUser"> <li id="user-{$user}" class="chatUser">
<span class="bgFix"><a class="chatUserLink" href="javascript:;">User {$user}</a></span> <span class="bgFix"><a class="chatUserLink" href="javascript:;">User {$user}</a></span>
@ -232,7 +208,23 @@
</li> </li>
{/section} {/section}
</ul> </ul>
<h2>{lang}wcf.chat.rooms{/lang}</h2>
<nav class="sidebarMenu">
<div>
<ul>
{foreach from=$rooms item='roomListRoom'}
<li{if $roomListRoom->roomID == $room->roomID} class="activeMenuItem"{/if}>
<a href="{link controller='Chat' object=$roomListRoom}{/link}" class="chatRoom">{$roomListRoom}</a>
</li>
{/foreach}
</ul>
</div>
</nav>
</aside> </aside>
<!-- CONTENT -->
<section id="content" class="content">
{include file='breadcrumbs' sandbox=false}
<div id="chatRoomContent"> <div id="chatRoomContent">
<div id="topic" class="border"{if $room->topic|language === ''} style="display: none;"{/if}>{$room->topic|language}</div> <div id="topic" class="border"{if $room->topic|language === ''} style="display: none;"{/if}>{$room->topic|language}</div>
<div class="chatMessageContainer border content"> <div class="chatMessageContainer border content">
@ -240,8 +232,7 @@
</div> </div>
<form id="chatForm" action="{link controller="Chat" action="Send"}{/link}" method="post"> <form id="chatForm" action="{link controller="Chat" action="Send"}{/link}" method="post">
<input type="text" id="chatInput" class="inputText" style="width: 100%" name="text" autocomplete="off" /> <input type="text" id="chatInput" class="inputText long" name="text" autocomplete="off" required="required" placeholder="Submit with enter" />
<input type="image" class="inputImage" alt="Absenden" src="{icon size=M}toRight1{/icon}" />
</form> </form>
<div id="chatControls"> <div id="chatControls">
@ -282,9 +273,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</section>
</div>
<script type="text/javascript"> <script type="text/javascript">
//<![CDATA[ //<![CDATA[