mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
fixed an issue in bootstrap.js causing ctrl-click to not work. removed ctrl-click / middle click simulation code in ajaxify. am currently using unminified bootstrap TODO minifiy fixed version;
This commit is contained in:
@@ -205,8 +205,8 @@ footer.footer {
|
|||||||
.latest-post {
|
.latest-post {
|
||||||
float: right;
|
float: right;
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
margin-right: 30px;
|
margin-right: 0px;
|
||||||
width: 50%;
|
width: 40%;
|
||||||
|
|
||||||
.pull-right {
|
.pull-right {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -21,12 +21,11 @@ var ajaxify = {};
|
|||||||
|
|
||||||
|
|
||||||
window.onpopstate = function(event) {
|
window.onpopstate = function(event) {
|
||||||
|
// "quiet": If set to true, will not call pushState
|
||||||
if (event !== null && event.state && event.state.url !== undefined) ajaxify.go(event.state.url, null, null, true);
|
if (event !== null && event.state && event.state.url !== undefined) ajaxify.go(event.state.url, null, null, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
ajaxify.go = function(url, callback, template, quiet) {
|
ajaxify.go = function(url, callback, template, quiet) {
|
||||||
// "quiet": If set to true, will not call pushState
|
|
||||||
|
|
||||||
// leave room and join global
|
// leave room and join global
|
||||||
app.enter_room('global');
|
app.enter_room('global');
|
||||||
|
|
||||||
@@ -61,9 +60,6 @@ var ajaxify = {};
|
|||||||
jQuery('#content, #footer').fadeIn(200);
|
jQuery('#content, #footer').fadeIn(200);
|
||||||
}, url, template);
|
}, url, template);
|
||||||
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
document.location.href = url;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,26 +67,20 @@ var ajaxify = {};
|
|||||||
}
|
}
|
||||||
|
|
||||||
ajaxify.enable = function() {
|
ajaxify.enable = function() {
|
||||||
$('a').unbind('mouseup', ajaxify.onmouseup).bind('mouseup', ajaxify.onmouseup);
|
|
||||||
$('a').unbind('click', ajaxify.onclick).bind('click', ajaxify.onclick);
|
$('a').unbind('click', ajaxify.onclick).bind('click', ajaxify.onclick);
|
||||||
}
|
}
|
||||||
|
|
||||||
ajaxify.onmouseup = 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 (!ev.ctrlKey && ev.which === 1) {
|
if (!ev.ctrlKey && ev.which === 1) {
|
||||||
if (ajaxify.go(url)) ev.preventDefault();
|
if (ajaxify.go(url)) {
|
||||||
} else if ((ev.ctrlKey && ev.which === 1) || ev.which === 2) {
|
ev.preventDefault();
|
||||||
window.open(this.href, '_blank');
|
}
|
||||||
ev.preventDefault();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ajaxify.onclick = function(ev) {
|
|
||||||
ev.preventDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('document').ready(function() {
|
$('document').ready(function() {
|
||||||
if (!window.history || !window.history.pushState) return; // no ajaxification for old browsers
|
if (!window.history || !window.history.pushState) return; // no ajaxification for old browsers
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<link href="/vendor/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
|
<link href="/vendor/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
|
||||||
<link rel="stylesheet" href="/vendor/fontawesome/css/font-awesome.min.css">
|
<link rel="stylesheet" href="/vendor/fontawesome/css/font-awesome.min.css">
|
||||||
<script type="text/javascript" src="http://code.jquery.com/jquery.js"></script>
|
<script type="text/javascript" src="http://code.jquery.com/jquery.js"></script>
|
||||||
<script type="text/javascript" src="/vendor/bootstrap/js/bootstrap.min.js"></script>
|
<script type="text/javascript" src="/vendor/bootstrap/js/bootstrap.js"></script>
|
||||||
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
|
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
|
||||||
<script type="text/javascript" src="/src/app.js"></script>
|
<script type="text/javascript" src="/src/app.js"></script>
|
||||||
<script type="text/javascript" src="/src/templates.js"></script>
|
<script type="text/javascript" src="/src/templates.js"></script>
|
||||||
|
|||||||
2
public/vendor/bootstrap/js/bootstrap.js
vendored
2
public/vendor/bootstrap/js/bootstrap.js
vendored
@@ -788,7 +788,7 @@
|
|||||||
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
/* APPLY TO STANDARD DROPDOWN ELEMENTS
|
||||||
* =================================== */
|
* =================================== */
|
||||||
|
|
||||||
$(document)
|
$('.dropdown')
|
||||||
.on('click.dropdown.data-api', clearMenus)
|
.on('click.dropdown.data-api', clearMenus)
|
||||||
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
||||||
.on('click.dropdown-menu', function (e) { e.stopPropagation() })
|
.on('click.dropdown-menu', function (e) { e.stopPropagation() })
|
||||||
|
|||||||
Reference in New Issue
Block a user