Skip to content

Commit

Permalink
Demo buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinke Hoekstra committed Dec 21, 2013
1 parent aca038d commit ae48e38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,19 @@

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<ul class="nav navbar-nav" id="demos">
<li><div class="btn btn-primary btn-file navbar-btn" >
Select files to display... <input type="file" id="fileinput" multiple/>
</div></li>
<li class="dropdown">
<!-- <li class="dropdown">
<div class="btn btn-default dropdown-toggle navbar-btn" id="dropdownMenu1" data-toggle="dropdown">
Demo Datasets
<span class="caret"></span>
</div>
<ul class="dropdown-menu" id="demos" role="menu" aria-labelledby="dropdownMenu1">
</ul>
</li>
</li> -->
</ul>
<ul class="nav navbar-nav navbar-right" id='yearcontrol'>
<li>
Expand Down
9 changes: 4 additions & 5 deletions js/patents.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ $(function () {
console.log(s);
var demoset = demos[s];

var demoset_header = $('<li role="presentation" class="dropdown-header">'+ s +'</li>');
var demoset_header = $('<li></li>');

$('#demos').append(demoset_header);

Expand All @@ -92,7 +92,7 @@ $(function () {
demo = demoset[d];

// <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
var demo_button = $('<a role="menuitem" tabindex="-1" href="#">'+demo.description+'</a>');
var demo_button = $('<div class="btn btn-default navbar-btn">Demo '+demo.description+'</div>');

demo_button.on('click', {demo: demo}, function(e){
var demo = e.data.demo;
Expand All @@ -104,10 +104,9 @@ $(function () {
get_from_server(demo,demo.start);
});

var demo_li = $('<li role="presentation"></li>');
demo_li.append(demo_button);
demoset_header.append(demo_button);

$('#demos').append(demo_li);

}

}
Expand Down

0 comments on commit ae48e38

Please sign in to comment.