Attachment 'TrivialChangeEasyAccess.patch'
Download 1 diff -r 68c9a7017b11 MoinMoin/PageEditor.py
2 --- a/MoinMoin/PageEditor.py Thu Nov 29 22:16:38 2007 +0100
3 +++ b/MoinMoin/PageEditor.py Fri Nov 30 22:13:12 2007 +0200
4 @@ -392,6 +392,26 @@ If you don't want that, hit '''%(cancel_
5 <input type="hidden" name="editor" value="text">
6 ''' % (button_spellcheck, cancel_button_text,))
7
8 + # Trivial Change-checkbox to the top of the page, shows up only if user has JavaScript enabled. It's "linked" with the bottom's box (checking one checks both)
9 + if self.cfg.mail_enabled:
10 + request.write('''
11 +<script type="text/javascript">
12 + <!--
13 + function toggle_trivial(CheckedBox)
14 + {
15 + TrivialBoxes = document.getElementsByName("trivial");
16 + for (var i = 0; i < TrivialBoxes.length; i++)
17 + TrivialBoxes[i].checked = CheckedBox.checked;
18 + }
19 +
20 + document.write('<input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s onclick="toggle_trivial(this)">');
21 + document.write('<label for="chktrivial">%(label)s</label>');
22 + //-->
23 +</script> ''' % {
24 + 'checked': ('', 'checked')[form.get('trivial', ['0'])[0] == '1'],
25 + 'label': _("Trivial change", formatted=False),
26 + })
27 +
28 from MoinMoin.security.textcha import TextCha
29 request.write(TextCha(request).render())
30
31 @@ -433,8 +453,11 @@ If you don't want that, hit '''%(cancel_
32 if self.cfg.mail_enabled:
33 request.write('''
34
35 -<input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s>
36 -<label for="chktrivial">%(label)s</label> ''' % {
37 +
38 +<input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s onclick="toggle_trivial(this)">
39 +<label for="chktrivial">%(label)s</label>
40 +
41 +''' % {
42 'checked': ('', 'checked')[form.get('trivial', ['0'])[0] == '1'],
43 'label': _("Trivial change", formatted=False),
44 })
45 diff -r 68c9a7017b11 MoinMoin/PageGraphicalEditor.py
46 --- a/MoinMoin/PageGraphicalEditor.py Thu Nov 29 22:16:38 2007 +0100
47 +++ b/MoinMoin/PageGraphicalEditor.py Fri Nov 30 22:13:12 2007 +0200
48 @@ -285,7 +285,23 @@ If you don't want that, hit '''%(cancel_
49 <input class="button" type="submit" name="button_cancel" value="%s">
50 <input type="hidden" name="editor" value="gui">
51 ''' % (button_spellcheck, cancel_button_text,))
52 -
53 + if self.cfg.mail_enabled:
54 + request.write('''
55 +<script type="text/javascript">
56 + function toggle_trivial(CheckedBox)
57 + {
58 + TrivialBoxes = document.getElementsByName("trivial");
59 + for (var i = 0; i < TrivialBoxes.length; i++)
60 + TrivialBoxes[i].checked = CheckedBox.checked;
61 + }
62 +</script>
63 +
64 +<input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s onclick="toggle_trivial(this)">
65 +<label for="chktrivial">%(label)s</label>
66 +''' % {
67 + 'checked': ('', 'checked')[form.get('trivial', ['0'])[0] == '1'],
68 + 'label': _("Trivial change", formatted=False),
69 + })
70 from MoinMoin.security.textcha import TextCha
71 request.write(TextCha(request).render())
72
73 @@ -359,7 +375,7 @@ If you don't want that, hit '''%(cancel_
74 if self.cfg.mail_enabled:
75 request.write('''
76
77 -<input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s>
78 +<input type="checkbox" name="trivial" id="chktrivial" value="1" %(checked)s onclick="toggle_trivial(this)">
79 <label for="chktrivial">%(label)s</label> ''' % {
80 'checked': ('', 'checked')[form.get('trivial', ['0'])[0] == '1'],
81 'label': _("Trivial change", formatted=False),
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.