2025-09-13 12:21:19 -07:00
|
|
|
let slideShowIndex = 0;
|
|
|
|
|
let slideShowSlides = []; //An array of arrays - each sub-array contains the image path, title, description, width, and height.//
|
|
|
|
|
let scrollerScrollTime = 3500;
|
|
|
|
|
let scrollerInitialDelay = 5000;
|
|
|
|
|
let scrollerTransitionTime = 1000;
|
2015-10-25 15:20:42 -07:00
|
|
|
|
|
|
|
|
window.status="";
|
|
|
|
|
|
|
|
|
|
//Handle the document ready event which is where any initialization code goes.
|
|
|
|
|
$(document).ready(function($) {
|
2025-09-13 12:21:19 -07:00
|
|
|
let contentDiv = $('#content');
|
|
|
|
|
//let viewName = "main-view";
|
|
|
|
|
//let view = $('[bs-view="' + viewName + '"]');
|
2016-05-06 18:22:34 -07:00
|
|
|
//if(!view || view.length != 1) {
|
2016-05-06 18:17:22 -07:00
|
|
|
// throw "View with name: '" + viewName + "' not found";
|
|
|
|
|
//}
|
2025-09-13 12:21:19 -07:00
|
|
|
//let layoutManager = new LayoutManager("main-view");
|
|
|
|
|
let layoutManager = new LayoutManager(contentDiv);
|
|
|
|
|
|
2016-05-06 19:18:41 -07:00
|
|
|
//layoutManager.defaultUrl = '!/holidays';
|
2020-05-07 15:09:06 -07:00
|
|
|
layoutManager.defaultUrl = '!/home';
|
2015-10-25 15:20:42 -07:00
|
|
|
layoutManager.pageClassFades = [
|
|
|
|
|
{cls: 'full', fadeIn: null, fadeOut: null}
|
|
|
|
|
];
|
|
|
|
|
layoutManager.viewMetadataDefaults = {classes: 'full'};
|
2025-09-13 11:48:21 -07:00
|
|
|
// layoutManager.viewMetadata = {
|
|
|
|
|
// weddings: {
|
2025-09-13 12:21:19 -07:00
|
|
|
// load: "element.data('scroller', new ItemScroller($('div.scrollViewport'), 142, scrollerScrollTime, scrollerInitialDelay, scrollerTransitionTime, false));",
|
2025-09-13 11:48:21 -07:00
|
|
|
// unload:"element.data('scroller').release(); element.data('scroller', undefined);"
|
|
|
|
|
// },
|
|
|
|
|
// home: {
|
|
|
|
|
// load: "$('#head').addClass('tall')",
|
|
|
|
|
// unload: "$('#head').removeClass('tall')"
|
|
|
|
|
// //load: "$('#head, #links').css({display: 'none'})",
|
|
|
|
|
// //unload: "$('#head, #links').css({display: 'block'})"
|
|
|
|
|
// }
|
|
|
|
|
// };
|
|
|
|
|
|
2015-10-25 15:20:42 -07:00
|
|
|
layoutManager.viewMetadata = {
|
2025-09-13 11:48:21 -07:00
|
|
|
// home: {
|
|
|
|
|
// load: "$('#head').addClass('tall');",
|
|
|
|
|
// unload: "$('#head').removeClass('tall')"
|
|
|
|
|
// },
|
2025-09-13 12:21:19 -07:00
|
|
|
// farm: {
|
|
|
|
|
// load: "$('#submenu-home').removeClass('hidden')",
|
|
|
|
|
// unload: "$('#submenu-home').addClass('hidden')"
|
|
|
|
|
// },
|
|
|
|
|
// food: {
|
|
|
|
|
// load: "$('#submenu-food').removeClass('hidden')",
|
|
|
|
|
// unload: "$('#submenu-food').addClass('hidden')"
|
|
|
|
|
// },
|
|
|
|
|
// canned: {
|
|
|
|
|
// load: "$('#submenu-food').removeClass('hidden')",
|
|
|
|
|
// unload: "$('#submenu-food').addClass('hidden')"
|
|
|
|
|
// },
|
|
|
|
|
// produce: {
|
|
|
|
|
// load: "$('#submenu-food').removeClass('hidden')",
|
|
|
|
|
// unload: "$('#submenu-food').addClass('hidden')"
|
|
|
|
|
// }
|
2015-10-25 15:20:42 -07:00
|
|
|
};
|
2025-09-13 12:21:19 -07:00
|
|
|
|
2015-10-25 15:20:42 -07:00
|
|
|
//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;
|
|
|
|
|
}
|
2025-09-13 12:21:19 -07:00
|
|
|
|
2015-10-25 15:20:42 -07:00
|
|
|
layoutManager.show(url);
|
|
|
|
|
});
|
|
|
|
|
/*
|
2025-09-13 12:21:19 -07:00
|
|
|
let websocket = new WebSocket('ws://petitteton.com/');
|
|
|
|
|
|
2015-10-25 15:20:42 -07:00
|
|
|
websocket.onopen = function() {
|
|
|
|
|
websocket.ping();
|
|
|
|
|
};
|
|
|
|
|
websocket.onerror = function(error) {
|
|
|
|
|
console.log('Websocket error: ' + error);
|
|
|
|
|
};
|
|
|
|
|
websocket.onmessage = function(message) {
|
|
|
|
|
console.log('Server: ' + message);
|
|
|
|
|
};
|
|
|
|
|
*/
|
2025-09-13 12:21:19 -07:00
|
|
|
});
|