diff --git a/UI/WebServerResources/UIxReminderEditor.css b/UI/WebServerResources/UIxReminderEditor.css new file mode 100644 index 000000000..1ce54565c --- /dev/null +++ b/UI/WebServerResources/UIxReminderEditor.css @@ -0,0 +1,108 @@ +n0DIV#windowButtonz +{ position: absolute; + bottom: 0px; + left: 0px; + right: 0px; + height: 2em; + margin: 1em; + text-align: right; } + +DIV#windowButtons +{ position: absolute; + bottom: 0px; + left: 0px; + right: 15px; + height: 3em; + line-height: 2em; + vertical-align: middle; + text-align: right; } + +DIV#pageContent +{ padding: 1em; } + +TABLE.section +{ border: 1px solid #aaa; + margin-top: -.5em; + margin-left: auto; + margin-right: auto; + margin-bottom: 1em; + padding: 1em; + -moz-border-radius: 6px; + table-layout: auto; + text-align: right; + width: 100%; } + +TABLE TH +{ font-weight: normal; + text-align: right; + width: 5em; } + +TABLE TD +{ text-align: left; } + +TABLE TD.label +{ width: 11em; } + +SPAN.caption +{ display: inline-block; + position: relative; + text-align: center; + cursor: default; + background-color: #d4d0c8; + width: auto; + padding: .25em; + margin-left: 7px; + border: 0px; } + +INPUT.textField +{ margin: 0 0.7em 0 0; + width: 2em; } + +SPAN.datePicker INPUT.textField +{ width: 6em; } + +/* Days selectors */ + +DIV#week, +DIV#month +{ background-color: #fff; + border-top: 1px solid #fff; + border-left: 1px solid #fff; + border-right: 1px solid #999; + border-bottom: 1px solid #999; } + +DIV#week +{ width: 210px; /* 7*(28+2)px */ } + +DIV#month +{ width: 140px; /* 7*(18+2)px */ } + +SPAN.week +{ clear: both; + display: block; } + +SPAN.week DIV +{ border: 1px solid #fff; + cursor: pointer; + display: block; + float: left; } + +SPAN.week DIV._selected +{ background-color: #4b6983; + border-color: #4b6983; + color: #fff; } + +SPAN.week DIV P +{ display: block; + margin: 2px 0px; + padding: 0px; + text-align: center; } + +DIV#week SPAN.week DIV P +{ width: 28px; } + +DIV#month SPAN.week DIV P +{ width: 18px; } + +SPAN.week DIV:hover +{ border: 1px solid #4b6983; } diff --git a/UI/WebServerResources/UIxReminderEditor.js b/UI/WebServerResources/UIxReminderEditor.js new file mode 100644 index 000000000..c0abc775f --- /dev/null +++ b/UI/WebServerResources/UIxReminderEditor.js @@ -0,0 +1,42 @@ +/* -*- Mode: java; tab-width: 2; c-tab-always-indent: t; indent-tabs-mode: t; c-basic-offset: 2 -*- */ +function initializeWindowButtons() { + var okButton = $("okButton"); + var cancelButton = $("cancelButton"); + + okButton.observe("click", onEditorOkClick, false); + cancelButton.observe("click", onEditorCancelClick, false); +} + + +function initializeFormValues() { + $("quantityField").value = parent$("reminderQuantity").value; + $("unitsList").value = parent$("reminderUnit").value; + $("relationsList").value = parent$("reminderRelation").value; + $("referencesList").value = parent$("reminderReference").value; +} + +function onEditorOkClick(event) { + preventDefault(event); + if (parseInt($("quantityField").value) > 0) { + parent$("reminderQuantity").value = parseInt($("quantityField").value); + parent$("reminderUnit").value = $("unitsList").value; + parent$("reminderRelation").value = $("relationsList").value; + parent$("reminderReference").value = $("referencesList").value; + + window.close(); + } + else + alert("heu"); +} + +function onEditorCancelClick(event) { + preventDefault(event); + window.close(); +} + +function onRecurrenceLoadHandler() { + initializeFormValues(); + initializeWindowButtons(); +} + +document.observe("dom:loaded", onRecurrenceLoadHandler);