PageSourceSearch

https://onlineservice.eins.de/powercommerce/eins/fo/portal/resources/js/core/jquery/jquery.selectboxes.min.js

js eins.de collected 2026-10-01 14:39:27 UTC 4,092 bytes, 1 lines download raw bytes

1(function(a){a.fn.addOption=function(){var h=function(m,u,x,r,s){var q=document.createElement("option");q.value=u,q.text=x;var l=m.options;var k=l.length;if(!m.cache){m.cache={};for(var p=0;p<k;p++){m.cache[l[p].value]=p}}if(s||s==0){var j=q;for(var w=s;w<=k;w++){var n=m.options[w];m.options[w]=j;l[w]=j;m.cache[l[w].value]=w;j=n}}if(typeof m.cache[u]=="undefined"){m.cache[u]=k}m.options[m.cache[u]]=q;if(r){q.selected=true}};var c=arguments;if(c.length==0){return this}var g=true;var b=false;var e,d,f;if(typeof(c[0])=="object"){b=true;e=c[0]}if(c.length>=2){if(typeof(c[1])=="boolean"){g=c[1];startindex=c[2]}else{if(typeof(c[2])=="boolean"){g=c[2];startindex=c[1]}else{startindex=c[1]}}if(!b){d=c[0];f=c[1]}}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return}if(b){for(var i in e){h(this,i,e[i],g,startindex);startindex+=1}}else{h(this,d,f,g,startindex)}});return this};a.fn.ajaxAddOption=function(d,f,b,e,c){if(typeof(d)!="string"){return this}if(typeof(f)!="object"){f={}}if(typeof(b)!="boolean"){b=true}this.each(function(){var g=this;a.getJSON(d,f,function(h){a(g).addOption(h,b);if(typeof e=="function"){if(typeof c=="object"){e.apply(g,c)}else{e.call(g)}}})});return this};a.fn.removeOption=function(){var c=arguments;if(c.length==0){return this}var e=typeof(c[0]);var d,f;if(e=="string"||e=="object"||e=="function"){d=c[0];if(d.constructor==Array){var b=d.length;for(var g=0;g<b;g++){this.removeOption(d[g],c[1])}return this}}else{if(e=="number"){f=c[0]}else{return this}}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return}if(this.cache){this.cache=null}var h=false;var l=this.options;if(!!d){var j=l.length;for(var k=j-1;k>=0;k--){if(d.constructor==RegExp){if(l[k].value.match(d)){h=true}}else{if(l[k].value==d){h=true}}if(h&&c[1]===true){h=l[k].selected}if(h){l[k]=null}h=false}}else{if(c[1]===true){h=l[f].selected}else{h=true}if(h){this.remove(f)}}});return this};a.fn.sortOptions=function(c){var d=a(this).selectedValues();var b=typeof(c)=="undefined"?true:!!c;this.each(function(){if(this.nodeName.toLowerCase()!="select"){return}var g=this.options;var e=g.length;var h=[];for(var f=0;f<e;f++){h[f]={v:g[f].value,t:g[f].text}}h.sort(function(j,i){o1t=j.t.toLowerCase(),o2t=i.t.toLowerCase();if(o1t==o2t){return 0}if(b){return o1t<o2t?-1:1}else{return o1t>o2t?-1:1}});for(var f=0;f<e;f++){g[f].text=h[f].t;g[f].value=h[f].v}}).selectOptions(d,true);return this};a.fn.selectOptions=function(e,b){var d=e;var g=typeof(e);if(g=="object"&&d.constructor==Array){var f=this;a.each(d,function(){f.selectOptions(this,b)})}var h=b||false;if(g!="string"&&g!="function"&&g!="object"){return this}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return this}var k=this.options;var c=k.length;for(var j=0;j<c;j++){if(d.constructor==RegExp){if(k[j].value.match(d)){k[j].selected=true}else{if(h){k[j].selected=false}}}else{if(k[j].value==d){k[j].selected=true}else{if(h){k[j].selected=false}}}}});return this};a.fn.copyOptions=function(d,c){var b=c||"selected";if(a(d).length==0){return this}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return this}var g=this.options;var e=g.length;for(var f=0;f<e;f++){if(b=="all"||(b=="selected"&&g[f].selected)){a(d).addOption(g[f].value,g[f].text)}}});return this};a.fn.containsOption=function(e,c){var d=false;var b=e;var f=typeof(b);var g=typeof(c);if(f!="string"&&f!="function"&&f!="object"){return g=="function"?this:d}this.each(function(){if(this.nodeName.toLowerCase()!="select"){return this}if(d&&g!="function"){return false}var k=this.options;var h=k.length;for(var j=0;j<h;j++){if(b.constructor==RegExp){if(k[j].value.match(b)){d=true;if(g=="function"){c.call(k[j],j)}}}else{if(k[j].value==b){d=true;if(g=="function"){c.call(k[j],j)}}}}});return g=="function"?this:d};a.fn.selectedValues=function(){var b=[];this.selectedOptions().each(function(){b[b.length]=this.value});return b};a.fn.selectedTexts=function(){var b=[];this.selectedOptions().each(function(){b[b.length]=this.text});return b};a.fn.selectedOptions=function(){return this.find("option:selected")}})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.