Вход Регистрация
Файл: module-assets/admin/js/lib/jquery.validVal-4.3.2.js
Строк: 921
<?php

/*      *    jQuery validVal version 4.3.2  *    demo's and documentation:  *    validval.frebsite.nl  *  *    Copyright (c) 2013 Fred Heusschen  *    www.frebsite.nl  *  *    Dual licensed under the MIT and GPL licenses.  *    http://en.wikipedia.org/wiki/MIT_License  *    http://en.wikipedia.org/wiki/GNU_General_Public_License  */ (function( $ ) {     if ( $.fn.validVal ) {         return;     }     var textSelector 'input:not( [type="button"], [type="submit"], [type="reset"] )',         inputSelector textSelector ', textarea, select';     $.fn.validVal = $.fn.validval = function( ocdebug ) {         if ( this.length ) {             return this.each(function() {                 $(this).validValo);             });         }         //    debug option can be any of the arguments         if ( typeof o == 'boolean' ) {             debug o;             null;         } else if ( typeof c == 'boolean' ) {             debug c;             null;         }         var form this,             opts = $.extendtrue, {}, $.fn.validVal.defaults),             clss = $.extendtrue, {}, $.fn.validVal.classes);         //    DEPRECATED         if ( typeof opts.invalidFormFunc == 'function' ) {             $.fn.validVal.deprecated'callback function "invalidFormFunc"''"form.onInvalid"' );             opts.form.onInvalid opts.invalidFormFunc;         }         if ( typeof opts.onSubmit == 'function' ) {             $.fn.validVal.deprecated'callback function "onSubmit"''"form.onValid"' );             opts.form.onValid opts.onSubmit;         }         if ( typeof opts.onReset == 'function' ) {             $.fn.validVal.deprecated'callback function "onReset"''"form.onReset"' );             opts.form.onReset opts.onReset;         }         if ( typeof opts.validFieldFunc == 'function' ) {             $.fn.validVal.deprecated'callback function "validFieldFunc"''"fields.onValid"' );             opts.fields.onValid opts.validFieldFunc;         }         if ( typeof opts.invalidFieldFunc == 'function' ) {             $.fn.validVal.deprecated'callback function "invalidFieldFunc"''"fields.onInvalid"' );             opts.fields.onInvalid opts.invalidFieldFunc;         }         if ( typeof opts.validate.hiddenFields == 'boolean' ) {             $.fn.validVal.deprecated'option "validate.hiddenFields"''"validate.fields.hidden"' );             opts.validate.fields.hidden opts.validate.hiddenFields;         }         if ( typeof opts.validate.disabledFields == 'boolean' ) {             $.fn.validVal.deprecated'option "validate.disabledFields"''"validate.fields.disabled"' );             opts.validate.fields.disabled opts.validate.disabledFields;         }         //    /DEPRECATED         //    destroy if re-created         if ( dataform'isValidVal' ) ) {             form.trigger'destroy.vv' );         }         form.data'vv-isValidVal'true );         //    collect validations         opts.validations = {};         if ( $.fn.validVal.customValidations ) {             opts.validations = $.extendopts.validations, $.fn.validVal.customValidations );         }         if ( opts.customValidations ) {             opts.validations = $.extendopts.validationsopts.customValidations );         }         opts.validations = $.extendopts.validations, $.fn.validVal.defaultValidations );         //    bind events         form.bind(             'addField.vv',             function( eventel ) {                 event.stopPropagation();                 var $ff = $( el );                 if ( data$ff'isValidVal' ) ) {                     $ff.trigger'destroy.vv' );                 }                 $ff.data'vv-isValidVal'true );                 get_validations$ffopts );                 //    bind events                 $ff.bind(                     'focus.vv',                     function( event ) {                         clear_placeholdervalue$ff );                         $ff.addClassgetclass'focus' ) );                     }                 );                 $ff.bind(                     'blur.vv',                     function( event ) {                         $ff.removeClassgetclass'focus' ) );                         $ff.trigger'validate.vv', [ opts.validate.onBlur ] );                     }                 );                 $ff.bind(                     'keyup.vv',                     function( event ) {                         if ( !preventkeyupevent.keyCode ) ) {                             $ff.trigger'validate.vv', [ opts.validate.onKeyupfalse ] );                         }                     }                 );                 $ff.bind(                     'validate.vv',                     function( eventonEventfixPlaceholder ) {                         event.stopPropagation();                         if ( onEvent === false ) {                             return;                         }                         if ( typeof fixPlaceholder != 'boolean' ) {                             fixPlaceholder true;                         }                         $ff.data'vv-isValid''valid' );                         if ( ( $ff.is':hidden' ) && !opts.validate.fields.hidden ) ||                             ( $ff.is':disabled' ) && !opts.validate.fields.disabled )                         ) {                             return;                         }                         if ( fixPlaceholder ) {                             clear_placeholdervalue$ff );                         }                         if ( typeof opts.fields.onValidate == 'function' ) {                             opts.fields.onValidate.call$ff[0], formopts.language );                         }                         var invalid_check false,                             val trim$ff.val() );                         for ( var v in opts.validations ) {                             var opts.validations];                             if ( has_validation$ff) && typeof f == 'function' ) {                                 if ( !f.call$ff[0], val ) ) {                                     invalid_check v;                                     break;                                 }                             }                         }                         var is_valid = ( invalid_check ) ? false true;                         var callCallback = ( is_valid )                             ? ( onEvent !== 'invalid' )                             : ( onEvent !== 'valid' );                         $ff.trigger'isValid.vv', [ is_validcallCallback ] );                         set_validationgroup$ffis_valid );                         if ( fixPlaceholder ) {                             restore_placeholdervalue$ff );                         }                         if ( debug && invalid_check ) {                             $.fn.validVal.debug'invalid validation: ' invalid_check );                         }                         return is_valid;                     }                 );                 $ff.bind(                     'isValid.vv',                     function( eventvalidcallCallback ) {                         event.stopPropagation();                         if ( typeof valid == 'boolean' ) {                             if ( valid ) {                                 $ff.data'vv-isValid''valid' );                                 if ( callCallback ) {                                     set_valid$ffformopts );                                 }                             } else {                                 $ff.data'vv-isValid''NOT' );                                 if ( callCallback ) {                                     set_invalid$ffformopts );                                 }                             }                         } else {                             return data$ff'isValid' ) == 'valid';                         }                     }                 );                 $ff.bind(                     'addValidation.vv',                     function( eventvalidation ) {                         event.stopPropagation();                                                  var validations data$ff'validations' ).split' ' );                         validations.pushvalidation );                         $ff.data'vv-validations'validations.join' ' ) );                     }                 );                 $ff.bind(                     'removeValidation.vv',                     function( eventvalidation ) {                         event.stopPropagation();                                                  var validations ' ' data$ff'validations' ) + ' ';                         validations validations.split' ' validation ' ' );                         $ff.data'vv-validations'validations.join' ' ) );                     }                 );                 $ff.bind(                     'destroy.vv',                     function( event ) {                         event.stopPropagation();                                                  $ff.unbind'.vv' );                         $ff.data'vv-isValidVal'false );                     }                 );                 //    placeholder                 if ( is_placeholderfield$ff ) ) {                     if ( $ff.val() == '' ) {                         $ff.valdata$ff'placeholder-value' ) );                     }                     if ( has_placeholdervalue$ff ) ) {                         $ff.addClassgetclass'inactive' ) );                     }                     if ( $ff.is'select' ) ) {                         $ff.find'option:eq(' data$ff'placeholder-number' ) + ')' ).addClassgetclass'inactive' ) );                         $ff.bind(                             'change.vv',                             function( event ) {                                 if ( has_placeholdervalue$ff ) ) {                                     $ff.addClassgetclass'inactive' ) );                                 } else {                                     $ff.removeClassgetclass'inactive' ) );                                 }                             }                         );                     }                 }                 //    corresponding                 if ( is_correspondingfield$ff ) ) {                     $(inputSelector).filter('[name="' $ff.data'vv-corresponding' ) + '"]').bind(                         'blur.vv',                         function( event ) {                             $ff.trigger'validate.vv', [ opts.validate.onBlur ] );                         }                     ).bind(                         'keyup.vv',                         function( event ) {                             if ( !preventkeyupevent.keyCode ) ) {                                 $ff.trigger'validate.vv', [ opts.validate.onKeyupfalse ] );                             }                         }                     );                 }                 //    autotabbing                 if ( has_validation$ff'autotab' ) ) {                     var max $ff.attr'maxlength' ),                         tab $ff.attr'tabindex' ),                         $next = $(inputSelector).filter('[tabindex="' + ( parseInttab ) + ) + '"]');                     if ( $ff.is'select' ) ) {                         if ( tab ) {                             $ff.bind(                                 'change.vv',                                 function( event ) {                                     if ( $next.length ) {                                         $next.focus();                                     }                                 }                             );                         }                     } else {                         if ( max && tab ) {                             $ff.bind(                                 'keyup.vv',                                 function( event ) {                                     if ( $ff.val().length == max ) {                                         if ( !preventkeyupevent.keyCode ) ) {                                             $ff.trigger'blur' );                                             if ( $next.length ) {                                                 $next.focus();                                             }                                         }                                     }                                 }                             );                         }                     }                 }                 //    autofocus                 if ( has_validation$ff'autofocus' ) && !$ff.is':disabled' ) ) {                     $ff.focus();                 }             }         );         opts.validate.fields.filter( $(inputSelectorform) ).each(function() {             form.trigger'addField.vv', [ $(this) ] );         }).filter'select, input[type="checkbox"], input[type="radio"]' ).bind(             'change.vv',             function( event ) {                 $(this).trigger'blur.vv' );             }         );         form.bind(             'destroy.vv',             function( event ) {                 event.stopPropagation();                                  form.unbind'.vv' );                 opts.validate.fields.filter( $(inputSelectorform) ).trigger'destroy.vv' );                 form.data'vv-isValidVal'false );             }         );         form.bind(             'validate.vv',             function( eventbodycallCallback ) {                 event.stopPropagation();                 if ( typeof body == 'undefined' ) {                     body form;                     callCallback true;                 }                 else if ( typeof callCallback != 'boolean' ) {                     callCallback false;                 }                 if ( typeof opts.form.onValidate == 'function' ) {                     opts.form.onValidate.callform[0], opts.language );                 }                 var miss_arr = $(),                     data_obj = {};                 opts.validate.fields.filter( $(inputSelectorbody) ).each(function() {                     var $ff = $(this);                     if ( data$ff'isValidVal' ) ) {                         $ff.trigger'validate.vv', [ opts.validate.onSubmit ] );                         var $ff.val();                         if ( data$ff'isValid' ) == 'valid' ) {                             if ( $ff.is'[type="radio"]' ) || $ff.is'[type="checkbox"]' ) ) {                                 if ( !$ff.is':checked' ) ) {                                     '';                                 }                             }                             if (typeof v == 'undefined' || == null) {                                 '';                             }                             if ( v.length ) {                                 data_obj$ff.attr'name' ) ] = v;                             }                         } else {                             if ( opts.validate.onSubmit !== false ) {                                 miss_arr miss_arr.add$ff );                             }                         }                     }                 });                 if ( miss_arr.length ) {                     if ( typeof opts.form.onInvalid == 'function' && callCallback ) {                         opts.form.onInvalid.callform[0], miss_arropts.language );                     }                     return false;                 } else {                     if ( typeof opts.form.onValid == 'function' && callCallback ) {                         opts.form.onValid.callform[0], opts.language );                     }                     return data_obj;                 }             }         );         form.bind(             'submitForm.vv',             function( event ) {                 event.stopPropagation();                 var result form.triggerHandler'validate.vv' );                 if ( result ) {                     opts.validate.fields.filter( $(textSelectorform) ).each(function() {                         clear_placeholdervalue( $(this) );                     });                 }                 return result;             }         );         form.bind(             'resetForm.vv',             function( event ) {                 event.stopPropagation();                 if ( typeof opts.form.onReset == 'function' ) {                     opts.form.onReset.callform[0], opts.language );                 }                 opts.validate.fields.filter( $(inputSelectorform) ).each(function() {                     var $ff = $(this);                     if ( is_placeholderfield$ff ) ) {                         $ff.addClassgetclass'inactive' ) );                         $ff.valdata$ff'placeholder-value' ) );                     } else {                         $ff.valdata$ff'original-value' ) );                     }                     $ff.trigger'isValid.vv', [ truetrue ] );                 });                 return false;             }         );         // bind to native submit/reset         if ( form.is'form' ) ) {             form.attr'novalidate''novalidate' );             form.bind(                 'submit.vv',                 function( event ) {                     return form.triggerHandler'submitForm.vv' );                 }             );             form.bind(                 'reset.vv',                 function( event ) {                     return form.triggerHandler'resetForm.vv' );                 }             );         }         return form;     };     $.fn.validVal.defaults = {         'selectPlaceholder'0,         'supportHtml5'true,         'language''en',         'customValidations': {},         'validate': {             'onBlur'true,             'onSubmit'true,             'onKeyup'false,             'fields': {                 'hidden'false,                 'disabled'false,                 'filter':function( $i ) {                     return $i;                 }             }         },         'fields': {             'onValidate'null,             'onValid': function() {                 var $f = $(this);                 $f.add$f.parent() ).removeClassgetclass'invalid' ) );             },             'onInvalid': function() {                 var $f = $(this);                 $f.add$f.parent() ).addClassgetclass'invalid' ) );             }         },         'form': {             'onReset'null,             'onValidate'null,             'onValid'null,             'onInvalid': function( fieldArrlanguage ) {                 switch ( language ) {                     case 'nl':                         msg 'Let op, niet alle velden zijn correct ingevuld.';                         break;                     case 'de':                         msg 'Achtung, nicht alle Felder sind korrekt ausgefuellt.';                         break;                     case 'es':                         msg 'Atención, no se han completado todos los campos correctamente.';                         break;                     case 'en':                     default:                         msg 'Attention, not all fields have been filled out correctly.';                         break;                 }                 alertmsg );                 fieldArr.first().focus();             }         },         'keepClasses': ['required'],         'keepAttributes': ['pattern']     };     $.fn.validVal.defaultValidations = {         'required': function( ) {             var $f = $(this);             if ( $f.is'[type="radio"]' ) || $f.is'[type="checkbox"]' ) ) {                 if ( $f.is'[type="radio"]' ) ) {                     var name $f.attr'name' );                     if ( name && name.length ) {                         $f = $( 'input[name="' name '"]' );                     }                 }                 if ( !$f.is':checked' ) ) {                     return false;                 }             } else if ( $f.is'select' ) ) {                 if ( is_placeholderfield$f ) ) {                     if ( has_placeholdervalue$f ) ) {                         return false;                     }                 } else {                     if ( v.length == ) {                         return false;                     }                 }             } else {                 if ( v.length == ) {                     return false;                 }             }             return true;         },         'Required': function( ) {             return $.fn.validVal.defaultValidations.required.callthis);         },         'requiredgroup': function( ) {             var $f = $(this),                 gr data$f'requiredgroup' );             if ( gr.length ) {                 $f = $(inputSelector).filter':vv-requiredgroup(' gr ')' );             }             var result false;             $f.each(function() {                 var this;                 if ( $.fn.validVal.defaultValidations.required.callftrim( $(f).val() ) ) ) {                     result true;                 }             });             return result;         },         'corresponding': function( ) {             var $f = $(inputSelector).filter('[name="' data( $(this), 'corresponding' ) + '"]');             clear_placeholdervalue$f );             var org trim$f.val() );             restore_placeholdervalue$f );             return ( == org );         },         'number': function( ) {             strip_whitespace);             if ( v.length == ) {                 return true;             }             if ( isNaN) ) {                 return false;             }             return true;         },         'email': function( ) {             if ( v.length == ) {                 return true;             }             var = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;             return r.test);         },         'url': function( ) {             if ( v.length == ) {                 return true;             }             if ( v.match(/^www./) ) {                 "http://" v;             }             return v.match(/^(http://|https://)(.{4,})$/);         },         'pattern': function( ) {             if ( v.length == ) {                 return true;             }             var $f = $(this),                 data$f'pattern' );             if ( p.substr0) == '/' ) {                 p.substr);             }             if ( p.substrp.length ) == '/' ) {                 p.substr0p.length -);             }             return new RegExp).test);         }     };     $.fn.validVal.classes = {         //    key        :  class         'focus'        'focus',         'invalid'    'invalid',         'inactive'    'inactive'     };     $.fn.validVal.debug = function( msg ) {         if ( typeof console != 'undefined' ) {             if ( typeof console.log != 'undefined' ) {                 console.log'validVal: ' msg );             }         }     };     $.fn.validVal.deprecated = function( funcalt ) {         if ( typeof console != 'undefined' ) {             if ( typeof console.error != 'undefined' ) {                 console.errorfunc ' is DEPRECATED, use ' alt ' instead.' );             }         }     };     //    test for borwser support     $.fn.validVal.support = {         touch: (function() {             return 'ontouchstart' in document.documentElement;         })(),         placeholder: (function() {             return 'placeholder' in document.createElement'input' );         })()     };     //    extend jQuery selector engine     $.expr[':']['vv-requiredgroup'] = function( elemcounterparams ) {        return selector_engine'requiredgroup'elemcounterparams );     };     $.expr[':']['vv-validationgroup'] = function( elemcounterparams ) {        return selector_engine'validationgroup'elemcounterparams );     };     function selector_enginestringelemcounterparams ) {          if ( !elem || !params || !params] ) {             return false;         }         var group data( $(elem), string );         if ( !group.length ) {             return false;         }         return group == params];     }     //    placeholder functions     function is_placeholderfield$f ) {         return has_validation$f'placeholder' );     }     function has_placeholdervalue$f ) {         if ( trim$f.val() ) == data$f'placeholder-value' ) ) {             return true;         }         return false;     }     function clear_placeholdervalue$f ) {         if ( is_placeholderfield$f ) ) {             if ( has_placeholdervalue$f ) && !$f.is'select' )  ) {                 $f.val'' );                 $f.removeClassgetclass'inactive' ) );             }         }     }     function restore_placeholdervalue$f ) {         if ( is_placeholderfield$f ) ) {             if ( trim$f.val() ) == '' && !$f.is'select' ) ) {                 $f.valdata$f'placeholder-value' ) );                 $f.addClassgetclass'inactive' ) );             }         }     }     //    corresponding     function is_correspondingfield$f ) {         return has_validation$f'corresponding' );     }     //    validate group     function is_validationgroupfield$f ) {         return has_validation$f'validationgroup' );     }     function set_validationgroup$fvalid ) {         if ( is_validationgroupfield$f ) ) {             var gr data$f'validationgroup' );             if ( gr.length ) {                 $(inputSelector).filter':vv-validationgroup(' gr ')' ).not$f ).each(function() {                     $(this).trigger'isValid.vv', [ validtrue ] );                 });             }         }     }     //    valid/invalid     function set_valid$ff) {         if ( typeof o.fields.onValid == 'function' ) {             o.fields.onValid.call$f[0], fo.language );         }     }     function set_invalid$ff) {         if ( typeof o.fields.onInvalid == 'function' ) {             o.fields.onInvalid.call$f[0], fo.language );         }     }     //    HTML5 stuff     function has_html5_attr$f) {         // non HTML5 browsers         if ( typeof $f.attr) == 'undefined' )     {             return false;         }         // HTML5 browsers         if ( $f.attr) === 'false' || $f.attr) === false ) {             return false;         }         return true;     }     function has_html5_type$f) {         // cool HTML5 browsers         if ( $f.attr'type' ) == ) {             return true;         }         // non-HTML5 but still cool browsers         if ( $f.is'input[type="' '"]' ) ) {             return true;         }         //    non-HTML5, non-cool browser         var res get_outerHtml$f );         if ( res.indexOf'type="' '"' ) != -|| res.indexOf'type='' + t + ''' ) != -|| res.indexOf'type=' '' ) != -) {             return true;         }         return false;     }     //    get all validations     function get_validations$f) {         var classes $f.attr'class' );         //    DEPRECATED         var alt $f.attr'alt' );         if ( alt && alt.length && !$f.hasClass'pattern' ) ) {             if ( $f.hasClass'corresponding' ) ) {                 $.fn.validVal.deprecated'name in "alt"-attribute''class="corresponding:name"' );                 $f.removeClass'corresponding' );                 $f.removeAttr'alt' );                 if ( o.supportHtml5 ) {                     $f.data'vv-corresponding'alt );                 } else {                     $f.addClass'corresponding:' alt );                 }             }             if ( $f.hasClass'required' ) ) {                 $.fn.validVal.deprecated'grouping required elements in the "alt"-attribute''class="requiredgroup:name"' );                 $f.removeClass'required' );                 $f.removeAttr'alt' );                 if ( o.supportHtml5 ) {                     $f.data'vv-requiredgroup'alt );                 } else {                     $f.addClass'requiredgroup:' alt );                 }             }         }         if ( classes && classes.indexOf'required:' ) != -) {             $.fn.validVal.deprecated'grouping required elements with class="required:name"''class="requiredgroup:name"' );         }         //    /DEPRECATED         var validations = [],             original_value get_original_value$f);         //    refactor HTML5 usage         if ( o.supportHtml5 ) {             var valids data$f'validations' );             if ( valids.length ) {                 validations.pushvalids );             }             //    placeholder attribute, only use if placeholder not supported by browser or placeholder not in keepAttributes-option             if ( has_html5_attr$f'placeholder' ) && $f.attr'placeholder' ).length ) {                 if ( !$.fn.validVal.support.placeholder || $.inArray'placeholder'o.keepAttributes ) == -) {                     $f.data'vv-placeholder-value'$f.attr'placeholder' ) );                 }             }             var placeh data$f'placeholder-value' );             if ( placeh.length ) {                 removeAttr$f'placeholder');                 validations.push'placeholder' );             }             //    pattern attribute             if ( has_html5_attr$f'pattern' ) && $f.attr'pattern' ).length )    {                 $f.data'vv-pattern'$f.attr'pattern' ) );                 removeAttr$f'pattern');                 validations.push'pattern' );             }             //    corresponding, required group and validation group             var dts = [ 'corresponding''requiredgroup''validationgroup' ];             for ( var 0dts.lengthld++ ) {                 if ( data$fdts] ).length ) {                     validations.pushdts] );                 }             }             // attributes             var atr = [ 'required''autofocus' ];             for ( var 0atr.lengthla++ ) {                 if ( has_html5_attr$fatr] ) ) {                     validations.pushatr] );                     removeAttr$fatr], );                 }             }             //    type-values             var typ = [ 'number''email''url' ];             for ( var 0typ.lengthlt++ ) {                 if ( has_html5_type$ftyp] ) ) {                     validations.pushtyp] );                 }             }         }         //    refactor non-HTML5 usage         var classes $f.attr'class' );         if ( classes && classes.length ) {             //    placeholder             if ( $f.hasClass'placeholder' ) ) {                 removeClass$f'placeholder');                 $f.data'vv-placeholder-value'original_value );                 validations.push'placeholder' );                 original_value '';             }             //    corresponding             var corsp 'corresponding:',                 start classes.indexOfcorsp );             if ( start != -) {                 var corrcls classes.substrstart ).split' ' )[ ],                     corresp corrcls.substr(  corsp.length );                 if ( corresp.length ) {                     $f.removeClasscorrcls );                     $f.data'vv-corresponding'corresp );                     validations.push'corresponding' );                 }             }             //    pattern             //    still using alt-attribute...             if ( $f.hasClass'pattern' ) ) {                 removeClass$f'pattern');                 $f.data'vv-pattern'get_original_value_from_value$f'alt' ) );                 removeAttr$f'alt');                 validations.push'pattern' );             }             //    groups             var grp = [ 'requiredgroup''validationgroup' ];             for ( var 0grp.lengthlg++ ) {                 var group grp] + ':',                     start classes.indexOfgroup );                 if ( start != -) {                     var groupclass classes.substrstart ).split' ' )[ ],                         groupname groupclass.substrgroup.length );                     if ( groupname.length ) {                         $f.removeClassgroupclass );                         $f.data'vv-' grp], groupname );                         validations.pushgrp]);                     }                 }             }         }         //    add all remaining classes         var classes $f.attr'class' );         if ( classes && classes.length ) {             validations.pushclasses );         }         //    store validations         $f.data'vv-validations'validations.join' ' ) );         //    save original value         $f.data'vv-original-value'original_value );     }     //    misc     function has_validation$f) {         var ' ' data$f'validations' ) + ' ';         return d.indexOf' ' ' ' ) != -1;     }     function data$f) {         var $f.data'vv-' );         if ( typeof v == 'undefined' ) {             '';         }         return v;     }     function removeAttr$fa) {         if ( $.inArrayao.keepAttributes ) == -) {             $f.removeAttr);         }     }     function removeClass$fc) {         if ( $.inArrayco.keepClasses ) == -) {             $f.removeClass);         }     }     function get_original_value$f) {         var val get_outerHtml$f );         if ( $f.is'select' ) ) {             var num 0,                 dal data$f'placeholder-number' );             if ( dal.length ) {                 num dal;             } else if ( typeof o.selectPlaceholder == 'number' ) {                 num o.selectPlaceholder;             } else {                 $f.find'> option' ).each(function( ) {                     val get_outerHtml( $(this) );                     var qal val.split"'" ).join'"' ).split'"' ).join'' );                     qal qal.substr0qal.indexOf'>' ) );                          if ( qal.indexOf'selected=selected' ) > -) {                         num n;                     }                 });             }             $f.data'vv-placeholder-number'num );             return get_original_value_from_value$f.find'> option:nth(' num ')' ) );         } else if ( $f.is'textarea' ) ) {             val val.substrval.indexOf'>' ) + );             val val.substr0val.indexOf'</textarea' ) );             return val;         } else {             return get_original_value_from_value$f );         }     }     function get_original_value_from_value$fat ) {         if ( typeof at == 'undefined' ) {             at 'value';         }         var val get_outerHtml$f ),             lal val.toLowerCase();         if ( lal.indexOfat '=' ) > -) {             val val.substrlal.indexOfat '=' ) + ( at.length ) );             var quot val.substr0);             if ( quot == '"' || quot == "'" ) {                 val val.substr);                 val val.substr0val.indexOfquot ) );             } else {                 val val.substr0val.indexOf' ' ) );             }             return val;         } else {             return '';         }     }     function get_outerHtml$e ) {         return $( '<div></div>' ).append$e.clone() ).html();     }     function getclasscl ) {         if ( typeof clss != 'undefined' && typeof clsscl ] != 'undefined' ) {             return clsscl ];         }         return cl;     }     function trimstr ) {         if ( str === null ) {             return '';         }         if ( typeof str == 'object' ) {             var arr = [];             for ( var a in str ) {                 arr] = trimstr] );             }             return arr;         }         if ( typeof str != 'string' ) {             return '';         }         if ( str.length == ) {             return '';         }         return str.replace(/^ss*/, '').replace(/ss*$/, '');     }     function strip_whitespacestr ) {         if ( str === null ) {             return '';         }         if ( typeof str == 'object' ) {             for ( var a in str ) {                 str] = strip_whitespacestr] );             }             return str;         }         if ( typeof str != 'string' ) {             return '';         }         if ( str.length == ) {             return '';         }         str trimstr );         var = [ ' ''-''+''('')''/''\' ];         for ( var i = 0, l = r.length; i < l; i++ ) {             str = str.split( r[ i ] ).join( '' );         }         return str;     }     function preventkeyup( kc ) {         switch( kc ) {             case 9:        //    tab             case 13:     //    enter             case 16:    //    shift             case 17:    //    control             case 18:    //    alt             case 37:    //    left             case 38:    //    up             case 39:    //    right             case 40:    //    down             case 224:    //    command                 return true;                 break;             default:                 return false;                 break;         }     } })( jQuery );
?>
Онлайн: 0
Реклама