mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 20:34:02 +03:00
Cleaned up unused code in <GhTagSettingsForm>
no issue - the tag screen is now separate from the index so the code needed for handling switches between main/meta panes and scroll resets is not used and no longer needed - tidies up indentation in the template
This commit is contained in:
parent
190f2e905d
commit
704cbcfb4d
@ -1,4 +1,3 @@
|
||||
/* global key */
|
||||
import Component from '@ember/component';
|
||||
import Ember from 'ember';
|
||||
import {computed} from '@ember/object';
|
||||
@ -12,8 +11,7 @@ export default Component.extend({
|
||||
config: service(),
|
||||
|
||||
tag: null,
|
||||
|
||||
isViewingSubview: false,
|
||||
scratchTag: null,
|
||||
|
||||
// Allowed actions
|
||||
setProperty: () => {},
|
||||
@ -98,30 +96,6 @@ export default Component.extend({
|
||||
|
||||
clearCoverImage() {
|
||||
this.setProperty('featureImage', '');
|
||||
},
|
||||
|
||||
openMeta() {
|
||||
this.set('isViewingSubview', true);
|
||||
},
|
||||
|
||||
closeMeta() {
|
||||
this.set('isViewingSubview', false);
|
||||
}
|
||||
},
|
||||
|
||||
reset() {
|
||||
this.set('isViewingSubview', false);
|
||||
if (this.$()) {
|
||||
this.$('.settings-menu-pane').scrollTop(0);
|
||||
}
|
||||
},
|
||||
|
||||
focusIn() {
|
||||
key.setScope('tag-settings-form');
|
||||
},
|
||||
|
||||
focusOut() {
|
||||
key.setScope('default');
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -8,10 +8,12 @@
|
||||
name="name"
|
||||
value=this.scratchTag.name
|
||||
tabindex="1"
|
||||
focus-out=(action 'setProperty' 'name' this.scratchTag.name)}}
|
||||
<p class="description">Start with # to create internal tags. <a
|
||||
href="https://ghost.org/docs/concepts/tags/#internal-tag" target="_blank" rel="noreferrer">Learn
|
||||
more</a></p>
|
||||
focus-out=(action 'setProperty' 'name' this.scratchTag.name)
|
||||
}}
|
||||
<p class="description">
|
||||
Start with # to create internal tags
|
||||
<a href="https://ghost.org/docs/concepts/tags/#internal-tag" target="_blank" rel="noreferrer">Learn more</a>
|
||||
</p>
|
||||
<GhErrorMessage @errors={{this.tag.errors}} @property="name" />
|
||||
{{/gh-form-group}}
|
||||
|
||||
@ -22,7 +24,8 @@
|
||||
id="tag-slug"
|
||||
name="slug"
|
||||
tabindex="2"
|
||||
focus-out=(action 'setProperty' 'slug' this.scratchTag.slug)}}
|
||||
focus-out=(action 'setProperty' 'slug' this.scratchTag.slug)
|
||||
}}
|
||||
{{gh-url-preview prefix="tag" slug=this.scratchTag.slug tagName="p" classNames="description"}}
|
||||
<GhErrorMessage @errors={{this.activeTag.errors}} @property="slug" />
|
||||
{{/gh-form-group}}
|
||||
@ -49,7 +52,8 @@
|
||||
class="gh-tag-image-uploader"
|
||||
allowUnsplash=true
|
||||
update=(action "setCoverImage")
|
||||
remove=(action "clearCoverImage")}}
|
||||
remove=(action "clearCoverImage")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -64,7 +68,8 @@
|
||||
placeholder=this.scratchTag.name
|
||||
tabindex="4"
|
||||
value=this.scratchTag.metaTitle
|
||||
focus-out=(action "setProperty" "metaTitle" this.scratchTag.metaTitle)}}
|
||||
focus-out=(action "setProperty" "metaTitle" this.scratchTag.metaTitle)
|
||||
}}
|
||||
<GhErrorMessage @errors={{this.tag.errors}} @property="metaTitle" />
|
||||
<p>Recommended: <b>70</b> characters. You’ve used {{gh-count-down-characters this.scratchTag.metaTitle 70}}</p>
|
||||
{{/gh-form-group}}
|
||||
|
Loading…
Reference in New Issue
Block a user