1(function($){ 2 $.fn.extend({ 3 select2_sortable: function(options) 4 { 5 var select = $(this); 6 7 options = typeof options !== 'undefined' ? options : {}; 8 options.items = typeof options.items !== 'undefined' ? options.items : 'li:not(.select2-search-field)'; 9 options.tolerance = typeof options.tolerance !== 'undefined' ? options.tolerance : 'pointer'; 10 11 options.stop = typeof options.stop !== 'undefined' ? options.stop : function(event, ui) 12 { 13 $($(ul).find('.select2-search-choice').get().reverse()).each(function() { 14 var id = $(this).data('select2Data').id; 15 var option = select.find('option[value="' + id + '"]')[0]; 16 select.prepend(option); 17 }); 18 } 19 20 var ul = select.prev('.select2-container').first('ul'); 21 ul.sortable(options); 22 } 23 }); 24}(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.