Skip to content

Commit

Permalink
BUGFIX Fixed ModelAdmin.js dropdown panel selection
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Dec 2, 2011
1 parent 5e9db04 commit 1553c3e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions admin/javascript/ModelAdmin.js
Expand Up @@ -38,10 +38,10 @@
* Set up an onchange function to show the applicable form and hide all others * Set up an onchange function to show the applicable form and hide all others
*/ */
onchange: function(e) { onchange: function(e) {
var self = this;
this.find('option').each(function() { this.find('option').each(function() {
var $form = $('#'+this.val()); var val = $(this).attr('value');
if(this.val() == this.val()) $form.show(); $('#' + val)[(val == $(self).val()) ? 'show' : 'hide']();
else $form.hide();
}); });
} }
}); });
Expand Down

0 comments on commit 1553c3e

Please sign in to comment.