summaryrefslogtreecommitdiff
path: root/js/selection.js
diff options
context:
space:
mode:
authorprashantsinalkar2017-01-20 15:28:14 +0530
committerprashantsinalkar2017-01-20 15:28:14 +0530
commit3fba4bb9b289f37c246588683413b6eb9e5b5d15 (patch)
tree30daad812843033783e02f423d65d191f0daf797 /js/selection.js
parent803e17e79d935efd7e8dc027e2d414bd1e8bc66e (diff)
downloadtextbook_companion_fixer-3fba4bb9b289f37c246588683413b6eb9e5b5d15.tar.gz
textbook_companion_fixer-3fba4bb9b289f37c246588683413b6eb9e5b5d15.tar.bz2
textbook_companion_fixer-3fba4bb9b289f37c246588683413b6eb9e5b5d15.zip
added the chapter name edit option and traker mail for every edit
Diffstat (limited to 'js/selection.js')
-rwxr-xr-xjs/selection.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/selection.js b/js/selection.js
index 639afe5..6488c73 100755
--- a/js/selection.js
+++ b/js/selection.js
@@ -14,6 +14,8 @@ function getSelectionText(divID) {
}
return selectedText;
}
+
+
(function($) {
$(document).ready(function() {
$(".fix-caption-code").mousedown(function() {
@@ -23,5 +25,12 @@ function getSelectionText(divID) {
quotedText = getSelectionText("#fix-caption-code");
$("#edit-caption").val(quotedText);
});
+ $("#edit-example").mousedown(function() {
+ $("#edit-caption").val("");
+ });
+ $("#edit-example").mouseup(function() {
+ quotedText = $('option:selected', this).attr("data-exampleid");
+ $("#edit-caption").val(quotedText);
+ });
});
})(jQuery);