view release on metacpan or search on metacpan
www/edgeexpress/jscript/SpryAssets/SpryDebug.js view on Meta::CPAN
//scroll in the visible area on refresh
setTimeout(function(){
try{
var top = 0;
if (document.documentElement && document.documentElement.scrollTop)
var top = parseInt(document.documentElement.scrollTop, 10);
else if (document.body)
var top = parseInt(document.body.scrollTop, 10);
top = top + 10;
if ( !isNaN(top) && top > 10)
debugwindow.style.top = top+'px';
}catch(silent){alert(silent.message);}
}, 500);
consolediv.id = 'consolediv';
consolediv.innerHTML = '<form id="debugForm" action="#" method="get" onsubmit="return debug.jseval();"><input type="text" id="debugtext" name="debugtext" /><input type="submit" id="submitform" /><div id="debuggersuggestions"></div></form>';
document.body.appendChild(debugwindow);
debugwindow.appendChild(headdiv);
debugwindow.appendChild(textdiv);
www/edgeexpress/jscript/SpryAssets/SpryDebug.js view on Meta::CPAN
value = element.currentStyle[Spry.Effect.Utils.camelize(prop)];
}
}
}
catch (e) {}
return value == 'auto' ? null : value;
};
Spry.Debugger.Utils.getIntProp = function(element, prop){
var a = parseInt(Spry.Debugger.Utils.getStyleProp(element, prop),10);
if (isNaN(a))
return 0;
return a;
};
Spry.Debugger.Utils.getBorderBox = function (el, doc) {
doc = doc || document;
if (typeof(el) == 'string') {
el = doc.getElementById(el);
}
if (!el) {
www/edgeexpress/jscript/SpryAssets/SpryEffects.js view on Meta::CPAN
return o;
};
Spry.Effect.getBgColor = function(ele)
{
return Spry.Effect.getStyleProp(ele, "background-color");
};
Spry.Effect.intPropStyle = function(e, prop){
var i = parseInt(Spry.Effect.getStyleProp(e, prop), 10);
if (isNaN(i))
return 0;
return i;
};
Spry.Effect.getPosition = function(element)
{
var position = new Spry.Effect.Utils.Position;
var computedStyle = null;
if (element.style.left && /px/i.test(element.style.left))
www/edgeexpress/jscript/SpryAssets/SpryEffects.js view on Meta::CPAN
var toOpacity = 100.0;
var doToggle = false;
var transition = Spry.fifthTransition;
var fps = 60;
var originalOpacity = 0;
if(/MSIE/.test(navigator.userAgent))
originalOpacity = parseInt(Spry.Effect.getStylePropRegardlessOfDisplayState(this.element, 'filter').replace(/alpha\(opacity=([0-9]{1,3})\)/g, '$1'), 10);
else
originalOpacity = parseInt(Spry.Effect.getStylePropRegardlessOfDisplayState(this.element, 'opacity') * 100, 10);
if (isNaN(originalOpacity))
originalOpacity = 100;
if (options)
{
if (options.duration != null) durationInMilliseconds = options.duration;
if (options.from != null){
if (Spry.Effect.Utils.isPercentValue(options.from))
fromOpacity = Spry.Effect.Utils.getPercentValue(options.from) * originalOpacity / 100;
else
fromOpacity = options.from;
www/edgeexpress/jscript/SpryAssets/SpryEffects.js view on Meta::CPAN
var fromOpacity = 100.0;
var toOpacity = 0.0;
var doToggle = false;
var kindOfTransition = Spry.linearTransition;
var fps = 60;
if(/MSIE/.test(navigator.userAgent))
originalOpacity = parseInt(Spry.Effect.getStylePropRegardlessOfDisplayState(this.element, 'filter').replace(/alpha\(opacity=([0-9]{1,3})\)/g, '$1'), 10);
else
originalOpacity = parseInt(Spry.Effect.getStylePropRegardlessOfDisplayState(this.element, 'opacity') * 100, 10);
if (isNaN(originalOpacity)){
originalOpacity = 100;
}
if (options)
{
if (options.from != null){
if (Spry.Effect.Utils.isPercentValue(options.from))
fromOpacity = Spry.Effect.Utils.getPercentValue(options.from) * originalOpacity / 100;
else
fromOpacity = options.from;
www/edgeexpress/jscript/SpryAssets/SpryValidationCheckbox.js view on Meta::CPAN
Spry.Widget.Utils.setOptions(this, opts);
// set validateOn flags
var validateOn = ['submit'].concat(this.validateOn || []);
validateOn = validateOn.join(",");
this.validateOn = 0 | (validateOn.indexOf('submit') != -1 ? Spry.Widget.ValidationCheckbox.ONSUBMIT : 0);
this.validateOn = this.validateOn | (validateOn.indexOf('blur') != -1 ? Spry.Widget.ValidationCheckbox.ONBLUR : 0);
this.validateOn = this.validateOn | (validateOn.indexOf('change') != -1 ? Spry.Widget.ValidationCheckbox.ONCHANGE : 0);
// sanity checks
if (!isNaN(this.minSelections)) {
this.minSelections = (this.minSelections > 0)? parseInt(this.minSelections, 10): null;
}
if (!isNaN(this.maxSelections)) {
this.maxSelections = (this.maxSelections > 0)? parseInt(this.maxSelections, 10): null;
}
// Unfortunately in some browsers like Safari, the Stylesheets our
// page depends on may not have been loaded at the time we are called.
// This means we have to defer attaching our behaviors until after the
// onload event fires, since some of our behaviors rely on dimensions
// specified in the CSS.
if (Spry.Widget.ValidationCheckbox.onloadDidFire)
www/edgeexpress/jscript/SpryAssets/SpryValidationTextField.js view on Meta::CPAN
validation: function(value, options) {
if (value == '' || value == '-' || value == '+') {
return false;
}
var regExp = /^[\-\+]?\d*$/;
if (!regExp.test(value)) {
return false;
}
options = options || {allowNegative:false};
var ret = parseInt(value, 10);
if (!isNaN(ret)) {
var allowNegative = true;
if (typeof options.allowNegative != 'undefined' && options.allowNegative == false) {
allowNegative = false;
}
if (!allowNegative && value < 0) {
ret = false;
}
} else {
ret = false;
}
www/edgeexpress/jscript/SpryAssets/SpryValidationTextField.js view on Meta::CPAN
},
'real': {
characterMasking: /[\d\.,\-\+e]/i,
regExpFilter: /^[\-\+]?\d(?:|\.,\d{0,2})|(?:|e{0,1}[\-\+]?\d{0,})$/i,
validation: function (value, options) {
var regExp = /^[\+\-]?[0-9]+([\.,][0-9]+)?([eE]{0,1}[\-\+]?[0-9]+)?$/;
if (!regExp.test(value)) {
return false;
}
var ret = parseFloat(value);
if (isNaN(ret)) {
ret = false;
}
return ret;
}
},
'currency': {
formats: {
'dot_comma': {
characterMasking: /[\d\.\,\-\+\$]/,
regExpFilter: /^[\-\+]?(?:[\d\.]*)+(|\,\d{0,2})$/,
www/edgeexpress/jscript/SpryAssets/SpryValidationTextField.js view on Meta::CPAN
secondIndex = i;
break;
case "t":
case "tt":
tIndex = i;
break;
}
}
if (hourIndex != -1) {
var theHour = parseInt(valueGroups[hourIndex], 10);
if (isNaN(theHour) || theHour > (formatGroups[hourIndex] == 'HH' ? 23 : 12 )) {
return false;
}
}
if (minuteIndex != -1) {
var theMinute = parseInt(valueGroups[minuteIndex], 10);
if (isNaN(theMinute) || theMinute > 59) {
return false;
}
}
if (secondIndex != -1) {
var theSecond = parseInt(valueGroups[secondIndex], 10);
if (isNaN(theSecond) || theSecond > 59) {
return false;
}
}
if (tIndex != -1) {
var theT = valueGroups[tIndex].toUpperCase();
if (
formatGroups[tIndex].toUpperCase() == 'TT' && !/^a|pm$/i.test(theT) ||
formatGroups[tIndex].toUpperCase() == 'T' && !/^a|p$/i.test(theT)
) {
return false;
www/edgeexpress/jscript/SpryAssets/SpryValidationTextField.js view on Meta::CPAN
var pieces = ipv4.split('.');
if (pieces.length != 4) {
return false;
}
var regExp = /^[\-\+]?\d*$/;
for (var i=0; i< pieces.length; i++) {
if (pieces[i] == '') {
return false;
}
var piece = parseInt(pieces[i], 10);
if (isNaN(piece) || piece > 255 || !regExp.test(pieces[i]) || pieces[i].length>3 || /^0{2,3}$/.test(pieces[i])) {
return false;
}
}
}
if (ret && value.indexOf("/") != -1) {
// if prefix-length is specified must be in [1-128]
var prefLen = value.match(/\/\d{1,3}$/);
if (!prefLen) return false;
var prefLenVal = parseInt(prefLen[0].replace(/^\//,''), 10);
if (isNaN(prefLenVal) || prefLenVal > 128 || prefLenVal < 1) {
return false;
}
}
return ret;
};
Spry.Widget.ValidationTextField.onloadDidFire = false;
Spry.Widget.ValidationTextField.loadQueue = [];
Spry.Widget.ValidationTextField.prototype.isBrowserSupported = function()
www/edgeexpress/jscript/prototype-1.6.0.2.js view on Meta::CPAN
if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {
i || (i = 0);
var length = this.length;
if (i < 0) i = length + i;
for (; i < length; i++)
if (this[i] === item) return i;
return -1;
};
if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
var n = this.slice(0, i).reverse().indexOf(item);
return (n < 0) ? n : i - n - 1;
};
Array.prototype.toArray = Array.prototype.clone;
function $w(string) {
if (!Object.isString(string)) return [];
string = string.strip();
return string ? string.split(/\s+/) : [];
www/edgeexpress/jscript/prototype-1.6.0.3.js view on Meta::CPAN
if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {
i || (i = 0);
var length = this.length;
if (i < 0) i = length + i;
for (; i < length; i++)
if (this[i] === item) return i;
return -1;
};
if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
var n = this.slice(0, i).reverse().indexOf(item);
return (n < 0) ? n : i - n - 1;
};
Array.prototype.toArray = Array.prototype.clone;
function $w(string) {
if (!Object.isString(string)) return [];
string = string.strip();
return string ? string.split(/\s+/) : [];