summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brachold <vdr07@deltab.de>2009-06-21 11:25:33 +0000
committerAndreas Brachold <vdr07@deltab.de>2009-06-21 11:25:33 +0000
commitf133b015da20a4fb2c6173e4fc514f1ca5adbfae (patch)
tree2f1c3772e30b645a17a79120ece6e93943150343
parent0017dab8fd4f5a02b16affcbb78aebc36bbf8e8f (diff)
downloadxxv-f133b015da20a4fb2c6173e4fc514f1ca5adbfae.tar.gz
xxv-f133b015da20a4fb2c6173e4fc514f1ca5adbfae.tar.bz2
* HTTPD: Add widget for input time based values
* RECORDS: redit remove useless edit of recording 'priority'
-rw-r--r--skins/deltab/widgets/time.tmpl16
-rw-r--r--skins/jason/form.js9
-rw-r--r--skins/stone/widgets/time.tmpl13
-rw-r--r--skins/xstyle/widgets/time.tmpl16
4 files changed, 52 insertions, 2 deletions
diff --git a/skins/deltab/widgets/time.tmpl b/skins/deltab/widgets/time.tmpl
new file mode 100644
index 0000000..15d3f42
--- /dev/null
+++ b/skins/deltab/widgets/time.tmpl
@@ -0,0 +1,16 @@
+<!-- time -->
+<tr>
+ <td valign='top'>
+ <?% data.msg %?>
+ </td>
+ <td>
+ <?% val = cgi.param(data.NAME) || data.def %?>
+ <?% IF data.readonly %?>
+ <p style="width:395px;">
+ <?% val %?>
+ </p>
+ <?% ELSE %?>
+ <input style="width:395px;" type="text" name="<?% data.NAME %?>" value="<?% val %?>" />
+ <?% END %?>
+ </td>
+</tr>
diff --git a/skins/jason/form.js b/skins/jason/form.js
index c0a5fc0..e818c63 100644
--- a/skins/jason/form.js
+++ b/skins/jason/form.js
@@ -96,6 +96,7 @@ Ext.extend(Ext.xxv.Question, Ext.Window, {
,value: r[i].data.valuedef
,anchor: '100%' // anchor width by percentage
,stateful: false
+ ,tabIndex: i + 1
};
if(r[i].data.valuereq){
config.allowBlank = false;
@@ -233,11 +234,15 @@ Ext.extend(Ext.xxv.Question, Ext.Window, {
config.editable = false;
break;
- /*case 'date':
+ case 'date':
+ var today = new Date();
+ today.clearTime();
config.xtype = 'datefield';
- break;*/
+ config.minValue = today;
+ break;
case 'time':
config.xtype = 'timefield';
+ config.increment = 15;
break;
case 'integer':
config.xtype = 'numberfield';
diff --git a/skins/stone/widgets/time.tmpl b/skins/stone/widgets/time.tmpl
new file mode 100644
index 0000000..8d12525
--- /dev/null
+++ b/skins/stone/widgets/time.tmpl
@@ -0,0 +1,13 @@
+<!-- time -->
+<?% global.widgetcount = global.widgetcount + 1 %?>
+<tr<?% ' class="two"' IF global.widgetcount mod 2 == 0 %?>>
+ <?% INCLUDE widgets/topic.inc abbr=data.msg %?>
+ <td>
+ <?% val = cgi.param(data.NAME) || data.def %?>
+ <?% IF data.readonly %?>
+ <?% val %?>
+ <?% ELSE %?>
+ <input style="width:80px;" type="text" name="<?% data.NAME %?>" value="<?% val %?>" />
+ <?% END %?>
+ </td>
+</tr>
diff --git a/skins/xstyle/widgets/time.tmpl b/skins/xstyle/widgets/time.tmpl
new file mode 100644
index 0000000..4e984bc
--- /dev/null
+++ b/skins/xstyle/widgets/time.tmpl
@@ -0,0 +1,16 @@
+<!-- time -->
+<tr>
+ <td class="<?% (param.count mod 2) == 0 ? 'light' : 'dark' %?>" >
+ <?% data.msg %?>
+ </td>
+ <td class="<?% (param.count mod 2) == 0 ? 'light' : 'dark' %?>" >
+ <?% val = cgi.param(data.NAME) || data.def %?>
+ <?% IF data.readonly %?>
+ <span<?% FOREACH p = param.tags; "$p ";END %?>>
+ <?% val %?>
+ </span>
+ <?% ELSE %?>
+ <input type="text" name="<?% data.NAME %?>" value="<?% val %?>" <?% FOREACH p = param.tags; "$p ";END %?>>
+ <?% END %?>
+ </td>
+</tr>