// exponent Javascript Support Systems EXPONENT = {}; // for back-compat eXp = EXPONENT; // map certian php CONSTANTS to JS vars EXPONENT.LANG = "English - US"; EXPONENT.PATH_RELATIVE = "/home/"; EXPONENT.URL_FULL = "http://www.greenmeadowsconf.com/home/"; EXPONENT.BASE = "/home/gmc/public_html/home/"; EXPONENT.THEME_RELATIVE = "/home/themes/gmctheme/"; EXPONENT.ICON_RELATIVE = "/home/framework/core/assets/images/"; EXPONENT.JS_FULL = 'http://www.greenmeadowsconf.com/home/framework/core/js/'; EXPONENT.YUI3_VERSION = '3.4.0'; EXPONENT.YUI3_PATH = '/home/external/yui/3.4.0/build/'; EXPONENT.YUI3_URL = 'http://www.greenmeadowsconf.com/home/external/yui/3.4.0/build/'; EXPONENT.YUI2_VERSION = '2.9.0'; EXPONENT.YUI2_PATH = '/home/external/yui/2in3/dist/2.9.0/build/'; EXPONENT.YUI2_URL = 'http://www.greenmeadowsconf.com/home/external/yui/2in3/dist/2.9.0/build/'; EXPONENT.YUI3_CONFIG = { combine:0, // root: EXPONENT.YUI3_PATH.substr(1), // base: EXPONENT.YUI3_PATH, comboBase: EXPONENT.PATH_RELATIVE+'external/minify/min/?b='+EXPONENT.PATH_RELATIVE.substr(1)+'external/yui&f=', filter: { 'searchExp': ".js&", 'replaceStr': ".js," }, //combine: false, //filter: "debug", // onFailure: function (error) { // console.debug(error); // }, groups: { yui2: { combine:false, base: EXPONENT.YUI2_PATH, root: EXPONENT.YUI2_VERSION+'/', comboBase:EXPONENT.PATH_RELATIVE+'external/minify/min/?b='+EXPONENT.PATH_RELATIVE.substr(1)+'external/yui/2in3/dist&f=', patterns: { "yui2-": { configFn: function (me) { if(/-skin|reset|fonts|grids|base/.test(me.name)) { //return me; me.type = "css"; me.path = me.path.replace(/\.js/, ".css"); me.path = me.path.replace(/\/yui2-skin/, "/assets/skins/sam/yui2-skin"); } } } } } } }; //console.debug(EXPONENT.YUI3_CONFIG); // YUI 2 ajax helper method. This is much easier in YUI 3. Should also migrate. // EXPONENT.AjaxEvent = function() { // var obj; // var data = ""; // // var gatherURLInfo = function (obj){ // json = obj.json ? "&json=1" : ""; // if (obj.form){ // data = YAHOO.util.Connect.setForm(obj.form); // //slap a date in there so IE doesn't cache // var dt = new Date().valueOf(); // var sUri = EXPONENT.URL_FULL + "index.php?ajax_action=1" + json + "&yaetime=" + dt; // return sUri; // } else if (!obj.action || (!obj.controller && !obj.module)) { // alert("If you don't pass the ID of a form, you need to specify both a module/controller AND and a cresponding action."); // } else { // //slap a date in there so IE doesn't cache // var dt = new Date().valueOf(); // var modcontrol = (obj.controller) ? "&controller="+obj.controller : "&module="+obj.module; // var sUri = EXPONENT.URL_FULL + "index.php?ajax_action=1" + modcontrol + "&action=" + obj.action + json + "&yaetime=" + dt + obj.params; // return sUri; // } // } // // return { // json:0, // subscribe: function(fn, oScope) { // if (!this.oEvent) { // this.oEvent = new YAHOO.util.CustomEvent("ajaxevent", this, false, YAHOO.util.CustomEvent.FLAT); // } // if (oScope) { // this.oEvent.subscribe(fn, oScope, true); // } else { // this.oEvent.subscribe(fn); // } // }, // fetch: function(obj) { // if (typeof obj == "undefined" || !obj){ // alert('EXPONENT.ajax requires a single object parameter.'); // return false; // } else { // if (typeof(obj.json)!=="undefined"){ // this.json = obj.json; // } else { // this.json = false; // } // var sUri = gatherURLInfo(obj); // //console.debug(sUri); // YAHOO.util.Connect.asyncRequest("POST", sUri, { // success: function (o) { // //if we're just sending a request and not needing to do // //anything on the completion, we can skip firing the custtom event // if (typeof(this.oEvent)!=="undefined") { // // //otherwise, we check if we've got SJON coming back to parse // if (this.json!==false) { // //if so, parse it // var oParse = YAHOO.lang.JSON.parse(o.responseText); // } else { // //if not, it's probably HTML we're going to update a view with // var oParse = o.responseText; // } // //fire off the custom event to do some more stuff with // this.oEvent.fire(oParse); // } // }, // scope: this // },obj.data); // } // } // } // } // // // Form helper functions. We should migrate this. // // EXPONENT.forms = { // // getSelectedRadio: function (formId, inputId){ // var oForm = this.grabForm(formId); // for (var i=0; i