From be603b01dd801a0ffa5047611ef15ee2b6fe9695 Mon Sep 17 00:00:00 2001 From: Felix Hayashi Date: Fri, 10 Jul 2015 14:32:46 +0200 Subject: [PATCH] yay! new search for visjs.org see #909 --- docs/css/style.css | 34 +++++- docs/css/tipuesearch.css | 205 +++++++++++++++++++++++++++++++++ docs/data/dataset.html | 78 ++++++++----- docs/data/dataview.html | 78 ++++++++----- docs/data/index.html | 78 ++++++++----- docs/graph2d/index.html | 30 ++++- docs/graph3d/index.html | 78 ++++++++----- docs/img/arrow.svg | 102 ++++++++++++++++ docs/js/jquery.highlight.js | 108 +++++++++++++++++ docs/js/jquery.url.min.js | 1 + docs/js/main.js | 83 ++++++++++++- docs/js/tipuesearch.config.js | 76 ++++++++++++ docs/js/tipuesearch.min.js | 155 +++++++++++++++++++++++++ docs/network/configure.html | 42 +++++-- docs/network/edges.html | 28 ++++- docs/network/groups.html | 28 ++++- docs/network/index.html | 28 ++++- docs/network/interaction.html | 25 +++- docs/network/layout.html | 30 ++++- docs/network/manipulation.html | 25 +++- docs/network/nodes.html | 24 +++- docs/network/physics.html | 25 +++- docs/timeline/index.html | 17 ++- 23 files changed, 1224 insertions(+), 154 deletions(-) create mode 100755 docs/css/tipuesearch.css create mode 100644 docs/img/arrow.svg create mode 100644 docs/js/jquery.highlight.js create mode 100644 docs/js/jquery.url.min.js create mode 100644 docs/js/tipuesearch.config.js create mode 100644 docs/js/tipuesearch.min.js diff --git a/docs/css/style.css b/docs/css/style.css index 721d6b8c..61b36273 100644 --- a/docs/css/style.css +++ b/docs/css/style.css @@ -203,4 +203,36 @@ pre.hidden { content: "▸"; padding: 0 2px 0 5px; display:inline-block; -} \ No newline at end of file +} + +#tipue_search_content { + max-width: 100% !important; +} + +#navbar #keyword-count { + font-weight: bold; +} + +#navbar .panel { + clear: both; + z-index: 1; + position: relative; + display: none; +} + +#navbar form[role="search"]::after { + background: rgba(0, 0, 0, 0) url("../img/arrow.svg") no-repeat scroll 145px 0; + background-size: 27%; + content: "Just search it"; + display: block; + padding: 40px 40px; + position: absolute; + width: 220px; + margin: 10px 0 0 20px; + color: black; + opacity: 0.4; +} + +.highlight { + background-color: #FFFF88; +} diff --git a/docs/css/tipuesearch.css b/docs/css/tipuesearch.css new file mode 100755 index 00000000..e47b0c70 --- /dev/null +++ b/docs/css/tipuesearch.css @@ -0,0 +1,205 @@ + +/* +Tipue Search 5.0 +Copyright (c) 2015 Tipue +Tipue Search is released under the MIT License +http://www.tipue.com/search +*/ + +/* Disabled by @felixhayashi to force bootstrap styles. +#tipue_search_input +{ + font: 13px/1.6 'open sans', sans-serif; + color: #333; + padding: 12px 12px 12px 40px; + width: 170px; + border: 1px solid #e2e2e2; + border-radius: 0; + -moz-appearance: none; + -webkit-appearance: none; + box-shadow: none; + outline: 0; + margin: 0; + background: #fff url('img/search.png') no-repeat 15px 15px; +} + +#tipue_search_content +{ + max-width: 650px; + padding-top: 15px; + margin: 0; +} +*/ + +#tipue_search_warning +{ + font: 300 15px/1.6 'Open Sans', sans-serif; + color: #555; + margin: 7px 0; +} +#tipue_search_warning a +{ + color: #396; + text-decoration: none; +} +#tipue_search_warning a:hover +{ + color: #555; +} +#tipue_search_results_count +{ + font: 300 15px/1.7 'Open Sans', sans-serif; + color: #555; +} +.tipue_search_content_title +{ + font: 300 21px/1.7 'Open Sans', sans-serif; + margin-top: 23px; +} +.tipue_search_content_title a +{ + color: #333; + text-decoration: none; +} +.tipue_search_content_title a:hover +{ + color: #555; +} +.tipue_search_content_url +{ + font: 300 14px/1.9 'Open Sans', sans-serif; + word-wrap: break-word; + hyphens: auto; +} +.tipue_search_content_url a +{ + color: #396; + text-decoration: none; +} +.tipue_search_content_url a:hover +{ + color: #555; +} +.tipue_search_content_text +{ + font: 300 15px/1.6 'Open Sans', sans-serif; + color: #555; + word-wrap: break-word; + hyphens: auto; + margin-top: 3px; +} +.tipue_search_content_debug +{ + font: 300 13px/1.6 'Open Sans', sans-serif; + color: #555; + margin: 5px 0; +} +.h01 +{ + color: #333; + font-weight: 400; +} + +#tipue_search_foot +{ + margin: 51px 0 21px 0; +} +#tipue_search_foot_boxes +{ + padding: 0; + margin: 0; + font: 12px 'Open Sans', sans-serif; +} +#tipue_search_foot_boxes li +{ + list-style: none; + margin: 0; + padding: 0; + display: inline; +} +#tipue_search_foot_boxes li a +{ + padding: 10px 17px 11px 17px; + background-color: #fff; + border: 1px solid #e2e2e2; + border-radius: 1px; + color: #333; + margin-right: 7px; + text-decoration: none; + text-align: center; +} +#tipue_search_foot_boxes li.current +{ + padding: 10px 17px 11px 17px; + background: #f6f6f6; + border: 1px solid #e2e2e2; + border-radius: 1px; + color: #333; + margin-right: 7px; + text-align: center; +} +#tipue_search_foot_boxes li a:hover +{ + background: #f6f6f6; +} + + +/* spinner */ + + +.tipue_search_spinner +{ + padding: 31px 0; + width: 50px; + height: 28px; +} +.tipue_search_spinner > div +{ + background-color: #777; + height: 100%; + width: 3px; + display: inline-block; + margin-right: 2px; + -webkit-animation: stretchdelay 1.2s infinite ease-in-out; + animation: stretchdelay 1.2s infinite ease-in-out; +} +.tipue_search_spinner .tipue_search_rect2 +{ + -webkit-animation-delay: -1.1s; + animation-delay: -1.1s; +} +.tipue_search_spinner .tipue_search_rect3 +{ + -webkit-animation-delay: -1.0s; + animation-delay: -1.0s; +} +@-webkit-keyframes stretchdelay +{ + 0%, 40%, 100% + { + -webkit-transform: scaleY(0.4) + } + 20% + { + -webkit-transform: scaleY(1.0) + } +} +@keyframes stretchdelay +{ + 0%, 40%, 100% + { + transform: scaleY(0.4); + -webkit-transform: scaleY(0.4); + } + 20% + { + transform: scaleY(1.0); + -webkit-transform: scaleY(1.0); + } +} + + + + + + diff --git a/docs/data/dataset.html b/docs/data/dataset.html index 28e9ec23..77d4b702 100644 --- a/docs/data/dataset.html +++ b/docs/data/dataset.html @@ -10,6 +10,9 @@ + + + @@ -33,35 +36,48 @@ - @@ -997,5 +1013,11 @@ var positiveBalance = dataset.get({ + + + + + + \ No newline at end of file diff --git a/docs/data/dataview.html b/docs/data/dataview.html index e74e3971..cfdedd29 100644 --- a/docs/data/dataview.html +++ b/docs/data/dataview.html @@ -10,6 +10,9 @@ + + + @@ -33,35 +36,48 @@ - @@ -387,5 +403,11 @@ view.on('*', function (event, properties, senderId) { + + + + + + \ No newline at end of file diff --git a/docs/data/index.html b/docs/data/index.html index 19078230..43f1512e 100644 --- a/docs/data/index.html +++ b/docs/data/index.html @@ -10,6 +10,9 @@ + + + @@ -33,35 +36,48 @@ - @@ -112,5 +128,11 @@ + + + + + + \ No newline at end of file diff --git a/docs/graph2d/index.html b/docs/graph2d/index.html index 28025771..55c9687f 100644 --- a/docs/graph2d/index.html +++ b/docs/graph2d/index.html @@ -11,6 +11,9 @@ + + + @@ -76,9 +79,6 @@ - - @@ -1412,7 +1426,11 @@ Graph2d.off('rangechanged', onChange); - - + + + + + + \ No newline at end of file diff --git a/docs/graph3d/index.html b/docs/graph3d/index.html index 979e8f64..134643d5 100644 --- a/docs/graph3d/index.html +++ b/docs/graph3d/index.html @@ -10,6 +10,9 @@ + + + @@ -33,35 +36,48 @@ - @@ -766,5 +782,11 @@ graph3d.on('cameraPositionChange', onCameraPositionChange); + + + + + + \ No newline at end of file diff --git a/docs/img/arrow.svg b/docs/img/arrow.svg new file mode 100644 index 00000000..782d119e --- /dev/null +++ b/docs/img/arrow.svg @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/docs/js/jquery.highlight.js b/docs/js/jquery.highlight.js new file mode 100644 index 00000000..9dcf3c7a --- /dev/null +++ b/docs/js/jquery.highlight.js @@ -0,0 +1,108 @@ +/* + * jQuery Highlight plugin + * + * Based on highlight v3 by Johann Burkard + * http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html + * + * Code a little bit refactored and cleaned (in my humble opinion). + * Most important changes: + * - has an option to highlight only entire words (wordsOnly - false by default), + * - has an option to be case sensitive (caseSensitive - false by default) + * - highlight element tag and class names can be specified in options + * + * Usage: + * // wrap every occurrance of text 'lorem' in content + * // with (default options) + * $('#content').highlight('lorem'); + * + * // search for and highlight more terms at once + * // so you can save some time on traversing DOM + * $('#content').highlight(['lorem', 'ipsum']); + * $('#content').highlight('lorem ipsum'); + * + * // search only for entire word 'lorem' + * $('#content').highlight('lorem', { wordsOnly: true }); + * + * // don't ignore case during search of term 'lorem' + * $('#content').highlight('lorem', { caseSensitive: true }); + * + * // wrap every occurrance of term 'ipsum' in content + * // with + * $('#content').highlight('ipsum', { element: 'em', className: 'important' }); + * + * // remove default highlight + * $('#content').unhighlight(); + * + * // remove custom highlight + * $('#content').unhighlight({ element: 'em', className: 'important' }); + * + * + * Copyright (c) 2009 Bartek Szopka + * + * Licensed under MIT license. + * + */ + +jQuery.extend({ + highlight: function (node, re, nodeName, className) { + if (node.nodeType === 3) { + var match = node.data.match(re); + if (match) { + var highlight = document.createElement(nodeName || 'span'); + highlight.className = className || 'highlight'; + var wordNode = node.splitText(match.index); + wordNode.splitText(match[0].length); + var wordClone = wordNode.cloneNode(true); + highlight.appendChild(wordClone); + wordNode.parentNode.replaceChild(highlight, wordNode); + return 1; //skip added node in parent + } + } else if ((node.nodeType === 1 && node.childNodes) && // only element nodes that have children + !/(script|style)/i.test(node.tagName) && // ignore script and style nodes + !(node.tagName === nodeName.toUpperCase() && node.className === className)) { // skip if already highlighted + for (var i = 0; i < node.childNodes.length; i++) { + i += jQuery.highlight(node.childNodes[i], re, nodeName, className); + } + } + return 0; + } +}); + +jQuery.fn.unhighlight = function (options) { + var settings = { className: 'highlight', element: 'span' }; + jQuery.extend(settings, options); + + return this.find(settings.element + "." + settings.className).each(function () { + var parent = this.parentNode; + parent.replaceChild(this.firstChild, this); + parent.normalize(); + }).end(); +}; + +jQuery.fn.highlight = function (words, options) { + var settings = { className: 'highlight', element: 'span', caseSensitive: false, wordsOnly: false }; + jQuery.extend(settings, options); + + if (words.constructor === String) { + words = [words]; + } + words = jQuery.grep(words, function(word, i){ + return word != ''; + }); + words = jQuery.map(words, function(word, i) { + return word.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + }); + if (words.length == 0) { return this; }; + + var flag = settings.caseSensitive ? "" : "i"; + var pattern = "(" + words.join("|") + ")"; + if (settings.wordsOnly) { + pattern = "\\b" + pattern + "\\b"; + } + var re = new RegExp(pattern, flag); + + return this.each(function () { + jQuery.highlight(this, re, settings.element, settings.className); + }); +}; + diff --git a/docs/js/jquery.url.min.js b/docs/js/jquery.url.min.js new file mode 100644 index 00000000..8057e0aa --- /dev/null +++ b/docs/js/jquery.url.min.js @@ -0,0 +1 @@ +/*! url - v1.8.6 - 2013-11-22 */window.url=function(){function a(a){return!isNaN(parseFloat(a))&&isFinite(a)}return function(b,c){var d=c||window.location.toString();if(!b)return d;b=b.toString(),"//"===d.substring(0,2)?d="http:"+d:1===d.split("://").length&&(d="http://"+d),c=d.split("/");var e={auth:""},f=c[2].split("@");1===f.length?f=f[0].split(":"):(e.auth=f[0],f=f[1].split(":")),e.protocol=c[0],e.hostname=f[0],e.port=f[1]||("https"===e.protocol.split(":")[0].toLowerCase()?"443":"80"),e.pathname=(c.length>3?"/":"")+c.slice(3,c.length).join("/").split("?")[0].split("#")[0];var g=e.pathname;"/"===g.charAt(g.length-1)&&(g=g.substring(0,g.length-1));var h=e.hostname,i=h.split("."),j=g.split("/");if("hostname"===b)return h;if("domain"===b)return/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(h)?h:i.slice(-2).join(".");if("sub"===b)return i.slice(0,i.length-2).join(".");if("port"===b)return e.port;if("protocol"===b)return e.protocol.split(":")[0];if("auth"===b)return e.auth;if("user"===b)return e.auth.split(":")[0];if("pass"===b)return e.auth.split(":")[1]||"";if("path"===b)return e.pathname;if("."===b.charAt(0)){if(b=b.substring(1),a(b))return b=parseInt(b,10),i[0>b?i.length+b:b-1]||""}else{if(a(b))return b=parseInt(b,10),j[0>b?j.length+b:b]||"";if("file"===b)return j.slice(-1)[0];if("filename"===b)return j.slice(-1)[0].split(".")[0];if("fileext"===b)return j.slice(-1)[0].split(".")[1]||"";if("?"===b.charAt(0)||"#"===b.charAt(0)){var k=d,l=null;if("?"===b.charAt(0)?k=(k.split("?")[1]||"").split("#")[0]:"#"===b.charAt(0)&&(k=k.split("#")[1]||""),!b.charAt(1))return k;b=b.substring(1),k=k.split("&");for(var m=0,n=k.length;n>m;m++)if(l=k[m].split("="),l[0]===b)return l[1]||"";return null}}return""}}(),"undefined"!=typeof jQuery&&jQuery.extend({url:function(a,b){return window.url(a,b)}}); \ No newline at end of file diff --git a/docs/js/main.js b/docs/js/main.js index ac5a3275..901d7843 100644 --- a/docs/js/main.js +++ b/docs/js/main.js @@ -1,7 +1,9 @@ $(document).ready(function() { vis.createBreadcrumbs($(".container.full").first()); - + vis.initSiteSearch(); + vis.initKeywords(); + }); // namespace @@ -43,4 +45,83 @@ vis.createBreadcrumbs = function(container) { // insert into the container at the beginning. $(container).prepend("
" + breadcrumbs + "
"); +}; + +/** + * Will load tipue search field. + * If the search has already begun, we also display the results. + * + * For information how it works: + * @see https://github.com/almende/vis/issues/909#issuecomment-120119414 + * @see https://github.com/almende/vis/issues/909#issuecomment-120397562 + * + * @author felixhayashi + */ +vis.initSiteSearch = function() { + + $("#tipue_search_input").tipuesearch({ + "mode": "live", + "show": 3, + }); + + var hasSearchMessage = $("#tipue_search_content").children().length > 0; + if(hasSearchMessage) { + // show result panel + $("#search-results-wrapper").css("display", "block"); + // encode the keywords that were entered by the user + var keywords = $("#tipue_search_input").val().replace(/\s/g, ","); + // add keywords to result-urls + $(".tipue_search_content_url a, .tipue_search_content_title a").each(function() { + $(this).attr("href", $(this).attr("href") + "?keywords=" + keywords); + }); + } else { + $("#search-results-wrapper").css("display", "none"); + } + +}; + +/** + * Will highlight the keywords that are passed as url get-parameters. + * All keywords are higlighted and a panel is displayed to jump to the + * first keyword found. + * + * For information how it works: + * @see https://github.com/almende/vis/issues/909#issuecomment-120119414 + * @see https://github.com/almende/vis/issues/909#issuecomment-120397562 + * + * @author felixhayashi + */ +vis.initKeywords = function() { + + // extract keywords from get-variable + var keywords = url("?keywords"); + + if(keywords) { + + // highlighting all keywords + keywords = keywords.split(","); + for(var i = 0; i < keywords.length; i++) { + $("body").highlight(keywords[i]); + } + + // nasty hack: programmatically open full options tab + // because no browser allows scrolling to hidden elements! + $("[role=presentation][targetnode=fullOptions]").click(); + $("tr.toggle:not(collapsible)").click(); + + // init keyword info panel + $("#keyword-info").css("display", "block"); + $("#keyword-count").text($(".highlight").length); + $("#keyword-jumper-button").on('click', function(event) { + event.preventDefault(); + // do not cache hits outside the handler; creates problems with prettyfy lib + // we use the first visible(!) hit at the time the button is clicked + var firstHit = $(".highlight:visible").first(); + if(firstHit) { + $("html, body").animate({ scrollTop: $(firstHit).offset().top }, 2000); + } + }); + + } + }; \ No newline at end of file diff --git a/docs/js/tipuesearch.config.js b/docs/js/tipuesearch.config.js new file mode 100644 index 00000000..744b88ea --- /dev/null +++ b/docs/js/tipuesearch.config.js @@ -0,0 +1,76 @@ + +/* +Tipue Search 5.0 +Copyright (c) 2015 Tipue +Tipue Search is released under the MIT License +http://www.tipue.com/search +*/ + +var tipuesearch_pages = [ +"../network/layout.html", +"../network/configure.html", +"../network/edges.html", +"../network/groups.html", +"../network/index.html", +"../network/interaction.html", +"../network/manipulation.html", +"../network/nodes.html", +"../network/physics.html", +"../data/dataset.html", +"../data/dataview.html", +"../data/index.html", +"../timeline/index.html", +"../graph2d/index.html", +"../graph3d/index.html" +]; + +/* +Stop words +Stop words list from http://www.ranks.nl/stopwords +*/ + +var tipuesearch_stop_words = ["a", "about", "above", "after", "again", "against", "all", "am", "an", "and", "any", "are", "aren't", "as", "at", "be", "because", "been", "before", "being", "below", "between", "both", "but", "by", "can't", "cannot", "could", "couldn't", "did", "didn't", "do", "does", "doesn't", "doing", "don't", "down", "during", "each", "few", "for", "from", "further", "had", "hadn't", "has", "hasn't", "have", "haven't", "having", "he", "he'd", "he'll", "he's", "her", "here", "here's", "hers", "herself", "him", "himself", "his", "how", "how's", "i", "i'd", "i'll", "i'm", "i've", "if", "in", "into", "is", "isn't", "it", "it's", "its", "itself", "let's", "me", "more", "most", "mustn't", "my", "myself", "no", "nor", "not", "of", "off", "on", "once", "only", "or", "other", "ought", "our", "ours", "ourselves", "out", "over", "own", "same", "shan't", "she", "she'd", "she'll", "she's", "should", "shouldn't", "so", "some", "such", "than", "that", "that's", "the", "their", "theirs", "them", "themselves", "then", "there", "there's", "these", "they", "they'd", "they'll", "they're", "they've", "this", "those", "through", "to", "too", "under", "until", "up", "very", "was", "wasn't", "we", "we'd", "we'll", "we're", "we've", "were", "weren't", "what", "what's", "when", "when's", "where", "where's", "which", "while", "who", "who's", "whom", "why", "why's", "with", "won't", "would", "wouldn't", "you", "you'd", "you'll", "you're", "you've", "your", "yours", "yourself", "yourselves"]; + + +// Word replace + +var tipuesearch_replace = {'words': [ + {'word': 'tipua', 'replace_with': 'tipue'}, + {'word': 'javscript', 'replace_with': 'javascript'}, + {'word': 'jqeury', 'replace_with': 'jquery'} +]}; + + +// Weighting + +var tipuesearch_weight = {'weight': [ + {'url': 'http://www.tipue.com', 'score': 200}, + {'url': 'http://www.tipue.com/search', 'score': 100}, + {'url': 'http://www.tipue.com/about', 'score': 100} +]}; + + +// Stemming + +var tipuesearch_stem = {'words': [ + {'word': 'e-mail', 'stem': 'email'}, + {'word': 'javascript', 'stem': 'jquery'}, + {'word': 'javascript', 'stem': 'js'} +]}; + + +// Internal strings + +var tipuesearch_string_1 = 'No title'; +var tipuesearch_string_2 = 'Showing results for'; +var tipuesearch_string_3 = 'Search instead for'; +var tipuesearch_string_4 = '1 result'; +var tipuesearch_string_5 = 'results'; +var tipuesearch_string_6 = 'Prev'; +var tipuesearch_string_7 = 'Next'; +var tipuesearch_string_8 = 'Nothing found'; +var tipuesearch_string_9 = 'Common words are largely ignored'; +var tipuesearch_string_10 = 'Search too short'; +var tipuesearch_string_11 = 'Should be one character or more'; +var tipuesearch_string_12 = 'Should be'; +var tipuesearch_string_13 = 'characters or more'; diff --git a/docs/js/tipuesearch.min.js b/docs/js/tipuesearch.min.js new file mode 100644 index 00000000..6b69c72a --- /dev/null +++ b/docs/js/tipuesearch.min.js @@ -0,0 +1,155 @@ +(function($){$.fn.tipuesearch=function(options){var set=$.extend({'show':7,'newWindow':false,'showURL':true,'showTitleCount':true,'minimumLength':3,'descriptiveWords':25,'highlightTerms':true,'highlightEveryTerm':false,'mode':'static','liveDescription':'*','liveContent':'*','contentLocation':'tipuesearch/tipuesearch_content.json','debug':false},options);return this.each(function(){var tipuesearch_in={pages:[]};$.ajaxSetup({async:false});var tipuesearch_t_c=0;if(set.mode=='live') +{for(var i=0;i');var t_2=html.toLowerCase().indexOf('',t_1+7);if(t_1!=-1&&t_2!=-1) +{var tit=html.slice(t_1+7,t_2);} +else +{var tit=tipuesearch_string_1;} +tipuesearch_in.pages.push({"title":tit,"text":desc,"tags":cont,"url":tipuesearch_pages[i]});});}} +if(set.mode=='json') +{$.getJSON(set.contentLocation).done(function(json) +{tipuesearch_in=$.extend({},json);});} +if(set.mode=='static') +{tipuesearch_in=$.extend({},tipuesearch);} +var tipue_search_w='';if(set.newWindow) +{tipue_search_w=' target="_blank"';} +function getURLP(name) +{return decodeURIComponent((new RegExp('[?|&]'+name+'='+'([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g,'%20'))||null;} +if(getURLP('q')) +{$('#tipue_search_input').val(getURLP('q'));getTipueSearch(0,true);} +$(this).keyup(function(event) +{if(event.keyCode=='13') +{getTipueSearch(0,true);}});function getTipueSearch(start,replace) +{$('#tipue_search_content').hide();$('#tipue_search_content').html('
');$('#tipue_search_content').show();var out='';var results='';var show_replace=false;var show_stop=false;var standard=true;var c=0;found=[];var d=$('#tipue_search_input').val().toLowerCase();d=$.trim(d);if((d.match("^\"")&&d.match("\"$"))||(d.match("^'")&&d.match("'$"))) +{standard=false;} +if(standard) +{var d_w=d.split(' ');d='';for(var i=0;i=set.minimumLength) +{if(standard) +{if(replace) +{var d_r=d;for(var i=0;i$1
");} +if(tipuesearch_in.pages[i].tags.search(pat)!=-1) +{var m_c=tipuesearch_in.pages[i].tags.match(pat).length;score+=(10*m_c);} +if(tipuesearch_in.pages[i].url.search(pat)!=-1) +{score+=20;} +if(score!=0) +{for(var e=0;e$1");} +if(tipuesearch_in.pages[i].tags.search(pat)!=-1) +{var m_c=tipuesearch_in.pages[i].tags.match(pat).length;score+=(10*m_c);} +if(tipuesearch_in.pages[i].url.search(pat)!=-1) +{score+=20;} +if(score!=0) +{for(var e=0;e'+d_r+'';} +if(c==1) +{out+='
'+tipuesearch_string_4+'
';} +else +{c_c=c.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");out+='
'+c_c+' '+tipuesearch_string_5+'
';} +found.sort(function(a,b){return b.score-a.score});var l_o=0;for(var i=0;i=start&&l_o'+found[i].title+'';if(set.debug) +{out+='
Score: '+found[i].score+'
';} +if(set.showURL) +{var s_u=found[i].url.toLowerCase();if(s_u.indexOf('http://')==0) +{s_u=s_u.slice(7);} +out+='';} +if(found[i].desc) +{var t=found[i].desc;var t_d='';var t_w=t.split(' ');if(t_w.length';}} +l_o++;} +if(c>set.show) +{var pages=Math.ceil(c / set.show);var page=(start / set.show);out+='
';}} +else +{out+='
'+tipuesearch_string_8+'
';}} +else +{if(show_stop) +{out+='
'+tipuesearch_string_8+'. '+tipuesearch_string_9+'
';} +else +{out+='
'+tipuesearch_string_10+'
';if(set.minimumLength==1) +{out+='
'+tipuesearch_string_11+'
';} +else +{out+='
'+tipuesearch_string_12+' '+set.minimumLength+' '+tipuesearch_string_13+'
';}}} +$('#tipue_search_content').hide();$('#tipue_search_content').html(out);$('#tipue_search_content').slideDown(200);$('#tipue_search_replaced').click(function() +{getTipueSearch(0,false);});$('.tipue_search_foot_box').click(function() +{var id_v=$(this).attr('id');var id_a=id_v.split('_');getTipueSearch(parseInt(id_a[0]),id_a[1]);});}});};})(jQuery); diff --git a/docs/network/configure.html b/docs/network/configure.html index 91409abf..7c4c0c17 100644 --- a/docs/network/configure.html +++ b/docs/network/configure.html @@ -13,6 +13,9 @@ + + + @@ -36,8 +39,7 @@ - + - @@ -81,7 +96,6 @@

Network - configure

Handles the HTML part of the canvas.

- Back to overview.

Options

The options for the canvas have to be contained in an object titled 'configure'.

Click on the full options or shorthand options to show how these options are supposed to be used.

@@ -169,5 +183,11 @@ function (option, path) { + + + + + + diff --git a/docs/network/edges.html b/docs/network/edges.html index d8dcc469..7b3104c8 100644 --- a/docs/network/edges.html +++ b/docs/network/edges.html @@ -11,6 +11,9 @@ + + + @@ -36,10 +39,8 @@ - - + @@ -81,7 +96,6 @@

Network - edges

Handles the creation and deletion of edges and contains the global edge options and styles.

- Back to overview.

Options

The options for the edges have to be contained in an object titled 'edges'. All of these options can be supplied per edge as well. Obviously, 'id' should not be defined globally but per edge. Options defined @@ -660,5 +674,11 @@ var options: { + + + + + + \ No newline at end of file diff --git a/docs/network/groups.html b/docs/network/groups.html index b78b28c7..c0aee787 100644 --- a/docs/network/groups.html +++ b/docs/network/groups.html @@ -11,6 +11,9 @@ + + + @@ -34,10 +37,8 @@ - - +

@@ -79,7 +94,6 @@

Network - groups

Handles the group styling.

- Back to overview.

Options

The options for the canvas have to be contained in an object titled 'groups'.

@@ -153,5 +167,11 @@ var options = { + + + + + + \ No newline at end of file diff --git a/docs/network/index.html b/docs/network/index.html index c994f583..603a4d21 100644 --- a/docs/network/index.html +++ b/docs/network/index.html @@ -11,6 +11,9 @@ + + + @@ -68,9 +71,6 @@ - - @@ -1566,5 +1580,11 @@ var network = new vis.Network(container, data, options); + + + + + + \ No newline at end of file diff --git a/docs/network/interaction.html b/docs/network/interaction.html index 2d20f0aa..22d871e7 100644 --- a/docs/network/interaction.html +++ b/docs/network/interaction.html @@ -11,6 +11,9 @@ + + + @@ -32,7 +35,6 @@ - @@ -67,7 +83,6 @@

Network - interaction

Used for all user interaction with the network. Handles mouse and touch events as well as the navigation buttons and the popups.

- Back to overview.

Options

The options for the interaction module have to be contained in an object titled 'interaction'.

Click on the full options or shorthand options to show how these options are supposed to be used.

@@ -147,5 +162,11 @@ network.setOptions(options); + + + + + + \ No newline at end of file diff --git a/docs/network/layout.html b/docs/network/layout.html index b9b04335..e86c0d0b 100644 --- a/docs/network/layout.html +++ b/docs/network/layout.html @@ -10,6 +10,9 @@ + + + @@ -25,7 +28,10 @@ - + + + + @@ -33,7 +39,6 @@ ================================================== --> - @@ -68,7 +87,6 @@

Network - layout

Acts as the camera that looks on the canvas. Does the animation, zooming and focusing.

- Back to overview.

Options

The options for the layout module have to be contained in an object titled 'layout'.

Click on the full options or shorthand options to show how these options are supposed to be used.

@@ -127,5 +145,11 @@ network.setOptions(options); + + + + + + \ No newline at end of file diff --git a/docs/network/manipulation.html b/docs/network/manipulation.html index 33cb2d1d..d2b394f4 100644 --- a/docs/network/manipulation.html +++ b/docs/network/manipulation.html @@ -10,6 +10,9 @@ + + + @@ -32,7 +35,6 @@ - @@ -67,7 +83,6 @@

Network - manipulation

Acts as the camera that looks on the canvas. Does the animation, zooming and focusing.

- Back to overview.

Options

The options for the manipulation module have to be contained in an object titled 'manipulation'.

Click on the full options or shorthand options to show how these options are supposed to be used.

@@ -179,5 +194,11 @@ var options = { + + + + + + \ No newline at end of file diff --git a/docs/network/nodes.html b/docs/network/nodes.html index eb2df8ee..895db9a9 100644 --- a/docs/network/nodes.html +++ b/docs/network/nodes.html @@ -11,6 +11,9 @@ + + + @@ -57,6 +60,20 @@
  • Feature requests
  • License
  • + +
    +
    +
    +
    +
    +
    +
    + Found results. Click here to jump to the first keyword occurence! +
    +
    @@ -73,7 +90,6 @@

    Network - nodes

    Handles the creation and deletion of nodes and contains the global node options and styles.

    - Back to overview.

    Options

    The options for the nodes have to be contained in an object titled 'nodes'. All of these options can be supplied per node as well. Obviously, 'id' should not be defined globally but per node. Options defined in the global nodes object, are applied to all nodes. If a node has options of its own, those will be used instead of the global options.

    @@ -661,5 +677,11 @@ mySize = minSize + diff * scale; + + + + + + \ No newline at end of file diff --git a/docs/network/physics.html b/docs/network/physics.html index a4ac3e51..633e5ed5 100644 --- a/docs/network/physics.html +++ b/docs/network/physics.html @@ -10,6 +10,9 @@ + + + @@ -33,7 +36,6 @@ - @@ -68,7 +84,6 @@

    Network - physics

    Handles the physics simulation, moving the nodes and edges to show them clearly.

    - Back to overview.

    Options

    The options for the physics have to be contained in an object titled 'physics'.

    Click on the full options or shorthand options to show how these options are supposed to be used.

    @@ -197,5 +212,11 @@ network.setOptions(options); + + + + + + \ No newline at end of file diff --git a/docs/timeline/index.html b/docs/timeline/index.html index 0359e32c..37a2a0ba 100644 --- a/docs/timeline/index.html +++ b/docs/timeline/index.html @@ -10,6 +10,9 @@ + + + @@ -28,7 +31,13 @@ - + + + + + + + @@ -1607,5 +1616,11 @@ var options = { + + + + + + \ No newline at end of file