From 005bdeebc0a18ba6646a48e69d875b8ddd759f5d Mon Sep 17 00:00:00 2001 From: lduarte1991 Date: Thu, 21 Aug 2014 15:24:09 -0400 Subject: [PATCH 1/4] HTML Textbooks: Adding annotation css files group --- lms/templates/notes.html | 1 + 1 file changed, 1 insertion(+) diff --git a/lms/templates/notes.html b/lms/templates/notes.html index 569393daaa..fcdca788e9 100644 --- a/lms/templates/notes.html +++ b/lms/templates/notes.html @@ -3,6 +3,7 @@ <%namespace name='static' file='static_content.html'/> ${static.css(group='style-vendor-tinymce-content', raw=True)} ${static.css(group='style-vendor-tinymce-skin', raw=True)} +${static.css(group='style-xmodule-annotations', raw=True)} <%inherit file="main.html" /> From 34e1128521b7fdb4dbe511d5d97d45ecfa6c37cc Mon Sep 17 00:00:00 2001 From: lduarte1991 Date: Tue, 26 Aug 2014 14:57:05 -0400 Subject: [PATCH 2/4] Annotation Tools: Removed Public/Private Permissions Trigger --- lms/templates/imageannotation.html | 2 +- lms/templates/textannotation.html | 2 +- lms/templates/videoannotation.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lms/templates/imageannotation.html b/lms/templates/imageannotation.html index 06e4964a30..c357171016 100644 --- a/lms/templates/imageannotation.html +++ b/lms/templates/imageannotation.html @@ -96,7 +96,7 @@ 'delete': ["${user.email}"], 'admin': ["${user.email}"] }, - showViewPermissionsCheckbox: true, + showViewPermissionsCheckbox: false, showEditPermissionsCheckbox: false, userAuthorize: function(action, annotation, user) { var token, tokens, _i, _len; diff --git a/lms/templates/textannotation.html b/lms/templates/textannotation.html index edc51a327f..d5d83e4960 100644 --- a/lms/templates/textannotation.html +++ b/lms/templates/textannotation.html @@ -85,7 +85,7 @@ ${static.css(group='style-xmodule-annotations', raw=True)} 'delete': ["${user.email}"], 'admin': ["${user.email}"] }, - showViewPermissionsCheckbox: true, + showViewPermissionsCheckbox: false, showEditPermissionsCheckbox: false, userAuthorize: function(action, annotation, user) { var token, tokens, _i, _len; diff --git a/lms/templates/videoannotation.html b/lms/templates/videoannotation.html index bbeed57e08..78f88c236c 100644 --- a/lms/templates/videoannotation.html +++ b/lms/templates/videoannotation.html @@ -88,7 +88,7 @@ ${static.css(group='style-xmodule-annotations', raw=True)} 'delete': ["${user.email}"], 'admin': ["${user.email}"] }, - showViewPermissionsCheckbox: true, + showViewPermissionsCheckbox: false, showEditPermissionsCheckbox: false, userAuthorize: function(action, annotation, user) { var token, tokens, _i, _len; From d649e208a7313583d52412e650bf8b45e4302e33 Mon Sep 17 00:00:00 2001 From: lduarte1991 Date: Tue, 26 Aug 2014 15:59:16 -0400 Subject: [PATCH 3/4] Annotation Tools: Adding Check for Grouping in MyNotes - Grouping instance checked instead of prototype - adding comments --- common/static/js/vendor/ova/catch/js/catch.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/static/js/vendor/ova/catch/js/catch.js b/common/static/js/vendor/ova/catch/js/catch.js index a5da7106a8..a1f5c46bf9 100644 --- a/common/static/js/vendor/ova/catch/js/catch.js +++ b/common/static/js/vendor/ova/catch/js/catch.js @@ -1124,9 +1124,15 @@ CatchAnnotation.prototype = { // checks to make sure that Grouping is redone when switching tags in text annotations if (this.options.media === 'text') { if (this.current_tab ==='public') { - this.annotator.plugins.Grouping.useGrouping = 0; + // this is to check if user is is MyNotes instead of the annotation component + if (typeof this.annotator.plugins.Grouping !== 'undefined') { + this.annotator.plugins.Grouping.useGrouping = 0; + } } else { - this.annotator.plugins.Grouping.useGrouping = 1; + // this is to check if user is is MyNotes instead of the annotation component + if (typeof this.annotator.plugins.Grouping !== 'undefined'){ + this.annotator.plugins.Grouping.useGrouping = 1; + } } this.annotator.publish("changedTabsInCatch"); } @@ -1156,7 +1162,10 @@ CatchAnnotation.prototype = { var searchtype = searchtype || ""; var searchInput = searchInput || ""; this.clean = true; - this._clearAnnotator(); + + // the following cannot run in notes for there are no highlights + if($("#notesHolder").length === 0) + this._clearAnnotator(); var annotator = this.annotator; var loadFromSearch = annotator.plugins.Store.options.loadFromSearch; From 3204016487dae1e5ba9302a133cb11a95f973ae9 Mon Sep 17 00:00:00 2001 From: lduarte1991 Date: Thu, 11 Sep 2014 12:38:48 -0400 Subject: [PATCH 4/4] Annotation Tools: Clean-up --- common/static/js/vendor/ova/catch/js/catch.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/common/static/js/vendor/ova/catch/js/catch.js b/common/static/js/vendor/ova/catch/js/catch.js index a1f5c46bf9..727bc9407c 100644 --- a/common/static/js/vendor/ova/catch/js/catch.js +++ b/common/static/js/vendor/ova/catch/js/catch.js @@ -1123,17 +1123,10 @@ CatchAnnotation.prototype = { // checks to make sure that Grouping is redone when switching tags in text annotations if (this.options.media === 'text') { - if (this.current_tab ==='public') { + if (typeof this.annotator.plugins.Grouping !== 'undefined') { // this is to check if user is is MyNotes instead of the annotation component - if (typeof this.annotator.plugins.Grouping !== 'undefined') { - this.annotator.plugins.Grouping.useGrouping = 0; - } - } else { - // this is to check if user is is MyNotes instead of the annotation component - if (typeof this.annotator.plugins.Grouping !== 'undefined'){ - this.annotator.plugins.Grouping.useGrouping = 1; - } - } + this.annotator.plugins.Grouping.useGrouping = this.current_tab === 'public' ? 0 : 1; + } this.annotator.publish("changedTabsInCatch"); } // Change userid and refresh @@ -1164,8 +1157,9 @@ CatchAnnotation.prototype = { this.clean = true; // the following cannot run in notes for there are no highlights - if($("#notesHolder").length === 0) + if ($("#notesHolder").length === 0) { this._clearAnnotator(); + } var annotator = this.annotator; var loadFromSearch = annotator.plugins.Store.options.loadFromSearch;