ES6: Modals converted
This commit is contained in:
parent
c7330ed73f
commit
a73b22b96f
|
@ -0,0 +1,5 @@
|
|||
export default Ember.View.extend({
|
||||
elementId: 'discourse-modal',
|
||||
templateName: 'modal/modal',
|
||||
classNameBindings: [':modal', ':hidden', 'controller.modalClass']
|
||||
});
|
|
@ -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']
|
||||
});
|
||||
|
||||
|
|
@ -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')
|
||||
});
|
|
@ -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')
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
export default Discourse.ModalBodyView.extend({
|
||||
templateName: 'modal/not_activated',
|
||||
title: I18n.t('log_in')
|
||||
});
|
|
@ -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')
|
||||
});
|
Loading…
Reference in New Issue