History

CoffeeScript 1.7

Thibaut committed 12 years ago

Commit 71afc2e1 parent 722a0457 files · +19 −19Browse files

Unified · Split

7 files
  1. assets/javascripts/lib/page.coffee +3 −3
  2. assets/javascripts/models/entry.coffee +5 −5
  3. assets/javascripts/views/content/content.coffee +4 −4
  4. assets/javascripts/views/layout/mobile.coffee +2 −2
  5. assets/javascripts/views/list/paginated_list.coffee +1 −1
  6. assets/javascripts/views/sidebar/results.coffee +2 −2
  7. assets/javascripts/views/sidebar/sidebar.coffee +2 −2
assets/javascripts/lib/page.coffee+3−3
@@ -121,7 +121,7 @@ pathtoRegexp = (path, keys) -> · 120 unmodified lines
121121
122122 path = "(#{path.join '|'})" if path instanceof Array
123123 path = path
124− .replace(/\/\(/g, '(?:/')
124+ .replace /\/\(/g, '(?:/'
125125 .replace /(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?/g, (_, slash = '', format = '', key, capture, optional) ->
126126 keys.push name: key, optional: !!optional
127127 str = if optional then '' else slash
@@ -132,8 +132,8 @@ pathtoRegexp = (path, keys) -> · 4 unmodified lines
132132 str += ')'
133133 str += optional if optional
134134 str
135− .replace(/([\/.])/g, '\\$1')
136− .replace(/\*/g, '(.*)')
135+ .replace /([\/.])/g, '\\$1'
136+ .replace /\*/g, '(.*)'
137137
138138 new RegExp "^#{path}$"
139139
assets/javascripts/models/entry.coffee+5−5
@@ -11,11 +11,11 @@ class app.models.Entry extends app.Model · 10 unmodified lines
1111 searchValue: ->
1212 @name
1313 .toLowerCase()
14− .replace('...', ' ')
15− .replace(' event', '')
16− .replace(SEPARATORS_REGEXP, '.')
17− .replace(/\.+/g, '.')
18− .replace(PARANTHESES_REGEXP, '')
14+ .replace '...', ' '
15+ .replace ' event', ''
16+ .replace SEPARATORS_REGEXP, '.'
17+ .replace /\.+/g, '.'
18+ .replace PARANTHESES_REGEXP, ''
1919 .trim()
2020
2121 fullPath: ->
assets/javascripts/views/content/content.coffee+4−4
@@ -28,12 +28,12 @@ class app.views.Content extends app.View · 27 unmodified lines
2828 @entryPage = new app.views.EntryPage
2929
3030 @entryPage
31− .on('loading', @onEntryLoading)
32− .on('loaded', @onEntryLoaded)
31+ .on 'loading', @onEntryLoading
32+ .on 'loaded', @onEntryLoaded
3333
3434 app
35− .on('ready', @onReady)
36− .on('bootError', @onBootError)
35+ .on 'ready', @onReady
36+ .on 'bootError', @onBootError
3737
3838 return
3939
assets/javascripts/views/layout/mobile.coffee+2−2
@@ -23,8 +23,8 @@ class app.views.Mobile extends app.View · 22 unmodified lines
2323 $.on $('._search'), 'touchend', @onTapSearch
2424
2525 app.document.sidebar.search
26− .on('searching', @showSidebar)
27− .on('clear', @hideSidebar)
26+ .on 'searching', @showSidebar
27+ .on 'clear', @hideSidebar
2828
2929 @activate()
3030 return
assets/javascripts/views/list/paginated_list.coffee+1−1
@@ -61,7 +61,7 @@ class app.views.PaginatedList extends app.View · 60 unmodified lines
6161 paginateTo: (object) ->
6262 index = @data.indexOf(object)
6363 if index >= PER_PAGE
64− @paginateNext() for [0...Math.floor(index / PER_PAGE)]
64+ @paginateNext() for [0...(index // PER_PAGE)]
6565 return
6666
6767 hideTopPage: ->
assets/javascripts/views/sidebar/results.coffee+2−2
@@ -16,8 +16,8 @@ class app.views.Results extends app.View · 15 unmodified lines
1616 @addSubview @listFocus = new app.views.ListFocus @el unless $.isTouchScreen()
1717
1818 @search
19− .on('results', @onResults)
20− .on('clear', @onClear)
19+ .on 'results', @onResults
20+ .on 'clear', @onClear
2121 return
2222
2323 onResults: (entries, flags) =>
assets/javascripts/views/sidebar/sidebar.coffee+2−2
@@ -14,8 +14,8 @@ class app.views.Sidebar extends app.View · 13 unmodified lines
1414 @addSubview @search = new app.views.Search
1515
1616 @search
17− .on('searching', @showResults)
18− .on('clear', @showDocList)
17+ .on 'searching', @showResults
18+ .on 'clear', @showDocList
1919
2020 @results = new app.views.Results @search
2121 @docList = new app.views.DocList