comparison xul/content/imago.js @ 203:bf945fcf9105

restarting with version control of xul sidebar/toolbar
author luginbue
date Fri, 27 Feb 2004 11:24:53 +0100
parents
children
comparison
equal deleted inserted replaced
202:7501034e54e1 203:bf945fcf9105
1 /*
2 Copyright (C) 2003 WTWG, Uni Bern
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
17
18 Author: Christian Luginbuehl, 26.02.2004 , Version Alcatraz 0.6
19 */
20
21
22 function markCurrentScale() {
23
24 var menuitems = document.getElementById('scale_popup').childNodes;
25
26 for ( i = 0; i < menuitems.length; i++ ) {
27 menuitems[i].setAttribute('checked', 'false');
28 }
29
30 if ( window.content.getParameter('mo').indexOf('clip') > -1 ) {
31 document.getElementById('scale_pbp').setAttribute('checked', 'true');
32 } else if ( window.content.getParameter('mo').indexOf('osize') > -1 ) {
33 document.getElementById('scale_os').setAttribute('checked', 'true');
34 } else {
35 var item = "scale_" + window.content.getParameter('ws').replace(/\./, "");
36
37 if ( document.getElementById(item) ) {
38 document.getElementById(item).setAttribute('checked', 'true');
39 }
40 }
41
42 }
43
44
45 function markCurrentMirror() {
46
47 var menuitems = document.getElementById('mirror_popup').childNodes;
48
49 for ( i = 0; i < menuitems.length; i++ ) {
50 menuitems[i].setAttribute('checked', 'false');
51 }
52
53 if ( window.content.getParameter('mo').indexOf('hmir') > -1 ) {
54 document.getElementById('mirror_h').setAttribute('checked', 'true');
55 }
56
57 if ( window.content.getParameter('mo').indexOf('vmir') > -1 ) {
58 document.getElementById('mirror_v').setAttribute('checked', 'true');
59 }
60
61 }
62
63
64 function dialog_originalsize() {
65 window.openDialog("chrome://alcatraz/content/dialog_originalsize.xul", "dialog_originalsize", "chrome,dialog,resizable=no", "");
66 }
67
68
69 function dialog_rotate() {
70 window.openDialog("chrome://alcatraz/content/dialog_rotate.xul", "dialog_rotate", "chrome,dialog,resizable=no", "");
71 }
72
73
74 function dialog_brightnesscontrast() {
75 window.openDialog("chrome://alcatraz/content/dialog_brightnesscontrast.xul", "dialog_brightnesscontrast", "chrome,dialog,resizable=no", "");
76 }
77
78
79 function dialog_colors() {
80 window.openDialog("chrome://alcatraz/content/dialog_colors.xul", "dialog_colors", "chrome,dialog,resizable=no", "");
81 }