CC-2848: Misc bugs from demo service
- Handling concurrency issue playlist section and show(canlendar) section
This commit is contained in:
parent
17016e5d40
commit
b04b7ff010
10 changed files with 317 additions and 72 deletions
|
@ -60,6 +60,10 @@ function findHosts(request, callback) {
|
|||
}
|
||||
|
||||
function beginEditShow(data){
|
||||
if(data.show_error == true){
|
||||
alertShowErrorAndReload();
|
||||
return false;
|
||||
}
|
||||
$("#add-show-form")
|
||||
.empty()
|
||||
.append(data.newForm);
|
||||
|
@ -310,7 +314,7 @@ function setAddShowEvents() {
|
|||
.append(json.newForm);
|
||||
|
||||
setAddShowEvents();
|
||||
scheduleRefetchEvents();
|
||||
scheduleRefetchEvents(json);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -432,6 +436,14 @@ $(document).ready(function() {
|
|||
//setAddShowEvents();
|
||||
});
|
||||
|
||||
//Alert the error and reload the page
|
||||
//this function is used to resolve concurrency issue
|
||||
function alertShowErrorAndReload(){
|
||||
alert("The show instance doesn't exist anymore!");
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
|
||||
$(window).resize(function(){
|
||||
var windowWidth = $(this).width();
|
||||
// margin on showform are 16 px on each side
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue