Permalink
Browse files

reload progress on submit

  • Loading branch information...
1 parent 4013151 commit 89ead9eae9220db22beeb42bdafe76b72e3a7099 @white-gecko committed Apr 16, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 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>

0 comments on commit 89ead9e

Please sign in to comment.