diff --git a/app/assets/javascripts/discourse/views/modal.js.es6 b/app/assets/javascripts/discourse/views/modal.js.es6 new file mode 100644 index 00000000000..204a17e8c7b --- /dev/null +++ b/app/assets/javascripts/discourse/views/modal.js.es6 @@ -0,0 +1,5 @@ +export default Ember.View.extend({ + elementId: 'discourse-modal', + templateName: 'modal/modal', + classNameBindings: [':modal', ':hidden', 'controller.modalClass'] +}); diff --git a/app/assets/javascripts/discourse/views/modal/modal_view.js b/app/assets/javascripts/discourse/views/modal/modal_view.js deleted file mode 100644 index 6c6d2f7072b..00000000000 --- a/app/assets/javascripts/discourse/views/modal/modal_view.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - A base class for helping us display modal content - - @class ModalView - @extends Discourse.View - @namespace Discourse - @module Discourse -**/ -Discourse.ModalView = Discourse.View.extend({ - elementId: 'discourse-modal', - templateName: 'modal/modal', - classNameBindings: [':modal', ':hidden', 'controller.modalClass'] -}); - - diff --git a/app/assets/javascripts/discourse/views/modal/not_activated_view.js b/app/assets/javascripts/discourse/views/modal/not_activated_view.js deleted file mode 100644 index 817fc1c125f..00000000000 --- a/app/assets/javascripts/discourse/views/modal/not_activated_view.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - A modal view for telling a user they're not activated - - @class NotActivatedView - @extends Discourse.ModalBodyView - @namespace Discourse - @module Discourse -**/ -Discourse.NotActivatedView = Discourse.ModalBodyView.extend({ - templateName: 'modal/not_activated', - title: I18n.t('log_in') -}); diff --git a/app/assets/javascripts/discourse/views/modal/option_boolean_view.js b/app/assets/javascripts/discourse/views/modal/option_boolean_view.js deleted file mode 100644 index 5536a204f4e..00000000000 --- a/app/assets/javascripts/discourse/views/modal/option_boolean_view.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - A modal view for displaying the options for a topic archetype - - @class OptionBooleanView - @extends Discourse.View - @namespace Discourse - @module Discourse -**/ -Discourse.OptionBooleanView = Discourse.GroupedView.extend({ - classNames: ['archetype-option'], - composerControllerBinding: 'Discourse.router.composerController', - templateName: "modal/option_boolean", - - checkedChanged: (function() { - var metaData; - metaData = this.get('parentView.metaData'); - metaData.set(this.get('content.key'), this.get('checked') ? 'true' : 'false'); - return this.get('controller.controllers.composer').saveDraft(); - }).observes('checked') - -}); - - diff --git a/app/assets/javascripts/discourse/views/modal/modal_body_view.js b/app/assets/javascripts/discourse/views/modal_body_view.js similarity index 100% rename from app/assets/javascripts/discourse/views/modal/modal_body_view.js rename to app/assets/javascripts/discourse/views/modal_body_view.js diff --git a/app/assets/javascripts/discourse/views/not-activated.js.es6 b/app/assets/javascripts/discourse/views/not-activated.js.es6 new file mode 100644 index 00000000000..30f4da1172e --- /dev/null +++ b/app/assets/javascripts/discourse/views/not-activated.js.es6 @@ -0,0 +1,4 @@ +export default Discourse.ModalBodyView.extend({ + templateName: 'modal/not_activated', + title: I18n.t('log_in') +}); diff --git a/app/assets/javascripts/discourse/views/option-boolean.js.es6 b/app/assets/javascripts/discourse/views/option-boolean.js.es6 new file mode 100644 index 00000000000..813677edcdf --- /dev/null +++ b/app/assets/javascripts/discourse/views/option-boolean.js.es6 @@ -0,0 +1,11 @@ +export default Discourse.GroupedView.extend({ + classNames: ['archetype-option'], + composerControllerBinding: 'Discourse.router.composerController', + templateName: "modal/option_boolean", + + _checkedChanged: function() { + var metaData = this.get('parentView.metaData'); + metaData.set(this.get('content.key'), this.get('checked') ? 'true' : 'false'); + this.get('controller.controllers.composer').saveDraft(); + }.observes('checked') +});