2015-10-25 15:20:42 -07:00
|
|
|
var slideShowIndex = 0;
|
|
|
|
|
var slideShowSlides = []; //An array of arrays - each sub-array contains the image path, title, description, width, and height.//
|
|
|
|
|
var scrollerScrollTime = 3500;
|
|
|
|
|
var scrollerInitialDelay = 5000;
|
|
|
|
|
var scrollerTransitionTime = 1000;
|
|
|
|
|
|
|
|
|
|
window.status="";
|
|
|
|
|
|
|
|
|
|
//Handle the document ready event which is where any initialization code goes.
|
|
|
|
|
$(document).ready(function($) {
|
2016-05-06 18:13:10 -07:00
|
|
|
var content = $('#content');
|
|
|
|
|
var viewName = "main-view";
|
|
|
|
|
var view = $('[bs-view="' + viewName + '"]');
|
|
|
|
|
if(!content || content.length != 1) {
|
|
|
|
|
throw "Content div not found";
|
|
|
|
|
}
|
|
|
|
|
else if(!view || view.length != 1) {
|
|
|
|
|
throw "View with name: '" + viewName + "' not found";
|
|
|
|
|
}
|
|
|
|
|
else {
|
2015-10-25 15:20:42 -07:00
|
|
|
var layoutManager = new LayoutManager("main-view");
|
|
|
|
|
|
2016-02-04 13:29:55 -08:00
|
|
|
//layoutManager.defaultUrl = '#!/holidays';
|
|
|
|
|
layoutManager.defaultUrl = '#!/Farm';
|
2015-10-25 15:20:42 -07:00
|
|
|
layoutManager.pageClassFades = [
|
|
|
|
|
{cls: 'full', fadeIn: null, fadeOut: null}
|
|
|
|
|
];
|
|
|
|
|
layoutManager.viewMetadataDefaults = {classes: 'full'};
|
|
|
|
|
layoutManager.viewMetadata = {
|
|
|
|
|
weddings: {
|
|
|
|
|
load: "element.data('scroller', new ItemScroller($('div.scrollViewport'), 142, scrollerScrollTime, scrollerInitialDelay, scrollerTransitionTime, false));",
|
|
|
|
|
unload:"element.data('scroller').release(); element.data('scroller', undefined);"
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//Associate a function with the history jquery addon that will load the url content after the history is updated.
|
|
|
|
|
$.history.init(function(url) {
|
|
|
|
|
if(!url || url.length == 0) {
|
|
|
|
|
url = layoutManager.defaultUrl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
layoutManager.show(url);
|
|
|
|
|
});
|
|
|
|
|
/*
|
|
|
|
|
var websocket = new WebSocket('ws://petitteton.com/');
|
|
|
|
|
|
|
|
|
|
websocket.onopen = function() {
|
|
|
|
|
websocket.ping();
|
|
|
|
|
};
|
|
|
|
|
websocket.onerror = function(error) {
|
|
|
|
|
console.log('Websocket error: ' + error);
|
|
|
|
|
};
|
|
|
|
|
websocket.onmessage = function(message) {
|
|
|
|
|
console.log('Server: ' + message);
|
|
|
|
|
};
|
|
|
|
|
*/
|
2016-05-06 18:13:10 -07:00
|
|
|
}
|
2015-10-25 15:20:42 -07:00
|
|
|
});
|