- 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 Delete View
define(['order!jQuery', 'order!jQueryUI', 'order!Underscore', 'order!Backbone'], function ($, jqueryui, _, Backbone) {
var GenreDeleteView = Backbone.View.extend({
container: "#Genre_Edit",
initialize: function () {
this.template = _.template($('#Genre-Delete-Template').html());
},
events: {
"click .Update": 'DeleteGenre',
"click .Cancel": 'CancelGenre'
},
render: function () {
$(this.container).append($(this.el).html(this.template(this.model.toJSON())));
$("input:button", $(this.el)).button();
$("#GenreEditDialog").dialog("open");
$('.ui-dialog-titlebar').hide();
var title = 'Delete Genre - ' + this.model.get('Name');
$(this.container).find('legend').html(title);
return this;
},
unrender: function () {
$(this.el).remove();
return this;
},
CancelGenre: function () {
this.unrender();
$("#GenreEditDialog").dialog("close");
},
DeleteGenre: function () {
var self = this;
this.model.destroy({ success: function () {
self.unrender();
$("#GenreEditDialog").dialog("close");
}
});
}
});
return GenreDeleteView;
});
|
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.