CC-3722: Create loading indicator for AJAX call when calculating Show length

- done
This commit is contained in:
James 2012-04-26 11:56:14 -04:00
parent cf4101cdcd
commit c9df8e8b15
3 changed files with 5 additions and 1 deletions

View File

@ -46,6 +46,7 @@
</dt>
<dd id="add_show_duration-element">
<?php echo $this->element->getElement('add_show_duration') ?>
<img id="icon-loader-small" src="/css/images/loader-small.gif" style="vertical-align:middle; display:none;"/>
</dd>
<?php if($this->element->getElement('add_show_duration')->hasErrors()){ ?>
<ul class='errors'>

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

View File

@ -460,9 +460,12 @@ function setAddShowEvents() {
})
function calculateDuration(endDateTime, startDateTime){
var duration;
var loadingIcon = $('#icon-loader-small');
loadingIcon.show();
$.post("/Schedule/calculate-duration", {startTime: startDateTime, endTime: endDateTime}, function(data){
$('#add_show_duration').val(JSON.parse(data));
loadingIcon.hide();
});
}
}