History

Add Knockout.js documentation

Thibaut committed 12 years ago

Commit ece6ff81 parent 6b0390d14 files · +121 −-1Browse 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 +2 −2
  3. assets/javascripts/views/pages/knockout.coffee +8 −0
assets/javascripts/templates/pages/about_tmpl.coffee+5−0
@@ -128,6 +128,11 @@ credits = [ · 127 unmodified lines
128128 '2014 jQuery Foundation',
129129 'MIT',
130130 'https://raw.github.com/jquery/api.jqueryui.com/master/LICENSE-MIT.txt'
131+ ], [
132+ 'Knockout.js',
133+ 'Steven Sanderson, the Knockout.js team, and other contributors',
134+ 'MIT',
135+ 'https://raw.github.com/knockout/knockout/master/LICENSE'
131136 ], [
132137 'Less',
133138 '2009-2014 Alexis Sellier & The Core Less Team',
assets/javascripts/templates/pages/news_tmpl.coffee+2−2
@@ -24,8 +24,8 @@ newsItem = (date, news) -> · 23 unmodified lines
2424 result
2525
2626 app.news = [
27− [ 1390089600000, # January 19, 2013
28− """ New <a href="/d3/">D3.js</a> documentation """,
27+ [ 1390089600001, # January 19, 2013
28+ """ New <a href="/d3/">D3.js</a> and <a href="/knockout/">Knockout.js</a> documentations """,
2929 ], [
3030 1390003200000, # January 18, 2013
3131 """ DevDocs is now available as a <a href="https://marketplace.firefox.com/app/devdocs/">Firefox web app</a> (currently requires Aurora). """,
assets/javascripts/views/pages/knockout.coffee+8−0
@@ -0,0 +1,8 @@
1+#= require views/pages/base
2+
3+class app.views.KnockoutPage extends app.views.BasePage
4+ afterRender: ->
5+ for el in @findAll('pre')
6+ language = if el.innerHTML.indexOf('data-bind="') > 0 then 'markup' else 'javascript'
7+ @highlightCode el, language
8+ return