Added date/time button, but not fully working (time needs to be updated before insertion)

SVN revision: 1835
This commit is contained in:
2007-04-11 07:34:19 +00:00
parent 878f3ebda2
commit d7e4be8b6e
3 changed files with 25 additions and 14 deletions
+8 -13
View File
@@ -410,16 +410,11 @@ Anonymous = Anonimo
Activation notice has been sent to %s = Notificacion de activacion enviada a %s
Your request has been forwarded to the administrator = Su solicitud fue enviada al administrador
You will be notified by email upon activation of your new account = Sera notificado por email cuando su cuenta sea activada
#
#---- please translate following items and then remove this comment ----#
#
Select period =
Last week =
Last month =
Last 3 Months =
Last 6 Months =
Last Year =
Enter %s =
Select %s =
Select period = Elija periodo
Last week = Ultima semana
Last month = Ultimo mes
Last 3 Months = Ultimos 3 meses
Last 6 Months = Ultimos 6 meses
Last Year = Ultimo año
Enter %s = Ingrese %s
Select %s = Elija %s
+7 -1
View File
@@ -110,6 +110,12 @@ function queryHeading(text)
elcode1(text, tag, '', selection);
}
function insertTime(text)
{
selection = getSelection(text);
elcode1(text, '', datetime, selection);
}
function elKeyInit()
{
document.onkeypress = elKeyPress;
@@ -175,4 +181,4 @@ function elKeyPress(evt)
}
return true;
}
}
+10
View File
@@ -9233,6 +9233,13 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
else
rsprintf("browser = 'Other';\n");
if (!getcfg(lbs->name, "Time format", format, sizeof(format)))
strcpy(format, DEFAULT_TIME_FORMAT);
time(&ltime);
pts = localtime(&ltime);
my_strftime(str, sizeof(str), format, pts);
rsprintf("datetime = '%s';", str);
rsprintf("//-->\n");
rsprintf("</script>\n");
@@ -9999,6 +10006,9 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
rsprintf("<option value=\"chocolate\" style=\"color:chocolate\">chocolate</option>\n");
rsprintf("</select>");
rsprintf(" ");
ricon("clock", loc("Insert current time/date"), "insertTime(document.form1.Text)");
rsprintf("</td></tr>\n");
}