From 3fba4bb9b289f37c246588683413b6eb9e5b5d15 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Fri, 20 Jan 2017 15:28:14 +0530 Subject: added the chapter name edit option and traker mail for every edit --- js/selection.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'js/selection.js') 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); -- cgit