Merged PetitTetonApps with the website now that the deployment server always uses SSL. Used the Apps more recent implementation of NodeJS/Express.

This commit is contained in:
Wynne Crisman
2016-05-31 14:37:42 -07:00
parent a98d7d3a5f
commit 78be012a14
192 changed files with 58459 additions and 19 deletions

65
public/admin/js/main.js Normal file
View File

@@ -0,0 +1,65 @@
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($) {
var layoutManager = new LayoutManager("main-view");
layoutManager.defaultUrl = '#!/Home';
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);
};
*/
});
//Override the jQuery.html(html) function to strip any <runonce>..</runonce> scripts and execute them.
(function(){
var htmlOriginal = jQuery.fn.html;
jQuery.fn.html = function(html) {
var data = brainstormFramework.extractViewData(html);
htmlOriginal.apply(this, [data.view]);
if(data.script && data.script.length > 0) {
try {
eval(data.script);
} catch(err) {
alert(err);
}
}
}
})();