History

Improve and complete Yii documentation

Thibaut committed 12 years ago

Commit 138ee091 parent 55d045514 files · +78 −49Browse files

Showing the changes to assets/javascripts (3 of 14 files). Show all

Unified · Split

3 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +5 −0
  2. assets/javascripts/templates/pages/news_tmpl.coffee +4 −1
  3. assets/javascripts/views/pages/yii.coffee +15 −0
assets/javascripts/templates/pages/about_tmpl.coffee+5−0
@@ -200,5 +200,10 @@ credits = [ · 199 unmodified lines
200 '2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors',200 '2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors',
201 'MIT',201 'MIT',
202 'https://raw.github.com/jashkenas/underscore/master/LICENSE'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]
assets/javascripts/templates/pages/news_tmpl.coffee+4−1
@@ -24,7 +24,10 @@ newsItem = (date, news) -> · 23 unmodified lines
24 result24 result
25 25
26app.news = [26app.news = [
27 [ 1394236800000, # March 8, 201427 [ 1394928000000, # March 16, 2013
28 """ New <a href="/yii/">Yii</a> documentation """,
29 ], [
30 1394236800000, # March 8, 2014
28 """ Added path bar. """,31 """ Added path bar. """,
29 ], [32 ], [
30 1393027200000, # February 22, 201433 1393027200000, # February 22, 2014
assets/javascripts/views/pages/yii.coffee+15−0
@@ -0,0 +1,15 @@
1#= require views/pages/base
2
3class 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'