Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

BUGFIX Fixed ModelAdmin.js dropdown panel selection

  • Loading branch information...
commit 1553c3e69c64e6d2105f8c336ba4449260734f64 1 parent 5e9db04
@chillu chillu authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 admin/javascript/ModelAdmin.js
View
6 admin/javascript/ModelAdmin.js
@@ -38,10 +38,10 @@
* Set up an onchange function to show the applicable form and hide all others
*/
onchange: function(e) {
+ var self = this;
this.find('option').each(function() {
- var $form = $('#'+this.val());
- if(this.val() == this.val()) $form.show();
- else $form.hide();
+ var val = $(this).attr('value');
+ $('#' + val)[(val == $(self).val()) ? 'show' : 'hide']();
});
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.