Work in Progress: Content Editing in Admin Section

This commit is contained in:
Robin Ward
2013-04-04 12:59:44 -04:00
parent bd0e98aec2
commit fa1ba6791b
39 changed files with 653 additions and 64 deletions
@@ -0,0 +1,25 @@
/**
This controller is used for editing site content
@class AdminSiteContentEditController
@extends Ember.ObjectController
@namespace Discourse
@module Discourse
**/
Discourse.AdminSiteContentEditController = Discourse.ObjectController.extend({
saveDisabled: function() {
if (this.get('saving')) return true;
if (this.blank('content.content')) return true;
return false;
}.property('saving', 'content.content'),
saveChanges: function() {
var controller = this;
controller.setProperties({saving: true, saved: false});
this.get('content').save().then(function () {
controller.setProperties({saving: false, saved: true});
});
}
});