Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

reload progress on submit

  • Loading branch information...
commit 89ead9eae9220db22beeb42bdafe76b72e3a7099 1 parent 4013151
@white-gecko authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 templates/edit.phtml
View
8 templates/edit.phtml
@@ -9,16 +9,20 @@ var greenSrc = 'http://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/Green_p
function submit() {
$.post("?m=a", {holiday: $('#holiday').val(), start: $('#start').val(), startDate: $('#startDate').val(), duration: $('#duration').val()});
$('#indicator').attr('src', greenSrc);
+ reloadProgress();
}
function edit() {
$('#indicator').attr('src', redSrc);
}
+function reloadProgress() {
+ var hol = $('#holiday').val();
+ $('#progress').load('?h=' + hol + '&f=html');
+}
$(function() {
$('#startDate').datepicker({ dateFormat: 'yy-mm-dd'});
$('#holiday').change(function() {
- var hol = $('#holiday').val();
- $('#progress').load('?h=' + hol + '&f=html');
+ reloadProgress();
});
});
</script>
Please sign in to comment.
Something went wrong with that request. Please try again.