Remove the last of the `ModalBodyView` uses
This commit is contained in:
parent
c9af4b839e
commit
06254d3163
|
@ -59,7 +59,6 @@
|
|||
//= require ./discourse/models/user-badge
|
||||
//= require ./discourse/controllers/discovery-sortable
|
||||
//= require ./discourse/controllers/navigation/default
|
||||
//= require ./discourse/views/modal-body
|
||||
//= require ./discourse/components/edit-category-panel
|
||||
//= require ./discourse/components/dropdown-button
|
||||
//= require ./discourse/components/notifications-button
|
||||
|
|
|
@ -22,8 +22,6 @@ export default Ember.Component.extend({
|
|||
}
|
||||
}
|
||||
|
||||
this.appEvents.trigger('modal:body-shown', {
|
||||
title: this.get('title')
|
||||
});
|
||||
this.appEvents.trigger('modal:body-shown', this.getProperties('title'));
|
||||
}
|
||||
});
|
||||
|
|
|
@ -18,7 +18,7 @@ export default function(name, opts) {
|
|||
} else {
|
||||
const templateName = opts.templateName || Ember.String.dasherize(name);
|
||||
|
||||
const renderArgs = { into: 'modal', outlet: 'modalBody', view: 'modal-body'};
|
||||
const renderArgs = { into: 'modal', outlet: 'modalBody'};
|
||||
if (controller) { renderArgs.controller = controllerName; }
|
||||
|
||||
const modalName = `modal/${templateName}`;
|
||||
|
|
|
@ -127,12 +127,12 @@ const ApplicationRoute = Discourse.Route.extend(OpenComposer, {
|
|||
},
|
||||
|
||||
editCategory(category) {
|
||||
Category.reloadById(category.get('id')).then((atts) => {
|
||||
Category.reloadById(category.get('id')).then(atts => {
|
||||
const model = this.store.createRecord('category', atts.category);
|
||||
model.setupGroupsAndPermissions();
|
||||
this.site.updateCategory(model);
|
||||
showModal('editCategory', { model });
|
||||
this.controllerFor('editCategory').set('selectedTab', 'general');
|
||||
showModal('edit-category', { model });
|
||||
this.controllerFor('edit-category').set('selectedTab', 'general');
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -117,8 +117,8 @@ const DiscoveryCategoriesRoute = Discourse.Route.extend(OpenComposer, {
|
|||
allow_badges: true
|
||||
});
|
||||
|
||||
showModal("editCategory", { model });
|
||||
this.controllerFor("editCategory").set("selectedTab", "general");
|
||||
showModal("edit-category", { model });
|
||||
this.controllerFor("edit-category").set("selectedTab", "general");
|
||||
},
|
||||
|
||||
reorderCategories() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="modal-body">
|
||||
{{#d-modal-body}}
|
||||
{{{i18n 'topic.change_owner.instructions' count=selectedPostsCount old_user=selectedPostsUsername}}}
|
||||
<p>
|
||||
{{{i18n 'topic.change_owner.instructions_warn'}}}
|
||||
|
@ -8,8 +8,7 @@
|
|||
<label>{{i18n 'topic.change_owner.label'}}</label>
|
||||
{{user-selector single="true" usernames=new_user placeholderKey="topic.change_owner.placeholder"}}
|
||||
</form>
|
||||
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class='btn btn-primary' disabled={{buttonDisabled}} {{action "changeOwnershipOfPosts"}}>{{buttonTitle}}</button>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="modal-body change-timestamp">
|
||||
{{#d-modal-body class="change-timestamp"}}
|
||||
<p>
|
||||
{{i18n 'topic.change_timestamp.instructions'}}
|
||||
</p>
|
||||
|
@ -13,7 +13,7 @@
|
|||
</form>
|
||||
|
||||
<div id="date-container" />
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary" disabled={{buttonDisabled}} {{action "changeTimestamp"}}>{{buttonTitle}}</button>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<div class="modal-body">
|
||||
{{#d-modal-body}}
|
||||
<p>
|
||||
{{preference-checkbox labelKey="topics.bulk.also_dismiss_topics" checked=dismissTopics}}
|
||||
</p>
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class='btn btn-primary' {{action "dismissReadTopics" dismissTopics}}><i class="fa fa-check"></i> {{i18n 'topics.bulk.dismiss'}}</button>
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
{{/if}}
|
||||
</ul>
|
||||
|
||||
<div class="modal-body">
|
||||
{{#d-modal-body}}
|
||||
{{#each panels as |tab|}}
|
||||
{{component tab selectedTab=selectedTab category=model}}
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
|
||||
<div class="modal-footer">
|
||||
{{d-button id="save-category" class="btn-primary" disabled=disabled action="saveCategory" label=saveLabel}}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="modal-body feature-topic">
|
||||
{{#d-modal-body class="feature-topic"}}
|
||||
{{#if model.pinned_at}}
|
||||
<div class="feature-section">
|
||||
<div class="desc">
|
||||
|
@ -105,7 +105,7 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
<div class="modal-footer">
|
||||
<a class="pull-right" {{action "closeModal"}}>{{i18n "cancel"}}</a>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div id="keyboard-shortcuts-help" class="modal-body">
|
||||
{{#d-modal-body id="keyboard-shortcuts-help"}}
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<h4>{{i18n 'keyboard_shortcuts_help.jump_to.title'}}</h4>
|
||||
|
@ -60,4 +60,4 @@
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<div id='move-selected' class="modal-body">
|
||||
{{#d-modal-body id='move-selected'}}
|
||||
<p>{{{i18n 'topic.merge_topic.instructions' count=selectedPostsCount}}}</p>
|
||||
|
||||
<form>
|
||||
{{choose-topic currentTopicId=model.id selectedTopicId=selectedTopicId}}
|
||||
</form>
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
|
||||
<div class="modal-footer">
|
||||
{{#d-button class="btn-primary" disabled=buttonDisabled action="movePostsToExistingTopic"}}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<div class="modal-body">
|
||||
{{#d-modal-body}}
|
||||
{{#if emailSent}}
|
||||
{{{i18n 'login.sent_activation_email_again' currentEmail=currentEmail}}}
|
||||
{{else}}
|
||||
{{{i18n 'login.not_activated' sentTo=sentTo}}}
|
||||
<a href {{action "sendActivationEmail"}} class="resend-link">{{i18n 'login.resend_activation_email'}}</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class='btn btn-primary' {{action "closeModal"}}>{{i18n 'close'}}</button>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<label>
|
||||
{{input type="checkbox" checked=checked}}
|
||||
{{title}}
|
||||
</label>
|
||||
|
||||
{{description}}
|
|
@ -1,8 +1,8 @@
|
|||
<div class="modal-body">
|
||||
{{#d-modal-body}}
|
||||
<p>{{{description}}}</p>
|
||||
|
||||
<p>{{{i18n "queue.approval.pending_posts" count=model.pending_count}}}</p>
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
<div class="modal-footer">
|
||||
{{d-button action="closeModal" class="btn-primary" label="queue.approval.ok"}}
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div id="search-help" class="modal-body">
|
||||
{{#d-modal-body id="search-help"}}
|
||||
{{{model}}}
|
||||
{{#if showGoogleSearch}}
|
||||
{{{i18n 'google_search'}}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
<div class='modal-body'>
|
||||
|
||||
{{#d-modal-body}}
|
||||
<p>{{{i18n 'topics.bulk.selected' count=model.length}}}</p>
|
||||
|
||||
{{outlet "bulkOutlet"}}
|
||||
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
|
|
|
@ -18,7 +18,9 @@ export default Ember.View.extend({
|
|||
});
|
||||
|
||||
this.appEvents.on('modal:body-shown', data => {
|
||||
this.set('controller.title', I18n.t(data.title));
|
||||
if (data.title) {
|
||||
this.set('controller.title', I18n.t(data.title));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="modal-body poll-ui-builder">
|
||||
{{#d-modal-body title="poll.ui_builder.title" class="poll-ui-builder"}}
|
||||
<form class="poll-ui-builder-form form-horizontal">
|
||||
<div class="input-group">
|
||||
<label class="input-group-label">{{i18n 'poll.ui_builder.poll_type.label'}}</label>
|
||||
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
{{/unless}}
|
||||
</form>
|
||||
</div>
|
||||
{{/d-modal-body}}
|
||||
|
||||
<div class="modal-footer">
|
||||
{{d-button action="insertPoll" icon="bar-chart-o" class='btn-primary' label='poll.ui_builder.insert' disabled=disableInsert}}
|
|
@ -1,6 +0,0 @@
|
|||
import ModalBodyView from "discourse/views/modal-body";
|
||||
|
||||
export default ModalBodyView.extend({
|
||||
templateName: 'modals/poll-ui-builder',
|
||||
title: I18n.t("poll.ui_builder.title")
|
||||
});
|
Loading…
Reference in New Issue