accurator/commit
Deselecting checkboxes on selecting none, fixes #223
author | Chris Dijkshoorn |
---|---|
Wed Apr 6 14:15:08 2016 +0200 | |
committer | Chris Dijkshoorn |
Wed Apr 6 14:15:08 2016 +0200 | |
commit | 551657682f957cc65f2b3f0d0ac49a6dac167a3f |
tree | 0795ba9f1d9756b72e7353d68bae99b108f1a242 |
parent | 5d2b176c82b0b69eda0b7649bb2eafcbfc3ae2b7 |
Diff style: patch stat
diff --git a/web/js/components/form.js b/web/js/components/form.js index b3bb6ac..89959e9 100644 --- a/web/js/components/form.js +++ b/web/js/components/form.js @@ -298,6 +298,18 @@ Form.prototype.addFormEvents = function(labels) { } }); + $(this.node).find("#formDivsocialNetwork #formChknone").click(function() { + // get all checkboxes except the none and uncheck them + $(_form.node).find("#formDivsocialNetwork :checkbox") + .not("#formChknone").prop("checked", false); + }); + + $(this.node).find("#formDivtaggingSites #formChktagNone").click(function() { + // get all checkboxes except the none and uncheck them + $(_form.node).find("#formDivtaggingSites :checkbox") + .not("#formChktagNone").prop("checked", false); + }); + $(this.node).find("#formDivsocialNetwork #formChktwitter").click(function() { if(!_form.twitterFieldAdded) { $(_form.node).find("#formDivsocialNetwork").after( diff --git a/web/js/item.js b/web/js/item.js index 7ec60f6..c2f270e 100644 --- a/web/js/item.js +++ b/web/js/item.js @@ -116,6 +116,7 @@ function initLabels(labelData) { function events(user, locale, labels) { return $.getJSON("annotations", {uri:user, type:"user"}) .then(function(annotations) { + console.log(annotations.length); if(annotations.length === 0) { alertMessage(labels.itemHdrFirst, labels.itemTxtFirst, 'success'); } @@ -132,7 +133,7 @@ function events(user, locale, labels) { }); } - if(annotations.length === 10) { + if(annotations.length === 26) { var formInternet = new Form( "formInternet", ["socialNetwork", "taggingSites", "taggingExperience", "mail", "mailCheck"],