next major version. uses the latest CouchDb PHP Library. Lots of interface goodies...
[couchdbimport.git] / CouchProjects / Demos / php / BugShrink / header.php
blobd0a546e77197c8e6f1b924503a8013b743d4dd05
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5 <title>Tell me about your problems&hellip;</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
7 <link rel="stylesheet" href="shrink.screen.css" type="text/css" media="screen" title="Screen CSS Layout" charset="utf-8">
8 <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="feed.php" />
10 <script type="text/javascript" charset="utf-8">
11 function $(id)
13 return document.getElementById(id);
16 function setMeta(name, type)
18 activateAllMeta(type);
19 //var area = document.getElementById('BugBody');
20 // alert(area.value.replace(/\[([^\s]*)\s?([^\]]*)\]/, '[' + name + ' ' + type + ']'));
21 switch(type) {
22 case 'projects':
23 //area.value = area.value.replace(/\[([^\s]*)/, '[' + name);
24 $('Project').value = name;
25 break;
27 case 'categories':
28 $('Category').value = name;
30 //area.value = area.value.replace(/\s([^\]]*)\]/, ' ' + name + ']');
31 break;
34 if(document.getElementById('meta_' + type + '_' + name)) {
35 var elm = $('meta_' + type + '_' + name);
36 elm.style.fontWeight = 'bold';
40 function activateAllMeta(type)
42 var metas = document.getElementsByName('meta_' + type);
43 for(var idx = 0; idx < metas.length; idx++) {
44 metas[idx].style.fontWeight = 'normal';
47 type = type == 'projects'?'project':'category';
48 var link = $('new_' + type + '_link');
49 var field = $('new_' + type);
50 hideNew(link, field);
53 function toggleNew(type)
55 var link = $('new_' + type + '_link');
56 var field = $('new_' + type);
58 if(link.style.display == 'none') { // show link, hide field
59 hideNew(link, field);
60 } else { // other way around
61 showNew(link, field);
65 function showNew(link, field)
67 link.style.display = 'none';
68 field.style.display = 'block';
69 field.focus();
72 function hideNew(link, field)
74 link.style.display = 'block';
75 field.style.display = 'none';
76 field.blur();
78 </script>
79 </head>
81 <body style="">
82 <a href="?" id="head"><h1>Bug<span style="letter-spacing:-0.2em">S</span>hrink</h1></a>
84 <div id="shrinkState">
85 <ul>
86 <li><a href="?state=open">Show All Open Bugs</a></li>
87 <li><a href="?state=closed">Show All Closed Bugs</a></li>
88 <li><a href="?state=all">Show All Bugs</a></li>
89 </ul>
90 </div>