Changeset 6016
- Timestamp:
- 08/25/07 18:34:42 (1 year ago)
- Files:
-
- django/branches/newforms-admin (modified) (1 prop)
- django/branches/newforms-admin/django/contrib/admin/media/js/SelectBox.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/newforms-admin
- Property svnmerge-integrated changed from /django/trunk:1-4345,4350-4357,4359-4365,4371-4372,4374-4377,4380-4386,4388,4390-4391,4400-4402,4404-4408,4410,4412-4419,4426-4427,4430-4432,4434,4441,4443-4444,4446-4447,4450,4452-4453,4455-4458,4476,4503,4546,4564-4569,4580-4586,4617,4630,4641-6013 to /django/trunk:1-4345,4350-4357,4359-4365,4371-4372,4374-4377,4380-4386,4388,4390-4391,4400-4402,4404-4408,4410,4412-4419,4426-4427,4430-4432,4434,4441,4443-4444,4446-4447,4450,4452-4453,4455-4458,4476,4503,4546,4564-4569,4580-4586,4617,4630,4641-6015
django/branches/newforms-admin/django/contrib/admin/media/js/SelectBox.js
r450 r6016 7 7 var cache = SelectBox.cache[id]; 8 8 for (var i = 0; (node = box.options[i]); i++) { 9 cache.push({ value: node.value, text: node.text, displayed: 1});9 cache.push({value: node.value, text: node.text, displayed: 1}); 10 10 } 11 11 }, … … 51 51 }, 52 52 add_to_cache: function(id, option) { 53 SelectBox.cache[id].push({ value: option.value, text: option.text, displayed: 1});53 SelectBox.cache[id].push({value: option.value, text: option.text, displayed: 1}); 54 54 }, 55 55 cache_contains: function(id, value) { … … 69 69 for (var i = 0; (option = from_box.options[i]); i++) { 70 70 if (option.selected && SelectBox.cache_contains(from, option.value)) { 71 SelectBox.add_to_cache(to, { value: option.value, text: option.text, displayed: 1});71 SelectBox.add_to_cache(to, {value: option.value, text: option.text, displayed: 1}); 72 72 SelectBox.delete_from_cache(from, option.value); 73 73 } … … 81 81 var option; 82 82 for (var i = 0; (option = from_box.options[i]); i++) { 83 SelectBox.add_to_cache(to, { value: option.value, text: option.text, displayed: 1 }); 84 SelectBox.delete_from_cache(from, option.value); 83 if (SelectBox.cache_contains(from, option.value)) { 84 SelectBox.add_to_cache(to, {value: option.value, text: option.text, displayed: 1}); 85 SelectBox.delete_from_cache(from, option.value); 86 } 85 87 } 86 88 SelectBox.redisplay(from);
