- RazorApp.zip
- RazorApp
- packages
- EntityFramework.4.1.10331.0
- EntityFramework.4.1.10331.0.nupkg
- lib
- jQuery.1.5.1
- Content
- Scripts
- jQuery.1.5.1.nupkg
- jQuery.UI.Combined.1.8.11
- Content
- Content
- themes
- base
- Scripts
- jQuery.UI.Combined.1.8.11.nupkg
- jQuery.Validation.1.8.0
- Content
- Scripts
- jQuery.Validation.1.8.0.nupkg
- jQuery.vsdoc.1.5.1
- Content
- Scripts
- jQuery.vsdoc.1.5.1.nupkg
- Modernizr.1.7
- Content
- Scripts
- Modernizr.1.7.nupkg
- repositories.config
- RazorApp.sln
- RazorApp.suo
- RazorApp
- App_Data
- ASPNETDB.MDF
- aspnetdb_log.ldf
- MvcMusicStore.sdf
- Content
- chosen.css
- images
- admin-privilege-icon.png
- chosen-sprite.png
- Home-icon.png
- home-showcase.png
- img_logo.gif
- logo.png
- placeholder.gif
- shopping-cart-icon.png
- textbox_bg.jpg
- ui-bg_flat_55_999999_40x100.png
- ui-bg_flat_75_aaaaaa_40x100.png
- ui-bg_glass_45_0078ae_1x400.png
- ui-bg_glass_55_f8da4e_1x400.png
- ui-bg_glass_75_79c9ec_1x400.png
- ui-bg_gloss-wave_45_e14f1c_500x100.png
- ui-bg_gloss-wave_50_6eac2c_500x100.png
- ui-bg_gloss-wave_75_2191c0_500x100.png
- ui-bg_gloss-wave_85_9fda58_500x100.png
- ui-bg_inset-hard_100_fcfdfd_1x100.png
- ui-icons_0078ae_256x240.png
- ui-icons_056b93_256x240.png
- ui-icons_d8e7f3_256x240.png
- ui-icons_e0fdff_256x240.png
- ui-icons_f5e175_256x240.png
- ui-icons_f7a50d_256x240.png
- ui-icons_fcd113_256x240.png
- jquery-ui-1.8.18.custom.css
- Site.css
- themes
- base
- ui.jqgrid.css
- Controllers
- Global.asax
- Global.asax.cs
- Helper
- Models
- packages.config
- Properties
- RazorApp.csproj
- RazorApp.csproj.user
- Scripts
- ViewModels
- Views
- web.config
- Web.Debug.config
- Web.Release.config
|
// Genre View - el returns the template enclosed within a tr
define(['order!jQuery', 'order!Underscore', 'order!Backbone', 'order!GenreEditView', 'order!GenreDeleteView'], function ($, _, Backbone, EditView, DeleteView) {
var GenreView = Backbone.View.extend({
tagName: "tr",
initialize: function () {
this.template = _.template($('#Genre-Template').html());
this.model.bind('change', this.render, this);
this.model.bind('remove', this.unrender, this);
},
render: function () {
$(this.el).html(this.template(this.model.toJSON()));
return this;
},
unrender: function () {
$(this.el).remove();
return this;
},
events: {
"click .Edit": 'EditGenre',
"click .Delete": 'DeleteGenre'
},
EditGenre: function () {
var editView = new EditView({ model: this.model });
editView.render();
},
DeleteGenre: function () {
var deleteView = new DeleteView({ model: this.model });
deleteView.render();
}
});
return GenreView;
});
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.