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 = ->
$('link[rel="stylesheet"]').remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onBeforeAction hide_non_admin_stuff,
only: (Houston._houstonize_route(name) for name in ['home', 'collecti... | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 3efbe30627513d8da60d3ebff27d21c445e70208 | 802 | https://github.com/gterrono/houston/blob/3efbe30627513d8da60d3ebff27d21c445e70208/client/router.coffee | 94 | 105 | ||
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()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onBeforeAction hide_non_admin_stuff,
only: (Houst... | var name, onRouteNotFound, remove_host_css;
remove_host_css = function() {
return $('link[rel="stylesheet"]').remove();
};
Router.onBeforeAction(mustBeAdmin, {
only: (function() {
var i, len, ref, results;
ref = ['home', 'collection', 'document', 'change_password'];
results = [];
for (i = 0, len =... | CoffeeScript | JavaScript | gterrono/houston | client/router.coffee | MIT | 3efbe30627513d8da60d3ebff27d21c445e70208 | 802 | https://github.com/gterrono/houston/blob/3efbe30627513d8da60d3ebff27d21c445e70208/client/router.coffee | 94 | 105 |
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() {
return $('link[rel="stylesheet"]').remove();
};
Router.onBeforeAction(mustBeAdmin, {
only: (function() {
var i, len, ref, results;
ref = ['home', 'collection', 'document', 'cha... | remove_host_css = ->
$('link[rel="stylesheet"]').remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onBeforeAction hide_non_admin_stuff,
only: (Houston._houstonize_route(name) for name in ['home', 'collecti... | JavaScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 3efbe30627513d8da60d3ebff27d21c445e70208 | 802 | https://github.com/gterrono/houston/blob/3efbe30627513d8da60d3ebff27d21c445e70208/client/router.coffee | 94 | 105 |
gterrono/houston:client/router.coffee:8:completion | completion | remove_host_css = ->
$('link[rel="stylesheet"]').remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password']) | Router.onBeforeAction hide_non_admin_stuff,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'login', 'custom_template'])
Router.onBeforeAction remove_host_css,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'login'])
onRouteNotFound = Rou... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 3efbe30627513d8da60d3ebff27d21c445e70208 | 802 | https://github.com/gterrono/houston/blob/3efbe30627513d8da60d3ebff27d21c445e70208/client/router.coffee | 94 | 105 |
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 | 8d61dce66ac5c045fd5ee4bcdcbc3d4b4d101643 | 802 | https://github.com/gterrono/houston/blob/8d61dce66ac5c045fd5ee4bcdcbc3d4b4d101643/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 | 8d61dce66ac5c045fd5ee4bcdcbc3d4b4d101643 | 802 | https://github.com/gterrono/houston/blob/8d61dce66ac5c045fd5ee4bcdcbc3d4b4d101643/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 | 8d61dce66ac5c045fd5ee4bcdcbc3d4b4d101643 | 802 | https://github.com/gterrono/houston/blob/8d61dce66ac5c045fd5ee4bcdcbc3d4b4d101643/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 'custom_template',
houston_path: "/:template"
template: 'custom_template_view'
data: -> this.params
houston_route 'change_password',
houston_path: "/password",
template: 'change_password'
houston_route 'collection',
houston_path: "/collection/:name"
data: ->
[collec... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 8d61dce66ac5c045fd5ee4bcdcbc3d4b4d101643 | 802 | https://github.com/gterrono/houston/blob/8d61dce66ac5c045fd5ee4bcdcbc3d4b4d101643/client/router.coffee | 30 | 79 |
gterrono/houston:client/router.coffee:6:raw_corpus | raw_corpus | mustBeAdmin = ->
if @ready() and not Houston._user_is_admin Meteor.userId()
@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 | 8bade252328ab001d5cbc6003f04cdba9b292367 | 802 | https://github.com/gterrono/houston/blob/8bade252328ab001d5cbc6003f04cdba9b292367/client/router.coffee | 85 | 90 | ||
gterrono/houston:client/router.coffee:6:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
mustBeAdmin = ->
if @ready() and not Houston._user_is_admin Meteor.userId()
@stop()
Houston._go 'login'
# If the host app doesn't have a router, their html may show up
``` | var mustBeAdmin;
mustBeAdmin = function() {
if (this.ready() && !Houston._user_is_admin(Meteor.userId())) {
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 | 8bade252328ab001d5cbc6003f04cdba9b292367 | 802 | https://github.com/gterrono/houston/blob/8bade252328ab001d5cbc6003f04cdba9b292367/client/router.coffee | 85 | 90 |
gterrono/houston:client/router.coffee:6:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var mustBeAdmin;
mustBeAdmin = function() {
if (this.ready() && !Houston._user_is_admin(Meteor.userId())) {
this.stop();
return Houston._go('login');
}
};
// If the host app doesn't have a router, their html may show up
``` | mustBeAdmin = ->
if @ready() and not Houston._user_is_admin Meteor.userId()
@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 | 8bade252328ab001d5cbc6003f04cdba9b292367 | 802 | https://github.com/gterrono/houston/blob/8bade252328ab001d5cbc6003f04cdba9b292367/client/router.coffee | 85 | 90 |
gterrono/houston:client/router.coffee:6:completion | completion | mustBeAdmin = ->
if @ready() and not Houston._user_is_admin Meteor.userId()
@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 | 8bade252328ab001d5cbc6003f04cdba9b292367 | 802 | https://github.com/gterrono/houston/blob/8bade252328ab001d5cbc6003f04cdba9b292367/client/router.coffee | 85 | 90 |
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 | 3f9d71d3b19f7770abaaef85e8d836d9122d71b7 | 802 | https://github.com/gterrono/houston/blob/3f9d71d3b19f7770abaaef85e8d836d9122d71b7/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 | 3f9d71d3b19f7770abaaef85e8d836d9122d71b7 | 802 | https://github.com/gterrono/houston/blob/3f9d71d3b19f7770abaaef85e8d836d9122d71b7/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 | 3f9d71d3b19f7770abaaef85e8d836d9122d71b7 | 802 | https://github.com/gterrono/houston/blob/3f9d71d3b19f7770abaaef85e8d836d9122d71b7/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 'custom_template',
houston_path: "/:template"
template: 'custom_template_view'
data: -> this.params
houston_route 'change_password',
houston_path: "/password",
template: 'change_password'
houston_route 'collection',
houston_path: "/collection/:name"
data: ->
[collec... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 3f9d71d3b19f7770abaaef85e8d836d9122d71b7 | 802 | https://github.com/gterrono/houston/blob/3f9d71d3b19f7770abaaef85e8d836d9122d71b7/client/router.coffee | 30 | 79 |
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 | 9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433 | 802 | https://github.com/gterrono/houston/blob/9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433/client/router.coffee | 28 | 77 | ||
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 | 9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433 | 802 | https://github.com/gterrono/houston/blob/9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433/client/router.coffee | 28 | 77 |
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 | 9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433 | 802 | https://github.com/gterrono/houston/blob/9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433/client/router.coffee | 28 | 77 |
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... | path: '/admin/:template'
template: 'custom_template_view'
data: -> this.params
houston_route 'change_password',
path: '/admin/password',
template: 'change_password'
houston_route 'collection',
path: '/admin/collection/:name'
data: ->
[collection, @subscription] = setup_collection(@p... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433 | 802 | https://github.com/gterrono/houston/blob/9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433/client/router.coffee | 28 | 77 |
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 | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433 | 802 | https://github.com/gterrono/houston/blob/9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433/client/router.coffee | 88 | 96 | ||
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
``` | var hide_non_admin_stuff;
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');
};
return ... | CoffeeScript | JavaScript | gterrono/houston | client/router.coffee | MIT | 9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433 | 802 | https://github.com/gterrono/houston/blob/9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433/client/router.coffee | 88 | 96 |
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() {
var func;
$('body').hide();
func = function() {
$('body').show();
$('body').children().hide();
$('body>.houston').show();
$('body').css('visibility', 'hidden');
return $('body>... | 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 | JavaScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433 | 802 | https://github.com/gterrono/houston/blob/9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433/client/router.coffee | 88 | 96 |
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 | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433 | 802 | https://github.com/gterrono/houston/blob/9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433/client/router.coffee | 88 | 96 |
gterrono/houston:client/router.coffee:8:raw_corpus | raw_corpus | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onBeforeAction hide_non_admin_stuff,
only: (Ho... | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433 | 802 | https://github.com/gterrono/houston/blob/9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433/client/router.coffee | 98 | 112 | ||
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)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password']... | var name, onRouteNotFound, remove_host_css;
remove_host_css = function() {
var $link, $links, i, len, link, results;
$links = $('link[rel="stylesheet"]');
results = [];
for (i = 0, len = $links.length; i < len; i++) {
link = $links[i];
$link = $(link);
results.push($link.remove());
}
return res... | CoffeeScript | JavaScript | gterrono/houston | client/router.coffee | MIT | 9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433 | 802 | https://github.com/gterrono/houston/blob/9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433/client/router.coffee | 98 | 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;
remove_host_css = function() {
var $link, $links, i, len, link, results;
$links = $('link[rel="stylesheet"]');
results = [];
for (i = 0, len = $links.length; i < len; i++) {
link = $links[i];
$link = $(li... | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onBeforeAction hide_non_admin_stuff,
only: (Ho... | JavaScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433 | 802 | https://github.com/gterrono/houston/blob/9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433/client/router.coffee | 98 | 112 |
gterrono/houston:client/router.coffee:8:completion | completion | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove() | Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onBeforeAction hide_non_admin_stuff,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'login', 'custom_template'])
Router.onBeforeA... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433 | 802 | https://github.com/gterrono/houston/blob/9a8b88f2ba0a400826ec739b6f5ba5cbd2fac433/client/router.coffee | 98 | 112 |
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)
optio... | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 8b20cd6f68dd15a04adbebae9fecb3164941866a | 802 | https://github.com/gterrono/houston/blob/8b20cd6f68dd15a04adbebae9fecb3164941866a/client/router.coffee | 32 | 81 | ||
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.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 | 8b20cd6f68dd15a04adbebae9fecb3164941866a | 802 | https://github.com/gterrono/houston/blob/8b20cd6f68dd15a04adbebae9fecb3164941866a/client/router.coffee | 32 | 81 |
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)
optio... | JavaScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 8b20cd6f68dd15a04adbebae9fecb3164941866a | 802 | https://github.com/gterrono/houston/blob/8b20cd6f68dd15a04adbebae9fecb3164941866a/client/router.coffee | 32 | 81 |
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)
optio... | houston_route 'custom_template',
houston_path: "/:template"
template: 'custom_template_view'
data: -> this.params
houston_route 'change_password',
houston_path: "/password",
template: 'change_password'
houston_route 'collection',
houston_path: "/collection/:name"
data: ->
[collec... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 8b20cd6f68dd15a04adbebae9fecb3164941866a | 802 | https://github.com/gterrono/houston/blob/8b20cd6f68dd15a04adbebae9fecb3164941866a/client/router.coffee | 32 | 81 |
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)
optio... | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 6136558ff485fe3bff30d1d6745b33b539e3171b | 802 | https://github.com/gterrono/houston/blob/6136558ff485fe3bff30d1d6745b33b539e3171b/client/router.coffee | 32 | 81 | ||
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.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 | 6136558ff485fe3bff30d1d6745b33b539e3171b | 802 | https://github.com/gterrono/houston/blob/6136558ff485fe3bff30d1d6745b33b539e3171b/client/router.coffee | 32 | 81 |
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)
optio... | JavaScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 6136558ff485fe3bff30d1d6745b33b539e3171b | 802 | https://github.com/gterrono/houston/blob/6136558ff485fe3bff30d1d6745b33b539e3171b/client/router.coffee | 32 | 81 |
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)
optio... | houston_route 'custom_template',
houston_path: "/:template"
template: 'custom_template_view'
data: -> this.params
houston_route 'change_password',
houston_path: "/password",
template: 'change_password'
houston_route 'collection',
houston_path: "/collection/:name"
data: ->
[collec... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 6136558ff485fe3bff30d1d6745b33b539e3171b | 802 | https://github.com/gterrono/houston/blob/6136558ff485fe3bff30d1d6745b33b539e3171b/client/router.coffee | 32 | 81 |
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 | a961d3e6ec85cbbf1287ddda49af56dd006cdc31 | 802 | https://github.com/gterrono/houston/blob/a961d3e6ec85cbbf1287ddda49af56dd006cdc31/client/router.coffee | 30 | 79 | ||
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 | a961d3e6ec85cbbf1287ddda49af56dd006cdc31 | 802 | https://github.com/gterrono/houston/blob/a961d3e6ec85cbbf1287ddda49af56dd006cdc31/client/router.coffee | 30 | 79 |
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 | a961d3e6ec85cbbf1287ddda49af56dd006cdc31 | 802 | https://github.com/gterrono/houston/blob/a961d3e6ec85cbbf1287ddda49af56dd006cdc31/client/router.coffee | 30 | 79 |
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 'custom_template',
path: '/admin/:template'
template: 'custom_template_view'
data: -> this.params
houston_route 'change_password',
path: '/admin/password',
template: 'change_password'
houston_route 'collection',
path: '/admin/collection/:name'
data: ->
[collection,... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | a961d3e6ec85cbbf1287ddda49af56dd006cdc31 | 802 | https://github.com/gterrono/houston/blob/a961d3e6ec85cbbf1287ddda49af56dd006cdc31/client/router.coffee | 30 | 79 |
gterrono/houston:client/router.coffee:2:raw_corpus | raw_corpus | Houston._subscribe = (name) -> Meteor.subscribe Houston._houstonize name
Houston._subscribe 'collections'
Houston._subscribe 'admin_user' | CoffeeScript | gterrono/houston | client/router.coffee | MIT | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 6 | 9 | ||
gterrono/houston:client/router.coffee:2:coffee_to_js | coffee_to_js | Convert this CoffeeScript to JavaScript.
```coffeescript
Houston._subscribe = (name) -> Meteor.subscribe Houston._houstonize name
Houston._subscribe 'collections'
Houston._subscribe 'admin_user'
``` | Houston._subscribe = function(name) {
return Meteor.subscribe(Houston._houstonize(name));
};
Houston._subscribe('collections');
Houston._subscribe('admin_user'); | CoffeeScript | JavaScript | gterrono/houston | client/router.coffee | MIT | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 6 | 9 |
gterrono/houston:client/router.coffee:2:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
Houston._subscribe = function(name) {
return Meteor.subscribe(Houston._houstonize(name));
};
Houston._subscribe('collections');
Houston._subscribe('admin_user');
``` | Houston._subscribe = (name) -> Meteor.subscribe Houston._houstonize name
Houston._subscribe 'collections'
Houston._subscribe 'admin_user' | JavaScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 6 | 9 |
gterrono/houston:client/router.coffee:2:completion | completion | Houston._subscribe = (name) -> Meteor.subscribe Houston._houstonize name | Houston._subscribe 'collections'
Houston._subscribe 'admin_user' | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 6 | 9 |
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)
optio... | CoffeeScript | gterrono/houston | client/router.coffee | MIT | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 33 | 82 | ||
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.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 | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 33 | 82 |
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)
optio... | JavaScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 33 | 82 |
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)
optio... | data: -> this.params
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
... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 33 | 82 |
gterrono/houston:client/router.coffee:7: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'
# If the host app doesn't have a router, their html may show up | CoffeeScript | gterrono/houston | client/router.coffee | MIT | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 84 | 90 | ||
gterrono/houston:client/router.coffee:7: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'
# 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())) {
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 | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 84 | 90 |
gterrono/houston:client/router.coffee:7: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())) {
this.stop();
return Houston._go('login');
}
}
};
// If the host app doesn't ha... | mustBeAdmin = ->
unless Meteor.loggingIn() # don't check for admin user until ready
unless Houston._user_is_admin Meteor.userId()
@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 | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 84 | 90 |
gterrono/houston:client/router.coffee:7: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'
# If the host app doesn't have a router, their html may show up | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 84 | 90 |
gterrono/houston:client/router.coffee:9:raw_corpus | raw_corpus | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onAfterAction hide_non_admin_stuff,
only: (Hou... | CoffeeScript | gterrono/houston | client/router.coffee | MIT | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 101 | 115 | ||
gterrono/houston:client/router.coffee:9: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)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password']... | var name, onRouteNotFound, remove_host_css;
remove_host_css = function() {
var $link, $links, i, len, link, results;
$links = $('link[rel="stylesheet"]');
results = [];
for (i = 0, len = $links.length; i < len; i++) {
link = $links[i];
$link = $(link);
results.push($link.remove());
}
return res... | CoffeeScript | JavaScript | gterrono/houston | client/router.coffee | MIT | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 101 | 115 |
gterrono/houston:client/router.coffee:9:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var name, onRouteNotFound, remove_host_css;
remove_host_css = function() {
var $link, $links, i, len, link, results;
$links = $('link[rel="stylesheet"]');
results = [];
for (i = 0, len = $links.length; i < len; i++) {
link = $links[i];
$link = $(li... | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onAfterAction hide_non_admin_stuff,
only: (Hou... | JavaScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 101 | 115 |
gterrono/houston:client/router.coffee:9:completion | completion | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove() | Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onAfterAction hide_non_admin_stuff,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'login', 'custom_template'])
Router.onBeforeAc... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | b6f8d01f951743c5f438e66867caf631df3b7674 | 802 | https://github.com/gterrono/houston/blob/b6f8d01f951743c5f438e66867caf631df3b7674/client/router.coffee | 101 | 115 |
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 | 4ad5422202b7580629b181c27b013e5ebbcfbc05 | 802 | https://github.com/gterrono/houston/blob/4ad5422202b7580629b181c27b013e5ebbcfbc05/client/router.coffee | 31 | 80 | ||
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 | 4ad5422202b7580629b181c27b013e5ebbcfbc05 | 802 | https://github.com/gterrono/houston/blob/4ad5422202b7580629b181c27b013e5ebbcfbc05/client/router.coffee | 31 | 80 |
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 | 4ad5422202b7580629b181c27b013e5ebbcfbc05 | 802 | https://github.com/gterrono/houston/blob/4ad5422202b7580629b181c27b013e5ebbcfbc05/client/router.coffee | 31 | 80 |
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... | data: -> this.params
houston_route 'change_password',
path: '/admin/password',
template: 'change_password'
houston_route 'collection',
path: '/admin/collection/:name'
data: ->
[collection, @subscription] = setup_collection(@params.name)
{collection}
waitOn: -> @subscription
te... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 4ad5422202b7580629b181c27b013e5ebbcfbc05 | 802 | https://github.com/gterrono/houston/blob/4ad5422202b7580629b181c27b013e5ebbcfbc05/client/router.coffee | 31 | 80 |
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 | 52a830f4a5e167270112ca48cee8fc5f67d8d718 | 802 | https://github.com/gterrono/houston/blob/52a830f4a5e167270112ca48cee8fc5f67d8d718/client/router.coffee | 31 | 80 | ||
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 | 52a830f4a5e167270112ca48cee8fc5f67d8d718 | 802 | https://github.com/gterrono/houston/blob/52a830f4a5e167270112ca48cee8fc5f67d8d718/client/router.coffee | 31 | 80 |
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 | 52a830f4a5e167270112ca48cee8fc5f67d8d718 | 802 | https://github.com/gterrono/houston/blob/52a830f4a5e167270112ca48cee8fc5f67d8d718/client/router.coffee | 31 | 80 |
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... | data: -> this.params
houston_route 'change_password',
path: '/admin/password',
template: 'change_password'
houston_route 'collection',
path: '/admin/collection/:name'
data: ->
[collection, @subscription] = setup_collection(@params.name)
{collection}
waitOn: -> @subscription
te... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 52a830f4a5e167270112ca48cee8fc5f67d8d718 | 802 | https://github.com/gterrono/houston/blob/52a830f4a5e167270112ca48cee8fc5f67d8d718/client/router.coffee | 31 | 80 |
gterrono/houston:client/router.coffee:9:raw_corpus | raw_corpus | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onAfterAction hide_non_admin_stuff,
only: (Hou... | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 52a830f4a5e167270112ca48cee8fc5f67d8d718 | 802 | https://github.com/gterrono/houston/blob/52a830f4a5e167270112ca48cee8fc5f67d8d718/client/router.coffee | 100 | 114 | ||
gterrono/houston:client/router.coffee:9: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)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password']... | var name, onRouteNotFound, remove_host_css;
remove_host_css = function() {
var $link, $links, i, len, link, results;
$links = $('link[rel="stylesheet"]');
results = [];
for (i = 0, len = $links.length; i < len; i++) {
link = $links[i];
$link = $(link);
results.push($link.remove());
}
return res... | CoffeeScript | JavaScript | gterrono/houston | client/router.coffee | MIT | 52a830f4a5e167270112ca48cee8fc5f67d8d718 | 802 | https://github.com/gterrono/houston/blob/52a830f4a5e167270112ca48cee8fc5f67d8d718/client/router.coffee | 100 | 114 |
gterrono/houston:client/router.coffee:9:js_to_coffee | js_to_coffee | Convert this JavaScript to CoffeeScript.
```javascript
var name, onRouteNotFound, remove_host_css;
remove_host_css = function() {
var $link, $links, i, len, link, results;
$links = $('link[rel="stylesheet"]');
results = [];
for (i = 0, len = $links.length; i < len; i++) {
link = $links[i];
$link = $(li... | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onAfterAction hide_non_admin_stuff,
only: (Hou... | JavaScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 52a830f4a5e167270112ca48cee8fc5f67d8d718 | 802 | https://github.com/gterrono/houston/blob/52a830f4a5e167270112ca48cee8fc5f67d8d718/client/router.coffee | 100 | 114 |
gterrono/houston:client/router.coffee:9:completion | completion | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove() | Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onAfterAction hide_non_admin_stuff,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'login', 'template'])
Router.onBeforeAction re... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 52a830f4a5e167270112ca48cee8fc5f67d8d718 | 802 | https://github.com/gterrono/houston/blob/52a830f4a5e167270112ca48cee8fc5f67d8d718/client/router.coffee | 100 | 114 |
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 | 3b36d0a20ae09055b0e2f0a4acff7c7266546248 | 802 | https://github.com/gterrono/houston/blob/3b36d0a20ae09055b0e2f0a4acff7c7266546248/client/router.coffee | 31 | 77 | ||
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 | 3b36d0a20ae09055b0e2f0a4acff7c7266546248 | 802 | https://github.com/gterrono/houston/blob/3b36d0a20ae09055b0e2f0a4acff7c7266546248/client/router.coffee | 31 | 77 |
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 | 3b36d0a20ae09055b0e2f0a4acff7c7266546248 | 802 | https://github.com/gterrono/houston/blob/3b36d0a20ae09055b0e2f0a4acff7c7266546248/client/router.coffee | 31 | 77 |
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... | path: '/admin/:template'
template: 'custom_template_view'
data: -> this.params
houston_route 'collection',
path: '/admin/collection/:name'
data: ->
[collection, @subscription] = setup_collection(@params.name)
{collection}
waitOn: -> @subscription
template: 'collection_view'
hou... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 3b36d0a20ae09055b0e2f0a4acff7c7266546248 | 802 | https://github.com/gterrono/houston/blob/3b36d0a20ae09055b0e2f0a4acff7c7266546248/client/router.coffee | 31 | 77 |
gterrono/houston:client/router.coffee:8:raw_corpus | raw_corpus | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$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 na... | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 3b36d0a20ae09055b0e2f0a4acff7c7266546248 | 802 | https://github.com/gterrono/houston/blob/3b36d0a20ae09055b0e2f0a4acff7c7266546248/client/router.coffee | 95 | 109 | ||
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)
$link.remove()
Router.before mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document'])
Router.after hide_non_adm... | var name, onRouteNotFound, remove_host_css;
remove_host_css = function() {
var $link, $links, i, len, link, results;
$links = $('link[rel="stylesheet"]');
results = [];
for (i = 0, len = $links.length; i < len; i++) {
link = $links[i];
$link = $(link);
results.push($link.remove());
}
return res... | CoffeeScript | JavaScript | gterrono/houston | client/router.coffee | MIT | 3b36d0a20ae09055b0e2f0a4acff7c7266546248 | 802 | https://github.com/gterrono/houston/blob/3b36d0a20ae09055b0e2f0a4acff7c7266546248/client/router.coffee | 95 | 109 |
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, $links, i, len, link, results;
$links = $('link[rel="stylesheet"]');
results = [];
for (i = 0, len = $links.length; i < len; i++) {
link = $links[i];
$link = $(li... | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$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 na... | JavaScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 3b36d0a20ae09055b0e2f0a4acff7c7266546248 | 802 | https://github.com/gterrono/houston/blob/3b36d0a20ae09055b0e2f0a4acff7c7266546248/client/router.coffee | 95 | 109 |
gterrono/houston:client/router.coffee:8:completion | completion | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$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.before remove_host_css,
only: (Houston._houstonize_route(name)... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 3b36d0a20ae09055b0e2f0a4acff7c7266546248 | 802 | https://github.com/gterrono/houston/blob/3b36d0a20ae09055b0e2f0a4acff7c7266546248/client/router.coffee | 95 | 109 |
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 | 25925c56b42caad1bc04439f4c5aa22d19e7aa78 | 802 | https://github.com/gterrono/houston/blob/25925c56b42caad1bc04439f4c5aa22d19e7aa78/client/router.coffee | 31 | 76 | ||
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 | 25925c56b42caad1bc04439f4c5aa22d19e7aa78 | 802 | https://github.com/gterrono/houston/blob/25925c56b42caad1bc04439f4c5aa22d19e7aa78/client/router.coffee | 31 | 76 |
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 | 25925c56b42caad1bc04439f4c5aa22d19e7aa78 | 802 | https://github.com/gterrono/houston/blob/25925c56b42caad1bc04439f4c5aa22d19e7aa78/client/router.coffee | 31 | 76 |
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... | path: '/admin/password',
template: 'change_password'
houston_route 'collection',
path: '/admin/:name'
data: ->
[collection, @subscription] = setup_collection(@params.name)
{collection}
waitOn: -> @subscription
template: 'collection_view'
houston_route 'document',
path: '/admin/... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 25925c56b42caad1bc04439f4c5aa22d19e7aa78 | 802 | https://github.com/gterrono/houston/blob/25925c56b42caad1bc04439f4c5aa22d19e7aa78/client/router.coffee | 31 | 76 |
gterrono/houston:client/router.coffee:8:raw_corpus | raw_corpus | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onAfterAction hide_non_admin_stuff,
only: (Hou... | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 25925c56b42caad1bc04439f4c5aa22d19e7aa78 | 802 | https://github.com/gterrono/houston/blob/25925c56b42caad1bc04439f4c5aa22d19e7aa78/client/router.coffee | 94 | 108 | ||
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)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password']... | var name, onRouteNotFound, remove_host_css;
remove_host_css = function() {
var $link, $links, i, len, link, results;
$links = $('link[rel="stylesheet"]');
results = [];
for (i = 0, len = $links.length; i < len; i++) {
link = $links[i];
$link = $(link);
results.push($link.remove());
}
return res... | CoffeeScript | JavaScript | gterrono/houston | client/router.coffee | MIT | 25925c56b42caad1bc04439f4c5aa22d19e7aa78 | 802 | https://github.com/gterrono/houston/blob/25925c56b42caad1bc04439f4c5aa22d19e7aa78/client/router.coffee | 94 | 108 |
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, $links, i, len, link, results;
$links = $('link[rel="stylesheet"]');
results = [];
for (i = 0, len = $links.length; i < len; i++) {
link = $links[i];
$link = $(li... | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onAfterAction hide_non_admin_stuff,
only: (Hou... | JavaScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 25925c56b42caad1bc04439f4c5aa22d19e7aa78 | 802 | https://github.com/gterrono/houston/blob/25925c56b42caad1bc04439f4c5aa22d19e7aa78/client/router.coffee | 94 | 108 |
gterrono/houston:client/router.coffee:8:completion | completion | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove() | Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'change_password'])
Router.onAfterAction hide_non_admin_stuff,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'login'])
Router.onBeforeAction remove_host_cs... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | 25925c56b42caad1bc04439f4c5aa22d19e7aa78 | 802 | https://github.com/gterrono/houston/blob/25925c56b42caad1bc04439f4c5aa22d19e7aa78/client/router.coffee | 94 | 108 |
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 | c96672b139065306bafc752df762ed5a0b33d3e1 | 802 | https://github.com/gterrono/houston/blob/c96672b139065306bafc752df762ed5a0b33d3e1/client/router.coffee | 31 | 72 | ||
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 | c96672b139065306bafc752df762ed5a0b33d3e1 | 802 | https://github.com/gterrono/houston/blob/c96672b139065306bafc752df762ed5a0b33d3e1/client/router.coffee | 31 | 72 |
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 | c96672b139065306bafc752df762ed5a0b33d3e1 | 802 | https://github.com/gterrono/houston/blob/c96672b139065306bafc752df762ed5a0b33d3e1/client/router.coffee | 31 | 72 |
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: ->
[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 | c96672b139065306bafc752df762ed5a0b33d3e1 | 802 | https://github.com/gterrono/houston/blob/c96672b139065306bafc752df762ed5a0b33d3e1/client/router.coffee | 31 | 72 |
gterrono/houston:client/router.coffee:8:raw_corpus | raw_corpus | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document'])
Router.onAfterAction hide_non_admin_stuff,
only: (Houston._houstonize_ro... | CoffeeScript | gterrono/houston | client/router.coffee | MIT | c96672b139065306bafc752df762ed5a0b33d3e1 | 802 | https://github.com/gterrono/houston/blob/c96672b139065306bafc752df762ed5a0b33d3e1/client/router.coffee | 90 | 104 | ||
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)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document'])
Router.onAfterAct... | var name, onRouteNotFound, remove_host_css;
remove_host_css = function() {
var $link, $links, i, len, link, results;
$links = $('link[rel="stylesheet"]');
results = [];
for (i = 0, len = $links.length; i < len; i++) {
link = $links[i];
$link = $(link);
results.push($link.remove());
}
return res... | CoffeeScript | JavaScript | gterrono/houston | client/router.coffee | MIT | c96672b139065306bafc752df762ed5a0b33d3e1 | 802 | https://github.com/gterrono/houston/blob/c96672b139065306bafc752df762ed5a0b33d3e1/client/router.coffee | 90 | 104 |
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, $links, i, len, link, results;
$links = $('link[rel="stylesheet"]');
results = [];
for (i = 0, len = $links.length; i < len; i++) {
link = $links[i];
$link = $(li... | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove()
Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document'])
Router.onAfterAction hide_non_admin_stuff,
only: (Houston._houstonize_ro... | JavaScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | c96672b139065306bafc752df762ed5a0b33d3e1 | 802 | https://github.com/gterrono/houston/blob/c96672b139065306bafc752df762ed5a0b33d3e1/client/router.coffee | 90 | 104 |
gterrono/houston:client/router.coffee:8:completion | completion | remove_host_css = ->
$links = $('link[rel="stylesheet"]')
for link in $links
$link = $(link)
$link.remove() | Router.onBeforeAction mustBeAdmin,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document'])
Router.onAfterAction hide_non_admin_stuff,
only: (Houston._houstonize_route(name) for name in ['home', 'collection', 'document', 'login'])
Router.onBeforeAction remove_host_css,
only: (Houston... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | c96672b139065306bafc752df762ed5a0b33d3e1 | 802 | https://github.com/gterrono/houston/blob/c96672b139065306bafc752df762ed5a0b33d3e1/client/router.coffee | 90 | 104 |
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 | dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25 | 802 | https://github.com/gterrono/houston/blob/dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25/client/router.coffee | 31 | 77 | ||
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 | dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25 | 802 | https://github.com/gterrono/houston/blob/dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25/client/router.coffee | 31 | 77 |
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 | dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25 | 802 | https://github.com/gterrono/houston/blob/dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25/client/router.coffee | 31 | 77 |
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... | path: '/admin/:name'
data: ->
[collection, @subscription] = setup_collection(@params.name)
{collection}
waitOn: -> @subscription
template: 'collection_view'
houston_route 'template',
path: '/admin/view/:template'
template: 'template_view'
data: -> this.params
houston_route 'doc... | CoffeeScript | CoffeeScript | gterrono/houston | client/router.coffee | MIT | dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25 | 802 | https://github.com/gterrono/houston/blob/dc9f1e32235e505b7bf3a0d9f77b3ca05c460a25/client/router.coffee | 31 | 77 |
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 | 69ca8b2b2bec6e22dbd8865f7c4f448eff6b5bba | 802 | https://github.com/gterrono/houston/blob/69ca8b2b2bec6e22dbd8865f7c4f448eff6b5bba/client/router.coffee | 31 | 72 | ||
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 | 69ca8b2b2bec6e22dbd8865f7c4f448eff6b5bba | 802 | https://github.com/gterrono/houston/blob/69ca8b2b2bec6e22dbd8865f7c4f448eff6b5bba/client/router.coffee | 31 | 72 |
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 | 69ca8b2b2bec6e22dbd8865f7c4f448eff6b5bba | 802 | https://github.com/gterrono/houston/blob/69ca8b2b2bec6e22dbd8865f7c4f448eff6b5bba/client/router.coffee | 31 | 72 |
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: ->
[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 | 69ca8b2b2bec6e22dbd8865f7c4f448eff6b5bba | 802 | https://github.com/gterrono/houston/blob/69ca8b2b2bec6e22dbd8865f7c4f448eff6b5bba/client/router.coffee | 31 | 72 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.