Remove more view classes
This commit is contained in:
parent
d98aa48f0d
commit
01a8ef590a
|
@ -1,10 +1,12 @@
|
||||||
{{bread-crumbs categories=categories}}
|
{{#d-section bodyClass="navigation-categories"}}
|
||||||
|
{{bread-crumbs categories=categories}}
|
||||||
|
|
||||||
{{navigation-bar navItems=navItems filterMode=filterMode}}
|
{{navigation-bar navItems=navItems filterMode=filterMode}}
|
||||||
|
|
||||||
{{#if canCreateCategory}}
|
{{#if canCreateCategory}}
|
||||||
{{categories-admin-dropdown}}
|
{{categories-admin-dropdown}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if canCreateTopic}}
|
{{#if canCreateTopic}}
|
||||||
<button id="create-topic" class='btn btn-default' {{action "createTopic"}}><i class='fa fa-plus'></i>{{i18n 'topic.create'}}</button>
|
<button id="create-topic" class='btn btn-default' {{action "createTopic"}}><i class='fa fa-plus'></i>{{i18n 'topic.create'}}</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{/d-section}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<section class='user-content'>
|
<section class='user-content user-preferences'>
|
||||||
<form class="form-horizontal">
|
<form class="form-horizontal">
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label">{{i18n 'user.email.title'}}</label>
|
<label class="control-label">{{i18n 'user.email.title'}}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{text-field value=newEmail id="change_email" classNames="input-xxlarge"}}
|
{{text-field value=newEmail id="change_email" classNames="input-xxlarge" autofocus="autofocus"}}
|
||||||
</div>
|
</div>
|
||||||
<div class='instructions'>
|
<div class='instructions'>
|
||||||
{{#if taken}}
|
{{#if taken}}
|
|
@ -1,8 +1,10 @@
|
||||||
<div class="container">
|
<div class='topic-unsubscribe'>
|
||||||
<p>
|
<div class="container">
|
||||||
{{{stopNotificiationsText}}}
|
<p>
|
||||||
</p>
|
{{{stopNotificiationsText}}}
|
||||||
<p>
|
</p>
|
||||||
{{i18n "topic.unsubscribe.change_notification_state"}} {{topic-notifications-button topic=model}}
|
<p>
|
||||||
</p>
|
{{i18n "topic.unsubscribe.change_notification_state"}} {{topic-notifications-button topic=model}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
import { bufferedRender } from 'discourse-common/lib/buffered-render';
|
|
||||||
|
|
||||||
export default Ember.View.extend(bufferedRender({
|
|
||||||
tagName: 'button',
|
|
||||||
classNameBindings: [':btn', ':standard', 'dropDownToggle'],
|
|
||||||
attributeBindings: ['title', 'data-toggle', 'data-share-url'],
|
|
||||||
|
|
||||||
title: function() {
|
|
||||||
return I18n.t(this.get('helpKey') || this.get('textKey'));
|
|
||||||
}.property('helpKey', 'textKey'),
|
|
||||||
|
|
||||||
text: function() {
|
|
||||||
if (Ember.isEmpty(this.get('textKey'))) { return ""; }
|
|
||||||
return I18n.t(this.get('textKey'));
|
|
||||||
}.property('textKey'),
|
|
||||||
|
|
||||||
buildBuffer(buffer) {
|
|
||||||
if (this.renderIcon) {
|
|
||||||
this.renderIcon(buffer);
|
|
||||||
}
|
|
||||||
buffer.push(this.get('text'));
|
|
||||||
}
|
|
||||||
}));
|
|
|
@ -1,15 +0,0 @@
|
||||||
import { on } from 'ember-addons/ember-computed-decorators';
|
|
||||||
|
|
||||||
const CATEGORIES_BODY_CLASS = "navigation-categories";
|
|
||||||
|
|
||||||
export default Ember.View.extend({
|
|
||||||
@on("didInsertElement")
|
|
||||||
addBodyClass() {
|
|
||||||
$('body').addClass(CATEGORIES_BODY_CLASS);
|
|
||||||
},
|
|
||||||
|
|
||||||
@on("willDestroyElement")
|
|
||||||
removeBodyClass() {
|
|
||||||
$('body').removeClass(CATEGORIES_BODY_CLASS);
|
|
||||||
},
|
|
||||||
});
|
|
|
@ -1,9 +0,0 @@
|
||||||
export default Em.View.extend({
|
|
||||||
templateName: 'user/email',
|
|
||||||
classNames: ['user-preferences'],
|
|
||||||
_focusField: function() {
|
|
||||||
Em.run.schedule('afterRender', function() {
|
|
||||||
$('#change_email').focus();
|
|
||||||
});
|
|
||||||
}.on('didInsertElement')
|
|
||||||
});
|
|
|
@ -1,2 +0,0 @@
|
||||||
// In case plugins are using the old `additionalButtons` API, don't break
|
|
||||||
export default Ember.View.extend();
|
|
|
@ -1,3 +0,0 @@
|
||||||
export default Ember.View.extend({
|
|
||||||
classNames: ["topic-unsubscribe"]
|
|
||||||
});
|
|
|
@ -62,7 +62,6 @@
|
||||||
//= require ./discourse/views/modal-body
|
//= require ./discourse/views/modal-body
|
||||||
//= require ./discourse/views/flag
|
//= require ./discourse/views/flag
|
||||||
//= require ./discourse/components/edit-category-panel
|
//= require ./discourse/components/edit-category-panel
|
||||||
//= require ./discourse/views/button
|
|
||||||
//= require ./discourse/components/dropdown-button
|
//= require ./discourse/components/dropdown-button
|
||||||
//= require ./discourse/components/notifications-button
|
//= require ./discourse/components/notifications-button
|
||||||
//= require ./discourse/lib/link-mentions
|
//= require ./discourse/lib/link-mentions
|
||||||
|
|
|
@ -19,17 +19,23 @@ test("update some fields", () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test("about me", () => {
|
test("username", () => {
|
||||||
visit("/users/eviltrout/preferences/username");
|
visit("/users/eviltrout/preferences/username");
|
||||||
andThen(() => {
|
andThen(() => {
|
||||||
ok(exists("#change_username"), "it has the input element for the bio");
|
ok(exists("#change_username"), "it has the input element");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test("username", () => {
|
test("about me", () => {
|
||||||
visit("/users/eviltrout/preferences/about-me");
|
visit("/users/eviltrout/preferences/about-me");
|
||||||
andThen(() => {
|
andThen(() => {
|
||||||
ok(exists(".raw-bio"), "it has the input element for the bio");
|
ok(exists(".raw-bio"), "it has the input element");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("email", () => {
|
||||||
|
visit("/users/eviltrout/preferences/email");
|
||||||
|
andThen(() => {
|
||||||
|
ok(exists("#change_email"), "it has the input element");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
|
@ -18,6 +18,7 @@ test("Visit Discovery Pages", () => {
|
||||||
|
|
||||||
visit("/categories");
|
visit("/categories");
|
||||||
andThen(() => {
|
andThen(() => {
|
||||||
|
ok($('body.navigation-categories').length, "has the body class");
|
||||||
ok($('body.category-bug').length === 0, "removes the custom category class");
|
ok($('body.category-bug').length === 0, "removes the custom category class");
|
||||||
ok(exists('.category'), "has a list of categories");
|
ok(exists('.category'), "has a list of categories");
|
||||||
ok($('body.categories-list').length, "has a custom class to indicate categories");
|
ok($('body.categories-list').length, "has a custom class to indicate categories");
|
||||||
|
|
Loading…
Reference in New Issue