jqplot / tests / opener.php

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="Author" content="Chris Leonello">
  <meta name="keywords" content="chart, plot, graph, javascript, jquery, jqplot, charting, plotting, graphing">
  <title><?php echo $title ?></title>
  <!--[if IE]><script language="javascript" type="text/javascript" src="../src/excanvas.min.js"></script><![endif]-->
  <link rel="stylesheet" type="text/css" href="../src/jquery.jqplot.css" />
  
  <!-- BEGIN: load jquery -->
  <script language="javascript" type="text/javascript" src="jquery-1.3.2.min.js"></script>
  <!-- END: load jquery -->
  
  <!-- BEGIN: load extras -->
  <script language="javascript" type="text/javascript" src="beautify.min.js" ></script>
  <script language="javascript" type="text/javascript" src="prettify.min.js"></script>
  <link rel="stylesheet" href="jspec.min.css" type="text/css" media="screen" title="no title" charset="utf-8">
  <link rel="stylesheet" href="prettify.min.css" type="text/css" rel="stylesheet" />
  <!-- END: load extras -->
  
  <!-- BEGIN: load jqplot -->
  <script language="javascript" type="text/javascript" src="../src/jquery.jqplot.js"></script>
  
  <?php
    if (count($jqplot_js_includes) > 0) {
      foreach ($jqplot_js_includes as $ji) {
        echo '<script language="javascript" type="text/javascript" src="'.$ji.'"></script>';
      }
    }
  ?>
  <!-- END: load jqplot -->

  <link rel="stylesheet" type="text/css" href="unittests.css" />
  
  <script language="javascript" type="text/javascript">
    // nice unique id function generator which I don't use anymore.
    var uID = (function() {
      var id = 1;
      return function(){return id++};
    })();

    function run() {
      var o, n, nid;
  
      var elems = $(".prettyprint.plot");
      
      for (var n=0; n<elems.length; n++) {
        var code = $(elems[n]).text();
        eval(code);
      }

      prettyPrint();
    }
    
  </script>
  
<?php
  $pages = array('coretests.php', 'pieTests.php', 'multipleYAxesTests.php', 'logAxisTests.php', 'dateAxisTests.php', 'highlighterTests.php', 'OHLCTests.php', 'zoomTests.php', 'categoryAxisTests.php', 'barRendererTests.php', 'dragableTests.php', 'stackedTests.php', 'pointLabelTests.php', 'canvasAxisTests.php');
        
  $len = count($pages);
  $parts = explode("/", $_SERVER["REQUEST_URI"]);
  $currpage = end($parts);
  $curridx = array_search($currpage, $pages);
  $prevpage = $pages[$curridx - 1];
  if (!$prevpage) $prevpage = $pages[$len-1];
  $nextpage = $pages[$curridx + 1];
  if (!$nextpage) $nextpage = $pages[0];
  
  $a = '<a href="%s">';
?>

</head>
  <body onLoad="run();">
    <div id="main">
      <div class="logo">
      
        <div id="navhome" onclick="location.href='../../index.php';"><a href="../../index.php"></a></div> 
        <div id="navexamples" onclick="location.href='./';"><a href="./"></a></div> 
        <div id="navdocs" onclick="location.href='../docs/';"><a href="../docs/"></a></div> 
        <div id="navdownload" onclick="location.href='http://bitbucket.org/cleonello/jqplot/downloads/';"><a href="../../index.php"></a></div> 
        <div id="navinfo" onclick="location.href='../info.php';"><a href="../../info.php"></a></div>
        
      </div>
    
      <div id="content">
        <div id="jspec-top">
          <div id="jspec-title"><?php echo $jspec_title ?></div>
          <div class="nav top">
            <?php echo '<a href="'.$prevpage.'"><img src="images/arrow_left_48.png" height="24" width="24" /></a>'; ?> 
            <a href="./index.html"><img src="images/arrow_up_48.png" height="24" width="24" /></a> 
            <?php echo '<a href="'.$nextpage.'"><img src="images/arrow_right_48.png" height="24" width="24" /></a>'; ?>
          </div>
        </div>
        <div id="jspec"></div>
        <div id="jspec-bottom"></div>
        
  <?php
    if (count($jqplot_js_includes)==1) {
      echo '<p class="description">The plot(s) on this page use the following plugin:</p>';
      echo '<pre class="prettyprint">&lt;script type="text/javascript" src="'.$jqplot_js_includes[0].'" /&gt;</pre>';
    }
    else if (count($jqplot_js_includes)>1) {
      echo '<p class="description">The plot(s) on this page use the following plugins:</p><pre class="prettyprint">';
      foreach ($jqplot_js_includes as $ji) {
        echo '&lt;script type="text/javascript" src="'.$ji.'" /&gt;';
        echo '<br />';
      }
      echo '</pre>';
    }
  ?>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.