add end button to views

This commit is contained in:
Zachary Chai
2016-11-04 18:28:52 -04:00
parent e11098c7a9
commit b8c876443f
6 changed files with 53 additions and 3 deletions

View File

@ -34,6 +34,18 @@
});
});
$('.meeting-end').click (function (event) {
var jqxhr = Meeting.getInstance().endMeeting();
var btn = $(this);
btn.prop("disabled", true);
jqxhr.done(function(data) {
});
jqxhr.fail(function(xhr, status, error) {
console.info("meeting end failed");
});
});
$('.meeting-url-copy').click (function (e) {
meetingURL = $('.meeting-url');
meetingURL.select();

View File

@ -36,6 +36,13 @@ class Meeting {
});
};
endMeeting() {
return $.ajax({
url: this.url + "/end",
type: 'DELETE'
});
}
setURL(url) {
this.url = url;
}