acknowledgments update
[openemr.git] / interface / super / show_lists_popup.php
blob23b77a37b6898d10f7e0da949a7d8bed80600262
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;
29 li {
30 cursor: pointer;
31 border-bottom: 1px solid #ccc;
32 background-color: white;
34 .highlight {
35 background-color: #336699;
36 color: white;
38 </style>
40 </head>
42 <body class="body_top text">
43 <div id="lists">
44 <h1><?php xl('Active lists','e'); ?></h1>
45 <ul>
46 <?php
47 $res = sqlStatement("SELECT * FROM list_options WHERE " .
48 "list_id = 'lists' ORDER BY title");
49 while ($row = sqlFetchArray($res)) {
50 echo "<li id='".$row['option_id']."' class='oneresult'>" . xl($row['title']) . "</li>";
53 </ul>
54 </div>
55 </body>
57 <script language="javascript">
59 // jQuery stuff to make the page a little easier to use
61 $(document).ready(function(){
62 $(".oneresult").mouseover(function() { $(this).toggleClass("highlight"); });
63 $(".oneresult").mouseout(function() { $(this).toggleClass("highlight"); });
64 $(".oneresult").click(function() { SelectList(this); });
66 var SelectList = function(obj) {
67 var listid = $(obj).attr("id");
68 if (opener.closed || ! opener.SetList)
69 alert('The destination form was closed; I cannot act on your selection.');
70 else
71 opener.SetList(listid);
72 window.close();
73 return false;
76 });
78 </script>
80 </html>