summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayaram R Pai2014-07-08 00:05:19 +0530
committerJayaram R Pai2014-07-08 00:05:19 +0530
commitb9f911222535cb03e98def07e4c94274d15ac483 (patch)
treeaf19f43e96261bcf8ce9b05f409c5575532a3e84
parent359cef390a698f9a3e5d550d5bc14fd044054eb1 (diff)
downloadcustom-b9f911222535cb03e98def07e4c94274d15ac483.tar.gz
custom-b9f911222535cb03e98def07e4c94274d15ac483.tar.bz2
custom-b9f911222535cb03e98def07e4c94274d15ac483.zip
removed modal for _target
-rw-r--r--custom.js30
1 files changed, 4 insertions, 26 deletions
diff --git a/custom.js b/custom.js
index 5858829..b8c01b5 100644
--- a/custom.js
+++ b/custom.js
@@ -55,13 +55,12 @@ $([IPython.events]).on('notebook_loaded.Notebook', function(){
/* creating the link */
var $link = $("<a></a>");
+ var href = "http://tbc-python.fossee.in/comments/get/?book={0}&chapter={1}&example={2}&page={3}";
+ href = href.format(book, chapter_number, example_no, page_no);
$link.attr({
- href: "#",
+ href: href,
class: "question",
- "data-book": book,
- "data-chapter": chapter_number,
- "data-example": example_no,
- "data-page": page_no,
+ target: "_blank",
});
$(this).prepend($link);
count++;
@@ -69,27 +68,6 @@ $([IPython.events]).on('notebook_loaded.Notebook', function(){
return;
}
});
-
- /* appending modal skeleton */
- var $comment_modal = $("<div id='commentModal' class='modal hide fade' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'> <div class='modal-header'> <button type='button' class='close' data-dismiss='modal' aria-hidden='true'>×</button> <h3 id='myModalLabel'>Python TBC Comments</h3> </div> <div class='modal-body'> <p>One fine body…</p> </div></div>");
- $("#site").append($comment_modal);
-
- $(".question").on("click", function() {
- $comment_frame = $("<iframe></iframe>");
- var book = $(this).data("book");
- var chapter = $(this).data("chapter");
- var example = $(this).data("example");
- var page = $(this).data("page");
- var src = "http://tbc-python.fossee.in/comments/get/?book={0}&chapter={1}&example={2}&page={3}";
- src = src.format(book, chapter, example, page);
- $comment_frame.attr({
- class: "comment-frame",
- src: src,
- });
- $comment_modal.find(".modal-body").html($comment_frame);
- $comment_modal.modal("show");
- });
-
});
/* hiding running/clusters links */