Skip to content

Commit

Permalink
Removed custom JavaScript for changing custom fields remove checkbox …
Browse files Browse the repository at this point in the history
…into a button for IE7

It's basically because IE7 doesn't like calling the change event on input that are not visible. It's not an ideal fix... but it does make the form usable.
  • Loading branch information
johnmartin committed Aug 30, 2012
1 parent fc5ea88 commit 6c60feb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ckan/public/base/javascript/modules/custom-fields.js
Expand Up @@ -17,14 +17,16 @@ this.ckan.module('custom-fields', function (jQuery, _) {
* Returns nothing.
*/
initialize: function () {
jQuery.proxyAll(this, /_on/);
if (!jQuery.browser.msie || !jQuery.browser.version == '7.0') {
jQuery.proxyAll(this, /_on/);

var delegated = this.options.fieldSelector + ':last input:first';
this.el.on('change', delegated, this._onChange);
this.el.on('change', ':checkbox', this._onRemove);
var delegated = this.options.fieldSelector + ':last input:first';
this.el.on('change', delegated, this._onChange);
this.el.on('change', ':checkbox', this._onRemove);

// Style the remove checkbox like a button.
this.$('.checkbox').addClass("btn btn-danger icon-remove");
// Style the remove checkbox like a button.
this.$('.checkbox').addClass("btn btn-danger icon-remove");
}
},

/* Creates a new field and appends it to the list. This currently works by
Expand Down

0 comments on commit 6c60feb

Please sign in to comment.