Mercurial > hg > digilib-old
comparison xul/content/dialog_options.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, 23.01.2004 , Version Alcatraz 0.5 | |
| 19 */ | |
| 20 | |
| 21 | |
| 22 function getCurrentOptions() { | |
| 23 | |
| 24 var keeparea = getSetting('keeparea'); | |
| 25 | |
| 26 if (keeparea != '') { | |
| 27 document.getElementById('keeparea_check').setAttribute('checked', keeparea); | |
| 28 } | |
| 29 | |
| 30 var items = document.getElementById('zoom_popup').childNodes; | |
| 31 var zoomkind = getSetting('zoomkind'); | |
| 32 | |
| 33 for ( i = 0; i <items.length; i++ ) { | |
| 34 if ( items[i].getAttribute('value') == zoomkind ) { | |
| 35 document.getElementById('zoom_menu').selectedItem = items[i]; | |
| 36 } | |
| 37 } | |
| 38 | |
| 39 } | |
| 40 | |
| 41 | |
| 42 function apply() { | |
| 43 | |
| 44 var keeparea = document.getElementById('keeparea_check').getAttribute('checked'); | |
| 45 // beautify | |
| 46 if ( keeparea == '' ) { | |
| 47 keeparea = 'false'; | |
| 48 } | |
| 49 | |
| 50 saveSetting('keeparea', keeparea); | |
| 51 | |
| 52 var zoomkind; | |
| 53 var items = document.getElementById('zoom_popup').childNodes; | |
| 54 | |
| 55 for ( i = 0; i <items.length; i++ ) { | |
| 56 if ( items[i].getAttribute('selected') == 'true' ) { | |
| 57 zoomkind = items[i].getAttribute('value'); | |
| 58 } | |
| 59 } | |
| 60 saveSetting('zoomkind', zoomkind); | |
| 61 | |
| 62 close(); | |
| 63 | |
| 64 } | |
| 65 | |
| 66 | |
| 67 function cancel() { | |
| 68 | |
| 69 close(); | |
| 70 | |
| 71 } |
