More documentation to Admin Controllers

This commit is contained in:
Robin Ward
2013-02-21 14:42:48 -05:00
parent c1b5803486
commit dd6d98f48f
6 changed files with 123 additions and 2 deletions

View File

@ -10,20 +10,41 @@
**/
window.Discourse.AdminCustomizeController = Ember.Controller.extend({
/**
Create a new customization style
@method newCustomization
**/
newCustomization: function() {
var item = Discourse.SiteCustomization.create({name: 'New Style'});
this.get('content').pushObject(item);
this.set('content.selectedItem', item);
},
/**
Select a given style
@method selectStyle
@param {Discourse.SiteCustomization} style The style we are selecting
**/
selectStyle: function(style) {
this.set('content.selectedItem', style);
},
/**
Save the current customization
@method save
**/
save: function() {
this.get('content.selectedItem').save();
},
/**
Destroy the current customization
@method destroy
**/
destroy: function() {
var _this = this;
return bootbox.confirm(Em.String.i18n("admin.customize.delete_confirm"), Em.String.i18n("no_value"), Em.String.i18n("yes_value"), function(result) {