Commit aa657272ae281e4c223f50d1126f6c638868c94a
Exists in
master
and in
1 other branch
Merge pull request #58 from kelvich/master
Some other bugs fixed
Showing
2 changed files
with
8 additions
and
5 deletions
Show diff stats
public/javascripts/form.js
@@ -66,12 +66,16 @@ function removeNestedItem() { | @@ -66,12 +66,16 @@ function removeNestedItem() { | ||
66 | 66 | ||
67 | 67 | ||
68 | function activateTypeSelector(field_class, section_class) { | 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 | $('div.'+field_class+' input[name*='+field_class+'_type]').live('click', function(){ | 74 | $('div.'+field_class+' input[name*='+field_class+'_type]').live('click', function(){ |
71 | var chosen = $(this).val(); | 75 | var chosen = $(this).val(); |
72 | var wrapper = $(this).closest('.nested'); | 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,7 +6,7 @@ var Errbit = { | ||
6 | <notifier>\ | 6 | <notifier>\ |
7 | <name>errbit_notifier_js</name>\ | 7 | <name>errbit_notifier_js</name>\ |
8 | <version>2.0</version>\ | 8 | <version>2.0</version>\ |
9 | - <url>http://NOTIFIER_HOST</url>\ | 9 | + <url>https://github.com/jdpace/errbit</url>\ |
10 | </notifier>\ | 10 | </notifier>\ |
11 | <error>\ | 11 | <error>\ |
12 | <class>EXCEPTION_CLASS</class>\ | 12 | <class>EXCEPTION_CLASS</class>\ |
@@ -103,7 +103,6 @@ var Errbit = { | @@ -103,7 +103,6 @@ var Errbit = { | ||
103 | } | 103 | } |
104 | 104 | ||
105 | xml = xml.replace('</request>', data + '</request>') | 105 | xml = xml.replace('</request>', data + '</request>') |
106 | - .replace('NOTIFIER_HOST', host) | ||
107 | .replace('REQUEST_URL', url) | 106 | .replace('REQUEST_URL', url) |
108 | .replace('REQUEST_ACTION', action) | 107 | .replace('REQUEST_ACTION', action) |
109 | .replace('REQUEST_COMPONENT', component); | 108 | .replace('REQUEST_COMPONENT', component); |