Skip to content

Instantly share code, notes, and snippets.

@demircancelebi
Created December 1, 2013 16:32
Show Gist options
  • Save demircancelebi/7736369 to your computer and use it in GitHub Desktop.
Save demircancelebi/7736369 to your computer and use it in GitHub Desktop.
/*
M2WA 0.1.3 (Metrekare Web Application)
November 2013
@author Batuhan Icoz <[email protected]>
@author Demircan Celebi <[email protected]>
@license Proprietary. Check README.md
@component search
@desc This the main file for this component, this has router and the initializer
*/
(function() {
define(["m2wa", "backbone", "communicator", "./controller", "./router", "jquery", "jquery.flexslider"], function(m2wa, backbone, communicator, controller, router, $) {
"use strict";
var listings = m2wa.module("listings");
communicator.events.on("listings:views:details:donerender", function(){
console.log("dsfsd")
$(function() {
$('.carousel').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
itemWidth: 120,
itemMargin: 5,
asNavFor: '.slider'
});
$('.slider').flexslider({
animation: "slide",
controlNav: false,
animationLoop: false,
slideshow: false,
sync: ".carousel"
});
$('.listing_details-fullname, .listing_details-email, .listing_details-phone, .listing_details-captcha').hide();
$('.listing_details-message, listing_details-contact-button').on('click', function (e) {
e.preventDefault();
$('.listing_details-fullname, .listing_details-email, .listing_details-phone, .listing_details-captcha').fadeIn();
});
$('.listing_details-panel').affix({
offset: {
top: 300
, bottom: function () {
return (this.bottom = $('.bs-footer').outerHeight(true))
}
}
});
});
});
listings.addInitializer(function() {
new router({
controller: controller
});
});
return listings;
});
}).call(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment