image_annotation/commit
toggle Cancel button back to Done after first tags have been added
author | Jacco van Ossenbruggen |
---|---|
Wed Jun 25 09:06:30 2014 +0200 | |
committer | Jacco van Ossenbruggen |
Wed Jun 25 09:06:30 2014 +0200 | |
commit | 64ec7433b7688bb6c48f5ee59a690681167d5ad6 |
tree | 3da86884f9e5cb3e65ea156c47566d8189546e54 |
parent | 9dc879e9f3a7d768dd8fd0928a41d62d12620482 |
Diff style: patch stat
diff --git a/web/js/deniche-plugin.js b/web/js/deniche-plugin.js index 3d3dfcd..2fd08b3 100644 --- a/web/js/deniche-plugin.js +++ b/web/js/deniche-plugin.js @@ -106,6 +106,7 @@ annotorious.plugin.DenichePlugin.prototype.filterTags = function(targetId, field tagNode.show(); } else { tagNode.hide(); + // console.log('Hiding tag ' + targetId + ' <> ' + tagNode.getAttribute('targetId')); } }); }); @@ -142,21 +143,21 @@ annotorious.plugin.DenichePlugin.prototype.addAnnotation = function (annotation, } else { this._dirtytag = annotation; } - // this.toggleButtons(annotorious.plugin.DenichePlugin.states.SOME, annotation.fieldsId); + this.toggleButtons(annotorious.plugin.DenichePlugin.states.SOME, annotation.fieldsId); } annotorious.plugin.DenichePlugin.prototype.flushDirtyAnnotation = function(original) { - var dirty = this._dirtytag; - this._dirtytag = null; - if (dirty) { - if (dirty.text) { - this._anno.addAnnotation(dirty,original); - this._cleantags[dirty.targetId] = dirty; - } else { - this._anno.removeAnnotation(original); - this._cleantags[dirty.targetId] = null; - } - } + var dirty = this._dirtytag; + this._dirtytag = null; + if (dirty) { + if (dirty.text) { + this._anno.addAnnotation(dirty,original); + this._cleantags[dirty.targetId] = dirty; + } else { + this._anno.removeAnnotation(original); + this._cleantags[dirty.targetId] = null; + } + } } annotorious.plugin.DenichePlugin.prototype.installHandlers = function() {