This file contains 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
var ContactView = Backbone.View.extend({ | |
render: function() { | |
// HTMLテンプレートを取得する | |
var template = $('#contact-template').html(); | |
// HTMLテンプレートにモデルのデータを適用する | |
// モデルのtoJSON()メソッドを使って属性を | |
// オブジェクトの形式で書き出す | |
var compiled = _.template(template) | |
var html = compiled(this.model.toJSON()); | |
// 自身が保持しているDOM要素を更新する |
This file contains 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
var ContactView = Backbone.View.extend({ | |
template: '<div>Name: <%= firstName %> <%= lastName %></div>' + | |
'<div>Email: <%= email %></div>', | |
render: function() { | |
var compiled = _.template(this.template); | |
var html = compiled(this.model.toJSON()); | |
this.$el.html(html); | |
return this; | |
} |
This file contains 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
var Todo = Backbone.Model.extend({ | |
defaults: { | |
title: '', | |
completed: false | |
} | |
}); | |
var TodoView = Backbone.View.extend({ | |
template: '<label>' + | |
' <input class="toggle" type="checkbox">' + |
This file contains 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
App.NoteListItemView = Backbone.View.extend({ | |
tagName: 'tr', | |
initialize: function() { | |
// モデルのdestroyイベントを監視して | |
// Backbone.Viewのremove()メソッドを呼び出す | |
this.listenTo(this.model, 'destroy', this.remove); | |
}, | |
// [Delete]ボタンを監視して | |
// onClickDelete()メソッドを呼び出す | |
events: { |
This file contains 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
// js/note_detail.js | |
App.NoteDetailView = Backbone.View.extend({ | |
render: function() { | |
var template = $('#noteDetailView-template').html(); | |
var compiled = _.template(template); | |
var html = compiled(this.model.toJSON()); | |
this.$el.html(html); | |
return this; | |
} |
This file contains 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
--- a/autoload/zencoding.vim | |
+++ b/autoload/zencoding.vim | |
@@ -456,7 +456,11 @@ function! s:zen_toString_html(settings, current, type, inline, filters, itemno, | |
else | |
if inline == 0 | |
if stridx(','.settings.html.empty_elements.',', ','.current.name.',') != -1 | |
- let str .= " />\n" | |
+ if &ft != 'xhtml' | |
+ let str .= ">\n" | |
+ else |
This file contains 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
/*! | |
Copyright (c) 2010, Yahoo! Inc. All rights reserved. | |
Code licensed under the BSD License: | |
http://developer.yahoo.com/yui/license.html | |
version: 3.3.0 | |
build: 3167 | |
*/ | |
html { | |
color: #000; | |
background: #FFF; } |
This file contains 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
@mixin clearfix { | |
clear: both; | |
zoom: 1; | |
&:after { | |
content: "."; | |
display: block; | |
height: 0; | |
clear: both; |
This file contains 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
/*! | |
Variable Grid System. | |
Learn more ~ http://www.spry-soft.com/grids/ | |
Based on 960 Grid System - http://960.gs/ | |
Licensed under GPL and MIT. | |
*/ | |
// Containers | |
//---------------------------------------------------------------------------------------------------- |
This file contains 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
cd /d C:\cygwin\bin | |
ash rebaseall -v | |
pause |
OlderNewer