renaming 2_9_0-to-2_9_1_upgrade.sql to 2_9_0-to-3_0_0_upgrade.sql
[openemr.git] / interface / super / show_lists_popup.php
blob4dae7873497e18f1fb5ec3dce4038577a959d890
1 <?php
2 /*
3 * This popup is called when choosing a list for a form layout
4 */
6 include_once("../globals.php");
8 ?>
10 <html>
11 <head>
12 <?php html_header_show();?>
13 <title><?php xl('List lists','e'); ?></title>
14 <link rel="stylesheet" href='<?php echo $css_header ?>' type='text/css'>
16 <script type="text/javascript" src="<?php echo $GLOBALS['webroot'] ?>/library/js/jquery-1.2.2.min.js"></script>
18 <style>
19 h1 {
20 font-size: 120%;
21 padding: 3px;
22 margin: 3px;
24 ul {
25 list-style: none;
26 padding: 3px;
27 margin: 3px;
28 background-color: white;
30 li {
31 cursor: pointer;
32 border-bottom: 1px solid #ccc;
34 </style>
36 </head>
38 <body class="body_top text">
39 <div id="lists">
40 <h1>Active lists</h1>
41 <ul>
42 <?php
43 $res = sqlStatement("SELECT * FROM list_options WHERE " .
44 "list_id = 'lists' ORDER BY title");
45 while ($row = sqlFetchArray($res)) {
46 echo "<li id='".$row['option_id']."' class='oneresult'>".$row['title']."</li>";
49 </ul>
50 </div>
51 </body>
53 <script language="javascript">
55 // jQuery stuff to make the page a little easier to use
57 $(document).ready(function(){
58 $(".oneresult").mouseover(function() { $(this).toggleClass("highlight"); });
59 $(".oneresult").mouseout(function() { $(this).toggleClass("highlight"); });
60 $(".oneresult").click(function() { SelectList(this); });
62 var SelectList = function(obj) {
63 var listid = $(obj).attr("id");
64 if (opener.closed || ! opener.SetList)
65 alert('The destination form was closed; I cannot act on your selection.');
66 else
67 opener.SetList(listid);
68 window.close();
69 return false;
72 });
74 </script>
76 </html>