mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 09:04:28 +00:00
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
<binding id="Datum">
|
||||
<content>
|
||||
<xul:textbox id="binding-datefield-textbox" value="asdf"/>
|
||||
<xul:textbox id="binding-datefield-textbox" maxlength="10" size="10"/>
|
||||
</content>
|
||||
<implementation>
|
||||
<property name="value" onget="return document.getElementById('binding-datefield-textbox').value" >
|
||||
@@ -21,18 +21,15 @@
|
||||
</property>
|
||||
</implementation>
|
||||
<handlers>
|
||||
<handler event="blur" phase="capturing">
|
||||
<handler event="input">
|
||||
<![CDATA[
|
||||
var datum = document.getElementById('binding-datefield-textbox').value;
|
||||
|
||||
if(CheckDatum(datum))
|
||||
document.getElementById('binding-datefield-textbox').style.backgroundColor="#FFFFFF";
|
||||
else
|
||||
document.getElementById('binding-datefield-textbox').style.backgroundColor="#F46B6B";
|
||||
|
||||
var pattern = /^\d{2}\.\d{2}\.\d{4}$/
|
||||
|
||||
if(!pattern.exec(datum))
|
||||
{
|
||||
alert("Das Datum muss im Format tt.mm.yyyy eingegeben werden!");
|
||||
//document.getElementById('binding-datefield-textbox').focus();
|
||||
return false;
|
||||
}
|
||||
]]>
|
||||
</handler>
|
||||
</handlers>
|
||||
|
||||
@@ -102,4 +102,19 @@ function ParseReturnValue(response)
|
||||
function SetStatusBarText(text)
|
||||
{
|
||||
document.getElementById('statusbarpanel-text').label=text;
|
||||
}
|
||||
|
||||
|
||||
// ****
|
||||
// * Prueft ein Datum auf Gueltigkeit
|
||||
// * Erlaubte Formate: 1.1.2007, 31.12.2007
|
||||
// ****
|
||||
function CheckDatum(datum)
|
||||
{
|
||||
var pattern = /^(0[1-9]|[1-9]|[12][0-9]|3[01])[.](0[1-9]|[1-9]|1[012])[.](19|20)\d\d$/
|
||||
|
||||
if(pattern.exec(datum))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
@@ -27,6 +27,8 @@ header("Pragma: no-cache");
|
||||
header("Content-type: application/vnd.mozilla.xul+xml");
|
||||
require_once('../../vilesci/config.inc.php');
|
||||
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
|
||||
echo "<?xml-stylesheet href=\"".APP_ROOT."content/bindings.css\" type=\"text/css\" ?>";
|
||||
?>
|
||||
|
||||
<overlay id="StudentKonto"
|
||||
@@ -107,6 +109,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<spacer flex="1"/>
|
||||
<button id="student-note-copy" label="<=" style="font-weight: bold;" oncommand="alert(document.getElementById('student-noten-datum').value);"/>
|
||||
<spacer flex="1"/>
|
||||
<box id="student-noten-datum" class="Datum"/>
|
||||
</vbox>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user