Showing the changes to assets/javascripts (3 of 14 files). Show all
Unified · Split
| @@ -200,5 +200,10 @@ credits = [ · 199 unmodified lines | ||
| 200 | 200 | '2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors', |
| 201 | 201 | 'MIT', |
| 202 | 202 | 'https://raw.github.com/jashkenas/underscore/master/LICENSE' |
| 203 | + ], [ | |
| 204 | + 'Yii', | |
| 205 | + '2008-2014 by Yii Software LLC', | |
| 206 | + 'BSD', | |
| 207 | + 'https://raw.github.com/yiisoft/yii/master/LICENSE' | |
| 203 | 208 | ] |
| 204 | 209 | ] |
| @@ -24,7 +24,10 @@ newsItem = (date, news) -> · 23 unmodified lines | ||
| 24 | 24 | result |
| 25 | 25 | |
| 26 | 26 | app.news = [ |
| 27 | − [ 1394236800000, # March 8, 2014 | |
| 27 | + [ 1394928000000, # March 16, 2013 | |
| 28 | + """ New <a href="/yii/">Yii</a> documentation """, | |
| 29 | + ], [ | |
| 30 | + 1394236800000, # March 8, 2014 | |
| 28 | 31 | """ Added path bar. """, |
| 29 | 32 | ], [ |
| 30 | 33 | 1393027200000, # February 22, 2014 |
| @@ -0,0 +1,15 @@ | ||
| 1 | +#= require views/pages/base | |
| 2 | + | |
| 3 | +class app.views.YiiPage extends app.views.BasePage | |
| 4 | + @events: | |
| 5 | + click: 'onClick' | |
| 6 | + | |
| 7 | + onClick: (event) -> | |
| 8 | + return unless event.target.classList.contains 'show' | |
| 9 | + $.stopEvent(event) | |
| 10 | + | |
| 11 | + source = $ '.code', event.target.parentNode.parentNode | |
| 12 | + isShown = source.style.display is 'block' | |
| 13 | + | |
| 14 | + source.style.display = if isShown then 'none' else 'block' | |
| 15 | + event.target.textContent = if isShown then 'show' else 'hide' | |