Changeset 7125
- Timestamp:
- 05/09/08 11:02:31 (3 months ago)
- Files:
-
- trunk/openlayers/examples/example-list.html (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/examples/example-list.html
r7119 r7125 13 13 } 14 14 .ex_container{ 15 border-bottom: 1px solid grey;15 border-bottom: 1px solid #cccccc; 16 16 } 17 17 .ex_container a { … … 45 45 width: 30%; 46 46 height: 100%; 47 } 48 #filter { 49 top: 0px; 50 height: 50px; 51 padding: 10px 1em 10px 1em; 52 } 53 #examples { 54 border-top: 1px solid #cccccc; 55 position: absolute; 56 width: 30%; 57 top: 70px; 58 bottom: 0px; 47 59 overflow: auto; 48 } 49 #instructions { 50 padding: 0.5em 1em 0; 60 list-style: none; 61 margin: 0; 62 padding: 0; 63 } 64 #examples ul { 65 list-style: none; 66 margin: 0; 67 padding: 0; 68 } 69 #examples ul li { 70 display: block; 71 margin: 0; 72 padding: 0; 51 73 } 52 74 #exwin { … … 56 78 width: 70%; 57 79 height: 100%; 58 border: 1px solid grey; 80 border: none; 81 border-left: 1px solid #cccccc; 59 82 margin: 0; 60 83 } … … 149 172 listExamples(info.examples); 150 173 } 174 175 function parseQuery() { 176 var params = {}; 177 var list = window.location.search.substring(1).split("&"); 178 for(var i=0; i<list.length; ++i) { 179 var pair = list[i].split("="); 180 if(pair.length == 2) { 181 params[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]); 182 } 183 } 184 if(params["q"]) { 185 var input = document.getElementById("keywords"); 186 input.value = params["q"]; 187 inputChange.call(input); 188 } 189 } 151 190 window.onload = function() { 152 191 template = new Jugl.Template("template"); … … 155 194 document.getElementById("exwin").src = "../examples/example.html"; 156 195 document.getElementById("keywords").onkeyup = inputChange 196 parseQuery(); 157 197 }; 158 198 </script> … … 160 200 <body> 161 201 <div id="toc"> 162 <p id="instructions"> 163 <label for="keywords">Filter by keywords</label><br /> 164 <input type="text" id="keywords" /> 165 <span id="count"></span> 166 <a href="javascript:void showAll();">show all</a> 167 </p> 202 <div id="filter"> 203 <p> 204 <label for="keywords">Filter by keywords</label><br /> 205 <input type="text" id="keywords" /> 206 <span id="count"></span><br /> 207 <a href="javascript:void showAll();">show all</a> 208 </p> 209 </div> 168 210 <div id="examples"></div> 169 211 </div> 170 <iframe id="exwin" name="exwin" ></iframe>212 <iframe id="exwin" name="exwin" frameborder="0"></iframe> 171 213 <div style="display: none;"> 172 < divid="template">173 < divclass="ex_container" jugl:repeat="example examples">214 <ul id="template"> 215 <li class="ex_container" jugl:repeat="example examples"> 174 216 <a jugl:attributes="href example.link" target="exwin"> 175 217 <h5 class="ex_title"> … … 184 226 </p> 185 227 </a> 186 </ div>187 </ div>228 </li> 229 </ul> 188 230 </div> 189 231 </body>
