index.html 1.79 KB
Newer Older
1
2
3
<!DOCTYPE html>
<html>
  <head>
Bertrand  NÉRON's avatar
Bertrand NÉRON committed
4
    <title>Secreton</title>
5
    <link rel="stylesheet" href="style/main.css" type="text/css">
Bertrand  NÉRON's avatar
Bertrand NÉRON committed
6
7
8
    <link rel="stylesheet" href="style/tooltip.css" type="text/css">
    <script src="/_utils/script/jquery.js"></script>
    <script src="/_utils/script/jquery.couch.js"></script>
9
10
  </head>
  <body>
Bertrand  NÉRON's avatar
Bertrand NÉRON committed
11
12
13
14
15
16
17
18
19
20
21
22
23
  <div id="request">
  <form>
    <fieldset>
        <label for="nameSearch">by replicon name (ex:BUMA001c02)</label>
        <input type="text" name="nameSearch" id="nameInput"/>
        <button type="button" id="nameButton">search by name</button>  
    </fieldset> 
  </form>
  </div>
  <div id="results">
  
  
  </div>  
24
  </body>
Bertrand  NÉRON's avatar
Bertrand NÉRON committed
25
26
27
28
29
30
31
32
33
34
35
36
37
  <script type="text/javascript">
$(".tooltip" , "#results").live('mouseenter', function(){
    var link$ = $(this).find("a");
    timer = setTimeout(function(){ 
        var pos = link$.position();
        var top = pos.top + link$.outerHeight(true)+3;
        var left = pos.left + link$.outerWidth(false)-25;
        link$.next().css({top: top+"px", left: left+"px"}).show(300)}, 
        500);
    }).live( 'mouseleave', function(){
         clearTimeout(timer);
         $(this).find("ul").hide(300)});
</script>
38

Bertrand  NÉRON's avatar
Bertrand NÉRON committed
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
  <script type="text/javascript">
  var get_results = function( view , args ){
	  var url= document.location.href.split('/').slice(0, -1).concat(['_list','index',view]).join('/');
	  $("#results").load(url , args );
  }
  $("#nameButton").click( function(){
	  var params = {limit:45};
	  var key= $("#nameInput").attr("value");
	  if( key ){ params.key='"'+key+'"'}
	  get_results( 'by_replicon_name', $.param(params)); 
  });
  
  
  $("#paginate .nav_page").live( 'click', function(){
	  console.log('paginate click' );
	  var url = $(this).attr('data-href');
	  console.log("url="+url);
	  $("#results").load( url );
  });
  
 		  
60
61
  </script>
</html>