opt
/
kaspersky
/
kav4fs
/
share
/
wmconsole
/
html
/
js
/
awt
➕ New
📤 Upload
✎ Editing:
extcombo.js
← Back
/* $().multicombo(params) to create multicombo params is next structure: { value: 'test', // text value of combo onchange: , // function to call when selection changed options: // string of html structure of <SELECT> tag, eg '<OPTION>1</OPTION>' } $().multicombo_get() - returns current value of multicombo $().multicombo_set(val) - set new value to multicombo */ jQuery.fn.extend({ extcombo: function( params ){ return this.each(function() { new $.Extendedcombo(this,params); }); }, extcombo_get: function(){ return $(this).children('INPUT').attr('value'); }, extcombo_set: function( value ){ return $(this).children('INPUT').attr('value',value); } }); jQuery.Extendedcombo = function(div,params){ var input, select, $mydiv=$(div), onchange; var needInit=true; function Init(){ if (!needInit) return; input=$('<INPUT TYPE="text"/>') .css({ position: 'absolute' }) .attr('readonly',true) .appendTo($mydiv); if (params.value) input.attr('value',params.value); if (params.onchange) onchange=params.onchange; select=$('<SELECT/>') .appendTo($mydiv) .change(function(){ selected=''; $(this).children('option').each(function(){ if (this.selected) selected=this.value; }); $(input).attr('value',selected); if (typeof(onchange)=='function') onchange(selected); }); $(params.options).appendTo(select); /* FIXME: calc according height */ if (jQuery.browser.opera) $(input).css('width',$(select).width()-10); else if ( jQuery.browser.msie ) $(input).css('width',$(select).outerWidth()-24); else $(input).css('width',$(select).innerWidth()-14); needInit=false; } Init(); }
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel