Created
July 29, 2015 08:48
-
-
Save prrraveen/e795a310e8e26ab8f468 to your computer and use it in GitHub Desktop.
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
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# | |
# | |
# This file uses CoffeeScript Object Notation (CSON). | |
# If you are unfamiliar with CSON, you can read more about it here: | |
# https://github.com/bevry/cson#what-is-cson | |
'.source.js': | |
'View': | |
'prefix': 'vi' | |
'body': """ | |
define(['backbone', | |
], | |
function(Backbone){ | |
var Footer= Backbone.View.extend({ | |
el: '#footer', | |
child_views : [], | |
initialize : function(options){ | |
_.extend(this,options); | |
this.render(); | |
}, | |
render : function(){ | |
var template = window['JST']['templates/footer.html']; | |
this.$el.html(template); | |
this.initialize_ui(); | |
}, | |
events:{ | |
}, | |
initialize_ui : function(){ | |
} | |
}) | |
return Footer | |
}) | |
""" | |
'.source.js': | |
'View': | |
'prefix': 'col' | |
'body': """ | |
define(['backbone', | |
'search/models/Item' | |
], | |
function(Backbone, | |
Item | |
){ | |
var Items= Backbone.collection.extend({ | |
model : Item | |
}) | |
return Items | |
}) | |
""" | |
'.source.js': | |
'View': | |
'prefix': 'mod' | |
'body': """ | |
define(['backbone', | |
], | |
function(Backbone, | |
){ | |
var = Backbone.Model.extend({ | |
model : Item | |
}) | |
return | |
}) | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment