this.fullUri = $("*[data-key='full-uri']", meta).text();
this.text = null;
+ this.saving = false;
this.has_local_changes = false;
this.active = new Date();
this._lock = -1;
/* this doesn't modify anything, so no locks */
var self = this;
let active = new Date() - self.active < 30 * 1000;
+ let saving = self.saving;
$.ajax({
method: "GET",
url: reverse("ajax_document_rev", self.id),
});
$("#people").html(people);
- if (data.rev != self.revision) {
+ if (!saving && (data.rev != self.revision)) {
params.outdated();
}
}
data['textsave-text'] = self.text;
+ self.saving = true;
$.ajax({
url: reverse("ajax_document_text", self.id),
type: "POST",
changed = true;
self.triggerDocumentChanged();
};
+ self.saving = false;
params['success'](self, changed, ((changed && "Udało się zapisać :)") || "Twoja wersja i serwera jest identyczna"));
},
error: function(xhr) {
+ self.saving = false;
if ($('#header').hasClass('saving')) {
$('#header').removeClass('saving');
$.blockUI({
class Presence(models.Model):
- GAP_THRESHOLD = 60
+ GAP_THRESHOLD = 10
user = models.ForeignKey(settings.AUTH_USER_MODEL, models.CASCADE, null=True, blank=True)
session_key = models.CharField(max_length=255)