id
stringlengths
34
124
type
stringclasses
4 values
prompt
stringlengths
0
4.95k
response
stringlengths
21
4.89k
source_lang
stringclasses
3 values
target_lang
stringclasses
2 values
repo
stringclasses
75 values
path
stringlengths
10
88
license
stringclasses
1 value
commit
stringlengths
40
40
stars
int64
431
18.7k
source_url
stringlengths
86
176
line_start
int64
1
214
line_end
int64
3
253
gterrono/houston:client/router.coffee:8:raw_corpus
raw_corpus
remove_host_css = -> # Houston._css_files is set in client/zma_helpers.coffee is_houston_link = ($link) -> $link.attr('href') in Houston._css_files links = $('link[rel="stylesheet"]') for link in links $link = $(link) unless is_houston_link($link) $link.remove() links = $('link[rel="stylesh...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
1b711831b30a93a7559fd482ebb103aa3651ff93
802
https://github.com/gterrono/houston/blob/1b711831b30a93a7559fd482ebb103aa3651ff93/client/router.coffee
90
120
gterrono/houston:client/router.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript remove_host_css = -> # Houston._css_files is set in client/zma_helpers.coffee is_houston_link = ($link) -> $link.attr('href') in Houston._css_files links = $('link[rel="stylesheet"]') for link in links $link = $(link) unless is_houston_link($l...
var name, onRouteNotFound, remove_host_css, indexOf = [].indexOf; remove_host_css = function() { var $head, $link, file, i, is_houston_link, j, len, len1, link, links, ref, results; // Houston._css_files is set in client/zma_helpers.coffee is_houston_link = function($link) { var ref; return ref = $link...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
1b711831b30a93a7559fd482ebb103aa3651ff93
802
https://github.com/gterrono/houston/blob/1b711831b30a93a7559fd482ebb103aa3651ff93/client/router.coffee
90
120
gterrono/houston:client/router.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var name, onRouteNotFound, remove_host_css, indexOf = [].indexOf; remove_host_css = function() { var $head, $link, file, i, is_houston_link, j, len, len1, link, links, ref, results; // Houston._css_files is set in client/zma_helpers.coffee is_houston_link ...
remove_host_css = -> # Houston._css_files is set in client/zma_helpers.coffee is_houston_link = ($link) -> $link.attr('href') in Houston._css_files links = $('link[rel="stylesheet"]') for link in links $link = $(link) unless is_houston_link($link) $link.remove() links = $('link[rel="stylesh...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
1b711831b30a93a7559fd482ebb103aa3651ff93
802
https://github.com/gterrono/houston/blob/1b711831b30a93a7559fd482ebb103aa3651ff93/client/router.coffee
90
120
gterrono/houston:client/router.coffee:8:completion
completion
remove_host_css = -> # Houston._css_files is set in client/zma_helpers.coffee is_houston_link = ($link) -> $link.attr('href') in Houston._css_files links = $('link[rel="stylesheet"]') for link in links $link = $(link) unless is_houston_link($link) $link.remove() links = $('link[rel="stylesh...
# same number of files as in Houston._css_files, all of our files are in there, # so there is no need to add them again. if links.length < Houston._css_files.length $head = $('head') for file in Houston._css_files $head.append("<link rel=\"stylesheet\" href=\"#{file}\">") Router.before mustBeAdmin, ...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
1b711831b30a93a7559fd482ebb103aa3651ff93
802
https://github.com/gterrono/houston/blob/1b711831b30a93a7559fd482ebb103aa3651ff93/client/router.coffee
90
120
gterrono/houston:client/router.coffee:9:raw_corpus
raw_corpus
Router.onRouteNotFound = (args...) -> non_houston_routes = _.filter(Router.routes, (route) -> route.name.indexOf('houston_') != 0) if non_houston_routes.length > 0 onRouteNotFound(args...) else console.log "Note: Houston is suppressing Iron-Router errors because we don't think you are using it."
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4da2e20614ad93be4e94a65c65752e6f231ea9fb
802
https://github.com/gterrono/houston/blob/4da2e20614ad93be4e94a65c65752e6f231ea9fb/client/router.coffee
121
126
gterrono/houston:client/router.coffee:9:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Router.onRouteNotFound = (args...) -> non_houston_routes = _.filter(Router.routes, (route) -> route.name.indexOf('houston_') != 0) if non_houston_routes.length > 0 onRouteNotFound(args...) else console.log "Note: Houston is suppressing Iron-Router e...
Router.onRouteNotFound = function(...args) { var non_houston_routes; non_houston_routes = _.filter(Router.routes, function(route) { return route.name.indexOf('houston_') !== 0; }); if (non_houston_routes.length > 0) { return onRouteNotFound(...args); } else { return console.log("Note: Houston is s...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
4da2e20614ad93be4e94a65c65752e6f231ea9fb
802
https://github.com/gterrono/houston/blob/4da2e20614ad93be4e94a65c65752e6f231ea9fb/client/router.coffee
121
126
gterrono/houston:client/router.coffee:9:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Router.onRouteNotFound = function(...args) { var non_houston_routes; non_houston_routes = _.filter(Router.routes, function(route) { return route.name.indexOf('houston_') !== 0; }); if (non_houston_routes.length > 0) { return onRouteNotFound(...args)...
Router.onRouteNotFound = (args...) -> non_houston_routes = _.filter(Router.routes, (route) -> route.name.indexOf('houston_') != 0) if non_houston_routes.length > 0 onRouteNotFound(args...) else console.log "Note: Houston is suppressing Iron-Router errors because we don't think you are using it."
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4da2e20614ad93be4e94a65c65752e6f231ea9fb
802
https://github.com/gterrono/houston/blob/4da2e20614ad93be4e94a65c65752e6f231ea9fb/client/router.coffee
121
126
gterrono/houston:client/router.coffee:9:completion
completion
Router.onRouteNotFound = (args...) -> non_houston_routes = _.filter(Router.routes, (route) -> route.name.indexOf('houston_') != 0) if non_houston_routes.length > 0
onRouteNotFound(args...) else console.log "Note: Houston is suppressing Iron-Router errors because we don't think you are using it."
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4da2e20614ad93be4e94a65c65752e6f231ea9fb
802
https://github.com/gterrono/houston/blob/4da2e20614ad93be4e94a65c65752e6f231ea9fb/client/router.coffee
121
126
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) opti...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c17c375d08fddee02ae19fd234e24f6d04bfaf46
802
https://github.com/gterrono/houston/blob/c17c375d08fddee02ae19fd234e24f6d04bfaf46/client/router.coffee
31
73
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options....
Houston._go = function(route_name, options) { return Router.go(Houston._houstonize_route(route_name), options); }; Router.map(function() { var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.templ...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
c17c375d08fddee02ae19fd234e24f6d04bfaf46
802
https://github.com/gterrono/houston/blob/c17c375d08fddee02ae19fd234e24f6d04bfaf46/client/router.coffee
31
73
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Houston._go = function(route_name, options) { return Router.go(Houston._houstonize_route(route_name), options); }; Router.map(function() { var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to av...
Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) opti...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c17c375d08fddee02ae19fd234e24f6d04bfaf46
802
https://github.com/gterrono/houston/blob/c17c375d08fddee02ae19fd234e24f6d04bfaf46/client/router.coffee
31
73
gterrono/houston:client/router.coffee:5:completion
completion
Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) opti...
houston_route 'collection', path: '/admin/:name' data: -> console.log 'here' [collection, @subscription] = setup_collection(@params.name) {collection} waitOn: -> @subscription template: 'collection_view' houston_route 'document', path: '/admin/:collection/:_id' data: -> ...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c17c375d08fddee02ae19fd234e24f6d04bfaf46
802
https://github.com/gterrono/houston/blob/c17c375d08fddee02ae19fd234e24f6d04bfaf46/client/router.coffee
31
73
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) @rou...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c67930c9b918f6b310956589dd5c03f42bbee7ab
802
https://github.com/gterrono/houston/blob/c67930c9b918f6b310956589dd5c03f42bbee7ab/client/router.coffee
31
71
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options....
Houston._go = function(route_name, options) { return Router.go(Houston._houstonize_route(route_name), options); }; Router.map(function() { var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.templ...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
c67930c9b918f6b310956589dd5c03f42bbee7ab
802
https://github.com/gterrono/houston/blob/c67930c9b918f6b310956589dd5c03f42bbee7ab/client/router.coffee
31
71
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Houston._go = function(route_name, options) { return Router.go(Houston._houstonize_route(route_name), options); }; Router.map(function() { var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to av...
Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) @rou...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c67930c9b918f6b310956589dd5c03f42bbee7ab
802
https://github.com/gterrono/houston/blob/c67930c9b918f6b310956589dd5c03f42bbee7ab/client/router.coffee
31
71
gterrono/houston:client/router.coffee:5:completion
completion
Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) @rou...
houston_route 'collection', path: '/admin/:name' data: -> [collection, @subscription] = setup_collection(@params.name) {collection} waitOn: -> @subscription template: 'collection_view' houston_route 'document', path: '/admin/:collection/:_id' data: -> Houston._session('docum...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c67930c9b918f6b310956589dd5c03f42bbee7ab
802
https://github.com/gterrono/houston/blob/c67930c9b918f6b310956589dd5c03f42bbee7ab/client/router.coffee
31
71
gterrono/houston:client/router.coffee:8:raw_corpus
raw_corpus
remove_host_css = -> is_houston_link = ($link) -> $link.attr('href') in Houston._css_files links = $('link[rel="stylesheet"]') for link in links $link = $(link) unless is_houston_link($link) $link.remove() links = $('link[rel="stylesheet"]') if links.length < Houston._css_files.length $...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
0580b15b70205092c8e78f81e2229130481e649d
802
https://github.com/gterrono/houston/blob/0580b15b70205092c8e78f81e2229130481e649d/client/router.coffee
89
112
gterrono/houston:client/router.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript remove_host_css = -> is_houston_link = ($link) -> $link.attr('href') in Houston._css_files links = $('link[rel="stylesheet"]') for link in links $link = $(link) unless is_houston_link($link) $link.remove() links = $('link[rel="styleshee...
var name, onRouteNotFound, remove_host_css, indexOf = [].indexOf; remove_host_css = function() { var $head, $link, file, i, is_houston_link, j, len, len1, link, links, ref, results; is_houston_link = function($link) { var ref; return ref = $link.attr('href'), indexOf.call(Houston._css_files, ref) >= 0; ...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
0580b15b70205092c8e78f81e2229130481e649d
802
https://github.com/gterrono/houston/blob/0580b15b70205092c8e78f81e2229130481e649d/client/router.coffee
89
112
gterrono/houston:client/router.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var name, onRouteNotFound, remove_host_css, indexOf = [].indexOf; remove_host_css = function() { var $head, $link, file, i, is_houston_link, j, len, len1, link, links, ref, results; is_houston_link = function($link) { var ref; return ref = $link.attr...
remove_host_css = -> is_houston_link = ($link) -> $link.attr('href') in Houston._css_files links = $('link[rel="stylesheet"]') for link in links $link = $(link) unless is_houston_link($link) $link.remove() links = $('link[rel="stylesheet"]') if links.length < Houston._css_files.length $...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
0580b15b70205092c8e78f81e2229130481e649d
802
https://github.com/gterrono/houston/blob/0580b15b70205092c8e78f81e2229130481e649d/client/router.coffee
89
112
gterrono/houston:client/router.coffee:8:completion
completion
remove_host_css = -> is_houston_link = ($link) -> $link.attr('href') in Houston._css_files links = $('link[rel="stylesheet"]') for link in links $link = $(link) unless is_houston_link($link) $link.remove() links = $('link[rel="stylesheet"]') if links.length < Houston._css_files.length $...
for file in Houston._css_files $head.append("<link rel=\"stylesheet\" href=\"#{file}\">") Router.before mustBeAdmin, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document']) Router.after hide_non_admin_stuff, only: (Houston._houstonize_route(name) for name in ['home', 'collecti...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
0580b15b70205092c8e78f81e2229130481e649d
802
https://github.com/gterrono/houston/blob/0580b15b70205092c8e78f81e2229130481e649d/client/router.coffee
89
112
gterrono/houston:client/router.coffee:8:raw_corpus
raw_corpus
remove_host_css = -> links = $('link[rel="stylesheet"]') for link in links $link = $(link) unless $link.attr('href').indexOf('/packages/houston') == 0 $link.remove() Router.before mustBeAdmin, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document']) Router.after hide_n...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
691d62dd344284bd260e4079a238b49332899825
802
https://github.com/gterrono/houston/blob/691d62dd344284bd260e4079a238b49332899825/client/router.coffee
89
103
gterrono/houston:client/router.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript remove_host_css = -> links = $('link[rel="stylesheet"]') for link in links $link = $(link) unless $link.attr('href').indexOf('/packages/houston') == 0 $link.remove() Router.before mustBeAdmin, only: (Houston._houstonize_route(name) for name i...
var name, onRouteNotFound, remove_host_css; remove_host_css = function() { var $link, i, len, link, links, results; links = $('link[rel="stylesheet"]'); results = []; for (i = 0, len = links.length; i < len; i++) { link = links[i]; $link = $(link); if ($link.attr('href').indexOf('/packages/houston'...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
691d62dd344284bd260e4079a238b49332899825
802
https://github.com/gterrono/houston/blob/691d62dd344284bd260e4079a238b49332899825/client/router.coffee
89
103
gterrono/houston:client/router.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var name, onRouteNotFound, remove_host_css; remove_host_css = function() { var $link, i, len, link, links, results; links = $('link[rel="stylesheet"]'); results = []; for (i = 0, len = links.length; i < len; i++) { link = links[i]; $link = $(link);...
remove_host_css = -> links = $('link[rel="stylesheet"]') for link in links $link = $(link) unless $link.attr('href').indexOf('/packages/houston') == 0 $link.remove() Router.before mustBeAdmin, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document']) Router.after hide_n...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
691d62dd344284bd260e4079a238b49332899825
802
https://github.com/gterrono/houston/blob/691d62dd344284bd260e4079a238b49332899825/client/router.coffee
89
103
gterrono/houston:client/router.coffee:8:completion
completion
remove_host_css = -> links = $('link[rel="stylesheet"]') for link in links $link = $(link) unless $link.attr('href').indexOf('/packages/houston') == 0 $link.remove()
Router.before mustBeAdmin, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document']) Router.after hide_non_admin_stuff, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'login']) Router.after remove_host_css, only: (Houston._houstonize_route(name) ...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
691d62dd344284bd260e4079a238b49332899825
802
https://github.com/gterrono/houston/blob/691d62dd344284bd260e4079a238b49332899825/client/router.coffee
89
103
gterrono/houston:client/router.coffee:7:raw_corpus
raw_corpus
hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.houston').show() $('body').css('visibility','hidden') $('body>.houston').css('visibility', 'visible') setTimeout func, 0 Router.before mustBeAdmin, only: (Houston._houstonize_route(nam...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b20366fb1672e30667b53bd4d0d585e235c2bd76
802
https://github.com/gterrono/houston/blob/b20366fb1672e30667b53bd4d0d585e235c2bd76/client/router.coffee
79
94
gterrono/houston:client/router.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.houston').show() $('body').css('visibility','hidden') $('body>.houston').css('visibility', 'visible') setTimeout func, 0 Router.b...
var hide_non_admin_stuff, name, onRouteNotFound; hide_non_admin_stuff = function() { var func; $('body').hide(); func = function() { $('body').show(); $('body').children().hide(); $('body>.houston').show(); $('body').css('visibility', 'hidden'); return $('body>.houston').css('visibility', 'vi...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
b20366fb1672e30667b53bd4d0d585e235c2bd76
802
https://github.com/gterrono/houston/blob/b20366fb1672e30667b53bd4d0d585e235c2bd76/client/router.coffee
79
94
gterrono/houston:client/router.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var hide_non_admin_stuff, name, onRouteNotFound; hide_non_admin_stuff = function() { var func; $('body').hide(); func = function() { $('body').show(); $('body').children().hide(); $('body>.houston').show(); $('body').css('visibility', 'hidden...
hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.houston').show() $('body').css('visibility','hidden') $('body>.houston').css('visibility', 'visible') setTimeout func, 0 Router.before mustBeAdmin, only: (Houston._houstonize_route(nam...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b20366fb1672e30667b53bd4d0d585e235c2bd76
802
https://github.com/gterrono/houston/blob/b20366fb1672e30667b53bd4d0d585e235c2bd76/client/router.coffee
79
94
gterrono/houston:client/router.coffee:7:completion
completion
hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.houston').show() $('body').css('visibility','hidden') $('body>.houston').css('visibility', 'visible')
setTimeout func, 0 Router.before mustBeAdmin, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document']) Router.after hide_non_admin_stuff, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'login']) onRouteNotFound = Router.onRouteNotFound
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b20366fb1672e30667b53bd4d0d585e235c2bd76
802
https://github.com/gterrono/houston/blob/b20366fb1672e30667b53bd4d0d585e235c2bd76/client/router.coffee
79
94
gterrono/houston:client/router.coffee:7:raw_corpus
raw_corpus
hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.houston').show() $('body').css('visibility','hidden') $('body>.houston').css('visibility', 'visible') setTimeout func, 0 Router.before mustBeAdmin, only: (Houston._houstonize_route(nam...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
cc73b49e033390fda2eb03ca770ccd074da47885
802
https://github.com/gterrono/houston/blob/cc73b49e033390fda2eb03ca770ccd074da47885/client/router.coffee
79
92
gterrono/houston:client/router.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.houston').show() $('body').css('visibility','hidden') $('body>.houston').css('visibility', 'visible') setTimeout func, 0 Router.b...
var hide_non_admin_stuff, name; hide_non_admin_stuff = function() { var func; $('body').hide(); func = function() { $('body').show(); $('body').children().hide(); $('body>.houston').show(); $('body').css('visibility', 'hidden'); return $('body>.houston').css('visibility', 'visible'); }; r...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
cc73b49e033390fda2eb03ca770ccd074da47885
802
https://github.com/gterrono/houston/blob/cc73b49e033390fda2eb03ca770ccd074da47885/client/router.coffee
79
92
gterrono/houston:client/router.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var hide_non_admin_stuff, name; hide_non_admin_stuff = function() { var func; $('body').hide(); func = function() { $('body').show(); $('body').children().hide(); $('body>.houston').show(); $('body').css('visibility', 'hidden'); return $(...
hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.houston').show() $('body').css('visibility','hidden') $('body>.houston').css('visibility', 'visible') setTimeout func, 0 Router.before mustBeAdmin, only: (Houston._houstonize_route(nam...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
cc73b49e033390fda2eb03ca770ccd074da47885
802
https://github.com/gterrono/houston/blob/cc73b49e033390fda2eb03ca770ccd074da47885/client/router.coffee
79
92
gterrono/houston:client/router.coffee:7:completion
completion
hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.houston').show() $('body').css('visibility','hidden')
$('body>.houston').css('visibility', 'visible') setTimeout func, 0 Router.before mustBeAdmin, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document']) Router.after hide_non_admin_stuff, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'login'])
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
cc73b49e033390fda2eb03ca770ccd074da47885
802
https://github.com/gterrono/houston/blob/cc73b49e033390fda2eb03ca770ccd074da47885/client/router.coffee
79
92
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) @rou...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4b18561921e57c866348c671e76597b67f4ea52e
802
https://github.com/gterrono/houston/blob/4b18561921e57c866348c671e76597b67f4ea52e/client/router.coffee
32
68
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options....
Houston._go = function(route_name, options) { return Router.go(Houston._houstonize_route(route_name), options); }; Router.map(function() { var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.templ...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
4b18561921e57c866348c671e76597b67f4ea52e
802
https://github.com/gterrono/houston/blob/4b18561921e57c866348c671e76597b67f4ea52e/client/router.coffee
32
68
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Houston._go = function(route_name, options) { return Router.go(Houston._houstonize_route(route_name), options); }; Router.map(function() { var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to av...
Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) @rou...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4b18561921e57c866348c671e76597b67f4ea52e
802
https://github.com/gterrono/houston/blob/4b18561921e57c866348c671e76597b67f4ea52e/client/router.coffee
32
68
gterrono/houston:client/router.coffee:5:completion
completion
Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) @rou...
path: '/admin/login', template: 'login' houston_route 'collection', path: '/admin/:name' data: -> [collection, @subscription] = setup_collection(@params.name) {collection} waitOn: -> @subscription template: 'collection_view' houston_route 'document', path: '/admin/:collection/:...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4b18561921e57c866348c671e76597b67f4ea52e
802
https://github.com/gterrono/houston/blob/4b18561921e57c866348c671e76597b67f4ea52e/client/router.coffee
32
68
gterrono/houston:client/router.coffee:6:raw_corpus
raw_corpus
mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Houston._user_is_admin Meteor.userId() @stop() Houston._go 'login' # cleaned up routes (hopefully) Router.before(mustBeAdmin, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'documen...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4b18561921e57c866348c671e76597b67f4ea52e
802
https://github.com/gterrono/houston/blob/4b18561921e57c866348c671e76597b67f4ea52e/client/router.coffee
70
81
gterrono/houston:client/router.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Houston._user_is_admin Meteor.userId() @stop() Houston._go 'login' # cleaned up routes (hopefully) Router.before(mustBeAdmin, only: (Houston._houstoniz...
var mustBeAdmin, name; mustBeAdmin = function() { if (!Meteor.loggingIn()) { // don't check for admin user until ready if (!Houston._user_is_admin(Meteor.userId())) { this.stop(); return Houston._go('login'); } } }; // cleaned up routes (hopefully) Router.before(mustBeAdmin, { only: (functio...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
4b18561921e57c866348c671e76597b67f4ea52e
802
https://github.com/gterrono/houston/blob/4b18561921e57c866348c671e76597b67f4ea52e/client/router.coffee
70
81
gterrono/houston:client/router.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var mustBeAdmin, name; mustBeAdmin = function() { if (!Meteor.loggingIn()) { // don't check for admin user until ready if (!Houston._user_is_admin(Meteor.userId())) { this.stop(); return Houston._go('login'); } } }; // cleaned up routes (h...
mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Houston._user_is_admin Meteor.userId() @stop() Houston._go 'login' # cleaned up routes (hopefully) Router.before(mustBeAdmin, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'documen...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4b18561921e57c866348c671e76597b67f4ea52e
802
https://github.com/gterrono/houston/blob/4b18561921e57c866348c671e76597b67f4ea52e/client/router.coffee
70
81
gterrono/houston:client/router.coffee:6:completion
completion
mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Houston._user_is_admin Meteor.userId() @stop() Houston._go 'login'
# cleaned up routes (hopefully) Router.before(mustBeAdmin, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document']) ) # If the host app doesn't have a router, their html may show up
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4b18561921e57c866348c671e76597b67f4ea52e
802
https://github.com/gterrono/houston/blob/4b18561921e57c866348c671e76597b67f4ea52e/client/router.coffee
70
81
gterrono/houston:client/router.coffee:7:raw_corpus
raw_corpus
hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.z-mongo-admin').show() $('body').css('visibility','hidden') $('body>.z-mongo-admin').css('visibility', 'visible') setTimeout func, 0 Router.after hide_non_admin_stuff, only: (Houston._...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4b18561921e57c866348c671e76597b67f4ea52e
802
https://github.com/gterrono/houston/blob/4b18561921e57c866348c671e76597b67f4ea52e/client/router.coffee
82
93
gterrono/houston:client/router.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.z-mongo-admin').show() $('body').css('visibility','hidden') $('body>.z-mongo-admin').css('visibility', 'visible') setTimeout func,...
var hide_non_admin_stuff, name; hide_non_admin_stuff = function() { var func; $('body').hide(); func = function() { $('body').show(); $('body').children().hide(); $('body>.z-mongo-admin').show(); $('body').css('visibility', 'hidden'); return $('body>.z-mongo-admin').css('visibility', 'visible...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
4b18561921e57c866348c671e76597b67f4ea52e
802
https://github.com/gterrono/houston/blob/4b18561921e57c866348c671e76597b67f4ea52e/client/router.coffee
82
93
gterrono/houston:client/router.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var hide_non_admin_stuff, name; hide_non_admin_stuff = function() { var func; $('body').hide(); func = function() { $('body').show(); $('body').children().hide(); $('body>.z-mongo-admin').show(); $('body').css('visibility', 'hidden'); ret...
hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.z-mongo-admin').show() $('body').css('visibility','hidden') $('body>.z-mongo-admin').css('visibility', 'visible') setTimeout func, 0 Router.after hide_non_admin_stuff, only: (Houston._...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4b18561921e57c866348c671e76597b67f4ea52e
802
https://github.com/gterrono/houston/blob/4b18561921e57c866348c671e76597b67f4ea52e/client/router.coffee
82
93
gterrono/houston:client/router.coffee:7:completion
completion
hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.z-mongo-admin').show()
$('body').css('visibility','hidden') $('body>.z-mongo-admin').css('visibility', 'visible') setTimeout func, 0 Router.after hide_non_admin_stuff, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'login'])
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4b18561921e57c866348c671e76597b67f4ea52e
802
https://github.com/gterrono/houston/blob/4b18561921e57c866348c671e76597b67f4ea52e/client/router.coffee
82
93
gterrono/houston:client/router.coffee:6:raw_corpus
raw_corpus
mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Houston._user_is_admin Meteor.userId() debugger @stop() Houston._go 'login' # If the host app doesn't have a router, their html may show up
CoffeeScript
gterrono/houston
client/router.coffee
MIT
920f222e080c04527c9e08c303c24c967f2a051c
802
https://github.com/gterrono/houston/blob/920f222e080c04527c9e08c303c24c967f2a051c/client/router.coffee
70
77
gterrono/houston:client/router.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Houston._user_is_admin Meteor.userId() debugger @stop() Houston._go 'login' # If the host app doesn't have a router, their html may show up ```
var mustBeAdmin; mustBeAdmin = function() { if (!Meteor.loggingIn()) { // don't check for admin user until ready if (!Houston._user_is_admin(Meteor.userId())) { debugger; this.stop(); return Houston._go('login'); } } }; // If the host app doesn't have a router, their html may show up
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
920f222e080c04527c9e08c303c24c967f2a051c
802
https://github.com/gterrono/houston/blob/920f222e080c04527c9e08c303c24c967f2a051c/client/router.coffee
70
77
gterrono/houston:client/router.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var mustBeAdmin; mustBeAdmin = function() { if (!Meteor.loggingIn()) { // don't check for admin user until ready if (!Houston._user_is_admin(Meteor.userId())) { debugger; this.stop(); return Houston._go('login'); } } }; // If the hos...
mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Houston._user_is_admin Meteor.userId() debugger @stop() Houston._go 'login' # If the host app doesn't have a router, their html may show up
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
920f222e080c04527c9e08c303c24c967f2a051c
802
https://github.com/gterrono/houston/blob/920f222e080c04527c9e08c303c24c967f2a051c/client/router.coffee
70
77
gterrono/houston:client/router.coffee:6:completion
completion
mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Houston._user_is_admin Meteor.userId() debugger
@stop() Houston._go 'login' # If the host app doesn't have a router, their html may show up
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
920f222e080c04527c9e08c303c24c967f2a051c
802
https://github.com/gterrono/houston/blob/920f222e080c04527c9e08c303c24c967f2a051c/client/router.coffee
70
77
gterrono/houston:client/router.coffee:7:raw_corpus
raw_corpus
hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.z-mongo-admin').show() $('body').css('visibility','hidden') $('body>.z-mongo-admin').css('visibility', 'visible') setTimeout func, 0 Router.after hide_non_admin_stuff, only: (Houston._...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
920f222e080c04527c9e08c303c24c967f2a051c
802
https://github.com/gterrono/houston/blob/920f222e080c04527c9e08c303c24c967f2a051c/client/router.coffee
78
91
gterrono/houston:client/router.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.z-mongo-admin').show() $('body').css('visibility','hidden') $('body>.z-mongo-admin').css('visibility', 'visible') setTimeout func,...
var hide_non_admin_stuff, name; hide_non_admin_stuff = function() { var func; $('body').hide(); func = function() { $('body').show(); $('body').children().hide(); $('body>.z-mongo-admin').show(); $('body').css('visibility', 'hidden'); return $('body>.z-mongo-admin').css('visibility', 'visible...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
920f222e080c04527c9e08c303c24c967f2a051c
802
https://github.com/gterrono/houston/blob/920f222e080c04527c9e08c303c24c967f2a051c/client/router.coffee
78
91
gterrono/houston:client/router.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var hide_non_admin_stuff, name; hide_non_admin_stuff = function() { var func; $('body').hide(); func = function() { $('body').show(); $('body').children().hide(); $('body>.z-mongo-admin').show(); $('body').css('visibility', 'hidden'); ret...
hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.z-mongo-admin').show() $('body').css('visibility','hidden') $('body>.z-mongo-admin').css('visibility', 'visible') setTimeout func, 0 Router.after hide_non_admin_stuff, only: (Houston._...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
920f222e080c04527c9e08c303c24c967f2a051c
802
https://github.com/gterrono/houston/blob/920f222e080c04527c9e08c303c24c967f2a051c/client/router.coffee
78
91
gterrono/houston:client/router.coffee:7:completion
completion
hide_non_admin_stuff = -> $('body').hide() func = -> $('body').show() $('body').children().hide() $('body>.z-mongo-admin').show() $('body').css('visibility','hidden')
$('body>.z-mongo-admin').css('visibility', 'visible') setTimeout func, 0 Router.after hide_non_admin_stuff, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'login']) Router.before mustBeAdmin, only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'documen...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
920f222e080c04527c9e08c303c24c967f2a051c
802
https://github.com/gterrono/houston/blob/920f222e080c04527c9e08c303c24c967f2a051c/client/router.coffee
78
91
gterrono/houston:client/router.coffee:1:raw_corpus
raw_corpus
window.Houston ?= {} Houston._houstonize = (name) -> "_houston_#{name}" Houston._subscribe = (name) -> Meteor.subscribe Houston._houstonize name Houston._subscribe 'collections' Houston._subscribe 'admin_user' setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Ho...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4c6cc47dff0e297975cd11fb82a244c814685fdf
802
https://github.com/gterrono/houston/blob/4c6cc47dff0e297975cd11fb82a244c814685fdf/client/router.coffee
1
50
gterrono/houston:client/router.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript window.Houston ?= {} Houston._houstonize = (name) -> "_houston_#{name}" Houston._subscribe = (name) -> Meteor.subscribe Houston._houstonize name Houston._subscribe 'collections' Houston._subscribe 'admin_user' setup_collection = (collection_name, document_id...
var setup_collection; if (window.Houston == null) { window.Houston = {}; } Houston._houstonize = function(name) { return `_houston_${name}`; }; Houston._subscribe = function(name) { return Meteor.subscribe(Houston._houstonize(name)); }; Houston._subscribe('collections'); Houston._subscribe('admin_user'); se...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
4c6cc47dff0e297975cd11fb82a244c814685fdf
802
https://github.com/gterrono/houston/blob/4c6cc47dff0e297975cd11fb82a244c814685fdf/client/router.coffee
1
50
gterrono/houston:client/router.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var setup_collection; if (window.Houston == null) { window.Houston = {}; } Houston._houstonize = function(name) { return `_houston_${name}`; }; Houston._subscribe = function(name) { return Meteor.subscribe(Houston._houstonize(name)); }; Houston._subscribe...
window.Houston ?= {} Houston._houstonize = (name) -> "_houston_#{name}" Houston._subscribe = (name) -> Meteor.subscribe Houston._houstonize name Houston._subscribe 'collections' Houston._subscribe 'admin_user' setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Ho...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4c6cc47dff0e297975cd11fb82a244c814685fdf
802
https://github.com/gterrono/houston/blob/4c6cc47dff0e297975cd11fb82a244c814685fdf/client/router.coffee
1
50
gterrono/houston:client/router.coffee:1:completion
completion
window.Houston ?= {} Houston._houstonize = (name) -> "_houston_#{name}" Houston._subscribe = (name) -> Meteor.subscribe Houston._houstonize name Houston._subscribe 'collections' Houston._subscribe 'admin_user' setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Ho...
Houston._page_length Houston._session('collection_name', collection_name) return [collection, Houston._paginated_subscription] Houston._houstonize_route = (name) -> Houston._houstonize(name)[1..] Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> ho...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4c6cc47dff0e297975cd11fb82a244c814685fdf
802
https://github.com/gterrono/houston/blob/4c6cc47dff0e297975cd11fb82a244c814685fdf/client/router.coffee
1
50
gterrono/houston:client/router.coffee:2:raw_corpus
raw_corpus
template: 'login' houston_route 'collection', path: '/admin/:name' data: -> [collection, @subscription] = setup_collection(@params.name) {collection} waitOn: -> @subscription template: 'collection_view' houston_route 'document', path: '/admin/:collection/:_id' data: -> Ho...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4c6cc47dff0e297975cd11fb82a244c814685fdf
802
https://github.com/gterrono/houston/blob/4c6cc47dff0e297975cd11fb82a244c814685fdf/client/router.coffee
51
79
gterrono/houston:client/router.coffee:2:completion
completion
template: 'login' houston_route 'collection', path: '/admin/:name' data: -> [collection, @subscription] = setup_collection(@params.name) {collection} waitOn: -> @subscription template: 'collection_view' houston_route 'document', path: '/admin/:collection/:_id' data: -> Ho...
[collection, @subscription] = setup_collection( @params.collection, @params._id) {collection, name: @params.collection} template: 'document_view' mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Houston._user_is_admin Meteor.userId() @stop() ...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
4c6cc47dff0e297975cd11fb82a244c814685fdf
802
https://github.com/gterrono/houston/blob/4c6cc47dff0e297975cd11fb82a244c814685fdf/client/router.coffee
51
79
gterrono/houston:client/router.coffee:1:raw_corpus
raw_corpus
Meteor.subscribe '_houston' Meteor.subscribe '_houston_adminUser' window.Houston ?= {} setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = "_houston_#{collection_name}" collection = Houston._get_collection(collection_name) filter = if document_id # Sometimes ...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c64d37df458f49f3aec190bdf793fa665473895a
802
https://github.com/gterrono/houston/blob/c64d37df458f49f3aec190bdf793fa665473895a/client/router.coffee
1
50
gterrono/houston:client/router.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Meteor.subscribe '_houston' Meteor.subscribe '_houston_adminUser' window.Houston ?= {} setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = "_houston_#{collection_name}" collection = Houston._get_collection(co...
var setup_collection; Meteor.subscribe('_houston'); Meteor.subscribe('_houston_adminUser'); if (window.Houston == null) { window.Houston = {}; } setup_collection = function(collection_name, document_id) { var collection, filter, subscription_name; Houston._page_length = 20; subscription_name = `_houston_${c...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
c64d37df458f49f3aec190bdf793fa665473895a
802
https://github.com/gterrono/houston/blob/c64d37df458f49f3aec190bdf793fa665473895a/client/router.coffee
1
50
gterrono/houston:client/router.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var setup_collection; Meteor.subscribe('_houston'); Meteor.subscribe('_houston_adminUser'); if (window.Houston == null) { window.Houston = {}; } setup_collection = function(collection_name, document_id) { var collection, filter, subscription_name; Houston...
Meteor.subscribe '_houston' Meteor.subscribe '_houston_adminUser' window.Houston ?= {} setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = "_houston_#{collection_name}" collection = Houston._get_collection(collection_name) filter = if document_id # Sometimes ...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c64d37df458f49f3aec190bdf793fa665473895a
802
https://github.com/gterrono/houston/blob/c64d37df458f49f3aec190bdf793fa665473895a/client/router.coffee
1
50
gterrono/houston:client/router.coffee:1:completion
completion
Meteor.subscribe '_houston' Meteor.subscribe '_houston_adminUser' window.Houston ?= {} setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = "_houston_#{collection_name}" collection = Houston._get_collection(collection_name) filter = if document_id # Sometimes ...
Houston._houstonize_route = (name) -> Houston._houstonize(name)[1..] Houston._go = (route_name, options) -> Router.go Houston._houstonize_route(route_name), options Router.map -> houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c64d37df458f49f3aec190bdf793fa665473895a
802
https://github.com/gterrono/houston/blob/c64d37df458f49f3aec190bdf793fa665473895a/client/router.coffee
1
50
gterrono/houston:client/router.coffee:2:raw_corpus
raw_corpus
path: '/admin/:name' data: -> [collection, @subscription] = setup_collection(@params.name) {collection} waitOn: -> @subscription template: 'collection_view' houston_route 'document', path: '/admin/:collection/:_id' data: -> Houston._session('document_id', @params._id) [col...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c64d37df458f49f3aec190bdf793fa665473895a
802
https://github.com/gterrono/houston/blob/c64d37df458f49f3aec190bdf793fa665473895a/client/router.coffee
51
76
gterrono/houston:client/router.coffee:2:completion
completion
path: '/admin/:name' data: -> [collection, @subscription] = setup_collection(@params.name) {collection} waitOn: -> @subscription template: 'collection_view' houston_route 'document', path: '/admin/:collection/:_id' data: -> Houston._session('document_id', @params._id) [col...
{collection, name: @params.collection} template: 'document_view' mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Meteor.user()?.profile.admin @stop() Houston._go 'login' # cleaned up routes (hopefully) Router.before(mustBeAdmin, only: (Houston._housto...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c64d37df458f49f3aec190bdf793fa665473895a
802
https://github.com/gterrono/houston/blob/c64d37df458f49f3aec190bdf793fa665473895a/client/router.coffee
51
76
gterrono/houston:client/router.coffee:1:raw_corpus
raw_corpus
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = "_houston_#{collection_name}" collection = Houston._get_collection(collection_name) filter = if document_id # Sometimes you can lookup with _id being a string, sometimes not # When id can be wrapped in an ...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
6
25
gterrono/houston:client/router.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = "_houston_#{collection_name}" collection = Houston._get_collection(collection_name) filter = if document_id # Sometimes you can lookup with _id being a ...
var setup_collection; setup_collection = function(collection_name, document_id) { var collection, filter, subscription_name; Houston._page_length = 20; subscription_name = `_houston_${collection_name}`; collection = Houston._get_collection(collection_name); // Sometimes you can lookup with _id being a string...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
6
25
gterrono/houston:client/router.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var setup_collection; setup_collection = function(collection_name, document_id) { var collection, filter, subscription_name; Houston._page_length = 20; subscription_name = `_houston_${collection_name}`; collection = Houston._get_collection(collection_name)...
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = "_houston_#{collection_name}" collection = Houston._get_collection(collection_name) filter = if document_id # Sometimes you can lookup with _id being a string, sometimes not # When id can be wrapped in an ...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
6
25
gterrono/houston:client/router.coffee:1:completion
completion
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = "_houston_#{collection_name}" collection = Houston._get_collection(collection_name) filter = if document_id # Sometimes you can lookup with _id being a string, sometimes not # When id can be wrapped in an ...
{_id: document_id} else {} Houston._paginated_subscription = Meteor.subscribeWithPagination subscription_name, {}, filter, Houston._page_length Houston._session('collection_name', collection_name) return [collection, Houston._paginated_subscription] # wrappers around IronRouter to avoid clobberin...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
6
25
gterrono/houston:client/router.coffee:3:raw_corpus
raw_corpus
Houston._go = (route_name, options) -> Router.go Houston._houstonize(route_name)[1..], options Router.map -> houston_route = (route_name, options) => # to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) @route Houston._houstonize(route_name)[1..], option...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
27
62
gterrono/houston:client/router.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Houston._go = (route_name, options) -> Router.go Houston._houstonize(route_name)[1..], options Router.map -> houston_route = (route_name, options) => # to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template...
Houston._go = function(route_name, options) { return Router.go(Houston._houstonize(route_name).slice(1), options); }; Router.map(function() { var houston_route; houston_route = (route_name, options) => { // to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
27
62
gterrono/houston:client/router.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Houston._go = function(route_name, options) { return Router.go(Houston._houstonize(route_name).slice(1), options); }; Router.map(function() { var houston_route; houston_route = (route_name, options) => { // to avoid clobbering parent route namespace ...
Houston._go = (route_name, options) -> Router.go Houston._houstonize(route_name)[1..], options Router.map -> houston_route = (route_name, options) => # to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) @route Houston._houstonize(route_name)[1..], option...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
27
62
gterrono/houston:client/router.coffee:3:completion
completion
Houston._go = (route_name, options) -> Router.go Houston._houstonize(route_name)[1..], options Router.map -> houston_route = (route_name, options) => # to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) @route Houston._houstonize(route_name)[1..], option...
template: 'login' houston_route 'collection', path: '/admin/:name' data: -> [collection, @subscription] = setup_collection(@params.name) {collection} waitOn: -> @subscription template: 'collection_view' houston_route 'document', path: '/admin/:collection/:_id' data: -> Ho...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
27
62
gterrono/houston:client/router.coffee:4:raw_corpus
raw_corpus
mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Meteor.user()?.profile.admin @stop() Houston._go 'login' # cleaned up routes (hopefully) Router.before(mustBeAdmin, only: (Houston._houstonize(name)[1..] for name in ['home', 'collection', 'document']) )
CoffeeScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
64
73
gterrono/houston:client/router.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Meteor.user()?.profile.admin @stop() Houston._go 'login' # cleaned up routes (hopefully) Router.before(mustBeAdmin, only: (Houston._houstonize(name)[1....
var mustBeAdmin, name; mustBeAdmin = function() { var ref; if (!Meteor.loggingIn()) { // don't check for admin user until ready if (!((ref = Meteor.user()) != null ? ref.profile.admin : void 0)) { this.stop(); return Houston._go('login'); } } }; // cleaned up routes (hopefully) Router.before...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
64
73
gterrono/houston:client/router.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var mustBeAdmin, name; mustBeAdmin = function() { var ref; if (!Meteor.loggingIn()) { // don't check for admin user until ready if (!((ref = Meteor.user()) != null ? ref.profile.admin : void 0)) { this.stop(); return Houston._go('login'); }...
mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Meteor.user()?.profile.admin @stop() Houston._go 'login' # cleaned up routes (hopefully) Router.before(mustBeAdmin, only: (Houston._houstonize(name)[1..] for name in ['home', 'collection', 'document']) )
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
64
73
gterrono/houston:client/router.coffee:4:completion
completion
mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Meteor.user()?.profile.admin @stop() Houston._go 'login'
# cleaned up routes (hopefully) Router.before(mustBeAdmin, only: (Houston._houstonize(name)[1..] for name in ['home', 'collection', 'document']) )
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
64
73
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
Houston._nested_field_lookup = (object, path) -> return '' unless object? return object._id._str if path =='_id'and typeof object._id == 'object' result = object for part in path.split(".") result = result[part] return '' unless result? # quit if you can't find anything here if typeof result isnt 'ob...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
75
82
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Houston._nested_field_lookup = (object, path) -> return '' unless object? return object._id._str if path =='_id'and typeof object._id == 'object' result = object for part in path.split(".") result = result[part] return '' unless result? # quit if...
Houston._nested_field_lookup = function(object, path) { var i, len, part, ref, result; if (object == null) { return ''; } if (path === '_id' && typeof object._id === 'object') { return object._id._str; } result = object; ref = path.split("."); for (i = 0, len = ref.length; i < len; i++) { pa...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
75
82
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Houston._nested_field_lookup = function(object, path) { var i, len, part, ref, result; if (object == null) { return ''; } if (path === '_id' && typeof object._id === 'object') { return object._id._str; } result = object; ref = path.split(".");...
Houston._nested_field_lookup = (object, path) -> return '' unless object? return object._id._str if path =='_id'and typeof object._id == 'object' result = object for part in path.split(".") result = result[part] return '' unless result? # quit if you can't find anything here if typeof result isnt 'ob...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
75
82
gterrono/houston:client/router.coffee:5:completion
completion
Houston._nested_field_lookup = (object, path) -> return '' unless object? return object._id._str if path =='_id'and typeof object._id == 'object' result = object
for part in path.split(".") result = result[part] return '' unless result? # quit if you can't find anything here if typeof result isnt 'object' then result else ''
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
446fa960c31d33c521b881308100a6ac27b904d0
802
https://github.com/gterrono/houston/blob/446fa960c31d33c521b881308100a6ac27b904d0/client/router.coffee
75
82
gterrono/houston:client/router.coffee:3:raw_corpus
raw_corpus
Houston._go = (route_name, options) -> Router.go Houston._houstonize(route_name)[1..], options Router.map -> houston_route = (route_name, options) => # to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) @route Houston._houstonize(route_name)[1..], option...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
3fa4b927aee4e23c39e194ee4e97fadbf627c39c
802
https://github.com/gterrono/houston/blob/3fa4b927aee4e23c39e194ee4e97fadbf627c39c/client/router.coffee
27
62
gterrono/houston:client/router.coffee:3:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Houston._go = (route_name, options) -> Router.go Houston._houstonize(route_name)[1..], options Router.map -> houston_route = (route_name, options) => # to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template...
Houston._go = function(route_name, options) { return Router.go(Houston._houstonize(route_name).slice(1), options); }; Router.map(function() { var houston_route; houston_route = (route_name, options) => { // to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
3fa4b927aee4e23c39e194ee4e97fadbf627c39c
802
https://github.com/gterrono/houston/blob/3fa4b927aee4e23c39e194ee4e97fadbf627c39c/client/router.coffee
27
62
gterrono/houston:client/router.coffee:3:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Houston._go = function(route_name, options) { return Router.go(Houston._houstonize(route_name).slice(1), options); }; Router.map(function() { var houston_route; houston_route = (route_name, options) => { // to avoid clobbering parent route namespace ...
Houston._go = (route_name, options) -> Router.go Houston._houstonize(route_name)[1..], options Router.map -> houston_route = (route_name, options) => # to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) @route Houston._houstonize(route_name)[1..], option...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
3fa4b927aee4e23c39e194ee4e97fadbf627c39c
802
https://github.com/gterrono/houston/blob/3fa4b927aee4e23c39e194ee4e97fadbf627c39c/client/router.coffee
27
62
gterrono/houston:client/router.coffee:3:completion
completion
Houston._go = (route_name, options) -> Router.go Houston._houstonize(route_name)[1..], options Router.map -> houston_route = (route_name, options) => # to avoid clobbering parent route namespace options.template = Houston._houstonize(options.template) @route Houston._houstonize(route_name)[1..], option...
template: 'login' houston_route 'collection', path: '/admin/:name' data: -> [collection, @subscription] = setup_collection(@params.name) {collection} waitOn: -> @subscription template: 'collection_view' houston_route 'document', path: '/admin/:collection/:_id' data: -> Ho...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
3fa4b927aee4e23c39e194ee4e97fadbf627c39c
802
https://github.com/gterrono/houston/blob/3fa4b927aee4e23c39e194ee4e97fadbf627c39c/client/router.coffee
27
62
gterrono/houston:client/router.coffee:4:raw_corpus
raw_corpus
mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Meteor.user()?.profile.admin @stop() Houston._go 'login' # cleaned up routes (hopefully) Router.before(mustBeAdmin, only: (Houston._houstonize(name) for name in ['home', 'collection', 'document']) )
CoffeeScript
gterrono/houston
client/router.coffee
MIT
3fa4b927aee4e23c39e194ee4e97fadbf627c39c
802
https://github.com/gterrono/houston/blob/3fa4b927aee4e23c39e194ee4e97fadbf627c39c/client/router.coffee
64
73
gterrono/houston:client/router.coffee:4:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Meteor.user()?.profile.admin @stop() Houston._go 'login' # cleaned up routes (hopefully) Router.before(mustBeAdmin, only: (Houston._houstonize(name) fo...
var mustBeAdmin, name; mustBeAdmin = function() { var ref; if (!Meteor.loggingIn()) { // don't check for admin user until ready if (!((ref = Meteor.user()) != null ? ref.profile.admin : void 0)) { this.stop(); return Houston._go('login'); } } }; // cleaned up routes (hopefully) Router.before...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
3fa4b927aee4e23c39e194ee4e97fadbf627c39c
802
https://github.com/gterrono/houston/blob/3fa4b927aee4e23c39e194ee4e97fadbf627c39c/client/router.coffee
64
73
gterrono/houston:client/router.coffee:4:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var mustBeAdmin, name; mustBeAdmin = function() { var ref; if (!Meteor.loggingIn()) { // don't check for admin user until ready if (!((ref = Meteor.user()) != null ? ref.profile.admin : void 0)) { this.stop(); return Houston._go('login'); }...
mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Meteor.user()?.profile.admin @stop() Houston._go 'login' # cleaned up routes (hopefully) Router.before(mustBeAdmin, only: (Houston._houstonize(name) for name in ['home', 'collection', 'document']) )
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
3fa4b927aee4e23c39e194ee4e97fadbf627c39c
802
https://github.com/gterrono/houston/blob/3fa4b927aee4e23c39e194ee4e97fadbf627c39c/client/router.coffee
64
73
gterrono/houston:client/router.coffee:4:completion
completion
mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Meteor.user()?.profile.admin @stop() Houston._go 'login'
# cleaned up routes (hopefully) Router.before(mustBeAdmin, only: (Houston._houstonize(name) for name in ['home', 'collection', 'document']) )
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
3fa4b927aee4e23c39e194ee4e97fadbf627c39c
802
https://github.com/gterrono/houston/blob/3fa4b927aee4e23c39e194ee4e97fadbf627c39c/client/router.coffee
64
73
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
Houston._lookup = (object, path) -> return '' unless object? return object._id._str if path =='_id'and typeof object._id == 'object' result = object for part in path.split(".") result = result[part] return '' unless result? # quit if you can't find anything here if typeof result isnt 'object' then re...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
16ea359dbf8dfec50191fb5cf8c98d6c81120457
802
https://github.com/gterrono/houston/blob/16ea359dbf8dfec50191fb5cf8c98d6c81120457/client/router.coffee
75
82
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Houston._lookup = (object, path) -> return '' unless object? return object._id._str if path =='_id'and typeof object._id == 'object' result = object for part in path.split(".") result = result[part] return '' unless result? # quit if you can't fi...
Houston._lookup = function(object, path) { var i, len, part, ref, result; if (object == null) { return ''; } if (path === '_id' && typeof object._id === 'object') { return object._id._str; } result = object; ref = path.split("."); for (i = 0, len = ref.length; i < len; i++) { part = ref[i]; ...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
16ea359dbf8dfec50191fb5cf8c98d6c81120457
802
https://github.com/gterrono/houston/blob/16ea359dbf8dfec50191fb5cf8c98d6c81120457/client/router.coffee
75
82
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript Houston._lookup = function(object, path) { var i, len, part, ref, result; if (object == null) { return ''; } if (path === '_id' && typeof object._id === 'object') { return object._id._str; } result = object; ref = path.split("."); for (i = 0...
Houston._lookup = (object, path) -> return '' unless object? return object._id._str if path =='_id'and typeof object._id == 'object' result = object for part in path.split(".") result = result[part] return '' unless result? # quit if you can't find anything here if typeof result isnt 'object' then re...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
16ea359dbf8dfec50191fb5cf8c98d6c81120457
802
https://github.com/gterrono/houston/blob/16ea359dbf8dfec50191fb5cf8c98d6c81120457/client/router.coffee
75
82
gterrono/houston:client/router.coffee:5:completion
completion
Houston._lookup = (object, path) -> return '' unless object? return object._id._str if path =='_id'and typeof object._id == 'object' result = object
for part in path.split(".") result = result[part] return '' unless result? # quit if you can't find anything here if typeof result isnt 'object' then result else ''
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
16ea359dbf8dfec50191fb5cf8c98d6c81120457
802
https://github.com/gterrono/houston/blob/16ea359dbf8dfec50191fb5cf8c98d6c81120457/client/router.coffee
75
82
gterrono/houston:client/router.coffee:1:raw_corpus
raw_corpus
Meteor.subscribe 'admin' Meteor.subscribe 'adminUser' setup_collection = (collection_name, document_id) -> COLLECTION_STORAGE = window # TODO find a better global object COLLECTION_STORAGE.admin_page_length = 20 subscription_name = "admin_#{collection_name}" collection = get_collection(collection_name) filte...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
e652379d68f6c94ff5ac4cd9f4dccafc62c185cf
802
https://github.com/gterrono/houston/blob/e652379d68f6c94ff5ac4cd9f4dccafc62c185cf/client/router.coffee
1
50
gterrono/houston:client/router.coffee:1:completion
completion
Meteor.subscribe 'admin' Meteor.subscribe 'adminUser' setup_collection = (collection_name, document_id) -> COLLECTION_STORAGE = window # TODO find a better global object COLLECTION_STORAGE.admin_page_length = 20 subscription_name = "admin_#{collection_name}" collection = get_collection(collection_name) filte...
houston_route 'home', path: '/admin', before: -> # TODO use wait Session.set "collections", Collections.find().fetch() template: 'db_view', houston_route 'login', path: '/admin/login', template: 'admin_login' houston_route 'collection', path: '/admin/:collection' data: -> ...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
e652379d68f6c94ff5ac4cd9f4dccafc62c185cf
802
https://github.com/gterrono/houston/blob/e652379d68f6c94ff5ac4cd9f4dccafc62c185cf/client/router.coffee
1
50
gterrono/houston:client/router.coffee:2:raw_corpus
raw_corpus
@params.collection, @params.document_id) {collection} template: 'document_view' mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Meteor.user()?.profile.admin @stop() houston_go 'login' # cleaned up routes (hopefully) Router.before(mustBeAdmin, on...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
e652379d68f6c94ff5ac4cd9f4dccafc62c185cf
802
https://github.com/gterrono/houston/blob/e652379d68f6c94ff5ac4cd9f4dccafc62c185cf/client/router.coffee
51
74
gterrono/houston:client/router.coffee:2:completion
completion
@params.collection, @params.document_id) {collection} template: 'document_view' mustBeAdmin = -> unless Meteor.loggingIn() # don't check for admin user until ready unless Meteor.user()?.profile.admin @stop() houston_go 'login' # cleaned up routes (hopefully) Router.before(mustBeAdmin,
only: (houstonize_route(name) for name in ['home', 'collection', 'document']) ) # TODO move this to some shared utils location window.lookup = (object, path) -> return '' unless object? return object._id._str if path =='_id'and typeof object._id == 'object' result = object for part in path.split(".") resul...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
e652379d68f6c94ff5ac4cd9f4dccafc62c185cf
802
https://github.com/gterrono/houston/blob/e652379d68f6c94ff5ac4cd9f4dccafc62c185cf/client/router.coffee
51
74
gterrono/houston:client/router.coffee:1:raw_corpus
raw_corpus
Meteor.subscribe '_houston' Meteor.subscribe '_houston_adminUser' window.Houston ?= {} setup_collection = (collection_name) -> Houston._page_length = 20 subscription_name = "_houston_#{collection_name}" collection = Houston._get_collection(collection_name) Houston._paginated_subscription = Meteor.subscrib...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
93e06a251afa99843d47e26f6bfde1ba3c93c47e
802
https://github.com/gterrono/houston/blob/93e06a251afa99843d47e26f6bfde1ba3c93c47e/client/router.coffee
1
45
gterrono/houston:client/router.coffee:1:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript Meteor.subscribe '_houston' Meteor.subscribe '_houston_adminUser' window.Houston ?= {} setup_collection = (collection_name) -> Houston._page_length = 20 subscription_name = "_houston_#{collection_name}" collection = Houston._get_collection(collection_name...
var setup_collection; Meteor.subscribe('_houston'); Meteor.subscribe('_houston_adminUser'); if (window.Houston == null) { window.Houston = {}; } setup_collection = function(collection_name) { var collection, subscription_name; Houston._page_length = 20; subscription_name = `_houston_${collection_name}`; c...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
93e06a251afa99843d47e26f6bfde1ba3c93c47e
802
https://github.com/gterrono/houston/blob/93e06a251afa99843d47e26f6bfde1ba3c93c47e/client/router.coffee
1
45
gterrono/houston:client/router.coffee:1:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var setup_collection; Meteor.subscribe('_houston'); Meteor.subscribe('_houston_adminUser'); if (window.Houston == null) { window.Houston = {}; } setup_collection = function(collection_name) { var collection, subscription_name; Houston._page_length = 20; ...
Meteor.subscribe '_houston' Meteor.subscribe '_houston_adminUser' window.Houston ?= {} setup_collection = (collection_name) -> Houston._page_length = 20 subscription_name = "_houston_#{collection_name}" collection = Houston._get_collection(collection_name) Houston._paginated_subscription = Meteor.subscrib...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
93e06a251afa99843d47e26f6bfde1ba3c93c47e
802
https://github.com/gterrono/houston/blob/93e06a251afa99843d47e26f6bfde1ba3c93c47e/client/router.coffee
1
45
gterrono/houston:client/router.coffee:1:completion
completion
Meteor.subscribe '_houston' Meteor.subscribe '_houston_adminUser' window.Houston ?= {} setup_collection = (collection_name) -> Houston._page_length = 20 subscription_name = "_houston_#{collection_name}" collection = Houston._get_collection(collection_name) Houston._paginated_subscription = Meteor.subscrib...
'/houston/:collection': (collection_name) -> collection = setup_collection collection_name return '_houston_collection_view' '/houston/:collection/:document': (collection_name, document_id) -> collection = setup_collection collection_name Session.set('_houston_document_id', document_id) return '_...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
93e06a251afa99843d47e26f6bfde1ba3c93c47e
802
https://github.com/gterrono/houston/blob/93e06a251afa99843d47e26f6bfde1ba3c93c47e/client/router.coffee
1
45