1 2 3 4 5 6 7 8 9 10
| /**
* Copyright (c) 2009 Anders Ekdahl (http://coffeescripter.com/)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version: 1.3.1
*
* Demo and documentation: http://coffeescripter.com/code/editable-select/
*/
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}('(3($){5 g=[];$.1e.1E=3(a){5 b={l:8,Y:8,Z:10,11:8};5 c=$.1F(b,a);6(c.l&&!$.1G.1H){c.l=8};5 d=8;$(1).M(3(){5 i=g.r;6(12 $(1).v(\'m-w\')==\'1f\'){g[i]=1I h(1,c);$(1).v(\'m-w\',i)}});p $(1)};$.1e.1J=3(){5 a=[];$(1).M(3(){6(12 $(1).v(\'m-w\')!=\'1f\'){a[a.r]=g[$(1).v(\'m-w\')]}});p a};5 h=3(a,b){1.1g(a,b)};h.1K={n:8,j:8,k:8,7:8,14:20,B:0,N:8,1L:8,l:8,C:\'\',1g:3(a,b){1.n=b;1.k=$(a);1.j=$(\'<1M 1N="j">\');1.j.t(\'1h\',1.k.t(\'1h\'));1.j.v(\'m-w\',1.k.v(\'m-w\'));1.k.t(\'1i\',\'1i\');5 c=1.k.t(\'15\');6(!c){c=\'m-k\'+g.r};1.j.t(\'15\',c);1.j.t(\'1O\',\'1P\');1.j.O(\'m-k\');1.k.t(\'15\',c+\'1Q\');1.1j(1.j);1.1k();1.1l();1.16();6(1.n.l){1.1m()}},1k:3(){5 b=1;5 c=$(D.1n(\'1R\'));c.O(\'m-k-1S\');5 d=$(D.1n(\'1o\'));c.z(d);5 e=1.k.u(\'17\');e.M(3(){6($(1).t(\'x\')){b.j.s($(1).s());b.C=$(1).s()};5 a=$(\'<q>\'+$(1).s()+\'</q>\');b.18(a);d.z(a)});1.7=c;1.19()},19:3(){5 a=1.7.u(\'q\');6(a.r>1.n.Z){1.B=1.14*1.n.Z;1.7.o(\'P\',1.B+\'Q\');1.7.o(\'1p\',\'1q\')}E{1.7.o(\'P\',\'1q\');1.7.o(\'1p\',\'1r\')}},1T:3(a){5 b=$(\'<q>\'+a+\'</q>\');5 c=$(\'<17>\'+a+\'</17>\');1.k.z(c);1.18(b);1.7.u(\'1o\').z(b);1.16();1.19()},1j:3(a){5 b=1;5 c=8;$(D.1a).1s(3(){b.y();b.F()});a.1U(3(){b.R();b.G()}).1s(3(e){e.1t();b.R();b.G()}).1V(3(e){1W(e.1u){H 1X:6(!b.1v()){b.R();b.G()}E{e.I();b.1b(\'1w\')};S;H 1Y:e.I();b.1b(\'1Z\');S;H 9:b.T(b.J());S;H 27:e.I();b.F();p 8;S;H 13:e.I();b.T(b.J());p 8}}).21(3(e){6(c!==8){22(c);c=8};c=23(3(){6(b.j.s()!=b.C){b.C=b.j.s();b.G()}},24)}).25(3(e){6(e.1u==13){e.I();p 8}})},18:3(a){5 b=1;a.26(3(){b.y();b.K(a)}).28(3(e){e.1t();b.T(b.J())})},1b:3(a){5 b=1.J();6(!b.r){b=1.U()};6(a==\'1w\'){5 c=b.29()}E{5 c=b.2a()};6(c.r){1.K(c);1.V(c);1.1x(b)}},K:3(a){1.y();a.O(\'x\')},U:3(){1.y();5 a=1.7.u(\'q:2b\');a.O(\'x\');p a},1x:3(a){a.1y(\'x\')},J:3(){p 1.7.u(\'q.x\')},y:3(){1.7.u(\'q.x\').1y(\'x\')},T:3(a){6(a.r){1.j.s(a.j());1.C=1.j.s()};6(12 1.n.Y==\'3\'){1.n.Y.2c(1,a)};1.F()},1v:3(){p 1.N},R:3(){1.7.1c();1.1z();1.N=1A;6(1.n.l){1.l.1c()}},G:3(){5 b=1;5 c=1.j.s();6(c.r<0){6(2d){1.U()};p};6(!b.n.11){c=c.1B()};5 d=8;5 e=8;5 f=1.7.u(\'q\');f.M(3(){6(!e){5 a=$(1).j();6(!b.n.11){a=a.1B()};6(a==c){e=1A;b.y();b.K($(1));b.V($(1));p 8}E 6(a.2e(c)===0&&!d){d=$(1)}}});6(d&&!e){b.y();b.K(d);b.V(d)}E 6(!d&&!e){1.U()}},V:3(a){6(1.B){1.7.2f(a[0].2g-(1.B/2))}},F:3(){1.7.W();1.N=8;6(1.n.l){1.l.W()}},1z:3(){2h(5 i=0;i<g.r;i++){6(i!=1.k.v(\'m-w\')){g[i].F()}}},1l:3(){5 a=1.k.2i();a.L+=1.k[0].1C;1.k.2j(1.j);1.k.W();1.7.o({L:a.L+\'Q\',X:a.X+\'Q\'});$(D.1a).z(1.7);1.7.o(\'1D\',\'2k\');1.7.1c();1.14=1.7.u(\'q\')[0].1C;1.7.o(\'1D\',\'1r\');1.7.W()},16:3(){5 a=1.k.A()+2;5 b=2l(1.j.o(\'2m-2n\').2o(/Q/,\'\'),10);1.j.A(a-b);1.7.A(a+2);6(1.l){1.l.A(a+4)}},1m:3(){5 a=$(\'<1d 2p="0" 2q="m-k-1d" 2r="2s:2t;"></1d>\');$(D.1a).z(a);a.A(1.k.A()+2);a.P(1.7.P());a.o({L:1.7.o(\'L\'),X:1.7.o(\'X\')});1.l=a}}})(2u);',62,155,'|this||function||var|if|wrapper|false|||||||||||text|select|bg_iframe|editable|settings|css|return|li|length|val|attr|find|data|selecter|selected|clearSelectedListItem|append|width|list_height|current_value|document|else|hideList|highlightSelected|case|preventDefault|selectedListItem|selectListItem|top|each|list_is_visible|addClass|height|px|showList|break|pickListItem|selectFirstListItem|scrollToListItem|hide|left|onSelect|items_then_scroll||case_sensitive|typeof||list_item_height|id|setWidths|option|initListItemEvents|checkScroll|body|selectNewListItem|show|iframe|fn|undefined|init|name|disabled|initInputEvents|duplicateOptions|positionElements|createBackgroundIframe|createElement|ul|overflow|auto|visible|click|stopPropagation|keyCode|listIsVisible|down|unselectListItem|removeClass|hideOtherLists|true|toLowerCase|offsetHeight|visibility|editableSelect|extend|browser|msie|new|editableSelectInstances|prototype|hide_on_blur_timeout|input|type|autocomplete|off|_hidden_select|div|options|addOption|focus|keydown|switch|40|38|up||keyup|clearTimeout|setTimeout|200|keypress|mouseover||mousedown|next|prev|first|call|highlight_first|indexOf|scrollTop|offsetTop|for|offset|after|hidden|parseInt|padding|right|replace|frameborder|class|src|about|blank|jQuery'.split('|'),0,{})) |
Partager