More base setup and integration with AdminLTE
This commit is contained in:
49
public/mt/assets/pages/scripts/bs-carousel.js
Normal file
49
public/mt/assets/pages/scripts/bs-carousel.js
Normal file
@@ -0,0 +1,49 @@
|
||||
var BsCarousel = function () {
|
||||
// Carousel interval
|
||||
// $('.carousel').carousel({
|
||||
// interval: 1000
|
||||
// });
|
||||
|
||||
// smart height detection for all major screens
|
||||
// if (Layout.getViewPort().width > 1600) {
|
||||
// height = $(window).height() - $('.subscribe').outerHeight(); // full height for high resolution
|
||||
// } else if (Layout.getViewPort().height > height) {
|
||||
// height = Layout.getViewPort().height;
|
||||
// }
|
||||
|
||||
(function( $ ) {
|
||||
//Function to animate slider captions
|
||||
function doAnimations( elems ) {
|
||||
//Cache the animationend event in a variable
|
||||
var animEndEv = 'webkitAnimationEnd animationend';
|
||||
|
||||
elems.each(function () {
|
||||
var $this = $(this),
|
||||
$animationType = $this.data('animation');
|
||||
$this.addClass($animationType).one(animEndEv, function () {
|
||||
$this.removeClass($animationType);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//Variables on page load
|
||||
var $myCarousel = $('#carousel-example-generic'),
|
||||
$firstAnimatingElems = $myCarousel.find('.item:first').find("[data-animation ^= 'animated']");
|
||||
|
||||
//Initialize carousel
|
||||
$myCarousel.carousel();
|
||||
|
||||
//Animate captions in first slide on page load
|
||||
doAnimations($firstAnimatingElems);
|
||||
|
||||
//Pause carousel
|
||||
$myCarousel.carousel('pause');
|
||||
|
||||
//Other slides to be animated on carousel slide event
|
||||
$myCarousel.on('slide.bs.carousel', function (e) {
|
||||
var $animatingElems = $(e.relatedTarget).find("[data-animation ^= 'animated']");
|
||||
doAnimations($animatingElems);
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
}();
|
22
public/mt/assets/pages/scripts/checkout.js
Normal file
22
public/mt/assets/pages/scripts/checkout.js
Normal file
@@ -0,0 +1,22 @@
|
||||
var Checkout = function () {
|
||||
|
||||
return {
|
||||
init: function () {
|
||||
|
||||
$('#checkout').on('change', '#checkout-content input[name="account"]', function() {
|
||||
|
||||
var title = '';
|
||||
|
||||
if ($(this).attr('value') == 'register') {
|
||||
title = 'Step 2: Account & Billing Details';
|
||||
} else {
|
||||
title = 'Step 2: Billing Details';
|
||||
}
|
||||
|
||||
$('#payment-address .accordion-toggle').html(title);
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
}();
|
27
public/mt/assets/pages/scripts/contact-us.js
Normal file
27
public/mt/assets/pages/scripts/contact-us.js
Normal file
@@ -0,0 +1,27 @@
|
||||
var ContactUs = function () {
|
||||
|
||||
return {
|
||||
//main function to initiate the module
|
||||
init: function () {
|
||||
var map;
|
||||
$(document).ready(function(){
|
||||
map = new GMaps({
|
||||
div: '#map',
|
||||
lat: -13.004333,
|
||||
lng: -38.494333,
|
||||
});
|
||||
var marker = map.addMarker({
|
||||
lat: -13.004333,
|
||||
lng: -38.494333,
|
||||
title: 'Loop, Inc.',
|
||||
infoWindow: {
|
||||
content: "<b>Loop, Inc.</b> 795 Park Ave, Suite 120<br>San Francisco, CA 94107"
|
||||
}
|
||||
});
|
||||
|
||||
marker.infoWindow.open(map, marker);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
}();
|
12
public/mt/assets/pages/scripts/portfolio.js
Normal file
12
public/mt/assets/pages/scripts/portfolio.js
Normal file
@@ -0,0 +1,12 @@
|
||||
var Portfolio = function () {
|
||||
|
||||
|
||||
return {
|
||||
//main function to initiate the module
|
||||
init: function () {
|
||||
$('.mix-grid').mixitup();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}();
|
Reference in New Issue
Block a user