mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 17:43:39 +08:00
FIX: use the correct check isUncategorizedCategory in the js
This commit is contained in:
parent
27fb65b562
commit
f8f0fb15e3
|
@ -102,7 +102,7 @@ export default Discourse.ObjectController.extend(Discourse.ModalFunctionality, {
|
|||
|
||||
buttonTitle: function() {
|
||||
if (this.get('saving')) return I18n.t("saving");
|
||||
if (this.get('isUncategorized')) return I18n.t("save");
|
||||
if (this.get('isUncategorizedCategory')) return I18n.t("save");
|
||||
return (this.get('id') ? I18n.t("category.save") : I18n.t("category.create"));
|
||||
}.property('saving', 'id'),
|
||||
|
||||
|
@ -111,8 +111,8 @@ export default Discourse.ObjectController.extend(Discourse.ModalFunctionality, {
|
|||
}.property(),
|
||||
|
||||
showDescription: function() {
|
||||
return !this.get('isUncategorized') && this.get('id');
|
||||
}.property('isUncategorized', 'id'),
|
||||
return !this.get('isUncategorizedCategory') && this.get('id');
|
||||
}.property('isUncategorizedCategory', 'id'),
|
||||
|
||||
showPositionInput: Discourse.computed.setting('fixed_category_positions'),
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ Discourse.ApplicationRoute = Em.Route.extend({
|
|||
editCategory: function(category) {
|
||||
var router = this;
|
||||
|
||||
if (category.get('isUncategorized')) {
|
||||
if (category.get('isUncategorizedCategory')) {
|
||||
Discourse.Route.showModal(router, 'editCategory', category);
|
||||
router.controllerFor('editCategory').set('selectedTab', 'general');
|
||||
} else {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<li {{bind-attr class="generalSelected:active"}}>
|
||||
<a href="#" {{action selectGeneral}}>{{i18n category.general}}</a>
|
||||
</li>
|
||||
{{#unless isUncategorized}}
|
||||
{{#unless isUncategorizedCategory}}
|
||||
<li {{bind-attr class="securitySelected:active"}}>
|
||||
<a href="#" {{action selectSecurity}}>{{i18n category.security}}</a>
|
||||
</li>
|
||||
|
@ -69,7 +69,7 @@
|
|||
</section>
|
||||
</form>
|
||||
</div>
|
||||
{{#unless isUncategorized}}
|
||||
{{#unless isUncategorizedCategory}}
|
||||
<div {{bind-attr class=":modal-tab :options-tab securitySelected::invisible"}}>
|
||||
<section class='field'>
|
||||
<ul class='permission-list'>
|
||||
|
|
Loading…
Reference in New Issue
Block a user