Unified · Split
| @@ -121,7 +121,7 @@ pathtoRegexp = (path, keys) -> · 120 unmodified lines | ||
| 121 | 121 | |
| 122 | 122 | path = "(#{path.join '|'})" if path instanceof Array |
| 123 | 123 | path = path |
| 124 | − .replace(/\/\(/g, '(?:/') | |
| 124 | + .replace /\/\(/g, '(?:/' | |
| 125 | 125 | .replace /(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?/g, (_, slash = '', format = '', key, capture, optional) -> |
| 126 | 126 | keys.push name: key, optional: !!optional |
| 127 | 127 | str = if optional then '' else slash |
| @@ -132,8 +132,8 @@ pathtoRegexp = (path, keys) -> · 4 unmodified lines | ||
| 132 | 132 | str += ')' |
| 133 | 133 | str += optional if optional |
| 134 | 134 | str |
| 135 | − .replace(/([\/.])/g, '\\$1') | |
| 136 | − .replace(/\*/g, '(.*)') | |
| 135 | + .replace /([\/.])/g, '\\$1' | |
| 136 | + .replace /\*/g, '(.*)' | |
| 137 | 137 | |
| 138 | 138 | new RegExp "^#{path}$" |
| 139 | 139 | |
| @@ -11,11 +11,11 @@ class app.models.Entry extends app.Model · 10 unmodified lines | ||
| 11 | 11 | searchValue: -> |
| 12 | 12 | @name |
| 13 | 13 | .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, '' | |
| 19 | 19 | .trim() |
| 20 | 20 | |
| 21 | 21 | fullPath: -> |
| @@ -28,12 +28,12 @@ class app.views.Content extends app.View · 27 unmodified lines | ||
| 28 | 28 | @entryPage = new app.views.EntryPage |
| 29 | 29 | |
| 30 | 30 | @entryPage |
| 31 | − .on('loading', @onEntryLoading) | |
| 32 | − .on('loaded', @onEntryLoaded) | |
| 31 | + .on 'loading', @onEntryLoading | |
| 32 | + .on 'loaded', @onEntryLoaded | |
| 33 | 33 | |
| 34 | 34 | app |
| 35 | − .on('ready', @onReady) | |
| 36 | − .on('bootError', @onBootError) | |
| 35 | + .on 'ready', @onReady | |
| 36 | + .on 'bootError', @onBootError | |
| 37 | 37 | |
| 38 | 38 | return |
| 39 | 39 | |
| @@ -23,8 +23,8 @@ class app.views.Mobile extends app.View · 22 unmodified lines | ||
| 23 | 23 | $.on $('._search'), 'touchend', @onTapSearch |
| 24 | 24 | |
| 25 | 25 | app.document.sidebar.search |
| 26 | − .on('searching', @showSidebar) | |
| 27 | − .on('clear', @hideSidebar) | |
| 26 | + .on 'searching', @showSidebar | |
| 27 | + .on 'clear', @hideSidebar | |
| 28 | 28 | |
| 29 | 29 | @activate() |
| 30 | 30 | return |
| @@ -61,7 +61,7 @@ class app.views.PaginatedList extends app.View · 60 unmodified lines | ||
| 61 | 61 | paginateTo: (object) -> |
| 62 | 62 | index = @data.indexOf(object) |
| 63 | 63 | if index >= PER_PAGE |
| 64 | − @paginateNext() for [0...Math.floor(index / PER_PAGE)] | |
| 64 | + @paginateNext() for [0...(index // PER_PAGE)] | |
| 65 | 65 | return |
| 66 | 66 | |
| 67 | 67 | hideTopPage: -> |
| @@ -16,8 +16,8 @@ class app.views.Results extends app.View · 15 unmodified lines | ||
| 16 | 16 | @addSubview @listFocus = new app.views.ListFocus @el unless $.isTouchScreen() |
| 17 | 17 | |
| 18 | 18 | @search |
| 19 | − .on('results', @onResults) | |
| 20 | − .on('clear', @onClear) | |
| 19 | + .on 'results', @onResults | |
| 20 | + .on 'clear', @onClear | |
| 21 | 21 | return |
| 22 | 22 | |
| 23 | 23 | onResults: (entries, flags) => |
| @@ -14,8 +14,8 @@ class app.views.Sidebar extends app.View · 13 unmodified lines | ||
| 14 | 14 | @addSubview @search = new app.views.Search |
| 15 | 15 | |
| 16 | 16 | @search |
| 17 | − .on('searching', @showResults) | |
| 18 | − .on('clear', @showDocList) | |
| 17 | + .on 'searching', @showResults | |
| 18 | + .on 'clear', @showDocList | |
| 19 | 19 | |
| 20 | 20 | @results = new app.views.Results @search |
| 21 | 21 | @docList = new app.views.DocList |