<commit_before><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Bootstrap, from Twitter</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Le styles -->
    <link href="../lib/bootstrap/css/bootstrap.css" rel="stylesheet">
    <style>
      body {
        padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
      }
      #map2 {position:absolute;width:1000; height:1000}
      #map1 {position:absolute; top:0px;left:0px;z-Index:-30;visibility:hidden; }
    </style>
    <link href="../lib/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../lib/jquery-ui-1.9.2.custom.min.css"/>
    <link rel="stylesheet" type="text/css" href="mindmap.css" /> 

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Fav and touch icons -->
  </head>

  <body>

    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="brand" href="#">Project name</a>
          <div class="nav-collapse collapse">
            <ul class="nav">
           <li class="dropdown">
    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
        Edit Map
      <b class="caret"></b>
    </a>
    <ul class="dropdown-menu">
      <li><a id="menuAdd" href="#">New child node</a></li>    
      <li><a id="menuEdit" href="#">Edit node</a></li>    
      <li><a id="menuDelete" href="#">Delete node</a></li>    
    </ul> 
</ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>


    <div id="map1"></div>
    <div id="map2" class="container" ></div>
   <script src="../test/testtree.js"></script>
  <script src="../lib/underscore-1.4.3-min.js"></script>
  <script src="../lib/jquery-1.8.3.js"></script>
  <script src="../lib/jquery-ui-1.9.2.custom.min.js"></script>
  <script src="../lib/bootstrap/js/bootstrap.js"></script>
  <script src="../src/observable.js"></script>
  <script src="../src/content.js"></script>
  <script src="../src/mindmap.js"></script>
    <script>
      var customClasses={ selectedClass:'btn-success', hoverClass:'btn-warning' }
      function addToSelected(){
        content_aggregate.addSubIdea(selectedId,'A cunning plan');
      };
      function jquery_repaint_map(active_content, active_jq_map,onComplete){
        var background_jq_map=$('#map1');
        dom_repaint_entire_map(active_content,background_jq_map);
        $('#map1 .MAP_label').addClass('btn');
        update_map(active_jq_map,visual_to_map(background_jq_map),onComplete);
        active_jq_map.find('.MAP_label').addClass('btn');
      }
      $(function(){
        var active_content=content(test_tree());
//        dom_repaint_entire_map(active_content,$('#map2'));
        selectedId=function(){
           return $('#map2').find('.'+customClasses.selectedClass).attr('idea') || active_content.id;
        }
        jquery_repaint_map(active_content,$('#map2'));
        attach_label_listeners($('#map2').find('.MAP_label'), $('#map2'),active_content, customClasses );
        attach_map_listeners(active_content,$('#map2'), jquery_repaint_map,customClasses);
        $('#menuAdd').click(function(){
           active_content.addSubIdea(selectedId(),'A cunning plan');  
        });
        $('#menuEdit').click(function(){
           var selected=selectedId();
           editLabel(
             $('#map2 .MAP_label[idea='+selected+']'),
             function(newValue){
              active_content.updateTitle(selected,newValue);
             }
           );
        });
        $('#menuDelete').click(function(){
          active_content.removeSubIdea(selectedId()); 
        })
      });
      </script>
  </body>
</html><commit_msg>clear menu button<commit_after><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Bootstrap, from Twitter</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Le styles -->
    <link href="../lib/bootstrap/css/bootstrap.css" rel="stylesheet">
    <style>
      body {
        padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
      }
      #map2 {position:absolute;width:1000; height:1000}
      #map1 {position:absolute; top:0px;left:0px;z-Index:-30;visibility:hidden; }
    </style>
    <link href="../lib/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../lib/jquery-ui-1.9.2.custom.min.css"/>
    <link rel="stylesheet" type="text/css" href="mindmap.css" /> 

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Fav and touch icons -->
  </head>

  <body>

    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <a class="brand" href="#">Project name</a>
          <div class="nav-collapse collapse">
            <ul class="nav">
           <li class="dropdown">
    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
        Edit Map
      <b class="caret"></b>
    </a>
    <ul class="dropdown-menu">
      <li><a id="menuAdd" href="#">New child node</a></li>    
      <li><a id="menuEdit" href="#">Edit node</a></li>    
      <li><a id="menuDelete" href="#">Delete node</a></li>
      <li class="divider"></li>
      <li><a id="menuClear" href="#">Clear Map</a></li>    
    </ul> 
</ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>


    <div id="map1"></div>
    <div class="text-align:center; width:100%">
    <div id="map2" class="container" ></div>
    </div>
   <script src="../test/testtree.js"></script>
  <script src="../lib/underscore-1.4.3-min.js"></script>
  <script src="../lib/jquery-1.8.3.js"></script>
  <script src="../lib/jquery-ui-1.9.2.custom.min.js"></script>
  <script src="../lib/bootstrap/js/bootstrap.js"></script>
  <script src="../src/observable.js"></script>
  <script src="../src/content.js"></script>
  <script src="../src/mindmap.js"></script>
    <script>
      var customClasses={ selectedClass:'btn-success', hoverClass:'btn-warning' }
      function addToSelected(){
        content_aggregate.addSubIdea(selectedId,'A cunning plan');
      };
      function jquery_repaint_map(active_content, active_jq_map,onComplete){
        var background_jq_map=$('#map1');
        dom_repaint_entire_map(active_content,background_jq_map);
        $('#map1 .MAP_label').addClass('btn');
        update_map(active_jq_map,visual_to_map(background_jq_map),onComplete);
        active_jq_map.find('.MAP_label').addClass('btn');
      }
      $(function(){
        var active_content=content(test_tree());
//        dom_repaint_entire_map(active_content,$('#map2'));
        var selectedId=function(){
           return $('#map2').find('.'+customClasses.selectedClass).attr('idea') || active_content.id;
        }
        jquery_repaint_map(active_content,$('#map2'));
        attach_label_listeners($('#map2').find('.MAP_label'), $('#map2'),active_content, customClasses );
        attach_map_listeners(active_content,$('#map2'), jquery_repaint_map,customClasses);
        $('#menuAdd').click(function(){
           active_content.addSubIdea(selectedId(),'A cunning plan');  
        });
        $('#menuEdit').click(function(){
           var selected=selectedId();
           editLabel(
             $('#map2 .MAP_label[idea='+selected+']'),
             function(newValue){
              active_content.updateTitle(selected,newValue);
             }
           );
        });
        $('#menuDelete').click(function(){
          active_content.removeSubIdea(selectedId()); 
        });
        $('#menuClear').click(function(){
          _.each(active_content.ideas, function(idea){ active_content.removeSubIdea(idea.id);})
        });
      });
      </script>
  </body>
</html>
{'fraction_non_alphanumeric': 0.19727473606678125, 'fraction_numerical': 0.012889761846304935, 'mean_word_length': 2.8447380840018877, 'pattern_counts': {'":': 0, '<': 167, '<?xml version=': 0, '>': 167, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1502427', 'n_tokens_mistral': 2657, 'n_tokens_neox': 2559, 'n_words': 412}