eb12c84e9a
Canonical names to forced to lowercase Made user model compatible to other DBs CSS adjustments Basic Firepad support (no presence info) Cleaned up JS a bit Added ability to remove draft from localstorage Added support for drafts on multiple pages Alert user if page changes, issue #1
37 lines
929 B
JavaScript
37 lines
929 B
JavaScript
var $startCollaborationBtn = $('#start-collaboration');
|
|
var $endCollaborationBtn = $('#end-collaboration');
|
|
var $loadingCollaborationBtn = $('#loading-collaboration');
|
|
|
|
function loadingCollaboration() {
|
|
$endCollaborationBtn.hide();
|
|
$startCollaborationBtn.hide();
|
|
$loadingCollaborationBtn.show();
|
|
$(document).trigger('loading-collaboration');
|
|
}
|
|
|
|
function startCollaboration() {
|
|
$loadingCollaborationBtn.hide();
|
|
$startCollaborationBtn.hide();
|
|
$endCollaborationBtn.show();
|
|
$(document).trigger('start-collaboration');
|
|
}
|
|
|
|
function endCollaboration() {
|
|
$loadingCollaborationBtn.hide();
|
|
$endCollaborationBtn.hide();
|
|
$startCollaborationBtn.show();
|
|
$(document).trigger('end-collaboration');
|
|
}
|
|
|
|
$(function() {
|
|
$startCollaborationBtn.click(function(e) {
|
|
loadingCollaboration();
|
|
e.preventDefault();
|
|
});
|
|
$endCollaborationBtn.click(function(e) {
|
|
endCollaboration();
|
|
e.preventDefault();
|
|
|
|
});
|
|
});
|