Merge branch 'develop'

main
Julian Lam 7 years ago
commit 5dd6d822d2

@ -374,3 +374,79 @@ body.skin-default .header {
}
}
}
label.dropdown-toggle {
cursor: pointer;
margin: 0;
}
#user-control-list-check:checked + #user-control-list {
display: block;
}
.navbar-default {
.navbar-nav {
> li > label {
color: @navbar-default-link-color;
&:hover,
&:focus {
color: @navbar-default-link-hover-color;
background-color: @navbar-default-link-hover-bg;
}
}
> .active > label {
&,
&:hover,
&:focus {
color: @navbar-default-link-active-color;
background-color: @navbar-default-link-active-bg;
}
}
> .disabled > label {
&,
&:hover,
&:focus {
color: @navbar-default-link-disabled-color;
background-color: @navbar-default-link-disabled-bg;
}
}
> .open > label {
&,
&:hover,
&:focus {
background-color: @navbar-default-link-active-bg;
color: @navbar-default-link-active-color;
}
}
}
}
.dropdown-menu > li > form {
> button, > .btn-link {
text-align: left;
width: 100%;
background: none;
border: none;
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: @line-height-base;
color: @dropdown-link-color;
white-space: nowrap; // prevent links from randomly breaking onto new lines
&:hover,
&:focus {
text-decoration: none;
color: @dropdown-link-hover-color;
background-color: @dropdown-link-hover-bg;
}
}
}
html[data-dir="rtl"] {
.dropdown-menu > li > form > button {
text-align: right;
}
}

@ -63,13 +63,13 @@
background-color: #1D1F20;
background-image: linear-gradient(145deg, #1D1F20, #404348);
a {
a, button {
color: #fff;
text-decoration: none;
}
a:hover {
text-decoration: underline;
&:hover {
text-decoration: underline;
}
}
.chat-list {
@ -81,15 +81,15 @@
color: #fff;
position: relative;
height: 60px;
&:hover {
background: none;
}
&:not(:last-child) {
border-bottom: none;
}
.main-avatar {
position: absolute;
top: 0;
@ -102,11 +102,11 @@
border-radius: 0;
}
}
.members {
display: none;
}
.room-name {
display: block;
overflow: hidden;
@ -114,7 +114,7 @@
text-overflow: ellipsis;
padding-left: 60px;
}
.teaser-content {
padding-left: 60px;
display: block;
@ -186,18 +186,20 @@
}
.menu-section-list {
padding:0;
padding: 0;
margin: 10px 0;
list-style:none;
list-style: none;
a {
a, button {
display: block;
padding: 10px 20px;
}
text-align: left;
width: 100%;
a:hover {
background-color: rgba(255, 255, 255, 0.1);
text-decoration: none;
&:hover {
background-color: rgba(255, 255, 255, 0.1);
text-decoration: none;
}
}
}

@ -1,20 +0,0 @@
define('persona/chats', ['components', 'forum/chats'], function(components, coreChats) {
var Chats = {};
Chats.init = function() {
var env = utils.findBootstrapEnvironment();
if (ajaxify.data.hasOwnProperty('roomId') && (env === 'sm' || env === 'xs')) {
app.openChat(ajaxify.data.roomId, ajaxify.data.uid);
}
components.get('chat/recent').on('click', '[component="chat/recent/room"]', function(e) {
env = utils.findBootstrapEnvironment();
if (env === 'xs' || env === 'sm') {
app.openChat($(this).attr('data-roomid'));
} else {
coreChats.switchChat($(this).attr('data-roomid'));
}
});
};
return Chats;
});

@ -3,29 +3,30 @@
/*globals $, app, ajaxify, socket*/
define('persona/quickreply', ['components'], function(components) {
var QuickReply = {};
QuickReply.init = function() {
var element = components.get('topic/quickreply/text');
var data = {
element: element,
strategies: [],
options: {
zIndex: 100,
listPosition: function(position) {
this.$el.css(this._applyPlacement(position));
var QuickReply = {};
QuickReply.init = function() {
var element = components.get('topic/quickreply/text');
var data = {
element: element,
strategies: [],
options: {
zIndex: 100,
listPosition: function(position) {
this.$el.css(this._applyPlacement(position));
this.$el.css('position', 'absolute');
return this;
}
}
};
$(window).trigger('composer:autocomplete:init', data);
}
}
};
$(window).trigger('composer:autocomplete:init', data);
data.element.textcomplete(data.strategies, data.options);
$('.textcomplete-wrapper').css('height', '100%').find('textarea').css('height', '100%');
components.get('topic/quickreply/button').on('click', function(e) {
e.preventDefault();
var replyMsg = components.get('topic/quickreply/text').val();
var replyData = {
tid: ajaxify.data.tid,
@ -41,6 +42,6 @@ define('persona/quickreply', ['components'], function(components) {
});
});
};
return QuickReply;
return QuickReply;
});

@ -26,11 +26,7 @@ $(document).ready(function() {
NProgress.done();
setupHoverCards();
if (data.url && data.url.match('^user/.+/chats')) {
require(['persona/chats'], function(chats) {
chats.init();
});
} else if (data.url && data.url.match('user/')) {
if (data.url && data.url.match('user/')) {
setupFavouriteButtonOnProfile();
}
});

@ -14,8 +14,7 @@
"lib/modules/nprogress.js",
"lib/modules/autohidingnavbar.min.js",
"lib/modules/slideout.min.js",
"lib/modules/quickreply.js",
"lib/client/chats.js"
"lib/modules/quickreply.js"
],
"acpScripts": [
"lib/admin.js"

@ -12,7 +12,7 @@
<div class="clearfix">
<!-- IF privileges.topics:create -->
<button component="category/post" id="new_topic" class="btn btn-primary">[[category:new_topic_button]]</button>
<a href="{config.relative_path}/compose?cid={cid}" component="category/post" id="new_topic" class="btn btn-primary" data-ajaxify="false" role="button">[[category:new_topic_button]]</a>
<!-- ELSE -->
<!-- IF !loggedIn -->
<a component="category/post/guest" href="{config.relative_path}/login" class="btn btn-primary">[[category:guest-login-post]]</a>

@ -1,8 +1,5 @@
<!-- IMPORT partials/breadcrumbs.tpl -->
<div class="row chats-page">
<div class="col-md-4">
<div class="col-md-4" component="chat/nav-wrapper">
<div class="chat-search hidden-xs">
<input class="form-control" type="text" component="chat/search" placeholder="[[users:enter_username]]" />
</div>
@ -16,38 +13,7 @@
</ul>
</div>
<div class="col-md-8 hidden-sm hidden-xs">
<!-- IF roomId -->
<div component="chat/messages" class="expanded-chat" data-roomid="{roomId}">
<button type="button" class="close" data-action="pop-out"><span aria-hidden="true"><i class="fa fa-compress"></i></span><span class="sr-only">[[modules:chat.pop-out]]</span></button>
<button class="close controlsToggle" component="expanded-chat/controlsToggle"><i class="fa fa-gear"></i></button>
<div class="controls hide" component="expanded-chat/controls">
<!-- IF showUserInput -->
<div class="users-tag-container">
<input class="users-tag-input" type="text" class="form-control" placeholder="[[modules:chat.add-users-to-room]]" tabindex="4"/>
</div>
<!-- ENDIF showUserInput -->
<input class="form-control" component="chat/room/name" value="{roomName}" <!-- IF !isOwner -->disabled<!-- ENDIF !isOwner -->/>
<hr />
</div>
<ul class="chat-content">
<!-- IMPORT partials/chats/messages.tpl -->
</ul>
<div class="input-group">
<textarea component="chat/input" placeholder="[[modules:chat.placeholder]]" class="form-control chat-input mousetrap" rows="1" <!-- IF !canReply -->readonly<!-- ENDIF !canReply -->></textarea>
<span class="input-group-btn">
<button class="btn btn-primary" type="button" data-action="send" <!-- IF !canReply -->disabled<!-- ENDIF !canReply -->>[[modules:chat.send]]</button>
</span>
</div>
<span component="chat/message/length">0</span>/<span>{maximumChatMessageLength}</span>
</div>
<!-- ELSE -->
<div class="alert alert-info">
[[modules:chat.no-messages]]
</div>
<!-- ENDIF roomId -->
<div class="col-md-8 hidden-sm hidden-xs" component="chat/main-wrapper">
<!-- IMPORT partials/chats/message-window.tpl -->
</div>
</div>

@ -10,7 +10,7 @@
<p>{error}</p>
</div>
<form class="form-horizontal" role="form" method="post" target="login" id="login-form">
<form class="form-horizontal" role="form" method="post" id="login-form">
<div class="form-group">
<label for="username" class="col-lg-2 control-label">{allowLoginWith}</label>
<div class="col-lg-10">
@ -32,6 +32,8 @@
</div>
</div>
</div>
<input type="hidden" name="_csrf" value="{config.csrf_token}" />
<input type="hidden" name="noscript" id="noscript" value="true" />
<div class="form-group">
<div class="col-lg-offset-2 col-lg-10">
<button class="btn btn-primary btn-lg btn-block" id="login" type="submit">[[global:login]]</button>

@ -0,0 +1,32 @@
<!-- IF roomId -->
<div component="chat/messages" class="expanded-chat" data-roomid="{roomId}">
<button type="button" class="close" data-action="pop-out"><span aria-hidden="true"><i class="fa fa-compress"></i></span><span class="sr-only">[[modules:chat.pop-out]]</span></button>
<button class="close controlsToggle" component="expanded-chat/controlsToggle"><i class="fa fa-gear"></i></button>
<div class="controls hide" component="expanded-chat/controls">
<!-- IF showUserInput -->
<div class="users-tag-container">
<input class="users-tag-input" type="text" class="form-control" placeholder="[[modules:chat.add-users-to-room]]" tabindex="4"/>
</div>
<!-- ENDIF showUserInput -->
<input class="form-control" component="chat/room/name" value="{roomName}" <!-- IF !isOwner -->disabled<!-- ENDIF !isOwner -->/>
<hr />
</div>
<ul class="chat-content">
<!-- IMPORT partials/chats/messages.tpl -->
</ul>
<div class="input-group">
<textarea component="chat/input" placeholder="[[modules:chat.placeholder]]" class="form-control chat-input mousetrap" rows="1" <!-- IF !canReply -->readonly<!-- ENDIF !canReply -->></textarea>
<span class="input-group-btn">
<button class="btn btn-primary" type="button" data-action="send" <!-- IF !canReply -->disabled<!-- ENDIF !canReply -->>[[modules:chat.send]]</button>
</span>
</div>
<span component="chat/message/length">0</span>/<span>{maximumChatMessageLength}</span>
</div>
<!-- ELSE -->
<div class="alert alert-info">
[[modules:chat.no-messages]]
</div>
<!-- ENDIF roomId -->

@ -26,7 +26,7 @@
<ul id="logged-in-menu" class="nav navbar-nav navbar-right">
<li class="notifications dropdown text-center hidden-xs" component="notifications">
<a href="#" title="[[global:header.notifications]]" class="dropdown-toggle" data-toggle="dropdown" id="notif_dropdown">
<a href="{relative_path}/notifications" title="[[global:header.notifications]]" class="dropdown-toggle" data-toggle="dropdown" id="notif_dropdown" data-ajaxify="false" role="button">
<i component="notifications/icon" class="fa fa-fw fa-bell-o" data-content="0"></i>
</a>
<ul class="dropdown-menu" aria-labelledby="notif_dropdown">
@ -44,7 +44,7 @@
<!-- IF !config.disableChat -->
<li class="chats dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" title="[[global:header.chats]]" id="chat_dropdown" component="chat/dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="{relative_path}/user/{user.userslug}/chats" title="[[global:header.chats]]" id="chat_dropdown" component="chat/dropdown" data-ajaxify="false" role="button">
<i component="chat/icon" class="fa fa-comment-o fa-fw"></i> <span class="visible-xs-inline">[[global:header.chats]]</span>
</a>
<ul class="dropdown-menu" aria-labelledby="chat_dropdown">
@ -62,11 +62,12 @@
<!-- ENDIF !config.disableChat -->
<li id="user_label" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" id="user_dropdown" title="[[global:header.profile]]">
<label for="user-control-list-check" class="dropdown-toggle" data-toggle="dropdown" id="user_dropdown" title="[[global:header.profile]]" role="button">
<img component="header/userpicture" src="{user.picture}" alt="{user.username}"<!-- IF !user.picture --> style="display: none;"<!-- ENDIF !user.picture --> />
<div component="header/usericon" class="user-icon" style="background-color: {user.icon:bgColor};<!-- IF user.picture --> display: none;"<!-- ENDIF user.picture -->">{user.icon:text}</div>
<span id="user-header-name" class="visible-xs-inline">{user.username}</span>
</a>
</label>
<input type="checkbox" class="hidden" id="user-control-list-check" aria-hidden="true">
<ul id="user-control-list" component="header/usercontrol" class="dropdown-menu" aria-labelledby="user_dropdown">
<li>
<a component="header/profilelink" href="{relative_path}/user/{user.userslug}">
@ -123,7 +124,13 @@
<!-- ENDIF showModMenu -->
<li role="presentation" class="divider"></li>
<li component="user/logout">
<a href="#"><i class="fa fa-fw fa-sign-out"></i><span> [[global:logout]]</span></a>
<form method="post" action="{relative_path}/logout">
<input type="hidden" name="_csrf" value="{config.csrf_token}">
<input type="hidden" name="noscript" value="true">
<button type="submit" class="btn btn-link">
<i class="fa fa-fw fa-sign-out"></i><span> [[global:logout]]</span>
</button>
</form>
</li>
</ul>
</li>

@ -1,7 +1,7 @@
<noscript>
<div class="alert alert-danger">
<p>
Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in <strong>read-only mode</strong>.
Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you may not be able to execute some actions.
</p>
<p>
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).

@ -10,9 +10,13 @@
<i component="user/status" class="fa fa-circle status {loggedInUser.status}" title="[[global:{loggedInUser.status}]]"></i>
</a>
</div>
<div class="quickreply-message">
<textarea component="topic/quickreply/text" class="form-control" rows="5"></textarea>
</div>
<button component="topic/quickreply/button" class="btn btn-primary pull-right">Post quick reply</button>
<form method="post" action="{config.relative_path}/compose">
<input type="hidden" name="tid" value="{tid}" />
<input type="hidden" name="_csrf" value="{config.csrf_token}" />
<div class="quickreply-message">
<textarea name="content" component="topic/quickreply/text" class="form-control" rows="5"></textarea>
</div>
<button type="submit" component="topic/quickreply/button" class="btn btn-primary pull-right">Post quick reply</button>
</form>
</div>
<!-- ENDIF loggedIn -->

@ -1,5 +1,5 @@
<div component="topic/reply/container" class="btn-group action-bar <!-- IF !privileges.topics:reply -->hidden<!-- ENDIF !privileges.topics:reply -->">
<button class="btn btn-primary" component="topic/reply">[[topic:reply]]</button>
<a href="{config.relative_path}/compose?tid={tid}&title={title}" class="btn btn-primary" component="topic/reply" data-ajaxify="false" role="button">[[topic:reply]]</a>
<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>

@ -56,6 +56,8 @@
</div>
<input id="referrer" type="hidden" name="referrer" value="" />
<input id="token" type="hidden" name="token" value="" />
<input id="noscript" type="hidden" name="noscript" value="true" />
<input type="hidden" name="_csrf" value="{config.csrf_token}" />
</form>
</div>
</div>

Loading…
Cancel
Save