├── 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 |Warning - publishing your email address, phone number or instant messenger screenname on the web can open it up to abuse.
296 |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 Tantek Çelik (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 | 317 | 318 |Этот пользовательский интерфейс и его код предоставлен как подспорье XFN разработчикам и как демонстрация красоты соответствия XFN значений и кода для их отображения. 182 | Создатель XFN 1.0, автор Мэт Малэнвег (Matt Mullenweg). 183 | Создатель XFN 1.1 (обновление), автор Тантек Челик (Tantek Çelik). 184 |
185 | 186 | 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