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:2:completion
completion
setup_collection = (collection_name, document_id) -> subscription_name = Houston._houstonize collection_name filter = if document_id # Sometimes you can lookup with _id being a string, sometimes not # When id can be wrapped in an ObjectID, it should # It can't if it isn't 12 bytes (24 characters) if...
document_id = new Meteor.Collection.ObjectID(document_id) {_id: document_id} else {} Houston._paginated_subscription = Meteor.subscribeWithPagination subscription_name, {}, filter, Houston._page_length
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
9
22
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
31
78
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Ho...
var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); options.template = Houston._houstonize(options.templa...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
31
78
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); ...
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
31
78
gterrono/houston:client/router.coffee:5:completion
completion
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
houston_route 'custom_template', houston_path: "/actions/:template" template: 'custom_template_view' data: -> this.params houston_route 'collection', houston_path: "/:collection_name" data: -> Houston._get_collection(@params.collection_name) subs: (params) -> [setup_collection(params.collection_name)] te...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
31
78
gterrono/houston:client/router.coffee:6:raw_corpus
raw_corpus
mustBeAdmin = -> if !Meteor.user() if Meteor.loggingIn() @render 'houstonLoading' else Houston._go 'login' else if @ready() and not Houston._user_is_admin Meteor.userId() Houston._go 'login' else @next() # If the host app doesn't have a router, their html may show up
CoffeeScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
79
91
gterrono/houston:client/router.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript mustBeAdmin = -> if !Meteor.user() if Meteor.loggingIn() @render 'houstonLoading' else Houston._go 'login' else if @ready() and not Houston._user_is_admin Meteor.userId() Houston._go 'login' else @next() # If the host ...
var mustBeAdmin; mustBeAdmin = function() { if (!Meteor.user()) { if (Meteor.loggingIn()) { return this.render('houstonLoading'); } else { return Houston._go('login'); } } else { if (this.ready() && !Houston._user_is_admin(Meteor.userId())) { return Houston._go('login'); } els...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
79
91
gterrono/houston:client/router.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var mustBeAdmin; mustBeAdmin = function() { if (!Meteor.user()) { if (Meteor.loggingIn()) { return this.render('houstonLoading'); } else { return Houston._go('login'); } } else { if (this.ready() && !Houston._user_is_admin(Meteor.us...
mustBeAdmin = -> if !Meteor.user() if Meteor.loggingIn() @render 'houstonLoading' else Houston._go 'login' else if @ready() and not Houston._user_is_admin Meteor.userId() Houston._go 'login' else @next() # If the host app doesn't have a router, their html may show up
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
79
91
gterrono/houston:client/router.coffee:6:completion
completion
mustBeAdmin = -> if !Meteor.user() if Meteor.loggingIn() @render 'houstonLoading' else Houston._go 'login'
else if @ready() and not Houston._user_is_admin Meteor.userId() Houston._go 'login' else @next() # If the host app doesn't have a router, their html may show up
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
79
91
gterrono/houston:client/router.coffee:7:raw_corpus
raw_corpus
hide_non_admin_stuff = -> $('body').css('visibility', 'hidden').children().hide() $('body>.houston').show() @next()
CoffeeScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
92
95
gterrono/houston:client/router.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript hide_non_admin_stuff = -> $('body').css('visibility', 'hidden').children().hide() $('body>.houston').show() @next() ```
var hide_non_admin_stuff; hide_non_admin_stuff = function() { $('body').css('visibility', 'hidden').children().hide(); $('body>.houston').show(); return this.next(); };
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
92
95
gterrono/houston:client/router.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var hide_non_admin_stuff; hide_non_admin_stuff = function() { $('body').css('visibility', 'hidden').children().hide(); $('body>.houston').show(); return this.next(); }; ```
hide_non_admin_stuff = -> $('body').css('visibility', 'hidden').children().hide() $('body>.houston').show() @next()
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
92
95
gterrono/houston:client/router.coffee:7:completion
completion
hide_non_admin_stuff = -> $('body').css('visibility', 'hidden').children().hide()
$('body>.houston').show() @next()
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
92
95
gterrono/houston:client/router.coffee:8:raw_corpus
raw_corpus
remove_host_css = -> $('link[rel="stylesheet"]').remove() @next() BASE_HOUSTON_ROUTES = (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password', 'custom_template']) ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES.concat([Houston._houstonize_route('login')]) Router.onBeforeAction ...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
96
106
gterrono/houston:client/router.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript remove_host_css = -> $('link[rel="stylesheet"]').remove() @next() BASE_HOUSTON_ROUTES = (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password', 'custom_template']) ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES.concat([Ho...
var ALL_HOUSTON_ROUTES, BASE_HOUSTON_ROUTES, name, onRouteNotFound, remove_host_css; remove_host_css = function() { $('link[rel="stylesheet"]').remove(); return this.next(); }; BASE_HOUSTON_ROUTES = (function() { var i, len, ref, results; ref = ['home', 'collection', 'document', 'change_password', 'custom_tem...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
96
106
gterrono/houston:client/router.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ALL_HOUSTON_ROUTES, BASE_HOUSTON_ROUTES, name, onRouteNotFound, remove_host_css; remove_host_css = function() { $('link[rel="stylesheet"]').remove(); return this.next(); }; BASE_HOUSTON_ROUTES = (function() { var i, len, ref, results; ref = ['home', '...
remove_host_css = -> $('link[rel="stylesheet"]').remove() @next() BASE_HOUSTON_ROUTES = (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password', 'custom_template']) ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES.concat([Houston._houstonize_route('login')]) Router.onBeforeAction ...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
96
106
gterrono/houston:client/router.coffee:8:completion
completion
remove_host_css = -> $('link[rel="stylesheet"]').remove() @next() BASE_HOUSTON_ROUTES = (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password', 'custom_template'])
ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES.concat([Houston._houstonize_route('login')]) Router.onBeforeAction mustBeAdmin, only: BASE_HOUSTON_ROUTES Router.onBeforeAction hide_non_admin_stuff, only: ALL_HOUSTON_ROUTES Router.onBeforeAction remove_host_css, only: ALL_HOUSTON_ROUTES onRouteNotFound = Router.onRouteNotFoun...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
96
106
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.apply Router, 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
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
107
112
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.apply Router, args else console.log "Note: Houston is suppressing Iro...
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.apply(Router, args); } else { return console.log("Note: H...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
107
112
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.apply(Ro...
Router.onRouteNotFound = (args...) -> non_houston_routes = _.filter(Router.routes, (route) -> route.name.indexOf('houston_') != 0) if non_houston_routes.length > 0 onRouteNotFound.apply Router, 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
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
107
112
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.apply Router, 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
581357048f3577f0487ed598e26eaf063c813183
802
https://github.com/gterrono/houston/blob/581357048f3577f0487ed598e26eaf063c813183/client/router.coffee
107
112
gterrono/houston:client/router.coffee:2:raw_corpus
raw_corpus
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize collection_name filter = if document_id # Sometimes you can lookup with _id being a string, sometimes not # When id can be wrapped in an ObjectID, it should # It can't if it isn't 12 ...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
10e4e8218bbc63f1244545e860b0607c96a80d36
802
https://github.com/gterrono/houston/blob/10e4e8218bbc63f1244545e860b0607c96a80d36/client/router.coffee
8
22
gterrono/houston:client/router.coffee:2: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._houstonize collection_name filter = if document_id # Sometimes you can lookup with _id being a string, sometimes not # When id can be wrapped...
var setup_collection; setup_collection = function(collection_name, document_id) { var filter, subscription_name; Houston._page_length = 20; subscription_name = Houston._houstonize(collection_name); // Sometimes you can lookup with _id being a string, sometimes not // When id can be wrapped in an ObjectID, it...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
10e4e8218bbc63f1244545e860b0607c96a80d36
802
https://github.com/gterrono/houston/blob/10e4e8218bbc63f1244545e860b0607c96a80d36/client/router.coffee
8
22
gterrono/houston:client/router.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var setup_collection; setup_collection = function(collection_name, document_id) { var filter, subscription_name; Houston._page_length = 20; subscription_name = Houston._houstonize(collection_name); // Sometimes you can lookup with _id being a string, somet...
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize collection_name filter = if document_id # Sometimes you can lookup with _id being a string, sometimes not # When id can be wrapped in an ObjectID, it should # It can't if it isn't 12 ...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
10e4e8218bbc63f1244545e860b0607c96a80d36
802
https://github.com/gterrono/houston/blob/10e4e8218bbc63f1244545e860b0607c96a80d36/client/router.coffee
8
22
gterrono/houston:client/router.coffee:2:completion
completion
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize collection_name filter = if document_id # Sometimes you can lookup with _id being a string, sometimes not # When id can be wrapped in an ObjectID, it should # It can't if it isn't 12 ...
if typeof(document_id) == 'string' and document_id.length == 24 document_id = new Meteor.Collection.ObjectID(document_id) {_id: document_id} else {} Houston._paginated_subscription = Meteor.subscribeWithPagination subscription_name, {}, filter, Houston._page_length
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
10e4e8218bbc63f1244545e860b0607c96a80d36
802
https://github.com/gterrono/houston/blob/10e4e8218bbc63f1244545e860b0607c96a80d36/client/router.coffee
8
22
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
dfbb91f5be748c1a85a3868a22d9416844b0b79b
802
https://github.com/gterrono/houston/blob/dfbb91f5be748c1a85a3868a22d9416844b0b79b/client/router.coffee
31
78
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Ho...
var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); options.template = Houston._houstonize(options.templa...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
dfbb91f5be748c1a85a3868a22d9416844b0b79b
802
https://github.com/gterrono/houston/blob/dfbb91f5be748c1a85a3868a22d9416844b0b79b/client/router.coffee
31
78
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); ...
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
dfbb91f5be748c1a85a3868a22d9416844b0b79b
802
https://github.com/gterrono/houston/blob/dfbb91f5be748c1a85a3868a22d9416844b0b79b/client/router.coffee
31
78
gterrono/houston:client/router.coffee:5:completion
completion
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
houston_route 'custom_template', houston_path: "/custom/:template" template: 'custom_template_view' data: -> this.params houston_route 'collection', houston_path: "/:collection_name" data: -> Houston._get_collection(@params.collection_name) subs: (params) -> [setup_collection(params.collection_name)] tem...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
dfbb91f5be748c1a85a3868a22d9416844b0b79b
802
https://github.com/gterrono/houston/blob/dfbb91f5be748c1a85a3868a22d9416844b0b79b/client/router.coffee
31
78
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
2183bc16871b6de4df0dbe0c6ab1eb09be6e531a
802
https://github.com/gterrono/houston/blob/2183bc16871b6de4df0dbe0c6ab1eb09be6e531a/client/router.coffee
31
78
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Ho...
var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); options.template = Houston._houstonize(options.templa...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
2183bc16871b6de4df0dbe0c6ab1eb09be6e531a
802
https://github.com/gterrono/houston/blob/2183bc16871b6de4df0dbe0c6ab1eb09be6e531a/client/router.coffee
31
78
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); ...
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
2183bc16871b6de4df0dbe0c6ab1eb09be6e531a
802
https://github.com/gterrono/houston/blob/2183bc16871b6de4df0dbe0c6ab1eb09be6e531a/client/router.coffee
31
78
gterrono/houston:client/router.coffee:5:completion
completion
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
houston_route 'collection', houston_path: "/:collection_name" data: -> Houston._get_collection(@params.collection_name) subs: (params) -> [setup_collection(params.collection_name)] template: 'collection_view' houston_route 'document', houston_path: "/:collection/:_id" data: -> @subscription = setup_col...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
2183bc16871b6de4df0dbe0c6ab1eb09be6e531a
802
https://github.com/gterrono/houston/blob/2183bc16871b6de4df0dbe0c6ab1eb09be6e531a/client/router.coffee
31
78
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
67fd2983ff7c32a5747b12dec80232f2fdb7af2e
802
https://github.com/gterrono/houston/blob/67fd2983ff7c32a5747b12dec80232f2fdb7af2e/client/router.coffee
31
79
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Ho...
var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); options.template = Houston._houstonize(options.templa...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
67fd2983ff7c32a5747b12dec80232f2fdb7af2e
802
https://github.com/gterrono/houston/blob/67fd2983ff7c32a5747b12dec80232f2fdb7af2e/client/router.coffee
31
79
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); ...
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
67fd2983ff7c32a5747b12dec80232f2fdb7af2e
802
https://github.com/gterrono/houston/blob/67fd2983ff7c32a5747b12dec80232f2fdb7af2e/client/router.coffee
31
79
gterrono/houston:client/router.coffee:5:completion
completion
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
houston_route 'collection', houston_path: "/:collection_name" data: -> Houston._get_collection(@params.collection_name) subs: (params) -> [setup_collection(params.collection_name)] template: 'collection_view' houston_route 'document', houston_path: "/:collection/:_id" data: -> @subscription = setup...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
67fd2983ff7c32a5747b12dec80232f2fdb7af2e
802
https://github.com/gterrono/houston/blob/67fd2983ff7c32a5747b12dec80232f2fdb7af2e/client/router.coffee
31
79
gterrono/houston:client/router.coffee:8:raw_corpus
raw_corpus
remove_host_css = -> $('link[rel="stylesheet"]').remove() @next() BASE_HOUSTON_ROUTES = ['home', 'collection', 'document', 'change_password', 'custom_template'] ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES.concat(['login']) Router.onBeforeAction mustBeAdmin, only: (Houston._houstonize_route(name) for name in BASE_HO...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
67fd2983ff7c32a5747b12dec80232f2fdb7af2e
802
https://github.com/gterrono/houston/blob/67fd2983ff7c32a5747b12dec80232f2fdb7af2e/client/router.coffee
97
110
gterrono/houston:client/router.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript remove_host_css = -> $('link[rel="stylesheet"]').remove() @next() BASE_HOUSTON_ROUTES = ['home', 'collection', 'document', 'change_password', 'custom_template'] ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES.concat(['login']) Router.onBeforeAction mustBeAdmin, o...
var ALL_HOUSTON_ROUTES, BASE_HOUSTON_ROUTES, name, onRouteNotFound, remove_host_css; remove_host_css = function() { $('link[rel="stylesheet"]').remove(); return this.next(); }; BASE_HOUSTON_ROUTES = ['home', 'collection', 'document', 'change_password', 'custom_template']; ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
67fd2983ff7c32a5747b12dec80232f2fdb7af2e
802
https://github.com/gterrono/houston/blob/67fd2983ff7c32a5747b12dec80232f2fdb7af2e/client/router.coffee
97
110
gterrono/houston:client/router.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ALL_HOUSTON_ROUTES, BASE_HOUSTON_ROUTES, name, onRouteNotFound, remove_host_css; remove_host_css = function() { $('link[rel="stylesheet"]').remove(); return this.next(); }; BASE_HOUSTON_ROUTES = ['home', 'collection', 'document', 'change_password', 'custo...
remove_host_css = -> $('link[rel="stylesheet"]').remove() @next() BASE_HOUSTON_ROUTES = ['home', 'collection', 'document', 'change_password', 'custom_template'] ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES.concat(['login']) Router.onBeforeAction mustBeAdmin, only: (Houston._houstonize_route(name) for name in BASE_HO...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
67fd2983ff7c32a5747b12dec80232f2fdb7af2e
802
https://github.com/gterrono/houston/blob/67fd2983ff7c32a5747b12dec80232f2fdb7af2e/client/router.coffee
97
110
gterrono/houston:client/router.coffee:8:completion
completion
remove_host_css = -> $('link[rel="stylesheet"]').remove() @next() BASE_HOUSTON_ROUTES = ['home', 'collection', 'document', 'change_password', 'custom_template'] ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES.concat(['login']) Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in BASE_HOUSTON_ROUTES) Router.onBeforeAction hide_non_admin_stuff, only: (Houston._houstonize_route(name) for name in ALL_HOUSTON_ROUTES) Router.onBeforeAction remove_host_css, only: (Houston._houstonize_route(name) for name in ALL_HOUSTON_ROUTES) onRouteNotFound = ...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
67fd2983ff7c32a5747b12dec80232f2fdb7af2e
802
https://github.com/gterrono/houston/blob/67fd2983ff7c32a5747b12dec80232f2fdb7af2e/client/router.coffee
97
110
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
ab493c6114ebd8a2068d6df0207651a20c21799e
802
https://github.com/gterrono/houston/blob/ab493c6114ebd8a2068d6df0207651a20c21799e/client/router.coffee
31
79
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Ho...
var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); options.template = Houston._houstonize(options.templa...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
ab493c6114ebd8a2068d6df0207651a20c21799e
802
https://github.com/gterrono/houston/blob/ab493c6114ebd8a2068d6df0207651a20c21799e/client/router.coffee
31
79
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); ...
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
ab493c6114ebd8a2068d6df0207651a20c21799e
802
https://github.com/gterrono/houston/blob/ab493c6114ebd8a2068d6df0207651a20c21799e/client/router.coffee
31
79
gterrono/houston:client/router.coffee:5:completion
completion
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
houston_route 'collection', houston_path: "/collection/:name" data: -> Houston._get_collection(@params.name) subs: (params) -> [setup_collection(params.name)] template: 'collection_view' houston_route 'document', houston_path: "/:collection/:_id" data: -> @subscription = setup_collection(@params.co...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
ab493c6114ebd8a2068d6df0207651a20c21799e
802
https://github.com/gterrono/houston/blob/ab493c6114ebd8a2068d6df0207651a20c21799e/client/router.coffee
31
79
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
e50aaa5ed8ba56704693ee2f52994792331d3f22
802
https://github.com/gterrono/houston/blob/e50aaa5ed8ba56704693ee2f52994792331d3f22/client/router.coffee
31
77
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Ho...
var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); options.template = Houston._houstonize(options.templa...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
e50aaa5ed8ba56704693ee2f52994792331d3f22
802
https://github.com/gterrono/houston/blob/e50aaa5ed8ba56704693ee2f52994792331d3f22/client/router.coffee
31
77
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); ...
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
e50aaa5ed8ba56704693ee2f52994792331d3f22
802
https://github.com/gterrono/houston/blob/e50aaa5ed8ba56704693ee2f52994792331d3f22/client/router.coffee
31
77
gterrono/houston:client/router.coffee:5:completion
completion
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
houston_route 'collection', houston_path: "/collection/:name" data: -> Houston._get_collection(@params.name) subs: (params) -> [setup_collection(params.name)] template: 'collection_view' houston_route 'document', houston_path: "/:collection/:_id" data: -> Houston._session('document_id', @params._id...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
e50aaa5ed8ba56704693ee2f52994792331d3f22
802
https://github.com/gterrono/houston/blob/e50aaa5ed8ba56704693ee2f52994792331d3f22/client/router.coffee
31
77
gterrono/houston:client/router.coffee:2:raw_corpus
raw_corpus
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize collection_name filter = if document_id # Sometimes you can lookup with _id being a string, sometimes not # When id can be wrapped in an ObjectID, it should # It can't if it isn't 12 ...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
0f6d10fca18da1946add534ccc920ff74ab99d68
802
https://github.com/gterrono/houston/blob/0f6d10fca18da1946add534ccc920ff74ab99d68/client/router.coffee
8
21
gterrono/houston:client/router.coffee:2: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._houstonize collection_name filter = if document_id # Sometimes you can lookup with _id being a string, sometimes not # When id can be wrapped...
var setup_collection; setup_collection = function(collection_name, document_id) { var filter, subscription_name; Houston._page_length = 20; subscription_name = Houston._houstonize(collection_name); // Sometimes you can lookup with _id being a string, sometimes not // When id can be wrapped in an ObjectID, it...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
0f6d10fca18da1946add534ccc920ff74ab99d68
802
https://github.com/gterrono/houston/blob/0f6d10fca18da1946add534ccc920ff74ab99d68/client/router.coffee
8
21
gterrono/houston:client/router.coffee:2:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var setup_collection; setup_collection = function(collection_name, document_id) { var filter, subscription_name; Houston._page_length = 20; subscription_name = Houston._houstonize(collection_name); // Sometimes you can lookup with _id being a string, somet...
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize collection_name filter = if document_id # Sometimes you can lookup with _id being a string, sometimes not # When id can be wrapped in an ObjectID, it should # It can't if it isn't 12 ...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
0f6d10fca18da1946add534ccc920ff74ab99d68
802
https://github.com/gterrono/houston/blob/0f6d10fca18da1946add534ccc920ff74ab99d68/client/router.coffee
8
21
gterrono/houston:client/router.coffee:2:completion
completion
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize collection_name filter = if document_id # Sometimes you can lookup with _id being a string, sometimes not # When id can be wrapped in an ObjectID, it should # It can't if it isn't 12 ...
if typeof(document_id) == 'string' and document_id.length == 24 document_id = new Meteor.Collection.ObjectID(document_id) {_id: document_id} else {} Meteor.subscribeWithPagination subscription_name, {}, filter, Houston._page_length
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
0f6d10fca18da1946add534ccc920ff74ab99d68
802
https://github.com/gterrono/houston/blob/0f6d10fca18da1946add534ccc920ff74ab99d68/client/router.coffee
8
21
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
0f6d10fca18da1946add534ccc920ff74ab99d68
802
https://github.com/gterrono/houston/blob/0f6d10fca18da1946add534ccc920ff74ab99d68/client/router.coffee
30
76
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Ho...
var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); options.template = Houston._houstonize(options.templa...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
0f6d10fca18da1946add534ccc920ff74ab99d68
802
https://github.com/gterrono/houston/blob/0f6d10fca18da1946add534ccc920ff74ab99d68/client/router.coffee
30
76
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); ...
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
0f6d10fca18da1946add534ccc920ff74ab99d68
802
https://github.com/gterrono/houston/blob/0f6d10fca18da1946add534ccc920ff74ab99d68/client/router.coffee
30
76
gterrono/houston:client/router.coffee:5:completion
completion
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
houston_path: "/collection/:name" data: -> [collection, @subscription] = setup_collection(@params.name) Houston._get_collection(@params.name) waitOn: -> @subscription template: 'collection_view' houston_route 'document', houston_path: "/:collection/:_id" data: -> Houston._session('document_id', @...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
0f6d10fca18da1946add534ccc920ff74ab99d68
802
https://github.com/gterrono/houston/blob/0f6d10fca18da1946add534ccc920ff74ab99d68/client/router.coffee
30
76
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
1e5178cd2fd31f2e6371607b4c13402a96ebff02
802
https://github.com/gterrono/houston/blob/1e5178cd2fd31f2e6371607b4c13402a96ebff02/client/router.coffee
30
75
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Ho...
var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); options.template = Houston._houstonize(options.templa...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
1e5178cd2fd31f2e6371607b4c13402a96ebff02
802
https://github.com/gterrono/houston/blob/1e5178cd2fd31f2e6371607b4c13402a96ebff02/client/router.coffee
30
75
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); ...
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
1e5178cd2fd31f2e6371607b4c13402a96ebff02
802
https://github.com/gterrono/houston/blob/1e5178cd2fd31f2e6371607b4c13402a96ebff02/client/router.coffee
30
75
gterrono/houston:client/router.coffee:5:completion
completion
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
data: -> [collection, @subscription] = setup_collection(@params.name) Houston._get_collection(@params.name) waitOn: -> @subscription template: 'collection_view' houston_route 'document', houston_path: "/:collection/:_id" data: -> Houston._session('document_id', @params._id) [collection, @subscr...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
1e5178cd2fd31f2e6371607b4c13402a96ebff02
802
https://github.com/gterrono/houston/blob/1e5178cd2fd31f2e6371607b4c13402a96ebff02/client/router.coffee
30
75
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
e7f3b45859baf942fb6681e5bfc48cba1ec1af6a
802
https://github.com/gterrono/houston/blob/e7f3b45859baf942fb6681e5bfc48cba1ec1af6a/client/router.coffee
30
74
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Ho...
var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); options.template = Houston._houstonize(options.templa...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
e7f3b45859baf942fb6681e5bfc48cba1ec1af6a
802
https://github.com/gterrono/houston/blob/e7f3b45859baf942fb6681e5bfc48cba1ec1af6a/client/router.coffee
30
74
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout'; options.name = Houston._houstonize_route(route_name); ...
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
e7f3b45859baf942fb6681e5bfc48cba1ec1af6a
802
https://github.com/gterrono/houston/blob/e7f3b45859baf942fb6681e5bfc48cba1ec1af6a/client/router.coffee
30
74
gterrono/houston:client/router.coffee:5:completion
completion
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace options.layoutTemplate = '_houston_master_layout' options.name = Houston._houstonize_route(route_name) options.template = Houston._houstonize(options.template) options.waitOn = ->...
data: -> [collection, @subscription] = setup_collection(@params.name) Houston._get_collection(@params.name) waitOn: -> @subscription template: 'collection_view' houston_route 'document', houston_path: "/:collection/:_id" data: -> Houston._session('document_id', @params._id) [collection, @subscr...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
e7f3b45859baf942fb6681e5bfc48cba1ec1af6a
802
https://github.com/gterrono/houston/blob/e7f3b45859baf942fb6681e5bfc48cba1ec1af6a/client/router.coffee
30
74
gterrono/houston:client/router.coffee:2:raw_corpus
raw_corpus
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize 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 ...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
a32808b056df45e21fb59f9bce37162f03d626b1
802
https://github.com/gterrono/houston/blob/a32808b056df45e21fb59f9bce37162f03d626b1/client/router.coffee
8
26
gterrono/houston:client/router.coffee:2: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._houstonize collection_name collection = Houston._get_collection(collection_name) filter = if document_id # Sometimes you can lookup with _id be...
var setup_collection; setup_collection = function(collection_name, document_id) { var collection, filter, subscription_name; Houston._page_length = 20; subscription_name = Houston._houstonize(collection_name); collection = Houston._get_collection(collection_name); // Sometimes you can lookup with _id being a...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
a32808b056df45e21fb59f9bce37162f03d626b1
802
https://github.com/gterrono/houston/blob/a32808b056df45e21fb59f9bce37162f03d626b1/client/router.coffee
8
26
gterrono/houston:client/router.coffee:2: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._houstonize(collection_name); collection = Houston._get_collection(collectio...
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize 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 ...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
a32808b056df45e21fb59f9bce37162f03d626b1
802
https://github.com/gterrono/houston/blob/a32808b056df45e21fb59f9bce37162f03d626b1/client/router.coffee
8
26
gterrono/houston:client/router.coffee:2:completion
completion
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize 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 ...
document_id = new Meteor.Collection.ObjectID(document_id) {_id: document_id} else {} Houston._paginated_subscription = Meteor.subscribeWithPagination subscription_name, {}, filter, Houston._page_length Houston._setup_collection_methods(collection) #Houston._session('collection_name', collectio...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
a32808b056df45e21fb59f9bce37162f03d626b1
802
https://github.com/gterrono/houston/blob/a32808b056df45e21fb59f9bce37162f03d626b1/client/router.coffee
8
26
gterrono/houston:client/router.coffee:5:raw_corpus
raw_corpus
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace Router.route "#{Houston._ROOT_ROUTE}#{options.houston_path}", name: Houston._houstonize_route(route_name) waitOn: -> Houston._subscribe('admin_user') layoutTemplate: '_houst...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
a32808b056df45e21fb59f9bce37162f03d626b1
802
https://github.com/gterrono/houston/blob/a32808b056df45e21fb59f9bce37162f03d626b1/client/router.coffee
35
79
gterrono/houston:client/router.coffee:5:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace Router.route "#{Houston._ROOT_ROUTE}#{options.houston_path}", name: Houston._houstonize_route(route_name) waitOn: -> Hou...
var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace return Router.route(`${Houston._ROOT_ROUTE}${options.houston_path}`, { name: Houston._houstonize_route(route_name), waitOn: function() { return Hous...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
a32808b056df45e21fb59f9bce37162f03d626b1
802
https://github.com/gterrono/houston/blob/a32808b056df45e21fb59f9bce37162f03d626b1/client/router.coffee
35
79
gterrono/houston:client/router.coffee:5:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var houston_route; houston_route = (route_name, options) => { // Append _houston_ to template and route names to avoid clobbering parent route namespace return Router.route(`${Houston._ROOT_ROUTE}${options.houston_path}`, { name: Houston._houstonize_route(...
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace Router.route "#{Houston._ROOT_ROUTE}#{options.houston_path}", name: Houston._houstonize_route(route_name) waitOn: -> Houston._subscribe('admin_user') layoutTemplate: '_houst...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
a32808b056df45e21fb59f9bce37162f03d626b1
802
https://github.com/gterrono/houston/blob/a32808b056df45e21fb59f9bce37162f03d626b1/client/router.coffee
35
79
gterrono/houston:client/router.coffee:5:completion
completion
houston_route = (route_name, options) => # Append _houston_ to template and route names to avoid clobbering parent route namespace Router.route "#{Houston._ROOT_ROUTE}#{options.houston_path}", name: Houston._houstonize_route(route_name) waitOn: -> Houston._subscribe('admin_user') layoutTemplate: '_houst...
data: -> [collection, @subscription] = setup_collection(@params.name) {collection} waitOn: -> @subscription template: 'collection_view' houston_route 'document', houston_path: "/:collection/:_id" data: -> Houston._session('document_id', @params._id) [collection, @subscription] = setup_collectio...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
a32808b056df45e21fb59f9bce37162f03d626b1
802
https://github.com/gterrono/houston/blob/a32808b056df45e21fb59f9bce37162f03d626b1/client/router.coffee
35
79
gterrono/houston:client/router.coffee:2:raw_corpus
raw_corpus
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize 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 ...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
8
26
gterrono/houston:client/router.coffee:2: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._houstonize collection_name collection = Houston._get_collection(collection_name) filter = if document_id # Sometimes you can lookup with _id be...
var setup_collection; setup_collection = function(collection_name, document_id) { var collection, filter, subscription_name; Houston._page_length = 20; subscription_name = Houston._houstonize(collection_name); collection = Houston._get_collection(collection_name); // Sometimes you can lookup with _id being a...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
8
26
gterrono/houston:client/router.coffee:2: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._houstonize(collection_name); collection = Houston._get_collection(collectio...
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize 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 ...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
8
26
gterrono/houston:client/router.coffee:2:completion
completion
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize 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 ...
document_id = new Meteor.Collection.ObjectID(document_id) {_id: document_id} else {} Houston._paginated_subscription = Meteor.subscribeWithPagination subscription_name, {}, filter, Houston._page_length Houston._setup_collection_methods(collection) Houston._session('collection_name', collection...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
8
26
gterrono/houston:client/router.coffee:4: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) optio...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
31
80
gterrono/houston:client/router.coffee:4: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.t...
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
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
31
80
gterrono/houston:client/router.coffee:4: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) optio...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
31
80
gterrono/houston:client/router.coffee:4: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) optio...
template: 'change_password' houston_route 'collection', houston_path: "/collection/:name" data: -> [collection, @subscription] = setup_collection(@params.name) {collection} waitOn: -> @subscription template: 'collection_view' houston_route 'document', houston_path: "/:collection/:_...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
31
80
gterrono/houston:client/router.coffee:6:raw_corpus
raw_corpus
mustBeAdmin = (pause) -> if @ready() and not Houston._user_is_admin Meteor.userId() pause() Houston._go 'login' # If the host app doesn't have a router, their html may show up
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
83
88
gterrono/houston:client/router.coffee:6:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript mustBeAdmin = (pause) -> if @ready() and not Houston._user_is_admin Meteor.userId() pause() Houston._go 'login' # If the host app doesn't have a router, their html may show up ```
var mustBeAdmin; mustBeAdmin = function(pause) { if (this.ready() && !Houston._user_is_admin(Meteor.userId())) { pause(); 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
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
83
88
gterrono/houston:client/router.coffee:6:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var mustBeAdmin; mustBeAdmin = function(pause) { if (this.ready() && !Houston._user_is_admin(Meteor.userId())) { pause(); return Houston._go('login'); } }; // If the host app doesn't have a router, their html may show up ```
mustBeAdmin = (pause) -> if @ready() and not Houston._user_is_admin Meteor.userId() pause() 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
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
83
88
gterrono/houston:client/router.coffee:6:completion
completion
mustBeAdmin = (pause) -> if @ready() and not Houston._user_is_admin Meteor.userId() pause()
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
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
83
88
gterrono/houston:client/router.coffee:7:raw_corpus
raw_corpus
hide_non_admin_stuff = -> $('body').css('visibility', 'hidden').children().hide() $('body>.houston').show()
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
89
91
gterrono/houston:client/router.coffee:7:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript hide_non_admin_stuff = -> $('body').css('visibility', 'hidden').children().hide() $('body>.houston').show() ```
var hide_non_admin_stuff; hide_non_admin_stuff = function() { $('body').css('visibility', 'hidden').children().hide(); return $('body>.houston').show(); };
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
89
91
gterrono/houston:client/router.coffee:7:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var hide_non_admin_stuff; hide_non_admin_stuff = function() { $('body').css('visibility', 'hidden').children().hide(); return $('body>.houston').show(); }; ```
hide_non_admin_stuff = -> $('body').css('visibility', 'hidden').children().hide() $('body>.houston').show()
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
89
91
gterrono/houston:client/router.coffee:8:raw_corpus
raw_corpus
remove_host_css = -> $('link[rel="stylesheet"]').remove() BASE_HOUSTON_ROUTES = ['home', 'collection', 'document', 'change_password', 'custom_template'] ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES.concat(['login']) Router.onBeforeAction mustBeAdmin, only: (Houston._houstonize_route(name) for name in BASE_HOUSTON_ROUT...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
92
104
gterrono/houston:client/router.coffee:8:coffee_to_js
coffee_to_js
Convert this CoffeeScript to JavaScript. ```coffeescript remove_host_css = -> $('link[rel="stylesheet"]').remove() BASE_HOUSTON_ROUTES = ['home', 'collection', 'document', 'change_password', 'custom_template'] ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES.concat(['login']) Router.onBeforeAction mustBeAdmin, only: (Hous...
var ALL_HOUSTON_ROUTES, BASE_HOUSTON_ROUTES, name, onRouteNotFound, remove_host_css; remove_host_css = function() { return $('link[rel="stylesheet"]').remove(); }; BASE_HOUSTON_ROUTES = ['home', 'collection', 'document', 'change_password', 'custom_template']; ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES.concat(['login...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
92
104
gterrono/houston:client/router.coffee:8:js_to_coffee
js_to_coffee
Convert this JavaScript to CoffeeScript. ```javascript var ALL_HOUSTON_ROUTES, BASE_HOUSTON_ROUTES, name, onRouteNotFound, remove_host_css; remove_host_css = function() { return $('link[rel="stylesheet"]').remove(); }; BASE_HOUSTON_ROUTES = ['home', 'collection', 'document', 'change_password', 'custom_template']; ...
remove_host_css = -> $('link[rel="stylesheet"]').remove() BASE_HOUSTON_ROUTES = ['home', 'collection', 'document', 'change_password', 'custom_template'] ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES.concat(['login']) Router.onBeforeAction mustBeAdmin, only: (Houston._houstonize_route(name) for name in BASE_HOUSTON_ROUT...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
92
104
gterrono/houston:client/router.coffee:8:completion
completion
remove_host_css = -> $('link[rel="stylesheet"]').remove() BASE_HOUSTON_ROUTES = ['home', 'collection', 'document', 'change_password', 'custom_template'] ALL_HOUSTON_ROUTES = BASE_HOUSTON_ROUTES.concat(['login']) Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in BASE_HOUSTON_ROUTES) Router.onBeforeAction hide_non_admin_stuff, only: (Houston._houstonize_route(name) for name in ALL_HOUSTON_ROUTES) Router.onBeforeAction remove_host_css, only: (Houston._houstonize_route(name) for name in ALL_HOUSTON_ROUTES) onRouteNotFound = ...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
b4a46e43f3ed061be17c56c577d6f5ba73995bc6
802
https://github.com/gterrono/houston/blob/b4a46e43f3ed061be17c56c577d6f5ba73995bc6/client/router.coffee
92
104
gterrono/houston:client/router.coffee:2:raw_corpus
raw_corpus
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize 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 ...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
7786ba0b67f05b578bbba3d72973eb48b766ba80
802
https://github.com/gterrono/houston/blob/7786ba0b67f05b578bbba3d72973eb48b766ba80/client/router.coffee
8
25
gterrono/houston:client/router.coffee:2: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._houstonize collection_name collection = Houston._get_collection(collection_name) filter = if document_id # Sometimes you can lookup with _id be...
var setup_collection; setup_collection = function(collection_name, document_id) { var collection, filter, subscription_name; Houston._page_length = 20; subscription_name = Houston._houstonize(collection_name); collection = Houston._get_collection(collection_name); // Sometimes you can lookup with _id being a...
CoffeeScript
JavaScript
gterrono/houston
client/router.coffee
MIT
7786ba0b67f05b578bbba3d72973eb48b766ba80
802
https://github.com/gterrono/houston/blob/7786ba0b67f05b578bbba3d72973eb48b766ba80/client/router.coffee
8
25
gterrono/houston:client/router.coffee:2: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._houstonize(collection_name); collection = Houston._get_collection(collectio...
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize 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 ...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
7786ba0b67f05b578bbba3d72973eb48b766ba80
802
https://github.com/gterrono/houston/blob/7786ba0b67f05b578bbba3d72973eb48b766ba80/client/router.coffee
8
25
gterrono/houston:client/router.coffee:2:completion
completion
setup_collection = (collection_name, document_id) -> Houston._page_length = 20 subscription_name = Houston._houstonize 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 ...
document_id = new Meteor.Collection.ObjectID(document_id) {_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_...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
7786ba0b67f05b578bbba3d72973eb48b766ba80
802
https://github.com/gterrono/houston/blob/7786ba0b67f05b578bbba3d72973eb48b766ba80/client/router.coffee
8
25
gterrono/houston:client/router.coffee:4: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) optio...
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c2f5e4d1c32217ab46b28495ad5b2afdf63117d5
802
https://github.com/gterrono/houston/blob/c2f5e4d1c32217ab46b28495ad5b2afdf63117d5/client/router.coffee
30
79
gterrono/houston:client/router.coffee:4: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.t...
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
c2f5e4d1c32217ab46b28495ad5b2afdf63117d5
802
https://github.com/gterrono/houston/blob/c2f5e4d1c32217ab46b28495ad5b2afdf63117d5/client/router.coffee
30
79
gterrono/houston:client/router.coffee:4: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) optio...
JavaScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c2f5e4d1c32217ab46b28495ad5b2afdf63117d5
802
https://github.com/gterrono/houston/blob/c2f5e4d1c32217ab46b28495ad5b2afdf63117d5/client/router.coffee
30
79
gterrono/houston:client/router.coffee:4: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) optio...
houston_route 'change_password', houston_path: "/password" template: 'change_password' houston_route 'collection', houston_path: "/collection/:name" data: -> [collection, @subscription] = setup_collection(@params.name) {collection} waitOn: -> @subscription template: 'collection_vi...
CoffeeScript
CoffeeScript
gterrono/houston
client/router.coffee
MIT
c2f5e4d1c32217ab46b28495ad5b2afdf63117d5
802
https://github.com/gterrono/houston/blob/c2f5e4d1c32217ab46b28495ad5b2afdf63117d5/client/router.coffee
30
79