notify-events: use send button, split css and js
This commit is contained in:
36
website/agenda/planung/css/notify-events.css
Normal file
36
website/agenda/planung/css/notify-events.css
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
.mailHeader{
|
||||||
|
background:#ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailSubject{
|
||||||
|
}
|
||||||
|
|
||||||
|
.mailBody{
|
||||||
|
white-space:pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
.done{
|
||||||
|
background:#cfc;
|
||||||
|
}
|
||||||
|
|
||||||
|
table#events td:nth-of-type(1){
|
||||||
|
width:15em;
|
||||||
|
}
|
||||||
|
|
||||||
|
table#events td:nth-of-type(2){
|
||||||
|
width:60em;
|
||||||
|
}
|
||||||
|
|
||||||
|
td.action, input.action{
|
||||||
|
width:5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
form input{
|
||||||
|
width:50em;
|
||||||
|
}
|
||||||
|
|
||||||
|
form textarea{
|
||||||
|
width:50em;
|
||||||
|
height:14em;
|
||||||
|
}
|
||||||
|
|
||||||
18
website/agenda/planung/js/notify-events.js
Normal file
18
website/agenda/planung/js/notify-events.js
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
function register_buttons() {
|
||||||
|
$("#forms form").on('click', 'button', function( event ) {
|
||||||
|
event.preventDefault();
|
||||||
|
var form = $(this).closest('form');
|
||||||
|
$.post("notify-events.cgi", form.serialize())
|
||||||
|
.done( function(data) {
|
||||||
|
var content = $(data).find("#content");
|
||||||
|
$('#result').html(content);
|
||||||
|
var formId = form.attr('id');
|
||||||
|
$('#'+formId+" .mailHeader").addClass("done");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
register_buttons();
|
||||||
|
});
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
msgid "button_send"
|
||||||
|
msgstr "Senden"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
msgid "button_send"
|
||||||
|
msgstr "Send"
|
||||||
|
|
||||||
|
|||||||
@@ -4,45 +4,8 @@
|
|||||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||||
<title><TMPL_VAR .doc.title></title>
|
<title><TMPL_VAR .doc.title></title>
|
||||||
<script src="js/page-leave-handler.js" type="text/javascript"></script>
|
<script src="js/page-leave-handler.js" type="text/javascript"></script>
|
||||||
|
<script src="js/notify-events.js" type="text/javascript"></script>
|
||||||
<style>
|
<link type="text/css" href="css/notify-events.css" rel="stylesheet"/>
|
||||||
.mailHeader{
|
|
||||||
background:#ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailSubject{
|
|
||||||
}
|
|
||||||
|
|
||||||
.mailBody{
|
|
||||||
white-space:pre;
|
|
||||||
}
|
|
||||||
|
|
||||||
.done{
|
|
||||||
background:#cfc;
|
|
||||||
}
|
|
||||||
|
|
||||||
table#events td:nth-of-type(1){
|
|
||||||
width:15em;
|
|
||||||
}
|
|
||||||
|
|
||||||
table#events td:nth-of-type(2){
|
|
||||||
width:60em;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.action, input.action{
|
|
||||||
width:5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
form input{
|
|
||||||
width:50em;
|
|
||||||
}
|
|
||||||
|
|
||||||
form textarea{
|
|
||||||
width:50em;
|
|
||||||
height:14em;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var region='<TMPL_VAR loc.region escape=js>';
|
var region='<TMPL_VAR loc.region escape=js>';
|
||||||
var event_id='<TMPL_VAR event_id escape=js>';
|
var event_id='<TMPL_VAR event_id escape=js>';
|
||||||
@@ -55,26 +18,6 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
</TMPL_IF>
|
</TMPL_IF>
|
||||||
|
|
||||||
$(document).ready(
|
|
||||||
function(){
|
|
||||||
$("#forms form").submit(
|
|
||||||
function( event ) {
|
|
||||||
event.preventDefault();
|
|
||||||
var $form = $( this );
|
|
||||||
var posting = $.post("notify-events.cgi", $form.serialize());
|
|
||||||
posting.done(
|
|
||||||
function( data ) {
|
|
||||||
var content = $( data ).find( "#content" );
|
|
||||||
$('#result').html(content);
|
|
||||||
var formId=$form.attr('id');
|
|
||||||
$('#'+formId+" .mailHeader").addClass("done");
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
@@ -106,7 +49,7 @@
|
|||||||
|
|
||||||
<TMPL_ELSE>
|
<TMPL_ELSE>
|
||||||
|
|
||||||
<td class="action"><input class="button" type="submit" name="action" value="send"></td>
|
<td class="action"><button type="submit"><TMPL_VAR .loc.button_send></button></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<TMPL_IF mail.Subject>
|
<TMPL_IF mail.Subject>
|
||||||
|
|||||||
Reference in New Issue
Block a user