Mercurial > defr > drupal > noderef_view
comparison noderef_view.js @ 9:b942365b70eb
Change the Action label to be more descriptive and simplify the warning.
The code also pass the node title through theme('placeholder') to both ensure
that it's safe for display /and/ pretty print it, by default by wrapping it in
an <em />
author | Franck Deroche <franck@defr.org> |
---|---|
date | Tue, 27 Jan 2009 12:28:41 +0100 |
parents | 1f9c278126f9 |
children |
comparison
equal
deleted
inserted
replaced
8:1f9c278126f9 | 9:b942365b70eb |
---|---|
37 // Radio field | 37 // Radio field |
38 count += $('input:radio[value='+ nid + '], input:checkbox[value='+ nid +']', wrapper) | 38 count += $('input:radio[value='+ nid + '], input:checkbox[value='+ nid +']', wrapper) |
39 .attr('checked', 'checked') | 39 .attr('checked', 'checked') |
40 .length; | 40 .length; |
41 if (count == 0) { | 41 if (count == 0) { |
42 left.push(selection[nid]); | 42 left.push(Drupal.theme('placeholder', selection[nid])); |
43 } | 43 } |
44 } | 44 } |
45 if (left.length) { | 45 if (left.length) { |
46 message = Drupal.t('No space left for value(s): @titles', | 46 message = Drupal.t('No space left for: !titles', |
47 { '@titles': left.join(', ')}); | 47 { '!titles': left.join(', ')}); |
48 text = $('<br /><div>'+ message + '<div>') | 48 text = $('<br /><div>'+ message + '<div>') |
49 .css('display', 'inline') | 49 .css('display', 'inline') |
50 .addClass('warning') | 50 .addClass('warning') |
51 .addClass('noderef_outofspace'); | 51 .addClass('noderef_outofspace'); |
52 element.after(text); | 52 element.after(text); |