mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 23:45:45 +01:00
prevent ajaxify from working on links with "target" set. added rss button as well as social icons to category listing.
This commit is contained in:
@@ -38,7 +38,7 @@ var ajaxify = {};
|
|||||||
} else if (templates[url]) {
|
} else if (templates[url]) {
|
||||||
tpl_url = url;
|
tpl_url = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (templates.is_available(tpl_url) && !templates.force_refresh(tpl_url)) {
|
if (templates.is_available(tpl_url) && !templates.force_refresh(tpl_url)) {
|
||||||
if (quiet !== true) {
|
if (quiet !== true) {
|
||||||
window.history.pushState({
|
window.history.pushState({
|
||||||
@@ -75,6 +75,8 @@ var ajaxify = {};
|
|||||||
ajaxify.onclick = function(ev) {
|
ajaxify.onclick = function(ev) {
|
||||||
if (this.href == window.location.href + "#") return;
|
if (this.href == window.location.href + "#") return;
|
||||||
var url = this.href.replace(rootUrl +'/', '');
|
var url = this.href.replace(rootUrl +'/', '');
|
||||||
|
|
||||||
|
if (this.target !== '') return;
|
||||||
|
|
||||||
if (!ev.ctrlKey && ev.which === 1) {
|
if (!ev.ctrlKey && ev.which === 1) {
|
||||||
if (ajaxify.go(url)) {
|
if (ajaxify.go(url)) {
|
||||||
|
|||||||
@@ -47,6 +47,14 @@
|
|||||||
<button id="new_post" class="btn btn-primary btn-large {show_category_features}">New Topic</button>
|
<button id="new_post" class="btn btn-primary btn-large {show_category_features}">New Topic</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="span3 {show_category_features} category-sidebar">
|
<div class="span3 {show_category_features} category-sidebar">
|
||||||
|
<div class="sidebar-block img-polaroid">
|
||||||
|
<div class="block-header">
|
||||||
|
<a target="_blank" href="../{category_id}.rss"><i class="icon-rss-sign icon-2x"></i></a>
|
||||||
|
<i class="icon-facebook-sign icon-2x"></i>
|
||||||
|
<i class="icon-twitter-sign icon-2x"></i>
|
||||||
|
<i class="icon-google-plus-sign icon-2x"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="sidebar-block img-polaroid">
|
<div class="sidebar-block img-polaroid">
|
||||||
<div class="block-header">
|
<div class="block-header">
|
||||||
Recent Replies
|
Recent Replies
|
||||||
|
|||||||
Reference in New Issue
Block a user