Commit 535e6e4f by Anton Stupak

Merge pull request #4983 from lduarte1991/lduarte-harvardx-pr20

Annotation Tools: Turn off Private/Public option and add missing css group to MyNotes
parents 51b680af 32040164
...@@ -1123,10 +1123,9 @@ CatchAnnotation.prototype = { ...@@ -1123,10 +1123,9 @@ CatchAnnotation.prototype = {
// checks to make sure that Grouping is redone when switching tags in text annotations // checks to make sure that Grouping is redone when switching tags in text annotations
if (this.options.media === 'text') { if (this.options.media === 'text') {
if (this.current_tab ==='public') { if (typeof this.annotator.plugins.Grouping !== 'undefined') {
this.annotator.plugins.Grouping.useGrouping = 0; // this is to check if user is is MyNotes instead of the annotation component
} else { this.annotator.plugins.Grouping.useGrouping = this.current_tab === 'public' ? 0 : 1;
this.annotator.plugins.Grouping.useGrouping = 1;
} }
this.annotator.publish("changedTabsInCatch"); this.annotator.publish("changedTabsInCatch");
} }
...@@ -1156,7 +1155,11 @@ CatchAnnotation.prototype = { ...@@ -1156,7 +1155,11 @@ CatchAnnotation.prototype = {
var searchtype = searchtype || ""; var searchtype = searchtype || "";
var searchInput = searchInput || ""; var searchInput = searchInput || "";
this.clean = true; this.clean = true;
// the following cannot run in notes for there are no highlights
if ($("#notesHolder").length === 0) {
this._clearAnnotator(); this._clearAnnotator();
}
var annotator = this.annotator; var annotator = this.annotator;
var loadFromSearch = annotator.plugins.Store.options.loadFromSearch; var loadFromSearch = annotator.plugins.Store.options.loadFromSearch;
......
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
'delete': ["${user.email}"], 'delete': ["${user.email}"],
'admin': ["${user.email}"] 'admin': ["${user.email}"]
}, },
showViewPermissionsCheckbox: true, showViewPermissionsCheckbox: false,
showEditPermissionsCheckbox: false, showEditPermissionsCheckbox: false,
userAuthorize: function(action, annotation, user) { userAuthorize: function(action, annotation, user) {
var token, tokens, _i, _len; var token, tokens, _i, _len;
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<%namespace name='static' file='static_content.html'/> <%namespace name='static' file='static_content.html'/>
${static.css(group='style-vendor-tinymce-content', raw=True)} ${static.css(group='style-vendor-tinymce-content', raw=True)}
${static.css(group='style-vendor-tinymce-skin', raw=True)} ${static.css(group='style-vendor-tinymce-skin', raw=True)}
${static.css(group='style-xmodule-annotations', raw=True)}
<script type="text/javascript" src="${static.url('js/vendor/tinymce/js/tinymce/tinymce.full.min.js', raw=True)}"></script> <script type="text/javascript" src="${static.url('js/vendor/tinymce/js/tinymce/tinymce.full.min.js', raw=True)}"></script>
<script type="text/javascript" src="${static.url('js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js', raw=True)}" ></script> <script type="text/javascript" src="${static.url('js/vendor/tinymce/js/tinymce/jquery.tinymce.min.js', raw=True)}" ></script>
<%inherit file="main.html" /> <%inherit file="main.html" />
......
...@@ -85,7 +85,7 @@ ${static.css(group='style-xmodule-annotations', raw=True)} ...@@ -85,7 +85,7 @@ ${static.css(group='style-xmodule-annotations', raw=True)}
'delete': ["${user.email}"], 'delete': ["${user.email}"],
'admin': ["${user.email}"] 'admin': ["${user.email}"]
}, },
showViewPermissionsCheckbox: true, showViewPermissionsCheckbox: false,
showEditPermissionsCheckbox: false, showEditPermissionsCheckbox: false,
userAuthorize: function(action, annotation, user) { userAuthorize: function(action, annotation, user) {
var token, tokens, _i, _len; var token, tokens, _i, _len;
......
...@@ -88,7 +88,7 @@ ${static.css(group='style-xmodule-annotations', raw=True)} ...@@ -88,7 +88,7 @@ ${static.css(group='style-xmodule-annotations', raw=True)}
'delete': ["${user.email}"], 'delete': ["${user.email}"],
'admin': ["${user.email}"] 'admin': ["${user.email}"]
}, },
showViewPermissionsCheckbox: true, showViewPermissionsCheckbox: false,
showEditPermissionsCheckbox: false, showEditPermissionsCheckbox: false,
userAuthorize: function(action, annotation, user) { userAuthorize: function(action, annotation, user) {
var token, tokens, _i, _len; var token, tokens, _i, _len;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment