Il 13/05/2015 15:47, Alessandro Briosi ha scritto:
> ne of my users complained that the time (hour:minute) values in the
> appointments could not be edited. We found out that using the numeric
> keypad to edit them does not work, using regular number keys (enabled
> with SHIFT) works perfecly.
> We use Firefox (mainly) and keyboard layout Italian (though the numbers
> and keypad are identical to an US keyboard, and probably many other
> implementations)
>
> The odd thing is that the numeric keypad works perfectly on any other
> input (date included).
>
> I found this
> http://www.sogo.nu/bugs/print_bug_page.php?bug_id=1516
>
> which is pretty old but still in "new" status.
>
> I suppose it has something to do with a javascript for the "time field"
> editing.
> I might find some time to dig and try to fix it, though before starting
> would like to know if anyone has already looked into this.
Ok, this was easyer than I thought.
Find patch attached.
Regards,
Alessandro
--
[email protected]
https://inverse.ca/sogo/lists
>From 1078ccc65f8387483bca7252dfdb461bf2241ceb Mon Sep 17 00:00:00 2001
From: Alessandro Briosi <[email protected]>
Date: Wed, 13 May 2015 18:09:42 +0200
Subject: [PATCH] Fix Bug 0001516 - Timepiker supports keypad
---
UI/WebServerResources/SOGoTimePicker.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/UI/WebServerResources/SOGoTimePicker.js b/UI/WebServerResources/SOGoTimePicker.js
index a5acbea..9d25e35 100644
--- a/UI/WebServerResources/SOGoTimePicker.js
+++ b/UI/WebServerResources/SOGoTimePicker.js
@@ -206,7 +206,8 @@ var SOGoTimePickerInterface = {
event.keyCode == Event.KEY_TAB ||
event.keyCode == Event.KEY_BACKSPACE)
return true;
- if (event.keyCode > 57 && event.keyCode != 186 && event.keyCode != 59 ||
+ if (event.keyCode > 57 && (event.keyCode<96 || event.keyCode>105)
+ && event.keyCode != 186 && event.keyCode != 59 ||
(event.keyCode == 186 || event.keyCode == 59) && this.value.indexOf(":") >= 0)
Event.stop(event);
},
--
2.1.4