X-Git-Url: http://nitlanguage.org
diff --git a/share/nitdoc/scripts/js-facilities.js b/share/nitdoc/scripts/js-facilities.js
index f225447..4297dd3 100644
--- a/share/nitdoc/scripts/js-facilities.js
+++ b/share/nitdoc/scripts/js-facilities.js
@@ -4,7 +4,6 @@
$.expr[':'].icontains = function(obj, index, meta, stack){
return (obj.textContent.replace(/\[[0-9]+\]/g, "") || obj.innerText.replace(/\[[0-9]+\]/g, "") || jQuery(obj).text().replace(/\[[0-9]+\]/g, "") || '').toLowerCase().indexOf(meta[3].toLowerCase()) >= 0;
};
-
/*
* Quick Search global vars
*/
@@ -15,12 +14,11 @@ var currentTable = null;
//Hightlighted index in search result preview table
var currentIndex = -1;
-
/*
* Add folding and filtering facilities to class description page.
*/
$(document).ready(function() {
-
+
/*
* Highlight the spoted element
*/
@@ -134,14 +132,17 @@ $(document).ready(function() {
// Escape regexp related characters in query
var query = $("#search").val();
+ query = query.replace(/\\/gi, "\\\\");
query = query.replace(/\[/gi, "\\[");
query = query.replace(/\|/gi, "\\|");
query = query.replace(/\*/gi, "\\*");
query = query.replace(/\+/gi, "\\+");
- query = query.replace(/\\/gi, "\\\\");
query = query.replace(/\?/gi, "\\?");
query = query.replace(/\(/gi, "\\(");
query = query.replace(/\)/gi, "\\)");
+ query = query.replace(/&/gi, "&&");
+ query = query.replace(/>/gi, ">");
+ query = query.replace(/ 10) {
break;
@@ -352,10 +353,18 @@ $(document).ready(function() {
//Preload filter fields with query string
preloadFilters();
- // Hide Authenfication form
- $(".popover").hide();
- // Display Login modal
- $("#logGitHub").click(function(){ displayLogginModal(); });
+
+ //Copy to clipboard utility on signatures
+ $(".signature").each(function(){
+ $(this).append(
+ $("")
+ .append($(""))
+ )
+ });
+
+ var clip = new ZeroClipboard($(".copyButton"), {
+ moviePath: "./ZeroClipboard.swf"
+ } );
});
/* Parse current URL and return anchor name */
@@ -404,31 +413,3 @@ function highlightBlock(a) {
target.addClass("highlighted");
target.show();
}
-
-function displayLogginModal(){
- if ($('.popover').is(':hidden')) { $('.popover').show(); }
- else { $('.popover').hide(); }
- updateDisplaying();
-}
-
-function updateDisplaying(){
- $('#logginMessage').css({'display' : 'none'});
- $("#liGitHub").attr("class", "");
- $("#imgGitHub").attr("src", "resources/icons/github-icon.png");
- $('#loginGit').val("");
- $('#passwordGit').val("");
- $('#nickName').text("");
- $('.popover').css({'height' : '280px'});
- $('#logginMessage').css({'display' : 'none'});
- $('#repositoryGit').val($('#repoName').attr('name'));
- $('#branchGit').val('wikidoc');
- $('#signIn').text("Sign In");
- $('#loginGit').show();
- $('#passwordGit').show();
- $('#lbpasswordGit').show();
- $('#lbloginGit').show();
- $('#repositoryGit').show();
- $('#lbrepositoryGit').show();
- $('#lbbranchGit').show();
- $('#branchGit').show();
-}