Commit 9d84ede2 authored by JC Brand's avatar JC Brand

Two website deps (jquery-easing & bootstrap) now managed by bower

parent 166b3bd0
......@@ -27,7 +27,9 @@
"requirejs-text": "~2.0.12",
"requirejs-tpl-jcbrand": "*",
"momentjs": "~2.6.0",
"jquery.browser": "~0.0.6"
"jquery.browser": "~0.0.6",
"jquery-easing-original": "~1.3.1",
"bootstrap": "~3.2.0"
},
"exportsOverride": {}
}
......@@ -16,10 +16,6 @@
<!--
<script src="builds/converse.min.js"></script>
-->
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script src="js/init.js"></script>
</head>
<body id="page-top" data-spy="scroll" data-target=".navbar-custom">
......@@ -223,6 +219,7 @@
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">try { var pageTracker = _gat._getTracker("UA-2128260-8"); pageTracker._trackPageview(); } catch(err) {}</script>
<script>
require(['converse'], function (converse) {
converse.initialize({
......
//jQuery to collapse the navbar on scroll
$(window).scroll(function() {
if ($(".navbar").offset().top > 50) {
$(".navbar-fixed-top").addClass("top-nav-collapse");
} else {
$(".navbar-fixed-top").removeClass("top-nav-collapse");
}
});
//jQuery for page scrolling feature - requires jQuery Easing plugin
$(function() {
$('.page-scroll a').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 700, 'easeInOutExpo');
event.preventDefault();
});
});
This diff is collapsed.
This diff is collapsed.
......@@ -4,6 +4,8 @@ config = {
"jquery": "components/jquery/dist/jquery",
"jquery.tinysort": "components/tinysort/src/jquery.tinysort",
"jquery.browser": "components/jquery.browser/dist/jquery.browser",
"jquery.easing": "components/jquery-easing-original/jquery.easing.1.3", // XXX: Only required for https://conversejs.org website
"bootstrap": "components/bootstrap/dist/js/bootstrap", // XXX: Only required for https://conversejs.org website
"locales": "locale/locales",
"underscore": "components/underscore/underscore",
"backbone": "components/backbone/backbone",
......@@ -59,6 +61,7 @@ config = {
exports: 'Backbone'
},
'underscore': { exports: '_' },
'bootstrap': { deps: ['jquery'] },
'crypto.aes': { deps: ['crypto.cipher-core'] },
'crypto.cipher-core': { deps: ['crypto.enc-base64', 'crypto.evpkdf'] },
'crypto.enc-base64': { deps: ['crypto.core'] },
......@@ -71,6 +74,7 @@ config = {
'crypto.sha256': { deps: ['crypto.core'] },
'jquery.tinysort': { deps: ['jquery'] },
'jquery.browser': { deps: ['jquery'] },
'jquery.easing': { deps: ['jquery'] },
'strophe': { deps: ['jquery'] },
'strophe.disco': { deps: ['strophe'] },
'strophe.muc': { deps: ['strophe', 'jquery'] },
......@@ -79,9 +83,32 @@ config = {
}
};
var initializeEasing = function () {
/* XXX: This function initializes jquery.easing for the https://conversejs.org
* website. This code is only useful in the context of the converse.js
* website and converse.js itself is not dependent on it.
*/
$(window).scroll(function() {
if ($(".navbar").offset().top > 50) {
$(".navbar-fixed-top").addClass("top-nav-collapse");
} else {
$(".navbar-fixed-top").removeClass("top-nav-collapse");
}
});
//jQuery for page scrolling feature - requires jQuery Easing plugin
$('.page-scroll a').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 700, 'easeInOutExpo');
event.preventDefault();
});
};
if (typeof(require) !== 'undefined') {
require.config(config);
require(["jquery", "converse"], function(require, $, converse) {
require(["jquery", "converse"], function($, converse) {
window.converse = converse;
initializeEasing(); // Only for https://conversejs.org website
});
}
......@@ -2,10 +2,12 @@ define("converse-dependencies", [
"otr",
"moment",
"locales",
"bootstrap",
"backbone.browserStorage",
"backbone.overview",
"jquery.tinysort",
"jquery.browser",
"jquery.easing",
"strophe",
"strophe.muc",
"strophe.roster",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment