Sha256: 08280beab6b8a08bac3c9c9d7354fb9bbceb7f5e2b836406b4c280ab773dd44c
Contents?: true
Size: 1.42 KB
Versions: 43
Compression:
Stored size: 1.42 KB
Contents
I" (function() { var PostEditLocking, bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; PostEditLocking = (function() { function PostEditLocking() { this.push_status = bind(this.push_status, this); this.status_uri = window.post_edit_status_uri; this.interval = window.post_status_interval; this.editor_id = window.post_editor_id; this.user_id = window.user_id; this.was_editor = this.editor_id === this.user_id; if (!this.was_editor) { this.interval += window.post_status_grace; } setInterval(this.push_status, this.interval); } PostEditLocking.prototype.push_status = function() { return $.post(this.status_uri, (function(_this) { return function(response) { if (!_this.was_editor && response.edit_lock_succeeded) { if (confirm(response.editor_byline + " has finished editing this post. Click OK to refresh this page and view the updated post content.")) { window.location.reload(); } _this.was_editor = true; } if (response.editor_is_self !== true) { $(".editing-user-name").html(response.editor_byline); return $("#post-locked-message").removeClass("hidden"); } }; })(this)); }; return PostEditLocking; })(); window.PostEditLocking = PostEditLocking; }).call(this); :ET
Version data entries
43 entries across 36 versions & 1 rubygems