Merge remote-tracking branch 'origin/master' into socketAL

v1.18.x
Julian Lam 11 years ago
commit 5a589c885a

@ -89,6 +89,12 @@ define(['uploader'], function(uploader) {
uploader.hideAlerts();
});
$('#settings-tab a').click(function (e) {
e.preventDefault();
$(this).tab('show');
return false;
});
};
Settings.remove = function(key) {

@ -250,18 +250,9 @@
});
function updateUnreadCount(count) {
var badge = $('#numUnreadBadge');
badge.html(count > 20 ? '20+' : count);
if (count > 0) {
badge
.removeClass('badge-inverse')
.addClass('badge-important');
} else {
badge
.removeClass('badge-important')
.addClass('badge-inverse');
}
$('#unread-count').toggleClass('unread-count', count > 0);
$('#unread-count').attr('data-content', count > 20 ? '20+' : count);
}
socket.on('event:unread.updateCount', updateUnreadCount);

@ -996,13 +996,13 @@ define(['composer'], function(composer) {
return;
}
var container = $(document.body),
var container = $(window),
scrollTo = $('#post_anchor_' + pid),
tid = $('#post-container').attr('data-tid');
function animateScroll() {
$('body,html').animate({
scrollTop: scrollTo.offset().top - container.offset().top + container.scrollTop() - $('#header-menu').height()
$('window,html').animate({
scrollTop: scrollTo.offset().top + container.scrollTop() - $('#header-menu').height()
}, 400);
}

@ -58,6 +58,7 @@ define(['taskbar', 'string'], function(taskbar, S) {
chatModal.attr('id', 'chat-modal-' + touid);
chatModal.attr('UUID', uuid);
chatModal.css("position", "fixed");
chatModal.appendTo($('body'));
chatModal.draggable({
start:function() {
@ -96,9 +97,10 @@ define(['taskbar', 'string'], function(taskbar, S) {
}
module.center = function(chatModal) {
chatModal.css("position", "fixed");
chatModal.css("left", Math.max(0, (($(window).width() - $(chatModal).outerWidth()) / 2) + $(window).scrollLeft()) + "px");
chatModal.css("top", "0px");
chatModal.css("zIndex", 2000);
chatModal.find('#chat-message-input').focus();
return chatModal;
}
@ -109,7 +111,7 @@ define(['taskbar', 'string'], function(taskbar, S) {
checkOnlineStatus(chatModal);
taskbar.updateActive(uuid);
scrollToBottom(chatModal.find('#chat-content'));
chatModal.find('#chat-message-input').focus();
module.center(chatModal);
}
module.minimize = function(uuid) {
@ -163,9 +165,11 @@ define(['taskbar', 'string'], function(taskbar, S) {
};
function scrollToBottom(chatContent) {
chatContent.scrollTop(
chatContent[0].scrollHeight - chatContent.height()
);
if(chatContent[0]) {
chatContent.scrollTop(
chatContent[0].scrollHeight - chatContent.height()
);
}
}
module.toggleNew = function(uuid, state) {

@ -1,137 +1,148 @@
<h1><i class="fa fa-cogs"></i> Settings</h1>
<hr />
<h3>General Settings</h3>
<div class="alert alert-warning">
<form>
<label>Site Title</label>
<input class="form-control" type="text" placeholder="Your Community Name" data-field="title" /><br />
<label>Site Description</label>
<input type="text" class="form-control" placeholder="A short description about your community" data-field="description" /><br />
<label>Site Keywords</label>
<input type="text" class="form-control" placeholder="Keywords describing your community, comma-seperated" data-field="keywords" /><br />
<label>Site Logo</label>
<input id="logoUrl" type="text" class="form-control" placeholder="Path to a logo to display on forum header" data-field="brand:logo" /><br />
<input id="uploadLogoBtn" type="button" class="btn btn-default" value="Upload Logo"></input> <br />
<label>Imgur Client ID</label>
<input type="text" class="form-control" placeholder="Imgur ClientID for image uploads" data-field="imgurClientID" /><br />
<label>Maximum User Image Size</label>
<input type="text" class="form-control" placeholder="Maximum size of uploaded user images in kilobytes" data-field="maximumProfileImageSize" /><br />
<label>Favicon</label><br />
<input id="faviconUrl" type="text" class="form-control" placeholder="favicon.ico" data-field="brand:favicon" /><br />
<input id="uploadFaviconBtn" type="button" class="btn btn-default" value="Upload Favicon"></input> <br />
</form>
</div>
<ul id="settings-tab" class="nav nav-tabs">
<li class="active"><a href="#general" data-toggle="tab">General</a></li>
<li><a href="#privilege-thresholds" data-toggle="tab">Privilege Thresholds</a></li>
<li><a href="#email" data-toggle="tab">Email</a></li>
<li><a href="#user" data-toggle="tab">User</a></li>
<li><a href="#post" data-toggle="tab">Post</a></li>
<li><a href="#web-crawler" data-toggle="tab">Web Crawler</a></li>
</ul>
<form>
<h3>Privilege Thresholds</h3>
<div class="alert alert-warning">
<p>Use <strong>privilege thresholds</strong> to manage how much reputation a user must gain to receive moderator access.</p><br />
<strong>Manage Thread</strong><br /> <input type="text" class="form-control" value="1000" data-field="privileges:manage_topic"><br />
<strong>Manage Content</strong><br /> <input type="text" class="form-control" value="1000" data-field="privileges:manage_content"><br />
<div class="checkbox">
<label>
<input type="checkbox" data-field="privileges:disabled"> <strong>Disable Privilege Threshold System</strong>
</label>
<div class="tab-content">
<div class="tab-pane active" id="general">
<div class="alert alert-warning">
<form>
<label>Site Title</label>
<input class="form-control" type="text" placeholder="Your Community Name" data-field="title" /><br />
<label>Site Description</label>
<input type="text" class="form-control" placeholder="A short description about your community" data-field="description" /><br />
<label>Site Keywords</label>
<input type="text" class="form-control" placeholder="Keywords describing your community, comma-seperated" data-field="keywords" /><br />
<label>Site Logo</label>
<input id="logoUrl" type="text" class="form-control" placeholder="Path to a logo to display on forum header" data-field="brand:logo" /><br />
<input id="uploadLogoBtn" type="button" class="btn btn-default" value="Upload Logo"></input> <br /> <br/>
<label>Imgur Client ID</label>
<input type="text" class="form-control" placeholder="Imgur ClientID for image uploads" data-field="imgurClientID" /><br />
<label>Favicon</label><br />
<input id="faviconUrl" type="text" class="form-control" placeholder="favicon.ico" data-field="brand:favicon" /><br />
<input id="uploadFaviconBtn" type="button" class="btn btn-default" value="Upload Favicon"></input> <br />
</form>
</div>
</div>
</form>
<form>
<h3>Email Settings</h3>
<div class="alert alert-warning">
<div>
<p>
Please ensure that you have installed a third-party emailer (e.g. PostageApp, Mailgun, Mandrill, SendGrid, etc), otherwise emails will not be sent by NodeBB
</p>
<p>
<strong>Email Address</strong><br />
The following email address refers to the email that the recipient will see in the "From" and "Reply To" fields.
</p>
<input type="text" class="form-control input-lg" data-field="email:from" placeholder="info@example.org" /><br />
</div>
<div class="tab-pane" id="privilege-thresholds">
<form>
<div class="alert alert-warning">
<p>Use <strong>privilege thresholds</strong> to manage how much reputation a user must gain to receive moderator access.</p><br />
<strong>Manage Thread</strong><br /> <input type="text" class="form-control" value="1000" data-field="privileges:manage_topic"><br />
<strong>Manage Content</strong><br /> <input type="text" class="form-control" value="1000" data-field="privileges:manage_content"><br />
<div class="checkbox">
<label>
<input type="checkbox" data-field="privileges:disabled"> <strong>Disable Privilege Threshold System</strong>
</label>
</div>
</div>
</form>
</div>
</form>
<form>
<h3>Profile Settings</h3>
<div class="alert alert-warning">
<div class="checkbox">
<label>
<input type="checkbox" data-field="profile:convertProfileImageToPNG"> <strong>Convert profile image uploads to PNG</strong>
</label>
</div>
<div class="tab-pane" id="email">
<form>
<div class="alert alert-warning">
<div>
<p>
Please ensure that you have installed a third-party emailer (e.g. PostageApp, Mailgun, Mandrill, SendGrid, etc), otherwise emails will not be sent by NodeBB
</p>
<p>
<strong>Email Address</strong><br />
The following email address refers to the email that the recipient will see in the "From" and "Reply To" fields.
</p>
<input type="text" class="form-control input-lg" data-field="email:from" placeholder="info@example.org" /><br />
</div>
</div>
</form>
</div>
</form>
<form>
<h3>User Settings</h3>
<div class="alert alert-warning">
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowRegistration" checked> <strong>Allow registration</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="disableSignatures"> <strong>Disable signatures</strong>
</label>
</div>
<strong>Minimum Username Length</strong><br />
<input type="text" class="form-control" value="2" data-field="minimumUsernameLength"><br />
<strong>Maximum Username Length</strong><br />
<input type="text" class="form-control" value="16" data-field="maximumUsernameLength"><br />
<strong>Minimum Password Length</strong><br />
<input type="text" class="form-control" value="6" data-field="minimumPasswordLength"><br />
<strong>Maximum Signature Length</strong><br />
<input type="text" class="form-control" value="255" data-field="maximumSignatureLength"><br />
<div class="tab-pane" id="user">
<form>
<div class="alert alert-warning">
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowRegistration" checked> <strong>Allow registration</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="disableSignatures"> <strong>Disable signatures</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="profile:convertProfileImageToPNG"> <strong>Convert profile image uploads to PNG</strong>
</label>
</div>
<label>Maximum User Image File Size</label>
<input type="text" class="form-control" placeholder="Maximum size of uploaded user images in kilobytes" data-field="maximumProfileImageSize" /><br />
<strong>Minimum Username Length</strong><br />
<input type="text" class="form-control" value="2" data-field="minimumUsernameLength"><br />
<strong>Maximum Username Length</strong><br />
<input type="text" class="form-control" value="16" data-field="maximumUsernameLength"><br />
<strong>Minimum Password Length</strong><br />
<input type="text" class="form-control" value="6" data-field="minimumPasswordLength"><br />
<strong>Maximum Signature Length</strong><br />
<input type="text" class="form-control" value="255" data-field="maximumSignatureLength"><br />
</div>
</form>
</div>
</form>
<form>
<h3>Post Settings</h3>
<div class="alert alert-warning">
<strong>Post Delay</strong><br /> <input type="text" class="form-control" value="10000" data-field="postDelay"><br />
<strong>Minimum Title Length</strong><br /> <input type="text" class="form-control" value="3" data-field="minimumTitleLength"><br />
<strong>Maximum Title Length</strong><br /> <input type="text" class="form-control" value="255" data-field="maximumTitleLength"><br />
<strong>Minimum Post Length</strong><br /> <input type="text" class="form-control" value="8" data-field="minimumPostLength"><br />
<strong>Chat Messages To Display</strong><br /> <input type="text" class="form-control" value="50" data-field="chatMessagesToDisplay"><br />
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowGuestPosting"> <strong>Allow guests to post without logging in</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowGuestSearching"> <strong>Allow guests to search without logging in</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="useOutgoingLinksPage"> <strong>Use Outgoing Links Warning Page</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="disableSocialButtons"> <strong>Disable social buttons</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowFileUploads"> <strong>Allow users to upload regular files</strong>
</label>
</div>
<strong>Maximum File Size</strong><br /> <input type="text" class="form-control" value="2048" data-field="maximumFileSize"><br />
<div class="tab-pane" id="post">
<form>
<div class="alert alert-warning">
<strong>Post Delay</strong><br /> <input type="text" class="form-control" value="10000" data-field="postDelay"><br />
<strong>Minimum Title Length</strong><br /> <input type="text" class="form-control" value="3" data-field="minimumTitleLength"><br />
<strong>Maximum Title Length</strong><br /> <input type="text" class="form-control" value="255" data-field="maximumTitleLength"><br />
<strong>Minimum Post Length</strong><br /> <input type="text" class="form-control" value="8" data-field="minimumPostLength"><br />
<strong>Chat Messages To Display</strong><br /> <input type="text" class="form-control" value="50" data-field="chatMessagesToDisplay"><br />
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowGuestPosting"> <strong>Allow guests to post without logging in</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowGuestSearching"> <strong>Allow guests to search without logging in</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="useOutgoingLinksPage"> <strong>Use Outgoing Links Warning Page</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="disableSocialButtons"> <strong>Disable social buttons</strong>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" data-field="allowFileUploads"> <strong>Allow users to upload regular files</strong>
</label>
</div>
<strong>Maximum File Size</strong><br /> <input type="text" class="form-control" value="2048" data-field="maximumFileSize"><br />
</div>
</form>
</div>
</form>
<form>
<h3>Web Crawler Settings</h3>
<div class="alert alert-warning">
<strong>Custom Robots.txt <small>Leave blank for default</small></strong><br />
<textarea class="form-control" data-field="robots.txt"></textarea>
<div class="tab-pane" id="web-crawler">
<form>
<div class="alert alert-warning">
<strong>Custom Robots.txt <small>Leave blank for default</small></strong><br />
<textarea class="form-control" data-field="robots.txt"></textarea>
</div>
</form>
</div>
</form>
</div>
<button class="btn btn-lg btn-primary" id="save">Save</button>

@ -58,7 +58,7 @@
<a href="{relative_path}/recent"><i class="fa fa-clock-o" title="[[global:header.recent]]"></i></a>
</li>
<li class="nodebb-loggedin">
<a href="{relative_path}/unread"><i class="fa fa-envelope" title="[[global:header.unread]]"> <span id="numUnreadBadge" class="">0</span></i></a>
<a href="{relative_path}/unread"><i id="unread-count" class="fa fa-inbox" data-content="0" title="[[global:header.unread]]"></i></a>
</li>
<li>
<a href="{relative_path}/users"><i class="fa fa-users" title="[[global:header.users]]"></i></a>

Loading…
Cancel
Save