├── README.md ├── creators ├── hcalendar.html ├── hcard.html ├── hreview.html ├── hreview.js └── xfn-ru.html ├── lib ├── DomCreate.js ├── dom.js ├── jquery-1.2.1.pack.js ├── jsunit │ ├── app │ │ ├── css │ │ │ ├── jsUnitStyle.css │ │ │ └── readme │ │ ├── emptyPage.html │ │ ├── jsUnitCore.js │ │ ├── jsUnitMockTimeout.js │ │ ├── jsUnitTestManager.js │ │ ├── jsUnitTestSuite.js │ │ ├── jsUnitTracer.js │ │ ├── jsUnitVersionCheck.js │ │ ├── main-counts-errors.html │ │ ├── main-counts-failures.html │ │ ├── main-counts-runs.html │ │ ├── main-counts.html │ │ ├── main-data.html │ │ ├── main-errors.html │ │ ├── main-frame.html │ │ ├── main-loader.html │ │ ├── main-progress.html │ │ ├── main-results.html │ │ ├── main-status.html │ │ ├── testContainer.html │ │ ├── testContainerController.html │ │ └── xbDebug.js │ ├── bin │ │ ├── mac │ │ │ ├── readme.txt │ │ │ ├── start-firefox.sh │ │ │ ├── start-safari.sh │ │ │ ├── stop-firefox.sh │ │ │ └── stop-safari.sh │ │ └── unix │ │ │ ├── start-firefox.sh │ │ │ └── stop-firefox.sh │ ├── changelog.txt │ ├── css │ │ └── jsUnitStyle.css │ ├── images │ │ ├── green.gif │ │ ├── logo_jsunit.gif │ │ ├── powerby-transparent.gif │ │ └── red.gif │ ├── index.jsp │ ├── jsunit.properties.sample │ ├── licenses │ │ ├── JDOM_license.txt │ │ ├── Jetty_license.html │ │ ├── MPL-1.1.txt │ │ ├── gpl-2.txt │ │ ├── index.html │ │ ├── lgpl-2.1.txt │ │ ├── mpl-tri-license-c.txt │ │ └── mpl-tri-license-html.txt │ ├── readme.txt │ ├── testRunner.html │ └── tests │ │ ├── data │ │ ├── data.html │ │ ├── staff.css │ │ ├── staff.dtd │ │ └── staff.xml │ │ ├── jsUnitAssertionTests.html │ │ ├── jsUnitFrameworkUtilityTests.html │ │ ├── jsUnitMockTimeoutTest.html │ │ ├── jsUnitOnLoadTests.html │ │ ├── jsUnitRestoredHTMLDivTests.html │ │ ├── jsUnitSetUpTearDownTests.html │ │ ├── jsUnitTestLoadData.html │ │ ├── jsUnitTestLoadStaff.html │ │ ├── jsUnitTestSetUpPages.html │ │ ├── jsUnitTestSetUpPagesSuite.html │ │ ├── jsUnitTestSuite.html │ │ ├── jsUnitUtilityTests.html │ │ └── jsUnitVersionCheckTests.html ├── string.js └── template.js └── tests └── hreview.html /README.md: -------------------------------------------------------------------------------- 1 | generators 2 | ========== -------------------------------------------------------------------------------- /creators/hcard.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | hCard Creator 6 | 7 | 8 | 43 | 44 | 45 | 46 | 47 | 204 | 205 | 206 | 207 |

hCard Creator

208 | 209 |
210 |
211 |
hCard-o-matic 212 | 213 |
214 | 215 | 216 |
217 |
218 | 219 | 220 |
221 |
222 | 223 | 224 |
225 |
226 | 227 | 228 |
229 | 230 |
231 | 232 | 233 |
234 |
235 | 236 | 237 |
238 |
239 | 240 | 241 |
242 |
243 | 244 | 245 |
246 |
247 | 248 | 249 |
250 |
251 | 252 | 253 | 254 |
255 |
256 | 257 | 258 |
259 |
260 | 261 | 262 |
263 |
264 | 265 | 266 | 267 |
268 |
269 | 270 | 271 |
272 |
273 | 274 | 275 |
276 |
277 | 278 | 279 |
280 |
281 | 282 | 283 |
284 |
285 | 286 | 287 |
288 |
289 |
290 |
291 | 292 |
293 | 294 |
295 |

Warning - publishing your email address, phone number or instant messenger screenname on the web can open it up to abuse.

296 |
297 | 298 |

code

299 | 300 |

preview

301 |
302 | 303 |
304 |
305 | 306 |
307 |

This user interface, and the code behind it, is provided as an example for the benefit of microformat open standards developers, and to demonstrate the clear 308 | one to one correspondence between microformat fields and microformat code. The code generated by this interface may be used for semantic web pages, structured blogging, or any other application that requires markup that is simultaneously human presentable and machine readable. Based on the 309 | hCard creator 310 | by (later updated by Ryan King), which is based on the 311 | XFN Creator (v1.0 by Matt Mullenweg, v1.1 update by Tantek Çelik). 312 |

313 | 314 |

To report any problems or make any suggestions, please send feedback to the #microformats IRC channel on Freenode.

315 | 316 |

Fork me on GitHub

317 | 318 |
319 | 320 | 322 | 323 | 324 | 325 | -------------------------------------------------------------------------------- /creators/hreview.js: -------------------------------------------------------------------------------- 1 | function pad(input) { 2 | if (input && input.toString().length < 2) return '0' + input.toString(); 3 | else if (!input) return null; 4 | else return input.toString(); 5 | } 6 | 7 | function format_dt(year, month, day, hour, minute, timezone) { 8 | var dt = $.map([year, month, day], function(i){return pad(i)}).join('-') 9 | if (hour) { 10 | dt = dt + 'T' + $.map([hour, minute], function(i){return pad(i || 0)}).join(':'); 11 | } 12 | if (timezone) dt = dt + timezone; 13 | return dt; 14 | } 15 | 16 | function rating_stars(rating){ 17 | var stars = []; 18 | for(i = 0; i < 5; i++){ 19 | if(i < rating) { 20 | stars += String.fromCharCode(parseInt('2605', 16)); 21 | } else { 22 | stars += String.fromCharCode(parseInt('2606', 16)); 23 | } 24 | } 25 | return stars 26 | } -------------------------------------------------------------------------------- /creators/xfn-ru.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | XFN 1.1 Creator 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 33 | 91 | 92 | 93 | 94 |

Создатель XFN 1.1

95 |
96 | 97 | 98 | 99 | 102 | 105 | 106 | 107 | 108 | 111 | 114 | 115 | 116 | 117 | 120 | 124 | 125 | 126 | 129 | 132 | 133 | 134 | 135 | 138 | 141 | 142 | 143 | 144 | 147 | 151 | 152 | 153 | 156 | 161 | 162 | 163 | 166 | 170 | 171 |
100 | Наименование 101 | 103 | 104 |
109 | URL 110 | 112 | 113 |
118 | дружба 119 | 121 | 122 | 123 |
127 | физически 128 | 130 | 131 |
136 | профессионально 137 | 139 | 140 |
145 | географически 146 | 148 | 149 | 150 |
154 | семейно 155 | 157 | 158 | 159 | 160 |
164 | романтично 165 | 167 | 168 | 169 |
172 |

173 | 174 |

175 |
176 |
177 | 178 | <a href="" rel=""></a> 179 |
180 | 181 |

Этот пользовательский интерфейс и его код предоставлен как подспорье XFN разработчикам и как демонстрация красоты соответствия XFN значений и кода для их отображения. 182 | Создатель XFN 1.0, автор Мэт Малэнвег (Matt Mullenweg). 183 | Создатель XFN 1.1 (обновление), автор Тантек Челик (Tantek Çelik). 184 |

185 | 186 |
187 | XFN [GMPG] 188 | 189 |
190 | 191 | 193 | 194 | 195 | 196 | 197 | -------------------------------------------------------------------------------- /lib/DomCreate.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | =head1 NAME 4 | 5 | DOM.Element.Create - Create new DOM elments in a more declarative manner 6 | 7 | =head1 SYNOPSIS 8 | 9 | // BEFORE 10 | var link = document.createElement('a'); 11 | link.href= "http://www.google.com"; 12 | link.title= "Search the Web"; 13 | link.target= "_blank" 14 | link.onclick= function() { alert('here we go'); return true; }; 15 | link.appendChild( document.createTextNode('link to Google') ); 16 | var para = document.createElement('p'); 17 | para.id = 'foo'; 18 | para.style.fontWeight = 'bold'; 19 | para.style.border = '1px solid black'; 20 | para.className = 'body-text'; 21 | para.onmouseover = function(){ this.style.backgroundColor="red"; }; 22 | para.onmouseout = function(){ this.style.backgroundColor="white"; }; 23 | para.appendChild( document.createTextNode('here is a ') ); 24 | para.appendChild( link ); 25 | 26 | // AFTER 27 | var para = createElement( 'p', { 28 | id: 'foo', 29 | className: 'body-text', 30 | style: { 31 | fontWeight: 'bold', 32 | border: '1px solid black' 33 | }, 34 | events: { 35 | mouseover: function(){ this.style.backgroundColor="red"; }, 36 | mouseout: function(){ this.style.backgroundColor="white"; } 37 | }, 38 | childNodes: [ 'here is a ', 39 | 40 | createElement( 'a', { 41 | href: 'http://www.google.com', 42 | className: 'offsite', 43 | title: 'Search the Web', 44 | target: '_blank', 45 | events: { 46 | click: function() { alert('here we go'); return true; } 47 | }, 48 | childNodes: [ 'link to Google' ] 49 | }) 50 | ] 51 | }); 52 | 53 | =head1 DESCRIPTION 54 | 55 | It has been fairly common in code I've had to write to create one or more html elements 56 | and subsequently set many of their attributes, append children and register event listeners. 57 | Rather than write line after line of C and 58 | C, C allows a more declarative approach to 59 | defining new elements. 60 | 61 | C does not export any methods by default, but allows you to export either of the 62 | methods described below. 63 | 64 | =head2 Package Methods 65 | 66 | =cut 67 | 68 | */ 69 | 70 | if ( typeof DOM == "undefined") DOM = {}; 71 | if ( typeof DOM.Element == "undefined") DOM.Element = {}; 72 | 73 | DOM.Element.Create = { 74 | 75 | VERSION: 0.01, 76 | 77 | EXPORT_OK: [ 'createElement','updateElement' ], 78 | 79 | /* 80 | 81 | =head3 C 82 | 83 | Pass a tagName and an associative array of attributes to this method and get back the 84 | correpsonding element. attribute names are not checked for validity, allowing the possibility 85 | of adding custom attributes to an element. There are, however, 3 reserved keys: 86 | 87 | =over 88 | 89 | =item C