1
/* Dali Clock - a melting digital clock for Palm WebOS.
2
* Copyright (c) 1991-2009 Jamie Zawinski <jwz@jwz.org>
4
* Permission to use, copy, modify, distribute, and sell this software and its
5
* documentation for any purpose is hereby granted without fee, provided that
6
* the above copyright notice appear in all copies and that both that
7
* copyright notice and this permission notice appear in supporting
8
* documentation. No representations are made about the suitability of this
9
* software for any purpose. It is provided "as is" without express or
13
function PrefsAssistant(model, hide_cb) {
15
this.hide_cb = hide_cb;
19
PrefsAssistant.prototype.setup = function() {
21
// Create the option menus
23
this.controller.setupWidget('timeModeSelector', {
24
label: 'Time Display',
25
modelProperty: 'time_mode',
27
{label: 'Hour, Min & Sec', value: 'HHMMSS' },
28
{label: 'Hour & Min Only', value: 'HHMM' },
29
{label: 'Seconds Only', value: 'SS' },
33
this.controller.setupWidget('dateModeSelector', {
34
label: 'Date Display',
35
modelProperty: 'date_mode',
37
{label: 'Month/Day/Year', value: 'MMDDYY' },
38
{label: 'Day/Month/Year', value: 'DDMMYY' },
39
{label: 'Year/Month/Day', value: 'YYMMDD' },
43
this.controller.setupWidget('twelveHourRadio', {
44
modelProperty: 'twelve_hour_p',
46
{label: '12 Hour Time', value: true },
47
{label: '24 Hour Time', value: false },
51
this.controller.setupWidget('fpsSlider', {
58
this.controller.setupWidget('cpsSlider', {
68
PrefsAssistant.prototype.deactivate = function(event) {
70
this.hide_cb.call(); // callback from parent