Permalink
Browse files

altered sample

  • Loading branch information...
1 parent 77086d9 commit e9071808c4738f59fe0c75464bbefb8006488fa4 @marcelklehr committed May 23, 2011
Showing with 21 additions and 176 deletions.
  1. +4 −1 LICENCE.txt
  2. +0 −73 index.htm
  3. +0 −9 js-mindmap.css
  4. +1 −2 js-mindmap.js
  5. +16 −25 sample.htm
  6. +0 −41 script.js
  7. +0 −25 style.css
View
@@ -1,5 +1,8 @@
+Copyright (c) 2001 Marcel Klehr
+
+uses original js-mindmap
Copyright (c) 2008/09/10 Kenneth Kufluk
-Adapted 2011 by Marcel Klehr
+
MIT LICENSE
View
@@ -1,73 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <!-- Kenneth Kufluk 2008/09/10 -->
- <title>js-mindmap demo - JavaScript Mindmap</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <link rel="stylesheet" type="text/css" href="js-mindmap.css" />
- <link href="style.css" type="text/css" rel="stylesheet"/>
-
- <!-- jQuery -->
-
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
- <!-- UI, for draggable nodes -->
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>
-
- <!-- Raphael for SVG support (won't work on android) -->
- <script type="text/javascript" src="raphael-min.js"></script>
-
- <!-- Mindmap -->
-
- <script type="text/javascript" src="js-mindmap.js"></script>
-
- <!-- Kick everything off -->
- <script src="script.js" type="text/javascript"></script>
-
-</head>
-<body>
- <ul>
- <li><div><span>Kenneth</span></div>
-
- <ul>
- <li><div><a href="http://twitter.com" target="_blank" class="icon twitter">Twitter</a></div></li>
- <li><div><span class="icon linkedin">LinkedIn</span></div></li>
- <li><div><a href="http://facebook.com" target="_blank"class="icon facebook">Facebook</a></div></li>
- <li><div><span class="icon rss">RSS Feed</span></div></li>
-
- <li><div><span>Blog categories</a></div>
-
- <ul>
- <li><div><span title="View all posts filed under General">General</span></div></li>
- <li><div><span title="View all posts filed under Personal">Personal</span></div></li>
- <li><div><span title="View all posts filed under Physics &amp; Astronomy">Physics &amp; Astronomy</span></div></li>
- <li><div><span title="View all posts filed under Projects">Projects</span></div></li>
- <li><div><span title="View all posts filed under Ranting">Ranting</span></div></li>
- <li><div><span title="View all posts filed under Work">Work</span></div></li>
- </ul>
-
- </li>
- <li><div><span>Pages</span></div>
- <ul>
- <li><div><span title="About Kenneth">About Kenneth</span></div></li>
- <li><div><span title="Employment">Employment</span></div></li>
- <li><div><span title="Experiments">Experiments</span></div></li>
- </ul>
- </li>
-
- <li><div><span>Friends</a></div>
- <ul>
- <li><div><a href="http://coderonfire.com/" traget="_blank" title="Coder on Fire" rel="friend met co-worker colleague neighbor">Andrew Mason</a></div></li>
- <li><div><a href="http://www.wait-till-i.com" traget="_blank" title="Wait till I come!" rel="met">Christian Heilmann</a></div></li>
- <li><div><a href="http://www.danwebb.net" traget="_blank" rel="friend met" title="Godlike JavaScript Guru">Dan Webb</a></div></li>
- <li><div><a href="http://www.sitedaniel.com" traget="_blank" rel="friend met co-worker colleague neighbor" title="Flash Whizz">Daniel Goldsworthy</a></div></li>
- <li><div><a href="http://dean.edwards.name" traget="_blank" rel="friend met" title="Godlike JavaScript Guru">Dean Edwards</a></div></li>
- <li><div><a href="http://www.dotsonline.co.uk" traget="_blank" title="My auntie&#8217;s music shop.">Dot&#8217;s Shop</a></div></li>
- <li><div><a href="http://simonwillison.net/" traget="_blank" title="PHP, Python, CSS, XML and general web development.">Simon Willison</a></div></li>
- </ul>
-
- </li>
- </ul>
- </li>
- </ul>
-</body>
-</html>
View
@@ -14,15 +14,6 @@
.js-mindmap-active .node.active{
font-size:1.5em;
}
-.js-mindmap-active img.line {
- position:absolute;
- width:200px;
- height:133px;
- top:0;
- left:0;
- display:block;
- z-index:0;
- }
.ui-draggable {
position:absolute;
}
View
@@ -460,7 +460,6 @@
$.fn.mindmap = function(options) {
var $mindmap = $(this);
var $return = $mindmap._mindmap(options);
-
// add the data to the mindmap
var root = $('>ul>li',$mindmap).get(0).mynode = $mindmap.addRootNode($('>ul>li>div',$mindmap), {
onclick:function(node) {
@@ -469,6 +468,7 @@
});
}
});
+
$('>ul>li',$mindmap).hide();
var addLI = function() {
var parentnode = $(this).parents('li').get(0);
@@ -491,7 +491,6 @@
$('>ul>li>ul',$mindmap).each(function() {
$('>li', this).each(addLI);
});
-
return $return;
};
View
@@ -31,43 +31,34 @@
</head>
<body>
<ul>
- <li><div><span>Kenneth</span></div>
+ <li><div><span>js-mindmap</span></div>
<ul>
- <li><div><a href="http://twitter.com" target="_blank" class="icon twitter">Twitter</a></div></li>
- <li><div><span class="icon linkedin">LinkedIn</span></div></li>
- <li><div><a href="http://facebook.com" target="_blank"class="icon facebook">Facebook</a></div></li>
- <li><div><span class="icon rss">RSS Feed</span></div></li>
-
- <li><div><span>Blog categories</a></div>
+ <li><div><span>Resources</a></div>
<ul>
- <li><div><span title="View all posts filed under General">General</span></div></li>
- <li><div><span title="View all posts filed under Personal">Personal</span></div></li>
- <li><div><span title="View all posts filed under Physics &amp; Astronomy">Physics &amp; Astronomy</span></div></li>
- <li><div><span title="View all posts filed under Projects">Projects</span></div></li>
- <li><div><span title="View all posts filed under Ranting">Ranting</span></div></li>
- <li><div><span title="View all posts filed under Work">Work</span></div></li>
+ <li><div><span>Raphaël</span></div></li>
+ <li><div><span>jQuery</span></div></li>
+ <li><div><span>jQueryUI</span></div></li>
+ <li><div><a href="https://github.com/kennethkufluk/js-mindmap" target="_blank">Origin</a></div></li>
</ul>
</li>
- <li><div><span>Pages</span></div>
+ <li><div><span>Files</span></div>
<ul>
- <li><div><span title="About Kenneth">About Kenneth</span></div></li>
- <li><div><span title="Employment">Employment</span></div></li>
- <li><div><span title="Experiments">Experiments</span></div></li>
+ <li><div><a href="sample.htm" target="_blank">sample.htm</a></div></li>
+ <li><div><a href="js-mindmap.js" target="_blank">js-mindmap.js</a></div></li>
+ <li><div><a href="js-mindmap.css" target="_blank">js-mindmap.css</a></div></li>
+ <li><div><a href="raphael-min.js" target="_blank">raphael-min.js</a></div></li>
+ <li><div><a href="jquery-1.4.3.min.js" target="_blank">jquery-1.4.3.min.js</a></div></li>
+ <li><div><a href="jquery-ui-1.8.12.min.js" target="_blank">jquery-ui-1.8.12.min.js</a></div></li>
</ul>
</li>
- <li><div><span>Friends</a></div>
+ <li><div><span>Licence</a></div>
<ul>
- <li><div><a href="http://coderonfire.com/" traget="_blank" title="Coder on Fire" rel="friend met co-worker colleague neighbor">Andrew Mason</a></div></li>
- <li><div><a href="http://www.wait-till-i.com" traget="_blank" title="Wait till I come!" rel="met">Christian Heilmann</a></div></li>
- <li><div><a href="http://www.danwebb.net" traget="_blank" rel="friend met" title="Godlike JavaScript Guru">Dan Webb</a></div></li>
- <li><div><a href="http://www.sitedaniel.com" traget="_blank" rel="friend met co-worker colleague neighbor" title="Flash Whizz">Daniel Goldsworthy</a></div></li>
- <li><div><a href="http://dean.edwards.name" traget="_blank" rel="friend met" title="Godlike JavaScript Guru">Dean Edwards</a></div></li>
- <li><div><a href="http://www.dotsonline.co.uk" traget="_blank" title="My auntie&#8217;s music shop.">Dot&#8217;s Shop</a></div></li>
- <li><div><a href="http://simonwillison.net/" traget="_blank" title="PHP, Python, CSS, XML and general web development.">Simon Willison</a></div></li>
+ <li><div><span>MIT Licence</span></div></li>
+ <li><div><a href="LICENCE.txt" target="_blank">LICENCE.txt</a></div></li>
</ul>
</li>
View
@@ -1,41 +0,0 @@
-// load the mindmap
- $(document).ready(function() {
- $('body').mindmap();
- // enable the mindmap in the body
- // add the data to the mindmap
- var root = $('body>ul>li').get(0).mynode = $('body').addRootNode($('body>ul>li>div'), {
-// href:$('body>ul>li>a').attr('href'),
-// url:$('body>ul>li>a').attr('href'),
- onclick:function(node) {
- $(node.obj.activeNode.content).each(function() {
- this.hide();
- });
- }
- });
- $('body>ul>li').hide();
- var addLI = function() {
- var parentnode = $(this).parents('li').get(0);
- if (typeof(parentnode)=='undefined') parentnode=root;
- else parentnode=parentnode.mynode;
-
- this.mynode = $('body').addNode(parentnode, $('div:eq(0)',this), {
-// href:$('a:eq(0)',this).text().toLowerCase(),
-// href:$('a:eq(0)',this).attr('href'),
-// url:$('a:eq(0)',this).attr('href'),
- onclick:function(node) {
- $(node.obj.activeNode.content).each(function() {
- this.hide();
- });
- $(node.content).each(function() {
- this.show();
- });
- }
- });
- $(this).hide();
- $('>ul>li', this).each(addLI);
- };
- $('body>ul>li>ul').each(function() {
- $('>li', this).each(addLI);
- });
-
- });
View
@@ -1,25 +0,0 @@
-.js-mindmap-active {
- background:blue;
-}
-.js-mindmap-active div.node {
- background:red;
- border: 2px solid orange;
- -webkit-border-top-left-radius: 20px;
- -webkit-border-bottom-right-radius: 20px;
- -moz-border-radius-topleft: 20px;
- -moz-border-radius-bottomright: 20px;
- border-top-left-radius: 20px;
- border-bottom-right-radius: 20px;
- color:#fff;
-}
-.js-mindmap-active div.node a {
- color:#fff;
-}
-.js-mindmap-active div.node.active {
- padding:5px 10px !important;
- border-width:5px !important;
- color:#fff!important;
-}
-.js-mindmap-active div.node.active a {
- color:#fff;
-}

0 comments on commit e907180

Please sign in to comment.