Commit aa657272ae281e4c223f50d1126f6c638868c94a

Authored by Nathan B
2 parents 73c81f07 a442cb1d
Exists in master and in 1 other branch production

Merge pull request #58 from kelvich/master

Some other bugs fixed
public/javascripts/form.js
... ... @@ -66,12 +66,16 @@ function removeNestedItem() {
66 66  
67 67  
68 68 function activateTypeSelector(field_class, section_class) {
69   - section_class = section_class || field_class+"_params"; // section_class can be deduced if not given
  69 + var section_class = section_class || field_class+"_params"; // section_class can be deduced if not given
  70 + // disable all inactive tabs to avoid sending its values on server
  71 + $('div.'+field_class+' > div.'+section_class).not('.chosen').find('input')
  72 + .attr('disabled','disabled').val('');
  73 +
70 74 $('div.'+field_class+' input[name*='+field_class+'_type]').live('click', function(){
71 75 var chosen = $(this).val();
72 76 var wrapper = $(this).closest('.nested');
73   - wrapper.find('div.chosen.'+section_class).removeClass('chosen');
74   - wrapper.find('div.'+section_class+'.'+chosen).addClass('chosen');
  77 + wrapper.find('div.chosen.'+section_class).removeClass('chosen').attr('disabled','disabled');;
  78 + wrapper.find('div.'+section_class+'.'+chosen).addClass('chosen').find('input').removeAttr('disabled');
75 79 });
76 80 }
77 81  
... ...
public/javascripts/notifier.js
... ... @@ -6,7 +6,7 @@ var Errbit = {
6 6 <notifier>\
7 7 <name>errbit_notifier_js</name>\
8 8 <version>2.0</version>\
9   - <url>http://NOTIFIER_HOST</url>\
  9 + <url>https://github.com/jdpace/errbit</url>\
10 10 </notifier>\
11 11 <error>\
12 12 <class>EXCEPTION_CLASS</class>\
... ... @@ -103,7 +103,6 @@ var Errbit = {
103 103 }
104 104  
105 105 xml = xml.replace('</request>', data + '</request>')
106   - .replace('NOTIFIER_HOST', host)
107 106 .replace('REQUEST_URL', url)
108 107 .replace('REQUEST_ACTION', action)
109 108 .replace('REQUEST_COMPONENT', component);
... ...