Ticket #3202: SelectBox.patch
File SelectBox.patch, 956 bytes (added by , 13 years ago) |
---|
-
.js
old new 12 12 redisplay: function(id) { 13 13 // Repopulate HTML select box from cache 14 14 var box = document.getElementById(id); 15 box.options.length = 0; // clear all options 15 box.innerHTML = ''; // clear all options 16 var fragment = document.createDocumentFragment(); 16 17 for (var i = 0, j = SelectBox.cache[id].length; i < j; i++) { 17 18 var node = SelectBox.cache[id][i]; 18 19 if (node.displayed) { 19 box.options[box.options.length] = new Option(node.text, node.value, false, false);20 fragment.appendChild(new Option(node.text, node.value, false, false)); 20 21 } 21 22 } 23 box.appendChild(fragment.cloneNode(true)); 22 24 }, 23 25 filter: function(id, text) { 24 26 // Redisplay the HTML select box, displaying only the choices containing ALL