summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/base/prefs/content/am-offline.xhtml
blob: 0d3a12e396985eff267c8a2062d2663c60b194a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<?xml-stylesheet href="chrome://messenger/skin/accountManage.css" type="text/css"?>

<!DOCTYPE html SYSTEM "chrome://messenger/locale/am-offline.dtd">

<html
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  xmlns:html="http://www.w3.org/1999/xhtml"
>
  <head>
    <script
      defer="defer"
      src="chrome://messenger/content/retention.js"
    ></script>
    <script
      defer="defer"
      src="chrome://messenger/content/am-offline.js"
    ></script>
    <script defer="defer" src="chrome://messenger/content/am-prefs.js"></script>
    <script>
      // FIXME: move to script file.
      window.addEventListener("load", event => {
        parent.onPanelLoaded("am-offline.xhtml");
      });
    </script>
  </head>
  <html:body
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  >
    <vbox id="containerBox" flex="1">
      <stringbundle
        id="bundle_prefs"
        src="chrome://messenger/locale/prefs.properties"
      />

      <label hidden="true" wsm_persist="true" id="server.type" />
      <label
        id="imap.autoSyncMaxAgeDays"
        hidden="true"
        wsm_persist="true"
        preftype="int"
        prefstring="mail.server.%serverkey%.autosync_max_age_days"
      />

      <hbox id="headertitle" class="dialogheader">
        <label class="dialogheader-title" />
      </hbox>

      <separator class="thin" />

      <html:div>
        <html:fieldset id="offline.titlebox" hidefor="pop3,none,rss">
          <html:legend>&syncGroupTitle.label;</html:legend>

          <vbox>
            <checkbox
              hidefor="pop3,nntp,none"
              id="offline.folders"
              label="&allFoldersOffline2.label;"
              oncommand="toggleOffline()"
              accesskey="&allFoldersOffline2.accesskey;"
            />

            <description hidefor="pop3,nntp,none,rss"
              >&allFoldersOfflineNote.label;</description
            >

            <separator class="thin" hidefor="pop3,nntp,none" />

            <hbox hidefor="pop3,nntp,none" pack="end">
              <button
                label="&offlineImapAdvancedOffline.label;"
                accesskey="&offlineImapAdvancedOffline.accesskey;"
                oncommand="onClickSelect()"
                id="selectImapFoldersButton"
                class="selectForOfflineUseButton"
              />
            </hbox>

            <hbox hidefor="pop3,imap,none" pack="end">
              <button
                label="&offlineSelectNntp.label;"
                accesskey="&offlineSelectNntp.accesskey;"
                oncommand="onClickSelect()"
                id="selectNewsgroupsButton"
                class="selectForOfflineUseButton"
              />
            </hbox>
          </vbox>
        </html:fieldset>
      </html:div>

      <html:div>
        <html:fieldset id="diskspace.titlebox">
          <html:legend hidefor="pop3,none,rss"
            >&diskspaceGroupTitle.label;</html:legend
          >

          <description hidefor="pop3,nntp,none,rss"
            >&doNotDownloadImap.label;</description
          >
          <description hidefor="pop3,imap,none,rss"
            >&doNotDownloadNntp.label;</description
          >
          <description hidefor="imap,nntp,none,rss"
            >&doNotDownloadPop3Movemail.label;</description
          >

          <!-- IMAP Autosync Preference -->
          <radiogroup
            hidefor="pop3,nntp,none,rss"
            id="autosyncSelect"
            class="indent"
          >
            <radio
              id="useAutosync.AllMsg"
              value="0"
              accesskey="&allAutosync.accesskey;"
              label="&allAutosync.label;"
              oncommand="onAutosyncChange();"
            />
            <hbox flex="1" align="center">
              <radio
                id="useAutosync.ByAge"
                accesskey="&ageAutosync.accesskey;"
                value="1"
                label="&ageAutosyncBefore.label;"
                oncommand="onAutosyncChange();"
              />
              <html:input
                id="autosyncValue"
                type="number"
                class="size4 input-inline autosync"
                min="1"
                onchange="onAutosyncChange();"
                aria-labelledby="ageAutosyncBefore autosyncValue ageAutosyncMiddle autosyncInterval ageAutosyncAfter"
              />
              <label
                id="ageAutosyncMiddle"
                control="autosyncValue"
                value="&ageAutosyncMiddle.label;"
              />
              <menulist id="autosyncInterval" onselect="onAutosyncChange();">
                <menupopup>
                  <menuitem label="&dayAgeInterval.label;" value="1" />
                  <menuitem label="&weekAgeInterval.label;" value="7" />
                  <menuitem label="&monthAgeInterval.label;" value="31" />
                  <menuitem label="&yearAgeInterval.label;" value="365" />
                </menupopup>
              </menulist>
              <label
                id="ageAutosyncAfter"
                control="autosyncInterval"
                value="&ageAutosyncAfter.label;"
              />
            </hbox>
          </radiogroup>

          <hbox align="center" class="indent" hidefor="rss">
            <checkbox
              hidefor="pop3,imap,none"
              id="nntp.notDownloadRead"
              wsm_persist="true"
              label="&nntpNotDownloadRead.label;"
              accesskey="&nntpNotDownloadRead.accesskey;"
            />
          </hbox>

          <hbox align="center" class="indent" hidefor="none,rss">
            <checkbox
              wsm_persist="true"
              id="offline.notDownload"
              hidefor="imap"
              label="&offlineNotDownload.label;"
              accesskey="&offlineNotDownload.accesskey;"
              oncommand="onCheckItem('offline.notDownloadMin', [this.id]);"
            />
            <checkbox
              wsm_persist="true"
              id="autosyncNotDownload"
              hidefor="pop3,nntp"
              label="&autosyncNotDownload.label;"
              accesskey="&autosyncNotDownload.accesskey;"
              oncommand="onAutosyncNotDownload();"
            />
            <html:input
              id="offline.notDownloadMin"
              type="number"
              class="size4 input-inline"
              min="1"
              value="50"
              wsm_persist="true"
              aria-labelledby="offline.notDownload offline.notDownloadMin kbLabel"
            />
            <label
              value="&kb.label;"
              control="offline.notDownloadMin"
              id="kbLabel"
            />
          </hbox>

          <hbox align="center" class="indent" hidefor="pop3,imap,none,rss">
            <checkbox
              wsm_persist="true"
              id="nntp.downloadMsg"
              label="&nntpDownloadMsg.label;"
              accesskey="&nntpDownloadMsg.accesskey;"
              oncommand="onCheckItem('nntp.downloadMsgMin', [this.id]);"
            />
            <html:input
              id="nntp.downloadMsgMin"
              type="number"
              class="size2 input-inline"
              min="1"
              value="30"
              wsm_persist="true"
              aria-labelledby="nntp.downloadMsg nntp.downloadMsgMin daysOldLabel"
            />
            <label
              value="&daysOld.label;"
              control="nntp.downloadMsgMin"
              id="daysOldLabel"
            />
          </hbox>

          <vbox align="start">
            <separator hidefor="none,rss" />
            <label
              id="retentionDescription"
              hidefor="imap,pop3"
              class="desc"
              control="retention.keepMsg"
              >&retentionCleanup.label;</label
            >
            <label
              id="retentionDescriptionImap"
              hidefor="pop3,nntp,none,rss"
              class="desc"
              control="retention.keepMsg"
              >&retentionCleanupImap.label;</label
            >
            <label
              id="retentionDescriptionPop"
              hidefor="imap,nntp,none,rss"
              class="desc"
              control="retention.keepMsg"
              >&retentionCleanupPop.label;</label
            >

            <radiogroup
              hidefor=""
              confirmfor="imap,pop3"
              id="retention.keepMsg"
              class="indent"
              oncommand="warnServerRemove(this);"
            >
              <radio
                id="retention.keepAllMsg"
                value="1"
                accesskey="&retentionKeepAll.accesskey;"
                label="&retentionKeepAll.label;"
                oncommand="onCheckKeepMsg();"
              />
              <hbox flex="1" align="center">
                <radio
                  id="retention.keepNewMsg"
                  accesskey="&retentionKeepRecent.accesskey;"
                  value="3"
                  label="&retentionKeepRecent.label;"
                  oncommand="onCheckKeepMsg();"
                />
                <html:input
                  id="retention.keepNewMsgMin"
                  type="number"
                  class="size4 input-inline"
                  min="1"
                  value="2000"
                  aria-labelledby="retention.keepNewMsg retention.keepNewMsgMin newMsgLabel"
                />
                <label
                  value="&message.label;"
                  control="retention.keepNewMsgMin"
                  id="newMsgLabel"
                />
              </hbox>
              <hbox flex="1" align="center">
                <radio
                  id="retention.keepOldMsg"
                  accesskey="&retentionKeepMsg.accesskey;"
                  value="2"
                  label="&retentionKeepMsg.label;"
                  oncommand="onCheckKeepMsg();"
                />
                <html:input
                  id="retention.keepOldMsgMin"
                  type="number"
                  class="size4 input-inline"
                  min="1"
                  value="30"
                  aria-labelledby="retention.keepOldMsg retention.keepOldMsgMin oldMsgLabel"
                />
                <label
                  value="&daysOld.label;"
                  control="retention.keepOldMsgMin"
                  id="oldMsgLabel"
                />
              </hbox>
            </radiogroup>

            <hbox align="center" class="indent">
              <checkbox
                id="retention.applyToFlagged"
                label="&retentionApplyToFlagged.label;"
                hidefor=""
                accesskey="&retentionApplyToFlagged.accesskey;"
                checked="true"
              />
            </hbox>
            <hbox align="center" class="indent" hidefor="pop3,imap,none,rss">
              <checkbox
                id="nntp.removeBody"
                accesskey="&nntpRemoveMsgBody.accesskey;"
                label="&nntpRemoveMsgBody.label;"
                oncommand="onCheckItem('nntp.removeBodyMin', [this.id]);"
              />
              <html:input
                id="nntp.removeBodyMin"
                type="number"
                class="size2 input-inline"
                min="1"
                value="30"
                aria-labelledby="nntp.removeBody nntp.removeBodyMin daysOldMsg"
              />
              <label
                value="&daysOld.label;"
                control="nntp.removeBodyMin"
                id="daysOldMsg"
              />
            </hbox>
          </vbox>
        </html:fieldset>
      </html:div>
    </vbox>
  </html:body>
</html>