annotate xul/content/dialog_options.js @ 243:a1b1deee1330

added common jars used by relato and annota
author luginbue
date Thu, 12 Aug 2004 01:45:21 +0200
parents 49cb8a445126
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
199
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
1 /*
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
2 Copyright (C) 2003 WTWG, Uni Bern
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
3
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
4 This program is free software; you can redistribute it and/or
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
5 modify it under the terms of the GNU General Public License
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
6 as published by the Free Software Foundation; either version 2
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
7 of the License, or (at your option) any later version.
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
8
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
12 GNU General Public License for more details.
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
13
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
15 along with this program; if not, write to the Free Software
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
17
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
18 Author: Christian Luginbuehl, 23.01.2004 , Version Alcatraz 0.5
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
19 */
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
20
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
21
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
22 function getCurrentOptions() {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
23
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
24 var keeparea = getSetting('keeparea');
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
25
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
26 if (keeparea != '') {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
27 document.getElementById('keeparea_check').setAttribute('checked', keeparea);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
28 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
29
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
30 var items = document.getElementById('zoom_popup').childNodes;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
31 var zoomkind = getSetting('zoomkind');
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
32
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
33 for ( i = 0; i <items.length; i++ ) {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
34 if ( items[i].getAttribute('value') == zoomkind ) {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
35 document.getElementById('zoom_menu').selectedItem = items[i];
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
36 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
37 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
38
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
39 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
40
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
41
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
42 function apply() {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
43
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
44 var keeparea = document.getElementById('keeparea_check').getAttribute('checked');
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
45 // beautify
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
46 if ( keeparea == '' ) {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
47 keeparea = 'false';
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
48 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
49
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
50 saveSetting('keeparea', keeparea);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
51
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
52 var zoomkind;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
53 var items = document.getElementById('zoom_popup').childNodes;
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
54
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
55 for ( i = 0; i <items.length; i++ ) {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
56 if ( items[i].getAttribute('selected') == 'true' ) {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
57 zoomkind = items[i].getAttribute('value');
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
58 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
59 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
60 saveSetting('zoomkind', zoomkind);
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
61
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
62 close();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
63
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
64 }
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
65
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
66
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
67 function cancel() {
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
68
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
69 close();
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
70
49cb8a445126 restarting with version control of xul sidebar/toolbar
luginbue
parents:
diff changeset
71 }