equal
deleted
inserted
replaced
4 var newVersion = $('#id_new_version').attr('checked') ; |
4 var newVersion = $('#id_new_version').attr('checked') ; |
5 var commentsKept = $('#id_keep_comments').attr('checked') ; |
5 var commentsKept = $('#id_keep_comments').attr('checked') ; |
6 |
6 |
7 var new_content = $('#id_content').val() |
7 var new_content = $('#id_content').val() |
8 var new_format = $('#id_format').val() |
8 var new_format = $('#id_format').val() |
9 |
9 var mess = gettext( 'Should these comments be detached (i.e. kept with no scope) or removed from new version?') ; |
|
10 |
10 if (commentsKept) { |
11 if (commentsKept) { |
11 var pre_edit_url = tb_conf['pre_edit_url'] ; |
12 var pre_edit_url = tb_conf['pre_edit_url'] ; |
12 |
13 |
13 $.ajax({ |
14 $.ajax({ |
14 url: pre_edit_url, |
15 url: pre_edit_url, |
25 var message = ngettext( |
26 var message = ngettext( |
26 '%(nb_comments)s comment applies to text that was modified.', |
27 '%(nb_comments)s comment applies to text that was modified.', |
27 '%(nb_comments)s comments apply to text that was modified.', |
28 '%(nb_comments)s comments apply to text that was modified.', |
28 nb_removed) ; |
29 nb_removed) ; |
29 message += '<br />' ; |
30 message += '<br />' ; |
30 message += gettext( 'Should comments be kept with no scope or entirely removed from new version?') ; |
31 message += mess ; |
31 message = interpolate(message,{'nb_comments':nb_removed}, true) ; |
32 message = interpolate(message,{'nb_comments':nb_removed}, true) ; |
32 |
33 |
33 $('#remove_scope_choice_dlg').html(message) ; |
34 $('#remove_scope_choice_dlg').html(message) ; |
34 $('#remove_scope_choice_dlg').dialog('open') ; |
35 $('#remove_scope_choice_dlg').dialog('open') ; |
35 } |
36 } |
44 '%(nb_comments)s comments apply to text that was modified.', |
45 '%(nb_comments)s comments apply to text that was modified.', |
45 nb_removed) ; |
46 nb_removed) ; |
46 message += '<br />' ; |
47 message += '<br />' ; |
47 message += gettext( '(We suggest you create a new version)') ; |
48 message += gettext( '(We suggest you create a new version)') ; |
48 message += '<br />' ; |
49 message += '<br />' ; |
49 message += gettext( 'Should comments be kept with no scope or entirely removed?') ; |
50 message += mess ; |
50 message = interpolate(message,{'nb_comments':nb_removed}, true) ; |
51 message = interpolate(message,{'nb_comments':nb_removed}, true) ; |
51 |
52 |
52 $('#remove_scope_choice_dlg').html(message) ; |
53 $('#remove_scope_choice_dlg').html(message) ; |
53 $('#remove_scope_choice_dlg').dialog('open') ; |
54 $('#remove_scope_choice_dlg').dialog('open') ; |
54 } |
55 } |