init
@@ -0,0 +1,923 @@
|
||||
/*
|
||||
* Really easy field validation with Prototype
|
||||
* http://tetlaw.id.au/view/javascript/really-easy-field-validation
|
||||
* Andrew Tetlaw
|
||||
* Version 1.5.4.1 (2007-01-05)
|
||||
*
|
||||
* Copyright (c) 2007 Andrew Tetlaw
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use, copy,
|
||||
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
* of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
var Validator = Class.create();
|
||||
|
||||
Validator.prototype = {
|
||||
initialize : function(className, error, test, options) {
|
||||
if(typeof test == 'function'){
|
||||
this.options = $H(options);
|
||||
this._test = test;
|
||||
} else {
|
||||
this.options = $H(test);
|
||||
this._test = function(){return true};
|
||||
}
|
||||
this.error = error || 'Validation failed.';
|
||||
this.className = className;
|
||||
},
|
||||
test : function(v, elm) {
|
||||
return (this._test(v,elm) && this.options.all(function(p){
|
||||
return Validator.methods[p.key] ? Validator.methods[p.key](v,elm,p.value) : true;
|
||||
}));
|
||||
}
|
||||
}
|
||||
Validator.methods = {
|
||||
pattern : function(v,elm,opt) {return Validation.get('IsEmpty').test(v) || opt.test(v)},
|
||||
minLength : function(v,elm,opt) {return v.length >= opt},
|
||||
maxLength : function(v,elm,opt) {return v.length <= opt},
|
||||
min : function(v,elm,opt) {return v >= parseFloat(opt)},
|
||||
max : function(v,elm,opt) {return v <= parseFloat(opt)},
|
||||
notOneOf : function(v,elm,opt) {return $A(opt).all(function(value) {
|
||||
return v != value;
|
||||
})},
|
||||
oneOf : function(v,elm,opt) {return $A(opt).any(function(value) {
|
||||
return v == value;
|
||||
})},
|
||||
is : function(v,elm,opt) {return v == opt},
|
||||
isNot : function(v,elm,opt) {return v != opt},
|
||||
equalToField : function(v,elm,opt) {return v == $F(opt)},
|
||||
notEqualToField : function(v,elm,opt) {return v != $F(opt)},
|
||||
include : function(v,elm,opt) {return $A(opt).all(function(value) {
|
||||
return Validation.get(value).test(v,elm);
|
||||
})}
|
||||
}
|
||||
|
||||
var Validation = Class.create();
|
||||
Validation.defaultOptions = {
|
||||
onSubmit : true,
|
||||
stopOnFirst : false,
|
||||
immediate : false,
|
||||
focusOnError : true,
|
||||
useTitles : false,
|
||||
addClassNameToContainer: false,
|
||||
containerClassName: '.input-box',
|
||||
onFormValidate : function(result, form) {},
|
||||
onElementValidate : function(result, elm) {}
|
||||
};
|
||||
|
||||
Validation.prototype = {
|
||||
initialize : function(form, options){
|
||||
this.form = $(form);
|
||||
if (!this.form) {
|
||||
return;
|
||||
}
|
||||
this.options = Object.extend({
|
||||
onSubmit : Validation.defaultOptions.onSubmit,
|
||||
stopOnFirst : Validation.defaultOptions.stopOnFirst,
|
||||
immediate : Validation.defaultOptions.immediate,
|
||||
focusOnError : Validation.defaultOptions.focusOnError,
|
||||
useTitles : Validation.defaultOptions.useTitles,
|
||||
onFormValidate : Validation.defaultOptions.onFormValidate,
|
||||
onElementValidate : Validation.defaultOptions.onElementValidate
|
||||
}, options || {});
|
||||
if(this.options.onSubmit) Event.observe(this.form,'submit',this.onSubmit.bind(this),false);
|
||||
if(this.options.immediate) {
|
||||
Form.getElements(this.form).each(function(input) { // Thanks Mike!
|
||||
if (input.tagName.toLowerCase() == 'select') {
|
||||
Event.observe(input, 'blur', this.onChange.bindAsEventListener(this));
|
||||
}
|
||||
if (input.type.toLowerCase() == 'radio' || input.type.toLowerCase() == 'checkbox') {
|
||||
Event.observe(input, 'click', this.onChange.bindAsEventListener(this));
|
||||
} else {
|
||||
Event.observe(input, 'change', this.onChange.bindAsEventListener(this));
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
},
|
||||
onChange : function (ev) {
|
||||
Validation.isOnChange = true;
|
||||
Validation.validate(Event.element(ev),{
|
||||
useTitle : this.options.useTitles,
|
||||
onElementValidate : this.options.onElementValidate
|
||||
});
|
||||
Validation.isOnChange = false;
|
||||
},
|
||||
onSubmit : function(ev){
|
||||
if(!this.validate()) Event.stop(ev);
|
||||
},
|
||||
validate : function() {
|
||||
var result = false;
|
||||
var useTitles = this.options.useTitles;
|
||||
var callback = this.options.onElementValidate;
|
||||
try {
|
||||
if(this.options.stopOnFirst) {
|
||||
result = Form.getElements(this.form).all(function(elm) {
|
||||
if (elm.hasClassName('local-validation') && !this.isElementInForm(elm, this.form)) {
|
||||
return true;
|
||||
}
|
||||
return Validation.validate(elm,{useTitle : useTitles, onElementValidate : callback});
|
||||
}, this);
|
||||
} else {
|
||||
result = Form.getElements(this.form).collect(function(elm) {
|
||||
if (elm.hasClassName('local-validation') && !this.isElementInForm(elm, this.form)) {
|
||||
return true;
|
||||
}
|
||||
if (elm.hasClassName('validation-disabled')) {
|
||||
return true;
|
||||
}
|
||||
return Validation.validate(elm,{useTitle : useTitles, onElementValidate : callback});
|
||||
}, this).all();
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
if(!result && this.options.focusOnError) {
|
||||
try{
|
||||
Form.getElements(this.form).findAll(function(elm){return $(elm).hasClassName('validation-failed')}).first().focus()
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
}
|
||||
this.options.onFormValidate(result, this.form);
|
||||
return result;
|
||||
},
|
||||
reset : function() {
|
||||
Form.getElements(this.form).each(Validation.reset);
|
||||
},
|
||||
isElementInForm : function(elm, form) {
|
||||
var domForm = elm.up('form');
|
||||
if (domForm == form) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Object.extend(Validation, {
|
||||
validate : function(elm, options){
|
||||
options = Object.extend({
|
||||
useTitle : false,
|
||||
onElementValidate : function(result, elm) {}
|
||||
}, options || {});
|
||||
elm = $(elm);
|
||||
|
||||
var cn = $w(elm.className);
|
||||
return result = cn.all(function(value) {
|
||||
var test = Validation.test(value,elm,options.useTitle);
|
||||
options.onElementValidate(test, elm);
|
||||
return test;
|
||||
});
|
||||
},
|
||||
insertAdvice : function(elm, advice){
|
||||
var container = $(elm).up('.field-row');
|
||||
if(container){
|
||||
Element.insert(container, {after: advice});
|
||||
} else if (elm.up('td.value')) {
|
||||
elm.up('td.value').insert({bottom: advice});
|
||||
} else if (elm.advaiceContainer && $(elm.advaiceContainer)) {
|
||||
$(elm.advaiceContainer).update(advice);
|
||||
}
|
||||
else {
|
||||
switch (elm.type.toLowerCase()) {
|
||||
case 'checkbox':
|
||||
case 'radio':
|
||||
var p = elm.parentNode;
|
||||
if(p) {
|
||||
Element.insert(p, {'bottom': advice});
|
||||
} else {
|
||||
Element.insert(elm, {'after': advice});
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Element.insert(elm, {'after': advice});
|
||||
}
|
||||
}
|
||||
},
|
||||
showAdvice : function(elm, advice, adviceName){
|
||||
if(!elm.advices){
|
||||
elm.advices = new Hash();
|
||||
}
|
||||
else{
|
||||
elm.advices.each(function(pair){
|
||||
if (!advice || pair.value.id != advice.id) {
|
||||
// hide non-current advice after delay
|
||||
this.hideAdvice(elm, pair.value);
|
||||
}
|
||||
}.bind(this));
|
||||
}
|
||||
elm.advices.set(adviceName, advice);
|
||||
if(typeof Effect == 'undefined') {
|
||||
advice.style.display = 'block';
|
||||
} else {
|
||||
if(!advice._adviceAbsolutize) {
|
||||
new Effect.Appear(advice, {duration : 1 });
|
||||
} else {
|
||||
Position.absolutize(advice);
|
||||
advice.show();
|
||||
advice.setStyle({
|
||||
'top':advice._adviceTop,
|
||||
'left': advice._adviceLeft,
|
||||
'width': advice._adviceWidth,
|
||||
'z-index': 1000
|
||||
});
|
||||
advice.addClassName('advice-absolute');
|
||||
}
|
||||
}
|
||||
},
|
||||
hideAdvice : function(elm, advice){
|
||||
if (advice != null) {
|
||||
new Effect.Fade(advice, {duration : 1, afterFinishInternal : function() {advice.hide();}});
|
||||
}
|
||||
},
|
||||
updateCallback : function(elm, status) {
|
||||
if (typeof elm.callbackFunction != 'undefined') {
|
||||
eval(elm.callbackFunction+'(\''+elm.id+'\',\''+status+'\')');
|
||||
}
|
||||
},
|
||||
ajaxError : function(elm, errorMsg) {
|
||||
var name = 'validate-ajax';
|
||||
var advice = Validation.getAdvice(name, elm);
|
||||
if (advice == null) {
|
||||
advice = this.createAdvice(name, elm, false, errorMsg);
|
||||
}
|
||||
this.showAdvice(elm, advice, 'validate-ajax');
|
||||
this.updateCallback(elm, 'failed');
|
||||
|
||||
elm.addClassName('validation-failed');
|
||||
elm.addClassName('validate-ajax');
|
||||
if (Validation.defaultOptions.addClassNameToContainer && Validation.defaultOptions.containerClassName != '') {
|
||||
var container = elm.up(Validation.defaultOptions.containerClassName);
|
||||
if (container && this.allowContainerClassName(elm)) {
|
||||
container.removeClassName('validation-passed');
|
||||
container.addClassName('validation-error');
|
||||
}
|
||||
}
|
||||
},
|
||||
allowContainerClassName: function (elm) {
|
||||
if (elm.type == 'radio' || elm.type == 'checkbox') {
|
||||
return elm.hasClassName('change-container-classname');
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
test : function(name, elm, useTitle) {
|
||||
var v = Validation.get(name);
|
||||
var prop = '__advice'+name.camelize();
|
||||
try {
|
||||
if(Validation.isVisible(elm) && !v.test($F(elm), elm)) {
|
||||
//if(!elm[prop]) {
|
||||
var advice = Validation.getAdvice(name, elm);
|
||||
if (advice == null) {
|
||||
advice = this.createAdvice(name, elm, useTitle);
|
||||
}
|
||||
this.showAdvice(elm, advice, name);
|
||||
this.updateCallback(elm, 'failed');
|
||||
//}
|
||||
elm[prop] = 1;
|
||||
if (!elm.advaiceContainer) {
|
||||
elm.removeClassName('validation-passed');
|
||||
elm.addClassName('validation-failed');
|
||||
}
|
||||
|
||||
if (Validation.defaultOptions.addClassNameToContainer && Validation.defaultOptions.containerClassName != '') {
|
||||
var container = elm.up(Validation.defaultOptions.containerClassName);
|
||||
if (container && this.allowContainerClassName(elm)) {
|
||||
container.removeClassName('validation-passed');
|
||||
container.addClassName('validation-error');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
var advice = Validation.getAdvice(name, elm);
|
||||
this.hideAdvice(elm, advice);
|
||||
this.updateCallback(elm, 'passed');
|
||||
elm[prop] = '';
|
||||
elm.removeClassName('validation-failed');
|
||||
elm.addClassName('validation-passed');
|
||||
if (Validation.defaultOptions.addClassNameToContainer && Validation.defaultOptions.containerClassName != '') {
|
||||
var container = elm.up(Validation.defaultOptions.containerClassName);
|
||||
if (container && !container.down('.validation-failed') && this.allowContainerClassName(elm)) {
|
||||
if (!Validation.get('IsEmpty').test(elm.value) || !this.isVisible(elm)) {
|
||||
container.addClassName('validation-passed');
|
||||
} else {
|
||||
container.removeClassName('validation-passed');
|
||||
}
|
||||
container.removeClassName('validation-error');
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
} catch(e) {
|
||||
throw(e)
|
||||
}
|
||||
},
|
||||
isVisible : function(elm) {
|
||||
while(elm.tagName != 'BODY') {
|
||||
if(!$(elm).visible()) return false;
|
||||
elm = elm.parentNode;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
getAdvice : function(name, elm) {
|
||||
return $('advice-' + name + '-' + Validation.getElmID(elm)) || $('advice-' + Validation.getElmID(elm));
|
||||
},
|
||||
createAdvice : function(name, elm, useTitle, customError) {
|
||||
var v = Validation.get(name);
|
||||
var errorMsg = useTitle ? ((elm && elm.title) ? elm.title : v.error) : v.error;
|
||||
if (customError) {
|
||||
errorMsg = customError;
|
||||
}
|
||||
if (jQuery.mage.__){
|
||||
errorMsg = jQuery.mage.__(errorMsg);
|
||||
}
|
||||
advice = '<div class="validation-advice" id="advice-' + name + '-' + Validation.getElmID(elm) +'" style="display:none">' + errorMsg + '</div>'
|
||||
|
||||
|
||||
Validation.insertAdvice(elm, advice);
|
||||
advice = Validation.getAdvice(name, elm);
|
||||
if($(elm).hasClassName('absolute-advice')) {
|
||||
var dimensions = $(elm).getDimensions();
|
||||
var originalPosition = Position.cumulativeOffset(elm);
|
||||
|
||||
advice._adviceTop = (originalPosition[1] + dimensions.height) + 'px';
|
||||
advice._adviceLeft = (originalPosition[0]) + 'px';
|
||||
advice._adviceWidth = (dimensions.width) + 'px';
|
||||
advice._adviceAbsolutize = true;
|
||||
}
|
||||
return advice;
|
||||
},
|
||||
getElmID : function(elm) {
|
||||
return elm.id ? elm.id : elm.name;
|
||||
},
|
||||
reset : function(elm) {
|
||||
elm = $(elm);
|
||||
var cn = $w(elm.className);
|
||||
cn.each(function(value) {
|
||||
var prop = '__advice'+value.camelize();
|
||||
if(elm[prop]) {
|
||||
var advice = Validation.getAdvice(value, elm);
|
||||
if (advice) {
|
||||
advice.hide();
|
||||
}
|
||||
elm[prop] = '';
|
||||
}
|
||||
elm.removeClassName('validation-failed');
|
||||
elm.removeClassName('validation-passed');
|
||||
if (Validation.defaultOptions.addClassNameToContainer && Validation.defaultOptions.containerClassName != '') {
|
||||
var container = elm.up(Validation.defaultOptions.containerClassName);
|
||||
if (container) {
|
||||
container.removeClassName('validation-passed');
|
||||
container.removeClassName('validation-error');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
add : function(className, error, test, options) {
|
||||
var nv = {};
|
||||
nv[className] = new Validator(className, error, test, options);
|
||||
Object.extend(Validation.methods, nv);
|
||||
},
|
||||
addAllThese : function(validators) {
|
||||
var nv = {};
|
||||
$A(validators).each(function(value) {
|
||||
nv[value[0]] = new Validator(value[0], value[1], value[2], (value.length > 3 ? value[3] : {}));
|
||||
});
|
||||
Object.extend(Validation.methods, nv);
|
||||
},
|
||||
get : function(name) {
|
||||
return Validation.methods[name] ? Validation.methods[name] : Validation.methods['_LikeNoIDIEverSaw_'];
|
||||
},
|
||||
methods : {
|
||||
'_LikeNoIDIEverSaw_' : new Validator('_LikeNoIDIEverSaw_','',{})
|
||||
}
|
||||
});
|
||||
|
||||
Validation.add('IsEmpty', '', function(v) {
|
||||
return (v == '' || (v == null) || (v.length == 0) || /^\s+$/.test(v));
|
||||
});
|
||||
|
||||
Validation.addAllThese([
|
||||
['validate-no-html-tags', 'HTML tags are not allowed', function(v) {
|
||||
return !/<(\/)?\w+/.test(v);
|
||||
}],
|
||||
['validate-select', 'Please select an option.', function(v) {
|
||||
return ((v != "none") && (v != null) && (v.length != 0));
|
||||
}],
|
||||
['required-entry', 'This is a required field.', function(v) {
|
||||
return !Validation.get('IsEmpty').test(v);
|
||||
}],
|
||||
['validate-number', 'Please enter a valid number in this field.', function(v) {
|
||||
return Validation.get('IsEmpty').test(v)
|
||||
|| (!isNaN(parseNumber(v)) && /^\s*-?\d*(\.\d*)?\s*$/.test(v));
|
||||
}],
|
||||
['validate-number-range', 'The value is not within the specified range.', function(v, elm) {
|
||||
if (Validation.get('IsEmpty').test(v)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var numValue = parseNumber(v);
|
||||
if (isNaN(numValue)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var reRange = /^number-range-(-?[\d.,]+)?-(-?[\d.,]+)?$/,
|
||||
result = true;
|
||||
|
||||
$w(elm.className).each(function(name) {
|
||||
var m = reRange.exec(name);
|
||||
if (m) {
|
||||
result = result
|
||||
&& (m[1] == null || m[1] == '' || numValue >= parseNumber(m[1]))
|
||||
&& (m[2] == null || m[2] == '' || numValue <= parseNumber(m[2]));
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}],
|
||||
['validate-digits', 'Please use numbers only in this field. Please avoid spaces or other characters such as dots or commas.', function(v) {
|
||||
return Validation.get('IsEmpty').test(v) || !/[^\d]/.test(v);
|
||||
}],
|
||||
['validate-digits-range', 'The value is not within the specified range.', function(v, elm) {
|
||||
if (Validation.get('IsEmpty').test(v)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var numValue = parseNumber(v);
|
||||
if (isNaN(numValue)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var reRange = /^digits-range-(-?\d+)?-(-?\d+)?$/,
|
||||
result = true;
|
||||
|
||||
$w(elm.className).each(function(name) {
|
||||
var m = reRange.exec(name);
|
||||
if (m) {
|
||||
result = result
|
||||
&& (m[1] == null || m[1] == '' || numValue >= parseNumber(m[1]))
|
||||
&& (m[2] == null || m[2] == '' || numValue <= parseNumber(m[2]));
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}],
|
||||
['validate-range', 'The value is not within the specified range.', function(v, elm) {
|
||||
var minValue, maxValue;
|
||||
if (Validation.get('IsEmpty').test(v)) {
|
||||
return true;
|
||||
} else if (Validation.get('validate-digits').test(v)) {
|
||||
minValue = maxValue = parseNumber(v);
|
||||
} else {
|
||||
var ranges = /^(-?\d+)?-(-?\d+)?$/.exec(v);
|
||||
|
||||
if (ranges) {
|
||||
minValue = parseNumber(ranges[1]);
|
||||
maxValue = parseNumber(ranges[2]);
|
||||
if (minValue > maxValue) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var reRange = /^range-(-?\d+)?-(-?\d+)?$/,
|
||||
result = true;
|
||||
$w(elm.className).each(function(name) {
|
||||
var validRange = reRange.exec(name);
|
||||
if (validRange) {
|
||||
var minValidRange = parseNumber(validRange[1]);
|
||||
var maxValidRange = parseNumber(validRange[2]);
|
||||
result = result
|
||||
&& (isNaN(minValidRange) || minValue >= minValidRange)
|
||||
&& (isNaN(maxValidRange) || maxValue <= maxValidRange);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}],
|
||||
['validate-alpha', 'Please use letters only (a-z or A-Z) in this field.', function (v) {
|
||||
return Validation.get('IsEmpty').test(v) || /^[a-zA-Z]+$/.test(v)
|
||||
}],
|
||||
['validate-code', 'Please use only lowercase letters (a-z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter.', function (v) {
|
||||
return Validation.get('IsEmpty').test(v) || /^[a-z]+[a-z0-9_]+$/.test(v)
|
||||
}],
|
||||
['validate-alphanum', 'Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.', function(v) {
|
||||
return Validation.get('IsEmpty').test(v) || /^[a-zA-Z0-9]+$/.test(v)
|
||||
}],
|
||||
['validate-alphanum-with-spaces', 'Please use only letters (a-z or A-Z), numbers (0-9) or spaces only in this field.', function(v) {
|
||||
return Validation.get('IsEmpty').test(v) || /^[a-zA-Z0-9 ]+$/.test(v)
|
||||
}],
|
||||
['validate-street', 'Please use only letters (a-z or A-Z), numbers (0-9), spaces and "#" in this field.', function(v) {
|
||||
return Validation.get('IsEmpty').test(v) || /^[ \w]{3,}([A-Za-z]\.)?([ \w]*\#\d+)?(\r\n| )[ \w]{3,}/.test(v)
|
||||
}],
|
||||
['validate-phoneStrict', 'Please enter a valid phone number (Ex: 123-456-7890).', function(v) {
|
||||
return Validation.get('IsEmpty').test(v) || /^(\()?\d{3}(\))?(-|\s)?\d{3}(-|\s)\d{4}$/.test(v);
|
||||
}],
|
||||
['validate-phoneLax', 'Please enter a valid phone number (Ex: 123-456-7890).', function(v) {
|
||||
return Validation.get('IsEmpty').test(v) || /^((\d[-. ]?)?((\(\d{3}\))|\d{3}))?[-. ]?\d{3}[-. ]?\d{4}$/.test(v);
|
||||
}],
|
||||
['validate-fax', 'Please enter a valid fax number (Ex: 123-456-7890).', function(v) {
|
||||
return Validation.get('IsEmpty').test(v) || /^(\()?\d{3}(\))?(-|\s)?\d{3}(-|\s)\d{4}$/.test(v);
|
||||
}],
|
||||
['validate-date', 'Please enter a valid date.', function(v) {
|
||||
var test = new Date(v);
|
||||
return Validation.get('IsEmpty').test(v) || !isNaN(test);
|
||||
}],
|
||||
['validate-date-range', 'Make sure the To Date is later than or the same as the From Date.', function(v, elm) {
|
||||
var m = /\bdate-range-(\w+)-(\w+)\b/.exec(elm.className);
|
||||
if (!m || m[2] == 'to' || Validation.get('IsEmpty').test(v)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var currentYear = new Date().getFullYear() + '';
|
||||
var normalizedTime = function(v) {
|
||||
v = v.split(/[.\/]/);
|
||||
if (v[2] && v[2].length < 4) {
|
||||
v[2] = currentYear.substr(0, v[2].length) + v[2];
|
||||
}
|
||||
return new Date(v.join('/')).getTime();
|
||||
};
|
||||
|
||||
var dependentElements = Element.select(elm.form, '.validate-date-range.date-range-' + m[1] + '-to');
|
||||
return !dependentElements.length || Validation.get('IsEmpty').test(dependentElements[0].value)
|
||||
|| normalizedTime(v) <= normalizedTime(dependentElements[0].value);
|
||||
}],
|
||||
['validate-email', 'Please enter a valid email address (Ex: johndoe@domain.com).', function (v) {
|
||||
//return Validation.get('IsEmpty').test(v) || /\w{1,}[@][\w\-]{1,}([.]([\w\-]{1,})){1,3}$/.test(v)
|
||||
//return Validation.get('IsEmpty').test(v) || /^[\!\#$%\*/?|\^\{\}`~&\'\+\-=_a-z0-9][\!\#$%\*/?|\^\{\}`~&\'\+\-=_a-z0-9\.]{1,30}[\!\#$%\*/?|\^\{\}`~&\'\+\-=_a-z0-9]@([a-z0-9_-]{1,30}\.){1,5}[a-z]{2,4}$/i.test(v)
|
||||
return Validation.get('IsEmpty').test(v) || /^([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*@([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*\.(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]){2,})$/i.test(v)
|
||||
}],
|
||||
['validate-emailSender', 'Please use only visible characters and spaces.', function (v) {
|
||||
return Validation.get('IsEmpty').test(v) || /^[\S ]+$/.test(v)
|
||||
}],
|
||||
['validate-password', 'Please enter 6 or more characters. Leading and trailing spaces will be ignored.', function(v) {
|
||||
var pass=v.strip(); /*strip leading and trailing spaces*/
|
||||
return !(pass.length>0 && pass.length < 6);
|
||||
}],
|
||||
['validate-admin-password', 'Please enter 7 or more characters, using both numeric and alphabetic.', function(v) {
|
||||
var pass=v.strip();
|
||||
if (0 == pass.length) {
|
||||
return true;
|
||||
}
|
||||
if (!(/[a-z]/i.test(v)) || !(/[0-9]/.test(v))) {
|
||||
return false;
|
||||
}
|
||||
return !(pass.length < 7);
|
||||
}],
|
||||
['validate-cpassword', 'Please make sure your passwords match.', function(v) {
|
||||
var conf = $('confirmation') ? $('confirmation') : $$('.validate-cpassword')[0];
|
||||
var pass = false;
|
||||
if ($('password')) {
|
||||
pass = $('password');
|
||||
}
|
||||
var passwordElements = $$('.validate-password');
|
||||
for (var i = 0; i < passwordElements.size(); i++) {
|
||||
var passwordElement = passwordElements[i];
|
||||
if (passwordElement.up('form').id == conf.up('form').id) {
|
||||
pass = passwordElement;
|
||||
}
|
||||
}
|
||||
if ($$('.validate-admin-password').size()) {
|
||||
pass = $$('.validate-admin-password')[0];
|
||||
}
|
||||
return (pass.value == conf.value);
|
||||
}],
|
||||
['validate-both-passwords', 'Please make sure your passwords match.', function(v, input) {
|
||||
var dependentInput = $(input.form[input.name == 'password' ? 'confirmation' : 'password']),
|
||||
isEqualValues = input.value == dependentInput.value;
|
||||
|
||||
if (isEqualValues && dependentInput.hasClassName('validation-failed')) {
|
||||
Validation.test(this.className, dependentInput);
|
||||
}
|
||||
|
||||
return dependentInput.value == '' || isEqualValues;
|
||||
}],
|
||||
['validate-url', 'Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function (v) {
|
||||
v = (v || '').replace(/^\s+/, '').replace(/\s+$/, '');
|
||||
return Validation.get('IsEmpty').test(v) || /^(http|https|ftp):\/\/(([A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))(\.[A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))*)(:(\d+))?(\/[A-Z0-9~](([A-Z0-9_~-]|\.)*[A-Z0-9~]|))*\/?(.*)?$/i.test(v)
|
||||
}],
|
||||
['validate-clean-url', 'Please enter a valid URL (Ex: "http://www.example.com" or "www.example.com").', function (v) {
|
||||
return Validation.get('IsEmpty').test(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+.(com|org|net|dk|at|us|tv|info|uk|co.uk|biz|se)$)(:(\d+))?\/?/i.test(v) || /^(www)((\.[A-Z0-9][A-Z0-9_-]*)+.(com|org|net|dk|at|us|tv|info|uk|co.uk|biz|se)$)(:(\d+))?\/?/i.test(v)
|
||||
}],
|
||||
['validate-identifier', 'Please enter a valid URL Key (Ex: "example-page", "example-page.html" or "anotherlevel/example-page").', function (v) {
|
||||
return Validation.get('IsEmpty').test(v) || /^[a-z0-9][a-z0-9_\/-]+(\.[a-z0-9_-]+)?$/.test(v)
|
||||
}],
|
||||
['validate-xml-identifier', 'Please enter a valid XML-identifier (Ex: something_1, block5, id-4).', function (v) {
|
||||
return Validation.get('IsEmpty').test(v) || /^[A-Z][A-Z0-9_\/-]*$/i.test(v)
|
||||
}],
|
||||
['validate-ssn', 'Please enter a valid social security number (Ex: 123-45-6789).', function(v) {
|
||||
return Validation.get('IsEmpty').test(v) || /^\d{3}-?\d{2}-?\d{4}$/.test(v);
|
||||
}],
|
||||
['validate-zip-us', 'Please enter a valid zip code (Ex: 90602 or 90602-1234).', function(v) {
|
||||
return Validation.get('IsEmpty').test(v) || /(^\d{5}$)|(^\d{5}-\d{4}$)/.test(v);
|
||||
}],
|
||||
['validate-zip-international', 'Please enter a valid zip code.', function(v) {
|
||||
//return Validation.get('IsEmpty').test(v) || /(^[A-z0-9]{2,10}([\s]{0,1}|[\-]{0,1})[A-z0-9]{2,10}$)/.test(v);
|
||||
return true;
|
||||
}],
|
||||
['validate-date-au', 'Please use this date format: dd/mm/yyyy (Ex: "17/03/2006" for the 17th of March, 2006).', function(v) {
|
||||
if(Validation.get('IsEmpty').test(v)) return true;
|
||||
var regex = /^(\d{2})\/(\d{2})\/(\d{4})$/;
|
||||
if(!regex.test(v)) return false;
|
||||
var d = new Date(v.replace(regex, '$2/$1/$3'));
|
||||
return ( parseInt(RegExp.$2, 10) == (1+d.getMonth()) ) &&
|
||||
(parseInt(RegExp.$1, 10) == d.getDate()) &&
|
||||
(parseInt(RegExp.$3, 10) == d.getFullYear() );
|
||||
}],
|
||||
['validate-currency-dollar', 'Please enter a valid $ amount (Ex: $100.00).', function(v) {
|
||||
// [$]1[##][,###]+[.##]
|
||||
// [$]1###+[.##]
|
||||
// [$]0.##
|
||||
// [$].##
|
||||
return Validation.get('IsEmpty').test(v) || /^\$?\-?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}\d*(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$/.test(v)
|
||||
}],
|
||||
['validate-one-required', 'Please select one of the options above.', function (v,elm) {
|
||||
var p = elm.parentNode;
|
||||
var options = p.getElementsByTagName('INPUT');
|
||||
return $A(options).any(function(elm) {
|
||||
return $F(elm);
|
||||
});
|
||||
}],
|
||||
['validate-one-required-by-name', 'Please select one of the options.', function (v,elm) {
|
||||
var inputs = $$('input[name="' + elm.name.replace(/([\\"])/g, '\\$1') + '"]');
|
||||
|
||||
var error = 1;
|
||||
for(var i=0;i<inputs.length;i++) {
|
||||
if((inputs[i].type == 'checkbox' || inputs[i].type == 'radio') && inputs[i].checked == true) {
|
||||
error = 0;
|
||||
}
|
||||
|
||||
if(Validation.isOnChange && (inputs[i].type == 'checkbox' || inputs[i].type == 'radio')) {
|
||||
Validation.reset(inputs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if( error == 0 ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}],
|
||||
['validate-not-negative-number', 'Please enter a number 0 or greater in this field.', function(v) {
|
||||
if (Validation.get('IsEmpty').test(v)) {
|
||||
return true;
|
||||
}
|
||||
v = parseNumber(v);
|
||||
return !isNaN(v) && v >= 0;
|
||||
}],
|
||||
['validate-zero-or-greater', 'Please enter a number 0 or greater in this field.', function(v) {
|
||||
return Validation.get('validate-not-negative-number').test(v);
|
||||
}],
|
||||
['validate-greater-than-zero', 'Please enter a number greater than 0 in this field.', function(v) {
|
||||
if (Validation.get('IsEmpty').test(v)) {
|
||||
return true;
|
||||
}
|
||||
v = parseNumber(v);
|
||||
return !isNaN(v) && v > 0;
|
||||
}],
|
||||
['validate-state', 'Please select State/Province.', function(v) {
|
||||
return (v!=0 || v == '');
|
||||
}],
|
||||
['validate-new-password', 'Please enter 6 or more characters. Leading and trailing spaces will be ignored.', function(v) {
|
||||
if (!Validation.get('validate-password').test(v)) return false;
|
||||
if (Validation.get('IsEmpty').test(v) && v != '') return false;
|
||||
return true;
|
||||
}],
|
||||
['validate-cc-number', 'Please enter a valid credit card number.', function(v, elm) {
|
||||
// remove non-numerics
|
||||
var ccTypeContainer = $(elm.id.substr(0,elm.id.indexOf('_cc_number')) + '_cc_type');
|
||||
if (ccTypeContainer && typeof Validation.creditCartTypes.get(ccTypeContainer.value) != 'undefined'
|
||||
&& Validation.creditCartTypes.get(ccTypeContainer.value)[2] == false) {
|
||||
if (!Validation.get('IsEmpty').test(v) && Validation.get('validate-digits').test(v)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return validateCreditCard(v);
|
||||
}],
|
||||
['validate-cc-type', 'Credit card number does not match credit card type.', function(v, elm) {
|
||||
// remove credit card number delimiters such as "-" and space
|
||||
elm.value = removeDelimiters(elm.value);
|
||||
v = removeDelimiters(v);
|
||||
|
||||
var ccTypeContainer = $(elm.id.substr(0,elm.id.indexOf('_cc_number')) + '_cc_type');
|
||||
if (!ccTypeContainer) {
|
||||
return true;
|
||||
}
|
||||
var ccType = ccTypeContainer.value;
|
||||
|
||||
if (typeof Validation.creditCartTypes.get(ccType) == 'undefined') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Other card type or switch or solo card
|
||||
if (Validation.creditCartTypes.get(ccType)[0]==false) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Matched credit card type
|
||||
var ccMatchedType = '';
|
||||
|
||||
Validation.creditCartTypes.each(function (pair) {
|
||||
if (pair.value[0] && v.match(pair.value[0])) {
|
||||
ccMatchedType = pair.key;
|
||||
throw $break;
|
||||
}
|
||||
});
|
||||
|
||||
if(ccMatchedType != ccType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ccTypeContainer.hasClassName('validation-failed') && Validation.isOnChange) {
|
||||
Validation.validate(ccTypeContainer);
|
||||
}
|
||||
|
||||
return true;
|
||||
}],
|
||||
['validate-cc-type-select', 'Card type does not match credit card number.', function(v, elm) {
|
||||
var ccNumberContainer = $(elm.id.substr(0,elm.id.indexOf('_cc_type')) + '_cc_number');
|
||||
if (Validation.isOnChange && Validation.get('IsEmpty').test(ccNumberContainer.value)) {
|
||||
return true;
|
||||
}
|
||||
if (Validation.get('validate-cc-type').test(ccNumberContainer.value, ccNumberContainer)) {
|
||||
Validation.validate(ccNumberContainer);
|
||||
}
|
||||
return Validation.get('validate-cc-type').test(ccNumberContainer.value, ccNumberContainer);
|
||||
}],
|
||||
['validate-cc-exp', 'Incorrect credit card expiration date.', function(v, elm) {
|
||||
var ccExpMonth = v;
|
||||
var ccExpYear = $(elm.id.substr(0,elm.id.indexOf('_expiration')) + '_expiration_yr').value;
|
||||
var currentTime = new Date();
|
||||
var currentMonth = currentTime.getMonth() + 1;
|
||||
var currentYear = currentTime.getFullYear();
|
||||
if (ccExpMonth < currentMonth && ccExpYear == currentYear) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}],
|
||||
['validate-cc-cvn', 'Please enter a valid credit card verification number.', function(v, elm) {
|
||||
var ccTypeContainer = $(elm.id.substr(0,elm.id.indexOf('_cc_cid')) + '_cc_type');
|
||||
if (!ccTypeContainer) {
|
||||
return true;
|
||||
}
|
||||
var ccType = ccTypeContainer.value;
|
||||
|
||||
if (typeof Validation.creditCartTypes.get(ccType) == 'undefined') {
|
||||
return false;
|
||||
}
|
||||
|
||||
var re = Validation.creditCartTypes.get(ccType)[1];
|
||||
|
||||
if (v.match(re)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}],
|
||||
['validate-ajax', '', function(v, elm) { return true; }],
|
||||
['validate-data', 'Please use only letters (a-z or A-Z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter.', function (v) {
|
||||
if(v != '' && v) {
|
||||
return /^[A-Za-z]+[A-Za-z0-9_]+$/.test(v);
|
||||
}
|
||||
return true;
|
||||
}],
|
||||
['validate-css-length', 'Please input a valid CSS-length (Ex: 100px, 77pt, 20em, .5ex or 50%).', function (v) {
|
||||
if (v != '' && v) {
|
||||
return /^[0-9\.]+(px|pt|em|ex|%)?$/.test(v) && (!(/\..*\./.test(v))) && !(/\.$/.test(v));
|
||||
}
|
||||
return true;
|
||||
}],
|
||||
['validate-length', 'Text length does not meet the specified text range.', function (v, elm) {
|
||||
var reMax = new RegExp(/^maximum-length-[0-9]+$/);
|
||||
var reMin = new RegExp(/^minimum-length-[0-9]+$/);
|
||||
var result = true;
|
||||
$w(elm.className).each(function(name, index) {
|
||||
if (name.match(reMax) && result) {
|
||||
var length = name.split('-')[2];
|
||||
result = (v.length <= length);
|
||||
}
|
||||
if (name.match(reMin) && result && !Validation.get('IsEmpty').test(v)) {
|
||||
var length = name.split('-')[2];
|
||||
result = (v.length >= length);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}],
|
||||
['validate-percents', 'Please enter a number lower than 100.', {max:100}],
|
||||
['required-file', 'Please select a file.', function(v, elm) {
|
||||
var result = !Validation.get('IsEmpty').test(v);
|
||||
if (result === false) {
|
||||
ovId = elm.id + '_value';
|
||||
if ($(ovId)) {
|
||||
result = !Validation.get('IsEmpty').test($(ovId).value);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}],
|
||||
['validate-cc-ukss', 'Please enter issue number or start date for switch/solo card type.', function(v,elm) {
|
||||
var endposition;
|
||||
|
||||
if (elm.id.match(/(.)+_cc_issue$/)) {
|
||||
endposition = elm.id.indexOf('_cc_issue');
|
||||
} else if (elm.id.match(/(.)+_start_month$/)) {
|
||||
endposition = elm.id.indexOf('_start_month');
|
||||
} else {
|
||||
endposition = elm.id.indexOf('_start_year');
|
||||
}
|
||||
|
||||
var prefix = elm.id.substr(0,endposition);
|
||||
|
||||
var ccTypeContainer = $(prefix + '_cc_type');
|
||||
|
||||
if (!ccTypeContainer) {
|
||||
return true;
|
||||
}
|
||||
var ccType = ccTypeContainer.value;
|
||||
|
||||
if(['SS','SM','SO'].indexOf(ccType) == -1){
|
||||
return true;
|
||||
}
|
||||
|
||||
$(prefix + '_cc_issue').advaiceContainer
|
||||
= $(prefix + '_start_month').advaiceContainer
|
||||
= $(prefix + '_start_year').advaiceContainer
|
||||
= $(prefix + '_cc_type_ss_div').down('.adv-container');
|
||||
|
||||
var ccIssue = $(prefix + '_cc_issue').value;
|
||||
var ccSMonth = $(prefix + '_start_month').value;
|
||||
var ccSYear = $(prefix + '_start_year').value;
|
||||
|
||||
var ccStartDatePresent = (ccSMonth && ccSYear) ? true : false;
|
||||
|
||||
if (!ccStartDatePresent && !ccIssue){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}]
|
||||
]);
|
||||
|
||||
function removeDelimiters (v) {
|
||||
v = v.replace(/\s/g, '');
|
||||
v = v.replace(/\-/g, '');
|
||||
return v;
|
||||
}
|
||||
|
||||
function parseNumber(v)
|
||||
{
|
||||
if (typeof v != 'string') {
|
||||
return parseFloat(v);
|
||||
}
|
||||
|
||||
var isDot = v.indexOf('.');
|
||||
var isComa = v.indexOf(',');
|
||||
|
||||
if (isDot != -1 && isComa != -1) {
|
||||
if (isComa > isDot) {
|
||||
v = v.replace('.', '').replace(',', '.');
|
||||
}
|
||||
else {
|
||||
v = v.replace(',', '');
|
||||
}
|
||||
}
|
||||
else if (isComa != -1) {
|
||||
v = v.replace(',', '.');
|
||||
}
|
||||
|
||||
return parseFloat(v);
|
||||
}
|
||||
|
||||
/**
|
||||
* Hash with credit card types which can be simply extended in payment modules
|
||||
* 0 - regexp for card number
|
||||
* 1 - regexp for cvn
|
||||
* 2 - check or not credit card number trough Luhn algorithm by
|
||||
* function validateCreditCard which you can find above in this file
|
||||
*/
|
||||
Validation.creditCartTypes = $H({
|
||||
// 'SS': [new RegExp('^((6759[0-9]{12})|(5018|5020|5038|6304|6759|6761|6763[0-9]{12,19})|(49[013][1356][0-9]{12})|(6333[0-9]{12})|(6334[0-4]\d{11})|(633110[0-9]{10})|(564182[0-9]{10}))([0-9]{2,3})?$'), new RegExp('^([0-9]{3}|[0-9]{4})?$'), true],
|
||||
'SO': [new RegExp('^(6334[5-9]([0-9]{11}|[0-9]{13,14}))|(6767([0-9]{12}|[0-9]{14,15}))$'), new RegExp('^([0-9]{3}|[0-9]{4})?$'), true],
|
||||
'SM': [new RegExp('(^(5[0678])[0-9]{11,18}$)|(^(6[^05])[0-9]{11,18}$)|(^(601)[^1][0-9]{9,16}$)|(^(6011)[0-9]{9,11}$)|(^(6011)[0-9]{13,16}$)|(^(65)[0-9]{11,13}$)|(^(65)[0-9]{15,18}$)|(^(49030)[2-9]([0-9]{10}$|[0-9]{12,13}$))|(^(49033)[5-9]([0-9]{10}$|[0-9]{12,13}$))|(^(49110)[1-2]([0-9]{10}$|[0-9]{12,13}$))|(^(49117)[4-9]([0-9]{10}$|[0-9]{12,13}$))|(^(49118)[0-2]([0-9]{10}$|[0-9]{12,13}$))|(^(4936)([0-9]{12}$|[0-9]{14,15}$))'), new RegExp('^([0-9]{3}|[0-9]{4})?$'), true],
|
||||
'VI': [new RegExp('^4[0-9]{12}([0-9]{3})?$'), new RegExp('^[0-9]{3}$'), true],
|
||||
'MC': [new RegExp('^5[1-5][0-9]{14}$'), new RegExp('^[0-9]{3}$'), true],
|
||||
'AE': [new RegExp('^3[47][0-9]{13}$'), new RegExp('^[0-9]{4}$'), true],
|
||||
'DI': [new RegExp('^6(011|4[4-9][0-9]|5[0-9]{2})[0-9]{12}$'), new RegExp('^[0-9]{3}$'), true],
|
||||
'JCB': [new RegExp('^(3[0-9]{15}|(2131|1800)[0-9]{11})$'), new RegExp('^[0-9]{3,4}$'), true],
|
||||
'OT': [false, new RegExp('^([0-9]{3}|[0-9]{4})?$'), false]
|
||||
});
|
||||
@@ -0,0 +1,28 @@
|
||||
Official site:
|
||||
http://prototype-window.xilinus.com/index.html
|
||||
|
||||
The license notice below refers to files:
|
||||
window.js, window_effects.js, window_ext.js:
|
||||
|
||||
|
||||
|
||||
|
||||
Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,19 @@
|
||||
Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,182 @@
|
||||
== Installation/Usage
|
||||
|
||||
Just copy windows.js in your javascript directory, and default.css + default directory in your stylesheets directory
|
||||
See samples/index.html for more details and go on my web page : http://prototype-window.xilinus.com
|
||||
|
||||
== Change log
|
||||
- 04/23/07 V 1.3
|
||||
- Added: getTitle
|
||||
- Added: blur/focus function on Windows module
|
||||
- Added: onBlur event
|
||||
- Fixed: WindowCloseKey works with URL content (iframe)
|
||||
- Fixed: Modal window with a parent != document.body
|
||||
- Updated: prototype 1.5RC3
|
||||
- Updated: Dialog handle resizable,minimizable, maximizable, draggable and closable options
|
||||
- 02/27/07 V 1.2
|
||||
- Added: gridX and gridY constructor's options to snap move and resize
|
||||
- Added: Effect on modal overlay (fade/appear) only if effects.js in included.
|
||||
You can change effect options (Windows.overlayShowEffectOptions and Windows.overlayHideEffectOptions).
|
||||
|
||||
- Fixed: Multimodal mode.
|
||||
- Fixed: Works on WebKit.
|
||||
|
||||
- Beta: effects on minimize and maximize. You need to include window_effects.js to have them.
|
||||
|
||||
- 02/17/07 V 1.1
|
||||
- Constructor has been simplified, now you can just do win = new Window(). By default id is automatically generated and can be passed as options
|
||||
win = new Window({id: "my_id", width: 100, height: 100})
|
||||
Backward compatibility with old constructor win = new Window("my_id", {width: 100, height: 100})
|
||||
- Observer event can be passed as window option: win = new Window({onClose: function() {alert('close')}})
|
||||
- parent option can be id or element
|
||||
- delegate has been removed (not really usefull) and0 setCloseCallback has been addedinstead. (It could be also passed as a constructor's option closeCallback: your_callcabck)
|
||||
your_callcabck must return true to be able to close the window
|
||||
- add onMove event
|
||||
- fix constraint for minimized window
|
||||
- destroyOnClose could be passed as constructor's option: win = new Window({destroyOnClose: true})
|
||||
- constraint works for maximized windows
|
||||
- Dialog ok and cancel parameters has been renamed to onOk and onCancel for coherence (ok and cancel still works)
|
||||
- Update to Prototype 1.5 and script.aculo.us 1.7
|
||||
|
||||
- 01/14/07 V 1.00
|
||||
- add changeClassName to change look and feel dynamically.
|
||||
- add constraint move. Constraint can be on a div or document.
|
||||
- full top and bottom bar are use to move window.
|
||||
- fixed computation of window width or height.
|
||||
- add setURL/getURL/refresh and setHTMLContent. Content can be change dynamically.
|
||||
- add tooltip.js add on. It's an add-on to add dynamically tooltips on a webpage (see samples/tooltips/tooltip.html)
|
||||
Thanks to Jonathan Modell of 2moromedia.com.
|
||||
|
||||
- 12/06/06 V 0.99
|
||||
- remove addClass that automatically tries to include default.css
|
||||
- add wired move/resize
|
||||
- fix recenterAuto
|
||||
- add show to WindowStore to be able to open a window the first time, wihtout any cookie (check samples/window_store/html)
|
||||
|
||||
- 11/06/06 V 0.98
|
||||
- new optional behavior for multi-level modal window.
|
||||
- Two new add-ons (in window_ext.js file)
|
||||
+ WindowStore to save open/close window status.
|
||||
+ WindowCloseKey to handle escape key (or any keys) to close windows/dialogs
|
||||
|
||||
- 10/26/06 V 0.97
|
||||
- add recenterModal to constructor
|
||||
- setAjaxContent eval response request
|
||||
- modal window multi level
|
||||
- fix close/closeAll issues
|
||||
- add addCss (auto add default.css)
|
||||
|
||||
- 09/26/06 V 0.96.3
|
||||
- Fixed onClose, no more memory leak and nore issues with sound on IE (even on dialogs)
|
||||
- add getLocation
|
||||
- Debug select problem on Firefox
|
||||
- change mouseup event to onclick event
|
||||
- Fixed event propagation on mininize/maximize/close
|
||||
- Add frameborder=0
|
||||
- Add prototype_window_class_helper.rb by Jorge Díaz (http://xurde.info)
|
||||
|
||||
- 07/22/06 V 0.96.2
|
||||
- Fixed select issue in modal window
|
||||
|
||||
- 07/15/06 V 0.96.1
|
||||
- Bugs fixed
|
||||
- Add isVisible()
|
||||
- Update debug.js
|
||||
|
||||
- 07/11/06 V 0.96
|
||||
- New events onShow, onHide, onFocus
|
||||
- isVisible()
|
||||
- Autofit width or height if width or (NOT AND) height is set to null in the constructor
|
||||
- updateWidth / updateHeight if you need to update width or height (useful after changing window content if you do not want scrollbars)
|
||||
- Add top, left to showCenter(modal, top, left) optional arguments if you need to center only left or top value.
|
||||
|
||||
- 06/30/06 V 0.95
|
||||
- Now you can set windows or dialogs content with an Ajax request!!
|
||||
- Fixed IE issue when you destroy window with an url that embeds mp3.
|
||||
- Fixed buttonClass issue for Dialog.
|
||||
- Update samples
|
||||
|
||||
- 06/24/06 V 0.90
|
||||
- Valid XHTML 1.0 Strict!
|
||||
- Fixed minimize function
|
||||
- Fixed destroy on window without hide effects
|
||||
- No more text selection while dragging
|
||||
- Add onMinimize/onMaximize event
|
||||
|
||||
- 06/19/06 V 0.85.2
|
||||
- Remove undeclared vars
|
||||
- Set top/left to 0 if not specify
|
||||
- Destroy objet after hide effect instead of before effect instead
|
||||
- getSize
|
||||
- add extended_debug.js (from Jason Pollard)
|
||||
|
||||
- 06/13/06 V 0.85.1
|
||||
- IE bug fixed
|
||||
|
||||
- 06/12/06 V 0.85
|
||||
- Autofit width or height for Dialog
|
||||
- Better Move/Resize over
|
||||
- Allow select in modal window (even on IE)
|
||||
- WARNING, ok callback for Dialog should returns true to close the dialog
|
||||
- better window HTML code (no more div inside the td)
|
||||
- Add themes
|
||||
|
||||
- 05/23/06 V 0.80
|
||||
- Add setTitle
|
||||
- Add setStatusBar
|
||||
- Store minimize/maximize in the cookie (Thanks to Ifran)
|
||||
- Add onload constructor parameter (Thanks to Ifran)
|
||||
- Add button class for dialog (Thanks to Felix Shnir)
|
||||
|
||||
- 05/09/06 V 0.75
|
||||
- Update with Script.aculo.us 1.6.1 and Prototype 1.5.0_rc1
|
||||
- Remove PNG for dialog overlay, use opacity as done in lightbox V2
|
||||
- Add Windows.focusedWindow and Windows.closeAll
|
||||
- Add name to iframe in case of url window
|
||||
- Clean up code, use _ for private function (just name convention)
|
||||
- Add Dialog.info function, usefull for submit or notice info (in Rails)
|
||||
- Add minimize and maximize buttons
|
||||
- Add alert_lite.css without any images
|
||||
- Debug
|
||||
|
||||
- 04/15/06 V 0.70
|
||||
- Add autoposition in setContent. The window will at the element location
|
||||
- Add draggable/closable parameter if you need to specify is the window is draggable/closable or not
|
||||
- Add parent parameter if you need a specific parent instead of body
|
||||
- Better resize
|
||||
- Add setCookie to store window location/size in a cookie
|
||||
- Add parent.html sample
|
||||
|
||||
- 04/05/06 V 0.65
|
||||
- Update to Prototype 1.5.0_pre1, script.aculo.us 1.6.0
|
||||
- Add setDestoyOnClose
|
||||
- Add Windows Observer with onStartResize(), onEndResize(), onStartMove(), onEndMove(), onClose(), onDestroy() events
|
||||
- Add setContent(id, autoresize)
|
||||
|
||||
- 03/29/06 V 0.6
|
||||
- Add Window delegate to manage close action
|
||||
- Add modal mode and Dialog class with common panels: alert, confirm
|
||||
- Clean HTML code and change caracters to lowercase to be XHTML compliant (thanks to nuxygen and Joseph)
|
||||
- Add showEffectOptions, hideEffectOptions, effectOptions to Window constructor (thanks to Jon)
|
||||
- Fix checkbox IE bug (big thanks to JCA)
|
||||
- Fix other little bugs (thanks to nuxygen, Dennis, and all who sent me emails)
|
||||
- Update samples/index.html
|
||||
- Add new sample usng frame (samples/inset.html and samples/inframe.html but use only samples/inset.html)
|
||||
|
||||
- 03/27/06 V 0.51
|
||||
- New CSS theme structure
|
||||
- Add url: constructor parameter to have a window with an URL content
|
||||
- Add bottom/right constructor parameters
|
||||
- Update sample files.
|
||||
|
||||
- 03/24/06 V 0.50 Initial revision
|
||||
|
||||
|
||||
== License
|
||||
|
||||
it is licensed under the terms of the MIT License, see the included MIT-LICENSE file.
|
||||
|
||||
== Thanks
|
||||
To all of you who sent me bugs, patches and feature requests
|
||||
|
||||
http://www.ciudadmovil.com.co/q/mod/mapa/conexion.php
|
||||
http://www.desyr.net/
|
||||
@@ -0,0 +1,119 @@
|
||||
.overlay_alert {
|
||||
background-color: #85BBEF;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity: 0.6;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.alert_nw {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background: transparent url(alert/top_left.gif) no-repeat bottom left;
|
||||
}
|
||||
|
||||
.alert_n {
|
||||
height: 5px;
|
||||
background: transparent url(alert/top.gif) repeat-x bottom left;
|
||||
}
|
||||
|
||||
.alert_ne {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background: transparent url(alert/top_right.gif) no-repeat bottom left
|
||||
}
|
||||
|
||||
.alert_e {
|
||||
width: 5px;
|
||||
background: transparent url(alert/right.gif) repeat-y 0 0;
|
||||
}
|
||||
|
||||
.alert_w {
|
||||
width: 5px;
|
||||
background: transparent url(alert/left.gif) repeat-y 0 0;
|
||||
}
|
||||
|
||||
.alert_sw {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background: transparent url(alert/bottom_left.gif) no-repeat 0 0;
|
||||
}
|
||||
|
||||
.alert_s {
|
||||
height: 5px;
|
||||
background: transparent url(alert/bottom.gif) repeat-x 0 0;
|
||||
}
|
||||
|
||||
.alert_se, .alert_sizer {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background: transparent url(alert/bottom_right.gif) no-repeat 0 0;
|
||||
}
|
||||
|
||||
.alert_close {
|
||||
width:0px;
|
||||
height:0px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.alert_minimize {
|
||||
width:0px;
|
||||
height:0px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.alert_maximize {
|
||||
width:0px;
|
||||
height:0px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.alert_title {
|
||||
float:left;
|
||||
height:1px;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.alert_content {
|
||||
overflow:visible;
|
||||
color: #000;
|
||||
font-family: Tahoma, Arial, sans-serif;
|
||||
font: 12px arial;
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
/* For alert/confirm dialog */
|
||||
.alert_window {
|
||||
background: #FFF;
|
||||
padding:20px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
width:400px;
|
||||
}
|
||||
|
||||
.alert_message {
|
||||
font: 12px arial;
|
||||
width:100%;
|
||||
color:#F00;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
|
||||
.alert_buttons {
|
||||
text-align:center;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.alert_buttons input {
|
||||
width:20%;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
.alert_progress {
|
||||
float:left;
|
||||
margin:auto;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
height:16px;
|
||||
background: #FFF url('alert/progress.gif') no-repeat center center
|
||||
}
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 62 B |
|
After Width: | Height: | Size: 41 B |
|
After Width: | Height: | Size: 41 B |
|
After Width: | Height: | Size: 76 B |
|
After Width: | Height: | Size: 88 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 76 B |
|
After Width: | Height: | Size: 62 B |
|
After Width: | Height: | Size: 41 B |
|
After Width: | Height: | Size: 41 B |
@@ -0,0 +1,88 @@
|
||||
.overlay_alert_lite {
|
||||
background-color: #85BBEF;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity: 0.6;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.alert_lite_sizer {
|
||||
width:0px;
|
||||
height:0px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.alert_lite_close {
|
||||
width:0px;
|
||||
height:0px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.alert_lite_minimize {
|
||||
width:0px;
|
||||
height:0px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.alert_lite_maximize {
|
||||
width:0px;
|
||||
height:0px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.alert_lite_title {
|
||||
width:0px;
|
||||
height:0px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.alert_lite_content {
|
||||
overflow:auto;
|
||||
color: #000;
|
||||
font-family: Tahoma, Arial, sans-serif;
|
||||
font-size: 10px;
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
|
||||
/* For alert/confirm dialog */
|
||||
.alert_lite_window {
|
||||
border:1px solid #F00;
|
||||
background: #FFF;
|
||||
padding:20px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
width:400px;
|
||||
}
|
||||
|
||||
.alert_lite_message {
|
||||
font-size:16px;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
color:#F00;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
|
||||
.alert_lite_buttons {
|
||||
text-align:center;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.alert_lite_buttons input {
|
||||
width:20%;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
.alert_lite_progress {
|
||||
float:left;
|
||||
margin:auto;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
height:16px;
|
||||
background: #FFF url('alert/progress.gif') no-repeat center center
|
||||
}
|
||||
|
||||
table.alert_lite_header {
|
||||
border:1px solid #F00;
|
||||
background:#FFF
|
||||
}
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
.overlay_alphacube {
|
||||
background-color: #85BBEF;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity: 0.6;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.alphacube_nw {
|
||||
background: transparent url(alphacube/left-top.gif) no-repeat 0 0;
|
||||
width:10px;
|
||||
height:25px;
|
||||
}
|
||||
|
||||
.alphacube_n {
|
||||
background: transparent url(alphacube/top-middle.gif) repeat-x 0 0;
|
||||
height:25px;
|
||||
}
|
||||
|
||||
.alphacube_ne {
|
||||
background: transparent url(alphacube/right-top.gif) no-repeat 0 0;
|
||||
width:10px;
|
||||
height:25px;
|
||||
}
|
||||
|
||||
.alphacube_w {
|
||||
background: transparent url(alphacube/frame-left.gif) repeat-y top left;
|
||||
width:7px;
|
||||
}
|
||||
|
||||
.alphacube_e {
|
||||
background: transparent url(alphacube/frame-right.gif) repeat-y top right;
|
||||
width:7px;
|
||||
}
|
||||
|
||||
.alphacube_sw {
|
||||
background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0;
|
||||
width:7px;
|
||||
height:7px;
|
||||
}
|
||||
|
||||
.alphacube_s {
|
||||
background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0;
|
||||
height:7px;
|
||||
}
|
||||
|
||||
.alphacube_se, .alphacube_sizer {
|
||||
background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0;
|
||||
width:7px;
|
||||
height:7px;
|
||||
}
|
||||
|
||||
.alphacube_sizer {
|
||||
cursor:se-resize;
|
||||
}
|
||||
|
||||
.alphacube_close {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:0px;
|
||||
right:11px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.alphacube_minimize {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:0px;
|
||||
right:55px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.alphacube_maximize {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:0px;
|
||||
right:33px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.alphacube_title {
|
||||
float:left;
|
||||
height:14px;
|
||||
font-size:14px;
|
||||
text-align:center;
|
||||
margin-top:2px;
|
||||
width:100%;
|
||||
color:#123456;
|
||||
}
|
||||
|
||||
.alphacube_content {
|
||||
overflow:auto;
|
||||
color: #000;
|
||||
font-family: Tahoma, Arial, sans-serif;
|
||||
font: 12px arial;
|
||||
background:#FDFDFD;
|
||||
}
|
||||
|
||||
/* For alert/confirm dialog */
|
||||
.alphacube_window {
|
||||
border:1px solid #F00;
|
||||
background: #FFF;
|
||||
padding:20px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
width:400px;
|
||||
}
|
||||
|
||||
.alphacube_message {
|
||||
font: 12px arial;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
|
||||
.alphacube_buttons {
|
||||
text-align:center;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.alphacube_buttons input {
|
||||
width:20%;
|
||||
margin:10px;
|
||||
}
|
||||
|
||||
.alphacube_progress {
|
||||
float:left;
|
||||
margin:auto;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
height:16px;
|
||||
background: #FFF url('alert/progress.gif') no-repeat center center
|
||||
}
|
||||
|
||||
.alphacube_wired_frame {
|
||||
background: #FFF;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity: 0.6;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 60 B |
|
After Width: | Height: | Size: 50 B |
|
After Width: | Height: | Size: 61 B |
|
After Width: | Height: | Size: 677 B |
|
After Width: | Height: | Size: 743 B |
|
After Width: | Height: | Size: 450 B |
|
After Width: | Height: | Size: 64 B |
|
After Width: | Height: | Size: 64 B |
|
After Width: | Height: | Size: 166 B |
|
After Width: | Height: | Size: 166 B |
|
After Width: | Height: | Size: 97 B |
@@ -0,0 +1,51 @@
|
||||
<public:component>
|
||||
<public:attach event="onpropertychange" onevent="propertyChanged()" />
|
||||
<script>
|
||||
|
||||
var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32";
|
||||
var realSrc;
|
||||
var blankSrc = "blank.gif";
|
||||
|
||||
if (supported) fixImage();
|
||||
|
||||
function propertyChanged() {
|
||||
if (!supported) return;
|
||||
|
||||
var pName = event.propertyName;
|
||||
if (pName != "src") return;
|
||||
// if not set to blank
|
||||
if ( ! new RegExp(blankSrc).test(src))
|
||||
fixImage();
|
||||
};
|
||||
|
||||
function fixImage() {
|
||||
// get src
|
||||
var src = element.src;
|
||||
|
||||
// check for real change
|
||||
if (src == realSrc) {
|
||||
element.src = blankSrc;
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! new RegExp(blankSrc).test(src)) {
|
||||
// backup old src
|
||||
realSrc = src;
|
||||
}
|
||||
|
||||
// test for png
|
||||
if ( /\.png$/.test( realSrc.toLowerCase() ) ) {
|
||||
// set blank image
|
||||
element.src = blankSrc;
|
||||
// set filter
|
||||
element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +
|
||||
src + "',sizingMethod='scale')";
|
||||
}
|
||||
else {
|
||||
// remove filter
|
||||
element.runtimeStyle.filter = "";
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</public:component>
|
||||
@@ -0,0 +1,101 @@
|
||||
.overlay_darkX {
|
||||
background-color: #85BBEF;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity: 0.6;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.darkX_nw {
|
||||
background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0;
|
||||
width:6px;
|
||||
height:21px;
|
||||
}
|
||||
.darkX_n {
|
||||
background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0;
|
||||
height:21px;
|
||||
}
|
||||
.darkX_ne {
|
||||
background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0;
|
||||
width:6px;
|
||||
height:21px;
|
||||
}
|
||||
.darkX_w {
|
||||
background: transparent url(darkX/frame-left-focused.png) repeat-y top left;
|
||||
width:3px;
|
||||
}
|
||||
|
||||
.darkX_e {
|
||||
background: transparent url(darkX/frame-right-focused.png) repeat-y top right;
|
||||
width:3px;
|
||||
}
|
||||
|
||||
.darkX_sw {
|
||||
background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0;
|
||||
width:5px;
|
||||
height:3px;
|
||||
}
|
||||
.darkX_s {
|
||||
background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0;
|
||||
height:3px;
|
||||
}
|
||||
.darkX_se, .darkX_sizer {
|
||||
background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0;
|
||||
width:5px;
|
||||
height:3px;
|
||||
}
|
||||
|
||||
.darkX_sizer {
|
||||
cursor:se-resize;
|
||||
}
|
||||
|
||||
.darkX_close {
|
||||
width: 21px;
|
||||
height: 21px;
|
||||
background: transparent url(darkX/button-close-focused.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:0px;
|
||||
right:5px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.darkX_minimize {
|
||||
width: 21px;
|
||||
height: 21px;
|
||||
background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:0px;
|
||||
right:26px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.darkX_maximize {
|
||||
width: 21px;
|
||||
height: 21px;
|
||||
background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:0px;
|
||||
right:47px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
|
||||
.darkX_title {
|
||||
float:left;
|
||||
height:14px;
|
||||
font-size:12px;
|
||||
text-align:center;
|
||||
margin-top:2px;
|
||||
width:100%;
|
||||
color:#FFF;
|
||||
}
|
||||
|
||||
.darkX_content {
|
||||
overflow:auto;
|
||||
color: #E6DF2A;
|
||||
font-family: Tahoma, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
background:#5E5148;
|
||||
}
|
||||
|
After Width: | Height: | Size: 771 B |
|
After Width: | Height: | Size: 777 B |
|
After Width: | Height: | Size: 746 B |
|
After Width: | Height: | Size: 77 B |
|
After Width: | Height: | Size: 77 B |
|
After Width: | Height: | Size: 77 B |
|
After Width: | Height: | Size: 87 B |
|
After Width: | Height: | Size: 77 B |
|
After Width: | Height: | Size: 117 B |
|
After Width: | Height: | Size: 108 B |
|
After Width: | Height: | Size: 117 B |
@@ -0,0 +1,25 @@
|
||||
div.inspector div.inspectable {
|
||||
padding: 0.25em 0 0.25em 1em;
|
||||
background-color: Gray;
|
||||
color: white;
|
||||
border: outset 2px white;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.inspector div.child {
|
||||
margin: 0 0 0 1em;
|
||||
}
|
||||
|
||||
#debug_window_content { /* DIV container for debug sizing*/
|
||||
width:250px;
|
||||
height:100px;
|
||||
background-color:#000;
|
||||
}
|
||||
|
||||
#debug { /* DIV container for debug contents*/
|
||||
padding:3px;
|
||||
color:#0f0;
|
||||
font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size:10px;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
.overlay_dialog {
|
||||
background-color: #666666;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity: 0.6;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.overlay___invisible__ {
|
||||
background-color: #666666;
|
||||
filter:alpha(opacity=0);
|
||||
-moz-opacity: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.dialog_nw {
|
||||
width: 9px;
|
||||
height: 23px;
|
||||
background: transparent url(default/top_left.gif) no-repeat 0 0;
|
||||
}
|
||||
|
||||
.dialog_n {
|
||||
background: transparent url(default/top_mid.gif) repeat-x 0 0;
|
||||
height: 23px;
|
||||
}
|
||||
|
||||
.dialog_ne {
|
||||
width: 9px;
|
||||
height: 23px;
|
||||
background: transparent url(default/top_right.gif) no-repeat 0 0;
|
||||
}
|
||||
|
||||
.dialog_e {
|
||||
width: 2px;
|
||||
background: transparent url(default/center_right.gif) repeat-y 0 0;
|
||||
}
|
||||
|
||||
.dialog_w {
|
||||
width: 2px;
|
||||
background: transparent url(default/center_left.gif) repeat-y 0 0;
|
||||
}
|
||||
|
||||
.dialog_sw {
|
||||
width: 9px;
|
||||
height: 19px;
|
||||
background: transparent url(default/bottom_left.gif) no-repeat 0 0;
|
||||
}
|
||||
|
||||
.dialog_s {
|
||||
background: transparent url(default/bottom_mid.gif) repeat-x 0 0;
|
||||
height: 19px;
|
||||
}
|
||||
|
||||
.dialog_se {
|
||||
width: 9px;
|
||||
height: 19px;
|
||||
background: transparent url(default/bottom_right.gif) no-repeat 0 0;
|
||||
}
|
||||
|
||||
.dialog_sizer {
|
||||
width: 9px;
|
||||
height: 19px;
|
||||
background: transparent url(default/sizer.gif) no-repeat 0 0;
|
||||
cursor:se-resize;
|
||||
}
|
||||
|
||||
.dialog_close {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
background: transparent url(default/close.gif) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:5px;
|
||||
left:8px;
|
||||
cursor:pointer;
|
||||
z-index:2000;
|
||||
}
|
||||
|
||||
.dialog_minimize {
|
||||
width: 14px;
|
||||
height: 15px;
|
||||
background: transparent url(default/minimize.gif) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:5px;
|
||||
left:28px;
|
||||
cursor:pointer;
|
||||
z-index:2000;
|
||||
}
|
||||
|
||||
.dialog_maximize {
|
||||
width: 14px;
|
||||
height: 15px;
|
||||
background: transparent url(default/maximize.gif) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:5px;
|
||||
left:49px;
|
||||
cursor:pointer;
|
||||
z-index:2000;
|
||||
}
|
||||
|
||||
.dialog_title {
|
||||
float:left;
|
||||
height:14px;
|
||||
font-family: Tahoma, Arial, sans-serif;
|
||||
font-size:12px;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
.dialog_content {
|
||||
overflow:auto;
|
||||
color: #DDD;
|
||||
font-family: Tahoma, Arial, sans-serif;
|
||||
font-size: 10px;
|
||||
background-color:#123;
|
||||
}
|
||||
|
||||
.top_draggable, .bottom_draggable {
|
||||
cursor:move;
|
||||
}
|
||||
|
||||
.status_bar {
|
||||
font-size:12px;
|
||||
}
|
||||
.status_bar input{
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
.wired_frame {
|
||||
display: block;
|
||||
position: absolute;
|
||||
border: 1px #000 dashed;
|
||||
}
|
||||
|
||||
/* DO NOT CHANGE THESE VALUES*/
|
||||
.dialog {
|
||||
display: block;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.dialog table.table_window {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 100%;
|
||||
margin: 0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
.dialog table.table_window td , .dialog table.table_window th {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.dialog .title_window {
|
||||
-moz-user-select:none;
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 187 B |
|
After Width: | Height: | Size: 68 B |
|
After Width: | Height: | Size: 186 B |
|
After Width: | Height: | Size: 200 B |
|
After Width: | Height: | Size: 46 B |
|
After Width: | Height: | Size: 43 B |
|
After Width: | Height: | Size: 1014 B |
|
After Width: | Height: | Size: 1012 B |
|
After Width: | Height: | Size: 556 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1023 B |
|
After Width: | Height: | Size: 76 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 200 B |
|
After Width: | Height: | Size: 356 B |
|
After Width: | Height: | Size: 149 B |
|
After Width: | Height: | Size: 357 B |
|
After Width: | Height: | Size: 43 B |
@@ -0,0 +1,3 @@
|
||||
/* PNG fix for all themes that uses PNG images on IE */
|
||||
td, div { behavior: url(../themes/iefix/iepngfix.htc) }
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<public:component>
|
||||
<public:attach event="onpropertychange" onevent="doFix()" />
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// IE5.5+ PNG Alpha Fix v1.0RC4
|
||||
// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com
|
||||
|
||||
// This is licensed under the CC-GNU LGPL, version 2.1 or later.
|
||||
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/
|
||||
|
||||
// Modified/Simplified on 04/23/2007 by Sebastien Gruhier (http://www.xilinus.com)
|
||||
// To work only on background and to handle repeat bg
|
||||
|
||||
// This must be a path to a blank image. That's all the configuration you need.
|
||||
if (typeof blankImg == 'undefined') var blankImg = 'blank.gif';
|
||||
|
||||
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
|
||||
|
||||
function filt(s, m)
|
||||
{
|
||||
if (filters[f])
|
||||
{
|
||||
filters[f].enabled = s ? true : false;
|
||||
if (s) with (filters[f]) { src = s; sizingMethod = m }
|
||||
}
|
||||
else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
|
||||
}
|
||||
|
||||
function doFix()
|
||||
{
|
||||
// Assume IE7 is OK.
|
||||
if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
|
||||
(event && !/(background|src)/.test(event.propertyName))) return;
|
||||
|
||||
var bgImg = currentStyle.backgroundImage || style.backgroundImage;
|
||||
var bgRepeat = currentStyle.backgroundRepeat || style.backgroundRepeat;
|
||||
if (bgImg && bgImg != 'none')
|
||||
{
|
||||
if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
|
||||
{
|
||||
var s = RegExp.$1;
|
||||
if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
|
||||
style.width = offsetWidth + 'px';
|
||||
style.backgroundImage = 'none';
|
||||
filt(s, bgRepeat == "no-repeat" ? 'crop' : 'scale');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
doFix();
|
||||
|
||||
</script>
|
||||
</public:component>
|
||||
@@ -0,0 +1,669 @@
|
||||
.overlay___invisible__ {
|
||||
background-color: #666;
|
||||
filter:alpha(opacity=0);
|
||||
-moz-opacity: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.top_draggable, .bottom_draggable {
|
||||
cursor:move;
|
||||
}
|
||||
|
||||
.status_bar {
|
||||
font-size:12px;
|
||||
}
|
||||
.status_bar input{
|
||||
font-size:12px;
|
||||
}
|
||||
|
||||
.wired_frame {
|
||||
display:block;
|
||||
position:absolute;
|
||||
border:1px #000 dashed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.overlay_bluelighting {
|
||||
background-color:#FFF;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
opacity:0.6;
|
||||
}
|
||||
|
||||
.bluelighting_wired_frame {
|
||||
background:#FFF;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
opacity:0.6;
|
||||
}
|
||||
|
||||
.bluelighting_nw {
|
||||
background:transparent url(lighting/top-left-blue.png) no-repeat 0 0;
|
||||
width:9px;
|
||||
height:28px;
|
||||
}
|
||||
|
||||
.bluelighting_n {
|
||||
background:transparent url(lighting/top-middle-blue.png) repeat-x 0 0;
|
||||
height:28px;
|
||||
}
|
||||
|
||||
.bluelighting_ne {
|
||||
background:transparent url(lighting/top-right-blue.png) no-repeat 0 0;
|
||||
width:15px;
|
||||
height:28px;
|
||||
}
|
||||
|
||||
.bluelighting_w {
|
||||
background:transparent url(lighting/left-blue.png) repeat-y top left;
|
||||
width:9px;
|
||||
}
|
||||
|
||||
.bluelighting_e {
|
||||
background:transparent url(lighting/right-blue.png) repeat-y top right;
|
||||
width:15px;
|
||||
}
|
||||
|
||||
.bluelighting_sw {
|
||||
background:transparent url(lighting/bottom-left-blue.png) no-repeat 0 0;
|
||||
width:9px;
|
||||
height:15px;
|
||||
}
|
||||
|
||||
.bluelighting_s {
|
||||
background:transparent url(lighting/bottom-middle-blue.png) repeat-x 0 0;
|
||||
height:15px;
|
||||
}
|
||||
|
||||
.bluelighting_se, .bluelighting_sizer {
|
||||
background:transparent url(lighting/bottom-right-blue.png) no-repeat 0 0;
|
||||
width:15px;
|
||||
height:15px;
|
||||
}
|
||||
|
||||
.bluelighting_sizer {
|
||||
cursor:se-resize;
|
||||
}
|
||||
|
||||
.bluelighting_close {
|
||||
width:15px;
|
||||
height:9px;
|
||||
background:transparent url(lighting/button-close-blue.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:11px;
|
||||
right:10px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.bluelighting_maximize {
|
||||
width:15px;
|
||||
height:9px;
|
||||
background:transparent url(lighting/button-maximize-blue.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:11px;
|
||||
right:25px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.bluelighting_minimize {
|
||||
width:15px;
|
||||
height:9px;
|
||||
background:transparent url(lighting/button-minimize-blue.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:11px;
|
||||
right:40px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.bluelighting_title {
|
||||
float:left;
|
||||
height:14px;
|
||||
font-size:14px;
|
||||
font-weight:bold;
|
||||
font-family:Verdana, Arial, sans-serif;
|
||||
text-align:center;
|
||||
margin-top:2px;
|
||||
width:100%;
|
||||
color:#17385B;
|
||||
}
|
||||
|
||||
.bluelighting_content {
|
||||
overflow:auto;
|
||||
color:#000;
|
||||
font-family:Verdana, Arial, sans-serif;
|
||||
font-size:12px;
|
||||
background:#BFDBFF;
|
||||
}
|
||||
|
||||
/* For alert/confirm dialog */
|
||||
.bluelighting_window {
|
||||
border:1px solid #F00;
|
||||
background:#FFF;
|
||||
padding:20px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
width:400px;
|
||||
}
|
||||
|
||||
.bluelighting_message {
|
||||
font-size:12px;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
|
||||
.bluelighting_buttons {
|
||||
text-align:center;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.bluelighting_buttons input {
|
||||
border:1px solid #999;
|
||||
border-top-color:#CCC;
|
||||
border-left-color:#CCC;
|
||||
padding:2px;
|
||||
background-color:#FFF;
|
||||
color:#333;
|
||||
background-image:url(lighting/background_buttons.gif);
|
||||
background-repeat:repeat-x;
|
||||
font-family:Verdana, Arial, sans-serif;
|
||||
font-size:10px;
|
||||
font-weight:bold;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.bluelighting_progress {
|
||||
float:left;
|
||||
margin:auto;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
height:16px;
|
||||
background:transparent url('lighting/spinner.gif') no-repeat center center
|
||||
}
|
||||
|
||||
.overlay_greylighting {
|
||||
background-color:#FFF;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
opacity:0.6;
|
||||
}
|
||||
|
||||
.greylighting_wired_frame {
|
||||
background:#FFF;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
opacity:0.6;
|
||||
}
|
||||
|
||||
.greylighting_nw {
|
||||
background:transparent url(lighting/top-left-grey.png) no-repeat 0 0;
|
||||
width:9px;
|
||||
height:28px;
|
||||
}
|
||||
|
||||
.greylighting_n {
|
||||
background:transparent url(lighting/top-middle-grey.png) repeat-x 0 0;
|
||||
height:28px;
|
||||
}
|
||||
|
||||
.greylighting_ne {
|
||||
background:transparent url(lighting/top-right-grey.png) no-repeat 0 0;
|
||||
width:15px;
|
||||
height:28px;
|
||||
}
|
||||
|
||||
.greylighting_w {
|
||||
background:transparent url(lighting/left-grey.png) repeat-y top left;
|
||||
width:9px;
|
||||
}
|
||||
|
||||
.greylighting_e {
|
||||
background:transparent url(lighting/right-grey.png) repeat-y top right;
|
||||
width:15px;
|
||||
}
|
||||
|
||||
.greylighting_sw {
|
||||
background:transparent url(lighting/bottom-left-grey.png) no-repeat 0 0;
|
||||
width:9px;
|
||||
height:15px;
|
||||
}
|
||||
|
||||
.greylighting_s {
|
||||
background:transparent url(lighting/bottom-middle-grey.png) repeat-x 0 0;
|
||||
height:15px;
|
||||
}
|
||||
|
||||
.greylighting_se, .greylighting_sizer {
|
||||
background:transparent url(lighting/bottom-right-grey.png) no-repeat 0 0;
|
||||
width:15px;
|
||||
height:15px;
|
||||
}
|
||||
|
||||
.greylighting_sizer {
|
||||
cursor:se-resize;
|
||||
}
|
||||
|
||||
.greylighting_close {
|
||||
width:15px;
|
||||
height:9px;
|
||||
background:transparent url(lighting/button-close-grey.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:11px;
|
||||
right:10px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.greylighting_maximize {
|
||||
width:15px;
|
||||
height:9px;
|
||||
background:transparent url(lighting/button-maximize-grey.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:11px;
|
||||
right:25px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.greylighting_minimize {
|
||||
width:15px;
|
||||
height:9px;
|
||||
background:transparent url(lighting/button-minimize-grey.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:11px;
|
||||
right:40px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.greylighting_title {
|
||||
float:left;
|
||||
height:14px;
|
||||
font-size:14px;
|
||||
font-weight:bold;
|
||||
font-family:Verdana, Arial, sans-serif;
|
||||
text-align:center;
|
||||
margin-top:2px;
|
||||
width:100%;
|
||||
color:#525252;
|
||||
}
|
||||
|
||||
.greylighting_content {
|
||||
overflow:auto;
|
||||
color:#000;
|
||||
font-family:Verdana, Arial, sans-serif;
|
||||
font-size:12px;
|
||||
background:#CDCDCD;
|
||||
}
|
||||
|
||||
/* For alert/confirm dialog */
|
||||
.greylighting_window {
|
||||
border:1px solid #F00;
|
||||
background:#FFF;
|
||||
padding:20px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
width:400px;
|
||||
}
|
||||
|
||||
.greylighting_message {
|
||||
font-size:12px;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
|
||||
.greylighting_buttons {
|
||||
text-align:center;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.greylighting_buttons input {
|
||||
border:1px solid #999;
|
||||
border-top-color:#CCC;
|
||||
border-left-color:#CCC;
|
||||
padding:2px;
|
||||
background-color:#FFF;
|
||||
color:#333;
|
||||
background-image:url(lighting/background_buttons.gif);
|
||||
background-repeat:repeat-x;
|
||||
font-family:Verdana, Arial, sans-serif;
|
||||
font-size:10px;
|
||||
font-weight:bold;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.greylighting_progress {
|
||||
float:left;
|
||||
margin:auto;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
height:16px;
|
||||
background:transparent url('lighting/spinner.gif') no-repeat center center
|
||||
}
|
||||
|
||||
.overlay_greenlighting {
|
||||
background-color:#FFF;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
opacity:0.6;
|
||||
}
|
||||
|
||||
.greenlighting_wired_frame {
|
||||
background:#FFF;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
opacity:0.6;
|
||||
}
|
||||
|
||||
.greenlighting_nw {
|
||||
background:transparent url(lighting/top-left-green.png) no-repeat 0 0;
|
||||
width:9px;
|
||||
height:28px;
|
||||
}
|
||||
|
||||
.greenlighting_n {
|
||||
background:transparent url(lighting/top-middle-green.png) repeat-x 0 0;
|
||||
height:28px;
|
||||
}
|
||||
|
||||
.greenlighting_ne {
|
||||
background:transparent url(lighting/top-right-green.png) no-repeat 0 0;
|
||||
width:15px;
|
||||
height:28px;
|
||||
}
|
||||
|
||||
.greenlighting_w {
|
||||
background:transparent url(lighting/left-green.png) repeat-y top left;
|
||||
width:9px;
|
||||
}
|
||||
|
||||
.greenlighting_e {
|
||||
background:transparent url(lighting/right-green.png) repeat-y top right;
|
||||
width:15px;
|
||||
}
|
||||
|
||||
.greenlighting_sw {
|
||||
background:transparent url(lighting/bottom-left-green.png) no-repeat 0 0;
|
||||
width:9px;
|
||||
height:15px;
|
||||
}
|
||||
|
||||
.greenlighting_s {
|
||||
background:transparent url(lighting/bottom-middle-green.png) repeat-x 0 0;
|
||||
height:15px;
|
||||
}
|
||||
|
||||
.greenlighting_se, .greenlighting_sizer {
|
||||
background:transparent url(lighting/bottom-right-green.png) no-repeat 0 0;
|
||||
width:15px;
|
||||
height:15px;
|
||||
}
|
||||
|
||||
.greenlighting_sizer {
|
||||
cursor:se-resize;
|
||||
}
|
||||
|
||||
.greenlighting_close {
|
||||
width:15px;
|
||||
height:9px;
|
||||
background:transparent url(lighting/button-close-green.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:11px;
|
||||
right:10px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.greenlighting_maximize {
|
||||
width:15px;
|
||||
height:9px;
|
||||
background:transparent url(lighting/button-maximize-green.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:11px;
|
||||
right:25px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.greenlighting_minimize {
|
||||
width:15px;
|
||||
height:9px;
|
||||
background:transparent url(lighting/button-minimize-green.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:11px;
|
||||
right:40px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.greenlighting_title {
|
||||
float:left;
|
||||
height:14px;
|
||||
font-size:14px;
|
||||
font-weight:bold;
|
||||
font-family:Verdana, Arial, sans-serif;
|
||||
text-align:center;
|
||||
margin-top:2px;
|
||||
width:100%;
|
||||
color:#2A6002;
|
||||
}
|
||||
|
||||
.greenlighting_content {
|
||||
overflow:auto;
|
||||
color:#000;
|
||||
font-family:Verdana, Arial, sans-serif;
|
||||
font-size:12px;
|
||||
background:#ACFCAF;
|
||||
}
|
||||
|
||||
/* For alert/confirm dialog */
|
||||
.greenlighting_window {
|
||||
border:1px solid #F00;
|
||||
background:#FFF;
|
||||
padding:20px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
width:400px;
|
||||
}
|
||||
|
||||
.greenlighting_message {
|
||||
font-size:12px;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
|
||||
.greenlighting_buttons {
|
||||
text-align:center;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.greenlighting_buttons input {
|
||||
border:1px solid #999;
|
||||
border-top-color:#CCC;
|
||||
border-left-color:#CCC;
|
||||
padding:2px;
|
||||
background-color:#FFF;
|
||||
color:#333;
|
||||
background-image:url(lighting/background_buttons.gif);
|
||||
background-repeat:repeat-x;
|
||||
font-family:Verdana, Arial, sans-serif;
|
||||
font-size:10px;
|
||||
font-weight:bold;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.greenlighting_progress {
|
||||
float:left;
|
||||
margin:auto;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
height:16px;
|
||||
background:transparent url('lighting/spinner.gif') no-repeat center center
|
||||
}
|
||||
|
||||
.overlay_darkbluelighting {
|
||||
background-color:#FFF;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
opacity:0.6;
|
||||
}
|
||||
|
||||
.darkbluelighting_wired_frame {
|
||||
background:#FFF;
|
||||
filter:alpha(opacity=60);
|
||||
-moz-opacity:0.6;
|
||||
opacity:0.6;
|
||||
}
|
||||
|
||||
.darkbluelighting_nw {
|
||||
background:transparent url(lighting/top-left-darkblue.png) no-repeat 0 0;
|
||||
width:9px;
|
||||
height:28px;
|
||||
}
|
||||
|
||||
.darkbluelighting_n {
|
||||
background:transparent url(lighting/top-middle-darkblue.png) repeat-x 0 0;
|
||||
height:28px;
|
||||
}
|
||||
|
||||
.darkbluelighting_ne {
|
||||
background:transparent url(lighting/top-right-darkblue.png) no-repeat 0 0;
|
||||
width:15px;
|
||||
height:28px;
|
||||
}
|
||||
|
||||
.darkbluelighting_w {
|
||||
background:transparent url(lighting/left-darkblue.png) repeat-y top left;
|
||||
width:9px;
|
||||
}
|
||||
|
||||
.darkbluelighting_e {
|
||||
background:transparent url(lighting/right-darkblue.png) repeat-y top right;
|
||||
width:15px;
|
||||
}
|
||||
|
||||
.darkbluelighting_sw {
|
||||
background:transparent url(lighting/bottom-left-darkblue.png) no-repeat 0 0;
|
||||
width:9px;
|
||||
height:15px;
|
||||
}
|
||||
|
||||
.darkbluelighting_s {
|
||||
background:transparent url(lighting/bottom-middle-darkblue.png) repeat-x 0 0;
|
||||
height:15px;
|
||||
}
|
||||
|
||||
.darkbluelighting_se, .darkbluelighting_sizer {
|
||||
background:transparent url(lighting/bottom-right-darkblue.png) no-repeat 0 0;
|
||||
width:15px;
|
||||
height:15px;
|
||||
}
|
||||
|
||||
.darkbluelighting_sizer {
|
||||
cursor:se-resize;
|
||||
}
|
||||
|
||||
.darkbluelighting_close {
|
||||
width:15px;
|
||||
height:9px;
|
||||
background:transparent url(lighting/button-close-darkblue.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:11px;
|
||||
right:10px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.darkbluelighting_maximize {
|
||||
width:15px;
|
||||
height:9px;
|
||||
background:transparent url(lighting/button-maximize-darkblue.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:11px;
|
||||
right:25px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.darkbluelighting_minimize {
|
||||
width:15px;
|
||||
height:9px;
|
||||
background:transparent url(lighting/button-minimize-darkblue.png) no-repeat 0 0;
|
||||
position:absolute;
|
||||
top:11px;
|
||||
right:40px;
|
||||
cursor:pointer;
|
||||
z-index:1000;
|
||||
}
|
||||
|
||||
.darkbluelighting_title {
|
||||
float:left;
|
||||
height:14px;
|
||||
font-size:14px;
|
||||
font-weight:bold;
|
||||
font-family:Verdana, Arial, sans-serif;
|
||||
text-align:center;
|
||||
margin-top:2px;
|
||||
width:100%;
|
||||
color:#E4EFFD;
|
||||
}
|
||||
|
||||
.darkbluelighting_content {
|
||||
overflow:auto;
|
||||
color:#FFF;
|
||||
font-family:Verdana, Arial, sans-serif;
|
||||
font-size:12px;
|
||||
background:#0413C0;
|
||||
}
|
||||
|
||||
/* For alert/confirm dialog */
|
||||
.darkbluelighting_window {
|
||||
border:1px solid #F00;
|
||||
background:#FFF;
|
||||
padding:20px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
width:400px;
|
||||
}
|
||||
|
||||
.darkbluelighting_message {
|
||||
font-size:12px;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
|
||||
.darkbluelighting_buttons {
|
||||
text-align:center;
|
||||
width:100%;
|
||||
}
|
||||
|
||||
.darkbluelighting_buttons input {
|
||||
border:1px solid #999;
|
||||
border-top-color:#CCC;
|
||||
border-left-color:#CCC;
|
||||
padding:2px;
|
||||
background-color:#FFF;
|
||||
color:#333;
|
||||
background-image:url(lighting/background_buttons.gif);
|
||||
background-repeat:repeat-x;
|
||||
font-family:Verdana, Arial, sans-serif;
|
||||
font-size:10px;
|
||||
font-weight:bold;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.darkbluelighting_progress {
|
||||
float:left;
|
||||
margin:auto;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
height:16px;
|
||||
background:transparent url('lighting/spinner.gif') no-repeat center center
|
||||
}
|
||||
|
After Width: | Height: | Size: 57 B |
|
After Width: | Height: | Size: 237 B |
|
After Width: | Height: | Size: 230 B |
|
After Width: | Height: | Size: 237 B |
|
After Width: | Height: | Size: 212 B |
|
After Width: | Height: | Size: 95 B |
|
After Width: | Height: | Size: 95 B |
|
After Width: | Height: | Size: 95 B |
|
After Width: | Height: | Size: 87 B |
|
After Width: | Height: | Size: 285 B |
|
After Width: | Height: | Size: 280 B |
|
After Width: | Height: | Size: 288 B |
|
After Width: | Height: | Size: 268 B |
|
After Width: | Height: | Size: 189 B |
|
After Width: | Height: | Size: 188 B |
|
After Width: | Height: | Size: 183 B |
|
After Width: | Height: | Size: 156 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 127 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 122 B |
|
After Width: | Height: | Size: 108 B |
|
After Width: | Height: | Size: 108 B |
|
After Width: | Height: | Size: 108 B |
|
After Width: | Height: | Size: 101 B |
|
After Width: | Height: | Size: 86 B |
|
After Width: | Height: | Size: 86 B |
|
After Width: | Height: | Size: 86 B |
|
After Width: | Height: | Size: 77 B |
@@ -0,0 +1,67 @@
|
||||
<public:component>
|
||||
<public:attach event="onpropertychange" onevent="doFix()" />
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// IE5.5+ PNG Alpha Fix v1.0RC4
|
||||
// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com
|
||||
|
||||
// This is licensed under the CC-GNU LGPL, version 2.1 or later.
|
||||
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/
|
||||
|
||||
|
||||
// This must be a path to a blank image. That's all the configuration you need.
|
||||
if (typeof blankImg == 'undefined') var blankImg = 'blank.gif';
|
||||
|
||||
|
||||
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
|
||||
|
||||
function filt(s, m)
|
||||
{
|
||||
if (filters[f])
|
||||
{
|
||||
filters[f].enabled = s ? true : false;
|
||||
if (s) with (filters[f]) { src = s; sizingMethod = m }
|
||||
}
|
||||
else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
|
||||
}
|
||||
|
||||
function doFix()
|
||||
{
|
||||
alert('ok')
|
||||
|
||||
// Assume IE7 is OK.
|
||||
if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) ||
|
||||
(event && !/(background|src)/.test(event.propertyName))) return;
|
||||
|
||||
var bgImg = currentStyle.backgroundImage || style.backgroundImage;
|
||||
|
||||
if (tagName == 'IMG')
|
||||
{
|
||||
if ((/\.png$/i).test(src))
|
||||
{
|
||||
if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
|
||||
style.width = offsetWidth + 'px';
|
||||
filt(src, 'scale');
|
||||
src = blankImg;
|
||||
}
|
||||
else if (src.indexOf(blankImg) < 0) filt();
|
||||
}
|
||||
else if (bgImg && bgImg != 'none')
|
||||
{
|
||||
if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))
|
||||
{
|
||||
var s = RegExp.$1;
|
||||
if (currentStyle.width == 'auto' && currentStyle.height == 'auto')
|
||||
style.width = offsetWidth + 'px';
|
||||
style.backgroundImage = 'none';
|
||||
filt(s, 'crop');
|
||||
// IE link fix.
|
||||
for (var n = 0; n < childNodes.length; n++)
|
||||
if (childNodes[n].style) childNodes[n].style.position = 'relative';
|
||||
}
|
||||
else filt();
|
||||
}
|
||||
}
|
||||
|
||||
doFix();
|
||||
|
After Width: | Height: | Size: 90 B |
|
After Width: | Height: | Size: 89 B |
|
After Width: | Height: | Size: 90 B |
|
After Width: | Height: | Size: 84 B |