Normalize line endings VIVO-101
This commit is contained in:
parent
b097a4d754
commit
54f79f2ea7
587 changed files with 91501 additions and 91501 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
### jQuery Multiple File Upload Plugin v1.28 - 2008-05-02 ###
|
||||
By Diego A., http://www.fyneworks.com, diego@fyneworks.com
|
||||
|
||||
Project: http://jquery.com/plugins/project/MultiFile/
|
||||
Website: http://www.fyneworks.com/jquery/multiple-file-upload/
|
||||
Forums: http://www.nabble.com/jQuery-Multiple-File-Upload-f20931.html
|
||||
*/
|
||||
/*
|
||||
### jQuery Multiple File Upload Plugin v1.28 - 2008-05-02 ###
|
||||
By Diego A., http://www.fyneworks.com, diego@fyneworks.com
|
||||
|
||||
Project: http://jquery.com/plugins/project/MultiFile/
|
||||
Website: http://www.fyneworks.com/jquery/multiple-file-upload/
|
||||
Forums: http://www.nabble.com/jQuery-Multiple-File-Upload-f20931.html
|
||||
*/
|
||||
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';2(1n)(3($){$.y($,{5:3(o){7 $("17:m.1s").5(o)}});$.y($.5,{X:{k:\'\',h:-1,1I:3(s){2($.1A){$.1A({2s:s.u(/\\n/l,\'<27/>\'),11:{Z:\'23\',1Z:\'1T\',1Q:\'12.1K\',2K:\'#2G\',2A:\'#2x\',2w:\'.8\',\'-2r-Z-1v\':\'1u\',\'-2h-Z-1v\':\'1u\'}});J.2b($.29,28)}T{26(s)}},1m:\'$D\',A:{E:\'E\',1j:\'20 1X 1W a $W m.\\1P 1N...\',M:\'1L M: $m\',1d:\'1J m 2J 2I 2F M:\\n$m\'}}});$.y($.5,{1b:3(){$(\'17:m\').H(3(){t a=$(6);2(a.1c()==\'\')a.1C(\'16\').H(3(){6.S=R})})},15:3(){$(\'17:m.16\').2p(\'16\').H(3(){6.S=q})},L:[\'2m\',\'2j\',\'2g\'],19:{},1t:3(b,c,d){t e,j;d=d||[];2(d.1r.1q().1p("1o")<0)d=[d];2(13(b)==\'3\'){$.5.1b();j=b.1l(c||J,d);$.5.15();7 j};2(b.1r.1q().1p("1o")<0)b=[b];1k(t i=0;i<b.10;i++){e=b[i]+\'\';2(e)(3(a){$.5.19[a]=$.Y[a]||3(){};$.Y[a]=3(){$.5.1b();j=$.5.19[a].1l(6,25);$.5.15();7 j}})(e)}}});$.y($.Y,{1a:3(){7 6.H(3(){24{6.1a()}22(e){}})},5:3(o){2($.5.L){$.5.1t($.5.L);$.5.L=N};7 $(6).H(3(e){2(6.1i)7;6.1i=R;J.5=(J.5||0)+1;e=J.5;t g=6,1h=$(g).1g();2(13 o==\'1V\')o={h:o};2(13 o==\'1U\')o={k:o};o=$.y({},$.5.X,($.1e?$(g).1e():($.1S?$(g).1R():N))||{},o||{});2(!(o.h>0)){o.h=$(g).C(\'1O\');2(!(o.h>0)){o.h=(p(g.1f.x(/\\b(h|1M)\\-([0-9]+)\\b/l)||[\'\']).x(/[0-9]+/l)||[\'\'])[0];2(!(o.h>0))o.h=-1;T o.h=p(o.h).x(/[0-9]+/l)[0]}};o.h=V 1Y(o.h);o.k=o.k||$(g).C(\'k\')||\'\';2(!o.k){o.k=(g.1f.x(/\\b(k\\-[\\w\\|]+)\\b/l))||\'\';o.k=V p(o.k).u(/^(k|W)\\-/i,\'\')};$.y(g,o||{});g.A=$.y({},$.5.X.A,g.A);$.y(g,{n:0,K:[],21:[],U:g.B||\'5\'+p(e),1H:3(z){7 g.U+(z>0?\'2H\'+p(z):\'\')},F:3(a,b){t c=g[a],j=$(b).C(\'j\');2(c){t d=c(b,j,g);2(d!=N)7 d}7 R}});2(p(g.k).10>1){g.1G=V 2D(\'\\\\.(\'+(g.k?g.k:\'\')+\')$\',\'l\')};g.G=g.U+\'2z\';$(g).2y(\'<O B="\'+g.G+\'"></O>\');g.1E=$(\'#\'+g.G+\'\');g.D=g.D||\'m[]\';g.1E.18(\'<P B="\'+g.G+\'1D"></P>\');g.14=$(\'#\'+g.G+\'1D\');g.Q=3(c,d){g.n++;c.1B=g;c.i=d;2(c.i>0)c.B=c.D=N;c.B=c.B||g.1H(c.i);c.D=p(g.1m.u(/\\$D/l,$(g).C(\'D\')).u(/\\$B/l,$(g).C(\'B\')).u(/\\$g/l,(e>0?e:\'\')).u(/\\$i/l,(d>0?d:\'\')));$(c).1c(\'\').C(\'j\',\'\')[0].j=\'\';2((g.h>0)&&((g.n-1)>(g.h)))c.S=R;g.I=g.K[c.i]=c;c=$(c);$(c).2v(3(){2(!g.F(\'2u\',6,g))7 q;t a=\'\',v=p(6.j||\'\');2(g.k){2(v!=\'\'){2(!v.x(g.1G)){a=g.A.1j.u(\'$W\',p(v.x(/\\.\\w{1,4}$/l)))}}};1k(t f=0;f<g.K.10;f++){2(g.K[f]!=6){2(g.K[f].j==v){a=g.A.1d.u(\'$m\',v.x(/[^\\/\\\\]+$/l))}}};t b=1h.1g();b.1C(\'5\');2(a!=\'\'){g.1I(a);g.n--;g.Q(b[0],6.i);c.1x().2q(b);c.E();7 q};$(6).11({1w:\'2t\',1y:\'-2o\'});g.14.2n(b);g.1z(6);g.Q(b[0],6.i+1);2(!g.F(\'2l\',6,g))7 q})};g.1z=3(c){2(!g.F(\'2k\',c,g))7 q;t r=$(\'<O></O>\'),v=p(c.j||\'\'),a=$(\'<P 2i="m" 2B="\'+g.A.M.u(\'$m\',v)+\'">\'+v.x(/[^\\/\\\\]+$/l)[0]+\'</P>\'),b=$(\'<a 2C="#\'+g.G+\'">\'+g.A.E+\'</a>\');g.14.18(r.18(\'[\',b,\']&2f;\',a));b.2E(3(){2(!g.F(\'2e\',c,g))7 q;g.n--;g.I.S=q;2(c.i==0){$(g.I).E();g.I=c}T{$(c).E()};$(6).1x().E();$(g.I).11({1w:\'\',1y:\'\'}).1a().1c(\'\').C(\'j\',\'\')[0].j=\'\';2(!g.F(\'2d\',c,g))7 q;7 q});2(!g.F(\'2c\',c,g))7 q};2(!g.1B)g.Q(g,0);g.n++})}});2($.1F)$.1F(\'5\',3(a){a=a||6;$("2a[@2L=\'m\'].1s",a).5()});T $(3(){$.5()})})(1n);',62,172,'||if|function||MultiFile|this|return||||||||||max||value|accept|gi|file|||String|false|||var|replace|||match|extend||STRING|id|attr|name|remove|trigger|wrapID|each|eCur|window|slaves|autoIntercept|selected|null|div|span|addSlave|true|disabled|else|instanceKey|new|ext|options|fn|border|length|css||typeof|eLBL|reEnableEmpty|mfD|input|append|intercepted|reset|disableEmpty|val|duplicate|metadata|className|clone|xCLONE|_MultiFile|denied|for|apply|namePattern|jQuery|Array|indexOf|toString|constructor|multi|intercept|10px|radius|position|parent|top|addToList|blockUI|MASTER|addClass|_labels|eWRP|start|rxAccept|generateID|error|This|0pt|File|limit|again|maxlength|nTry|size|data|meta|15px|string|number|select|cannot|Number|padding|You|files|catch|none|try|arguments|alert|br|2000|unblockUI|INPUT|setTimeout|afterFileAppend|afterFileRemove|onFileRemove|nbsp|validate|moz|class|ajaxSubmit|onFileAppend|afterFileSelect|submit|before|3000px|removeClass|prepend|webkit|message|absolute|onFileSelect|change|opacity|fff|wrap|_wrap|color|title|href|RegExp|click|been|900|_F|already|has|backgroundColor|type'.split('|'),0,{}))
|
|
@ -1,183 +1,183 @@
|
|||
/* http://keith-wood.name/realPerson.html
|
||||
Real Person Form Submission for jQuery v1.0.1.
|
||||
Written by Keith Wood (kwood{at}iinet.com.au) June 2009.
|
||||
Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
|
||||
MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
|
||||
Please attribute the author if you use it. */
|
||||
|
||||
(function($) { // Hide scope, no $ conflict
|
||||
|
||||
var PROP_NAME = 'realPerson';
|
||||
|
||||
/* Real person manager. */
|
||||
function RealPerson() {
|
||||
this._defaults = {
|
||||
length: 6, // Number of characters to use
|
||||
includeNumbers: false, // True to use numbers as well as letters
|
||||
regenerate: 'Click to change', // Instruction text to regenerate
|
||||
hashName: '{n}Hash' // Name of the hash value field to compare with,
|
||||
// use {n} to substitute with the original field name
|
||||
};
|
||||
}
|
||||
|
||||
var CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
||||
var DOTS = [
|
||||
[' * ', ' * * ', ' * * ', ' * * ', ' ***** ', '* *', '* *'],
|
||||
['****** ', '* *', '* *', '****** ', '* *', '* *', '****** '],
|
||||
[' ***** ', '* *', '* ', '* ', '* ', '* *', ' ***** '],
|
||||
['****** ', '* *', '* *', '* *', '* *', '* *', '****** '],
|
||||
['*******', '* ', '* ', '**** ', '* ', '* ', '*******'],
|
||||
['*******', '* ', '* ', '**** ', '* ', '* ', '* '],
|
||||
[' ***** ', '* *', '* ', '* ', '* ***', '* *', ' ***** '],
|
||||
['* *', '* *', '* *', '*******', '* *', '* *', '* *'],
|
||||
['*******', ' * ', ' * ', ' * ', ' * ', ' * ', '*******'],
|
||||
[' *', ' *', ' *', ' *', ' *', '* *', ' ***** '],
|
||||
['* *', '* ** ', '* ** ', '** ', '* ** ', '* ** ', '* *'],
|
||||
['* ', '* ', '* ', '* ', '* ', '* ', '*******'],
|
||||
['* *', '** **', '* * * *', '* * *', '* *', '* *', '* *'],
|
||||
['* *', '** *', '* * *', '* * *', '* * *', '* **', '* *'],
|
||||
[' ***** ', '* *', '* *', '* *', '* *', '* *', ' ***** '],
|
||||
['****** ', '* *', '* *', '****** ', '* ', '* ', '* '],
|
||||
[' ***** ', '* *', '* *', '* *', '* * *', '* * ', ' **** *'],
|
||||
['****** ', '* *', '* *', '****** ', '* * ', '* * ', '* *'],
|
||||
[' ***** ', '* *', '* ', ' ***** ', ' *', '* *', ' ***** '],
|
||||
['*******', ' * ', ' * ', ' * ', ' * ', ' * ', ' * '],
|
||||
['* *', '* *', '* *', '* *', '* *', '* *', ' ***** '],
|
||||
['* *', '* *', ' * * ', ' * * ', ' * * ', ' * * ', ' * '],
|
||||
['* *', '* *', '* *', '* * *', '* * * *', '** **', '* *'],
|
||||
['* *', ' * * ', ' * * ', ' * ', ' * * ', ' * * ', '* *'],
|
||||
['* *', ' * * ', ' * * ', ' * ', ' * ', ' * ', ' * '],
|
||||
['*******', ' * ', ' * ', ' * ', ' * ', ' * ', '*******'],
|
||||
[' *** ', ' * * ', '* *', '* *', '* *', ' * * ', ' *** '],
|
||||
[' * ', ' ** ', ' * * ', ' * ', ' * ', ' * ', '*******'],
|
||||
[' ***** ', '* *', ' *', ' * ', ' ** ', ' ** ', '*******'],
|
||||
[' ***** ', '* *', ' *', ' ** ', ' *', '* *', ' ***** '],
|
||||
[' * ', ' ** ', ' * * ', ' * * ', '*******', ' * ', ' * '],
|
||||
['*******', '* ', '****** ', ' *', ' *', '* *', ' ***** '],
|
||||
[' **** ', ' * ', '* ', '****** ', '* *', '* *', ' ***** '],
|
||||
['*******', ' * ', ' * ', ' * ', ' * ', ' * ', '* '],
|
||||
[' ***** ', '* *', '* *', ' ***** ', '* *', '* *', ' ***** '],
|
||||
[' ***** ', '* *', '* *', ' ******', ' *', ' * ', ' **** ']];
|
||||
|
||||
$.extend(RealPerson.prototype, {
|
||||
/* Class name added to elements to indicate already configured with real person. */
|
||||
markerClassName: 'hasRealPerson',
|
||||
|
||||
/* Override the default settings for all real person instances.
|
||||
@param settings (object) the new settings to use as defaults
|
||||
@return (RealPerson) this object */
|
||||
setDefaults: function(settings) {
|
||||
$.extend(this._defaults, settings || {});
|
||||
return this;
|
||||
},
|
||||
|
||||
/* Attach the real person functionality to an input field.
|
||||
@param target (element) the control to affect
|
||||
@param settings (object) the custom options for this instance */
|
||||
_attachRealPerson: function(target, settings) {
|
||||
target = $(target);
|
||||
if (target.hasClass(this.markerClassName)) {
|
||||
return;
|
||||
}
|
||||
target.addClass(this.markerClassName);
|
||||
var inst = {settings: $.extend({}, this._defaults)};
|
||||
$.data(target[0], PROP_NAME, inst);
|
||||
this._changeRealPerson(target, settings);
|
||||
},
|
||||
|
||||
/* Reconfigure the settings for a real person control.
|
||||
@param target (element) the control to affect
|
||||
@param settings (object) the new options for this instance or
|
||||
(string) an individual property name
|
||||
@param value (any) the individual property value (omit if settings is an object) */
|
||||
_changeRealPerson: function(target, settings, value) {
|
||||
target = $(target);
|
||||
if (!target.hasClass(this.markerClassName)) {
|
||||
return;
|
||||
}
|
||||
settings = settings || {};
|
||||
if (typeof settings == 'string') {
|
||||
var name = settings;
|
||||
settings = {};
|
||||
settings[name] = value;
|
||||
}
|
||||
var inst = $.data(target[0], PROP_NAME);
|
||||
$.extend(inst.settings, settings);
|
||||
target.prevAll('.realperson-challenge,.realperson-hash').remove().end().
|
||||
before(this._generateHTML(target, inst));
|
||||
},
|
||||
|
||||
/* Generate the additional content for this control.
|
||||
@param target (jQuery) the input field
|
||||
@param inst (object) the current instance settings
|
||||
@return (string) the additional content */
|
||||
_generateHTML: function(target, inst) {
|
||||
var text = '';
|
||||
for (var i = 0; i < inst.settings.length; i++) {
|
||||
text += CHARS.charAt(Math.floor(Math.random() *
|
||||
(inst.settings.includeNumbers ? 36 : 26)));
|
||||
}
|
||||
var html = '<div class="realperson-challenge"><div class="realperson-text">';
|
||||
for (var i = 0; i < DOTS[0].length; i++) {
|
||||
for (var j = 0; j < text.length; j++) {
|
||||
html += DOTS[CHARS.indexOf(text.charAt(j))][i].replace(/ /g, ' ') +
|
||||
' ';
|
||||
}
|
||||
html += '<br>';
|
||||
}
|
||||
html += '</div><div class="realperson-regen">' + inst.settings.regenerate +
|
||||
'</div></div><input type="hidden" class="realperson-hash" name="' +
|
||||
inst.settings.hashName.replace(/\{n\}/, target.attr('name')) +
|
||||
'" value="' + this._hash(text) + '">';
|
||||
return html;
|
||||
},
|
||||
|
||||
/* Remove the real person functionality from a control.
|
||||
@param target (element) the control to affect */
|
||||
_destroyRealPerson: function(target) {
|
||||
target = $(target);
|
||||
if (!target.hasClass(this.markerClassName)) {
|
||||
return;
|
||||
}
|
||||
target.removeClass(this.markerClassName).
|
||||
prevAll('.realperson-challenge,.realperson-hash').remove();
|
||||
$.removeData(target[0], PROP_NAME);
|
||||
},
|
||||
|
||||
/* Compute a hash value for the given text.
|
||||
@param value (string) the text to hash
|
||||
@return the corresponding hash value */
|
||||
_hash: function(value) {
|
||||
var hash = 5381;
|
||||
for (var i = 0; i < value.length; i++) {
|
||||
hash = ((hash << 5) + hash) + value.charCodeAt(i);
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
});
|
||||
|
||||
/* Attach the real person functionality to a jQuery selection.
|
||||
@param command (string) the command to run (optional, default 'attach')
|
||||
@param options (object) the new settings to use for these instances (optional)
|
||||
@return (jQuery) for chaining further calls */
|
||||
$.fn.realperson = function(options) {
|
||||
var otherArgs = Array.prototype.slice.call(arguments, 1);
|
||||
return this.each(function() {
|
||||
if (typeof options == 'string') {
|
||||
$.realperson['_' + options + 'RealPerson'].
|
||||
apply($.realperson, [this].concat(otherArgs));
|
||||
}
|
||||
else {
|
||||
$.realperson._attachRealPerson(this, options || {});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* Initialise the real person functionality. */
|
||||
$.realperson = new RealPerson(); // singleton instance
|
||||
|
||||
$('.realperson-challenge').live('click', function() {
|
||||
$(this).next().next().realperson('change');
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
/* http://keith-wood.name/realPerson.html
|
||||
Real Person Form Submission for jQuery v1.0.1.
|
||||
Written by Keith Wood (kwood{at}iinet.com.au) June 2009.
|
||||
Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
|
||||
MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
|
||||
Please attribute the author if you use it. */
|
||||
|
||||
(function($) { // Hide scope, no $ conflict
|
||||
|
||||
var PROP_NAME = 'realPerson';
|
||||
|
||||
/* Real person manager. */
|
||||
function RealPerson() {
|
||||
this._defaults = {
|
||||
length: 6, // Number of characters to use
|
||||
includeNumbers: false, // True to use numbers as well as letters
|
||||
regenerate: 'Click to change', // Instruction text to regenerate
|
||||
hashName: '{n}Hash' // Name of the hash value field to compare with,
|
||||
// use {n} to substitute with the original field name
|
||||
};
|
||||
}
|
||||
|
||||
var CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
||||
var DOTS = [
|
||||
[' * ', ' * * ', ' * * ', ' * * ', ' ***** ', '* *', '* *'],
|
||||
['****** ', '* *', '* *', '****** ', '* *', '* *', '****** '],
|
||||
[' ***** ', '* *', '* ', '* ', '* ', '* *', ' ***** '],
|
||||
['****** ', '* *', '* *', '* *', '* *', '* *', '****** '],
|
||||
['*******', '* ', '* ', '**** ', '* ', '* ', '*******'],
|
||||
['*******', '* ', '* ', '**** ', '* ', '* ', '* '],
|
||||
[' ***** ', '* *', '* ', '* ', '* ***', '* *', ' ***** '],
|
||||
['* *', '* *', '* *', '*******', '* *', '* *', '* *'],
|
||||
['*******', ' * ', ' * ', ' * ', ' * ', ' * ', '*******'],
|
||||
[' *', ' *', ' *', ' *', ' *', '* *', ' ***** '],
|
||||
['* *', '* ** ', '* ** ', '** ', '* ** ', '* ** ', '* *'],
|
||||
['* ', '* ', '* ', '* ', '* ', '* ', '*******'],
|
||||
['* *', '** **', '* * * *', '* * *', '* *', '* *', '* *'],
|
||||
['* *', '** *', '* * *', '* * *', '* * *', '* **', '* *'],
|
||||
[' ***** ', '* *', '* *', '* *', '* *', '* *', ' ***** '],
|
||||
['****** ', '* *', '* *', '****** ', '* ', '* ', '* '],
|
||||
[' ***** ', '* *', '* *', '* *', '* * *', '* * ', ' **** *'],
|
||||
['****** ', '* *', '* *', '****** ', '* * ', '* * ', '* *'],
|
||||
[' ***** ', '* *', '* ', ' ***** ', ' *', '* *', ' ***** '],
|
||||
['*******', ' * ', ' * ', ' * ', ' * ', ' * ', ' * '],
|
||||
['* *', '* *', '* *', '* *', '* *', '* *', ' ***** '],
|
||||
['* *', '* *', ' * * ', ' * * ', ' * * ', ' * * ', ' * '],
|
||||
['* *', '* *', '* *', '* * *', '* * * *', '** **', '* *'],
|
||||
['* *', ' * * ', ' * * ', ' * ', ' * * ', ' * * ', '* *'],
|
||||
['* *', ' * * ', ' * * ', ' * ', ' * ', ' * ', ' * '],
|
||||
['*******', ' * ', ' * ', ' * ', ' * ', ' * ', '*******'],
|
||||
[' *** ', ' * * ', '* *', '* *', '* *', ' * * ', ' *** '],
|
||||
[' * ', ' ** ', ' * * ', ' * ', ' * ', ' * ', '*******'],
|
||||
[' ***** ', '* *', ' *', ' * ', ' ** ', ' ** ', '*******'],
|
||||
[' ***** ', '* *', ' *', ' ** ', ' *', '* *', ' ***** '],
|
||||
[' * ', ' ** ', ' * * ', ' * * ', '*******', ' * ', ' * '],
|
||||
['*******', '* ', '****** ', ' *', ' *', '* *', ' ***** '],
|
||||
[' **** ', ' * ', '* ', '****** ', '* *', '* *', ' ***** '],
|
||||
['*******', ' * ', ' * ', ' * ', ' * ', ' * ', '* '],
|
||||
[' ***** ', '* *', '* *', ' ***** ', '* *', '* *', ' ***** '],
|
||||
[' ***** ', '* *', '* *', ' ******', ' *', ' * ', ' **** ']];
|
||||
|
||||
$.extend(RealPerson.prototype, {
|
||||
/* Class name added to elements to indicate already configured with real person. */
|
||||
markerClassName: 'hasRealPerson',
|
||||
|
||||
/* Override the default settings for all real person instances.
|
||||
@param settings (object) the new settings to use as defaults
|
||||
@return (RealPerson) this object */
|
||||
setDefaults: function(settings) {
|
||||
$.extend(this._defaults, settings || {});
|
||||
return this;
|
||||
},
|
||||
|
||||
/* Attach the real person functionality to an input field.
|
||||
@param target (element) the control to affect
|
||||
@param settings (object) the custom options for this instance */
|
||||
_attachRealPerson: function(target, settings) {
|
||||
target = $(target);
|
||||
if (target.hasClass(this.markerClassName)) {
|
||||
return;
|
||||
}
|
||||
target.addClass(this.markerClassName);
|
||||
var inst = {settings: $.extend({}, this._defaults)};
|
||||
$.data(target[0], PROP_NAME, inst);
|
||||
this._changeRealPerson(target, settings);
|
||||
},
|
||||
|
||||
/* Reconfigure the settings for a real person control.
|
||||
@param target (element) the control to affect
|
||||
@param settings (object) the new options for this instance or
|
||||
(string) an individual property name
|
||||
@param value (any) the individual property value (omit if settings is an object) */
|
||||
_changeRealPerson: function(target, settings, value) {
|
||||
target = $(target);
|
||||
if (!target.hasClass(this.markerClassName)) {
|
||||
return;
|
||||
}
|
||||
settings = settings || {};
|
||||
if (typeof settings == 'string') {
|
||||
var name = settings;
|
||||
settings = {};
|
||||
settings[name] = value;
|
||||
}
|
||||
var inst = $.data(target[0], PROP_NAME);
|
||||
$.extend(inst.settings, settings);
|
||||
target.prevAll('.realperson-challenge,.realperson-hash').remove().end().
|
||||
before(this._generateHTML(target, inst));
|
||||
},
|
||||
|
||||
/* Generate the additional content for this control.
|
||||
@param target (jQuery) the input field
|
||||
@param inst (object) the current instance settings
|
||||
@return (string) the additional content */
|
||||
_generateHTML: function(target, inst) {
|
||||
var text = '';
|
||||
for (var i = 0; i < inst.settings.length; i++) {
|
||||
text += CHARS.charAt(Math.floor(Math.random() *
|
||||
(inst.settings.includeNumbers ? 36 : 26)));
|
||||
}
|
||||
var html = '<div class="realperson-challenge"><div class="realperson-text">';
|
||||
for (var i = 0; i < DOTS[0].length; i++) {
|
||||
for (var j = 0; j < text.length; j++) {
|
||||
html += DOTS[CHARS.indexOf(text.charAt(j))][i].replace(/ /g, ' ') +
|
||||
' ';
|
||||
}
|
||||
html += '<br>';
|
||||
}
|
||||
html += '</div><div class="realperson-regen">' + inst.settings.regenerate +
|
||||
'</div></div><input type="hidden" class="realperson-hash" name="' +
|
||||
inst.settings.hashName.replace(/\{n\}/, target.attr('name')) +
|
||||
'" value="' + this._hash(text) + '">';
|
||||
return html;
|
||||
},
|
||||
|
||||
/* Remove the real person functionality from a control.
|
||||
@param target (element) the control to affect */
|
||||
_destroyRealPerson: function(target) {
|
||||
target = $(target);
|
||||
if (!target.hasClass(this.markerClassName)) {
|
||||
return;
|
||||
}
|
||||
target.removeClass(this.markerClassName).
|
||||
prevAll('.realperson-challenge,.realperson-hash').remove();
|
||||
$.removeData(target[0], PROP_NAME);
|
||||
},
|
||||
|
||||
/* Compute a hash value for the given text.
|
||||
@param value (string) the text to hash
|
||||
@return the corresponding hash value */
|
||||
_hash: function(value) {
|
||||
var hash = 5381;
|
||||
for (var i = 0; i < value.length; i++) {
|
||||
hash = ((hash << 5) + hash) + value.charCodeAt(i);
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
});
|
||||
|
||||
/* Attach the real person functionality to a jQuery selection.
|
||||
@param command (string) the command to run (optional, default 'attach')
|
||||
@param options (object) the new settings to use for these instances (optional)
|
||||
@return (jQuery) for chaining further calls */
|
||||
$.fn.realperson = function(options) {
|
||||
var otherArgs = Array.prototype.slice.call(arguments, 1);
|
||||
return this.each(function() {
|
||||
if (typeof options == 'string') {
|
||||
$.realperson['_' + options + 'RealPerson'].
|
||||
apply($.realperson, [this].concat(otherArgs));
|
||||
}
|
||||
else {
|
||||
$.realperson._attachRealPerson(this, options || {});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/* Initialise the real person functionality. */
|
||||
$.realperson = new RealPerson(); // singleton instance
|
||||
|
||||
$('.realperson-challenge').live('click', function() {
|
||||
$(this).next().next().realperson('change');
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
|
|
@ -1,208 +1,208 @@
|
|||
/* Main Style Sheet for jQuery UI date picker */
|
||||
#datepicker_div, .datepicker_inline {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: #ddd;
|
||||
width: 185px;
|
||||
}
|
||||
#datepicker_div {
|
||||
display: none;
|
||||
border: 1px solid #777;
|
||||
z-index: 9999; /*must have*/
|
||||
}
|
||||
.datepicker_inline {
|
||||
float: left;
|
||||
display: block;
|
||||
border: 0;
|
||||
}
|
||||
.datepicker_rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.datepicker_dialog {
|
||||
padding: 5px !important;
|
||||
border: 4px ridge #ddd !important;
|
||||
}
|
||||
button.datepicker_trigger {
|
||||
width: 25px;
|
||||
}
|
||||
img.datepicker_trigger {
|
||||
margin: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.datepicker_prompt {
|
||||
float: left;
|
||||
padding: 2px;
|
||||
background: #ddd;
|
||||
color: #000;
|
||||
}
|
||||
* html .datepicker_prompt {
|
||||
width: 185px;
|
||||
}
|
||||
.datepicker_control, .datepicker_links, .datepicker_header, .datepicker {
|
||||
clear: both;
|
||||
float: left;
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
}
|
||||
.datepicker_control {
|
||||
background: #400;
|
||||
padding: 2px 0px;
|
||||
}
|
||||
.datepicker_links {
|
||||
background: #000;
|
||||
padding: 2px 0px;
|
||||
}
|
||||
.datepicker_control, .datepicker_links {
|
||||
font-weight: bold;
|
||||
font-size: 80%;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.datepicker_links label { /* disabled links */
|
||||
padding: 2px 5px;
|
||||
color: #888;
|
||||
}
|
||||
.datepicker_clear, .datepicker_prev {
|
||||
float: left;
|
||||
width: 34%;
|
||||
}
|
||||
.datepicker_rtl .datepicker_clear, .datepicker_rtl .datepicker_prev {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.datepicker_current {
|
||||
float: left;
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
}
|
||||
.datepicker_close, .datepicker_next {
|
||||
float: right;
|
||||
width: 34%;
|
||||
text-align: right;
|
||||
}
|
||||
.datepicker_rtl .datepicker_close, .datepicker_rtl .datepicker_next {
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
.datepicker_header {
|
||||
padding: 1px 0 3px;
|
||||
background: #333;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
height: 1.3em;
|
||||
}
|
||||
.datepicker_header select {
|
||||
background: #333;
|
||||
color: #fff;
|
||||
border: 0px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.datepicker {
|
||||
background: #ccc;
|
||||
text-align: center;
|
||||
font-size: 100%;
|
||||
}
|
||||
.datepicker a {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
.datepicker_titleRow {
|
||||
background: #777;
|
||||
}
|
||||
.datepicker_daysRow {
|
||||
background: #eee;
|
||||
color: #666;
|
||||
}
|
||||
.datepicker_weekCol {
|
||||
background: #777;
|
||||
color: #fff;
|
||||
}
|
||||
.datepicker_daysCell {
|
||||
color: #000;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.datepicker_daysCell a{
|
||||
display: block;
|
||||
}
|
||||
.datepicker_weekEndCell {
|
||||
background: #ddd;
|
||||
}
|
||||
.datepicker_titleRow .datepicker_weekEndCell {
|
||||
background: #777;
|
||||
}
|
||||
.datepicker_daysCellOver {
|
||||
background: #fff;
|
||||
border: 1px solid #777;
|
||||
}
|
||||
.datepicker_unselectable {
|
||||
color: #888;
|
||||
}
|
||||
.datepicker_today {
|
||||
background: #fcc !important;
|
||||
}
|
||||
.datepicker_currentDay {
|
||||
background: #999 !important;
|
||||
}
|
||||
.datepicker_status {
|
||||
background: #ddd;
|
||||
width: 100%;
|
||||
font-size: 80%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ________ Datepicker Links _______
|
||||
|
||||
** Reset link properties and then override them with !important */
|
||||
#datepicker_div a, .datepicker_inline a {
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
color: #000;
|
||||
}
|
||||
.datepicker_inline .datepicker_links a {
|
||||
padding: 0 5px !important;
|
||||
}
|
||||
.datepicker_control a, .datepicker_links a {
|
||||
padding: 2px 5px !important;
|
||||
color: #eee !important;
|
||||
}
|
||||
.datepicker_titleRow a {
|
||||
color: #eee !important;
|
||||
}
|
||||
.datepicker_control a:hover {
|
||||
background: #fdd !important;
|
||||
color: #333 !important;
|
||||
}
|
||||
.datepicker_links a:hover, .datepicker_titleRow a:hover {
|
||||
background: #ddd !important;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
/* ___________ MULTIPLE MONTHS _________*/
|
||||
|
||||
.datepicker_multi .datepicker {
|
||||
border: 1px solid #777;
|
||||
}
|
||||
.datepicker_oneMonth {
|
||||
float: left;
|
||||
width: 185px;
|
||||
}
|
||||
.datepicker_newRow {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* ___________ IE6 IFRAME FIX ________ */
|
||||
|
||||
.datepicker_cover {
|
||||
display: none; /*sorry for IE5*/
|
||||
display/**/: block; /*sorry for IE5*/
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
/* Main Style Sheet for jQuery UI date picker */
|
||||
#datepicker_div, .datepicker_inline {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: #ddd;
|
||||
width: 185px;
|
||||
}
|
||||
#datepicker_div {
|
||||
display: none;
|
||||
border: 1px solid #777;
|
||||
z-index: 9999; /*must have*/
|
||||
}
|
||||
.datepicker_inline {
|
||||
float: left;
|
||||
display: block;
|
||||
border: 0;
|
||||
}
|
||||
.datepicker_rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.datepicker_dialog {
|
||||
padding: 5px !important;
|
||||
border: 4px ridge #ddd !important;
|
||||
}
|
||||
button.datepicker_trigger {
|
||||
width: 25px;
|
||||
}
|
||||
img.datepicker_trigger {
|
||||
margin: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.datepicker_prompt {
|
||||
float: left;
|
||||
padding: 2px;
|
||||
background: #ddd;
|
||||
color: #000;
|
||||
}
|
||||
* html .datepicker_prompt {
|
||||
width: 185px;
|
||||
}
|
||||
.datepicker_control, .datepicker_links, .datepicker_header, .datepicker {
|
||||
clear: both;
|
||||
float: left;
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
}
|
||||
.datepicker_control {
|
||||
background: #400;
|
||||
padding: 2px 0px;
|
||||
}
|
||||
.datepicker_links {
|
||||
background: #000;
|
||||
padding: 2px 0px;
|
||||
}
|
||||
.datepicker_control, .datepicker_links {
|
||||
font-weight: bold;
|
||||
font-size: 80%;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.datepicker_links label { /* disabled links */
|
||||
padding: 2px 5px;
|
||||
color: #888;
|
||||
}
|
||||
.datepicker_clear, .datepicker_prev {
|
||||
float: left;
|
||||
width: 34%;
|
||||
}
|
||||
.datepicker_rtl .datepicker_clear, .datepicker_rtl .datepicker_prev {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
.datepicker_current {
|
||||
float: left;
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
}
|
||||
.datepicker_close, .datepicker_next {
|
||||
float: right;
|
||||
width: 34%;
|
||||
text-align: right;
|
||||
}
|
||||
.datepicker_rtl .datepicker_close, .datepicker_rtl .datepicker_next {
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
.datepicker_header {
|
||||
padding: 1px 0 3px;
|
||||
background: #333;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
height: 1.3em;
|
||||
}
|
||||
.datepicker_header select {
|
||||
background: #333;
|
||||
color: #fff;
|
||||
border: 0px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.datepicker {
|
||||
background: #ccc;
|
||||
text-align: center;
|
||||
font-size: 100%;
|
||||
}
|
||||
.datepicker a {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
.datepicker_titleRow {
|
||||
background: #777;
|
||||
}
|
||||
.datepicker_daysRow {
|
||||
background: #eee;
|
||||
color: #666;
|
||||
}
|
||||
.datepicker_weekCol {
|
||||
background: #777;
|
||||
color: #fff;
|
||||
}
|
||||
.datepicker_daysCell {
|
||||
color: #000;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
.datepicker_daysCell a{
|
||||
display: block;
|
||||
}
|
||||
.datepicker_weekEndCell {
|
||||
background: #ddd;
|
||||
}
|
||||
.datepicker_titleRow .datepicker_weekEndCell {
|
||||
background: #777;
|
||||
}
|
||||
.datepicker_daysCellOver {
|
||||
background: #fff;
|
||||
border: 1px solid #777;
|
||||
}
|
||||
.datepicker_unselectable {
|
||||
color: #888;
|
||||
}
|
||||
.datepicker_today {
|
||||
background: #fcc !important;
|
||||
}
|
||||
.datepicker_currentDay {
|
||||
background: #999 !important;
|
||||
}
|
||||
.datepicker_status {
|
||||
background: #ddd;
|
||||
width: 100%;
|
||||
font-size: 80%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ________ Datepicker Links _______
|
||||
|
||||
** Reset link properties and then override them with !important */
|
||||
#datepicker_div a, .datepicker_inline a {
|
||||
cursor: pointer;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
color: #000;
|
||||
}
|
||||
.datepicker_inline .datepicker_links a {
|
||||
padding: 0 5px !important;
|
||||
}
|
||||
.datepicker_control a, .datepicker_links a {
|
||||
padding: 2px 5px !important;
|
||||
color: #eee !important;
|
||||
}
|
||||
.datepicker_titleRow a {
|
||||
color: #eee !important;
|
||||
}
|
||||
.datepicker_control a:hover {
|
||||
background: #fdd !important;
|
||||
color: #333 !important;
|
||||
}
|
||||
.datepicker_links a:hover, .datepicker_titleRow a:hover {
|
||||
background: #ddd !important;
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
/* ___________ MULTIPLE MONTHS _________*/
|
||||
|
||||
.datepicker_multi .datepicker {
|
||||
border: 1px solid #777;
|
||||
}
|
||||
.datepicker_oneMonth {
|
||||
float: left;
|
||||
width: 185px;
|
||||
}
|
||||
.datepicker_newRow {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* ___________ IE6 IFRAME FIX ________ */
|
||||
|
||||
.datepicker_cover {
|
||||
display: none; /*sorry for IE5*/
|
||||
display/**/: block; /*sorry for IE5*/
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue