Last active
December 11, 2015 03:19
-
-
Save todoubled/4536762 to your computer and use it in GitHub Desktop.
Module examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{SearchError} = require '../views/search-error.coffee' | |
@onEnterError = (event, from, to, model) -> | |
new SearchError({model}).render() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.sidebar | |
width 200px | |
border-left 1px solid #ccc | |
h2 | |
font-size 18px |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section class="sidebar"> | |
<h2>{{ title }}</h2> | |
<p>{{ description }}</p> | |
</section |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{BaseView} = require './base.coffee' | |
{template} = require '../../../templates/search-error.mustache' | |
class @SearchError extends BaseView | |
id: 'error' | |
template: template | |
render: -> | |
html = Mustache.to_html @template | |
@$el.html html | |
$('#widget').after @$el | |
@model.set 'modelAttrs': ['with','several','values'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment