mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
i18n section types
This commit is contained in:
parent
bca7794c00
commit
f735ae1278
11 changed files with 61 additions and 44 deletions
|
@ -15,6 +15,7 @@ export default Component.extend({
|
|||
data: "",
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super();
|
||||
this.set("data", this.get("meta.rawBody"));
|
||||
},
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ export default Component.extend(Modals, Notifier, {
|
|||
pageTitle: '',
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
this._super();
|
||||
this.set('pageTitle', this.get('page.title'));
|
||||
},
|
||||
|
||||
|
|
|
@ -21,7 +21,9 @@ export default Component.extend(ModalMixin, {
|
|||
hasNameError: empty('page.title'),
|
||||
hasDescError: empty('page.excerpt'),
|
||||
|
||||
didRender() {
|
||||
didRender(...args) {
|
||||
this._super(...args);
|
||||
|
||||
let self = this;
|
||||
Mousetrap.bind('esc', function () {
|
||||
self.send('onCancel');
|
||||
|
|
|
@ -67,7 +67,8 @@ export default Component.extend({
|
|||
}
|
||||
},
|
||||
|
||||
didInsertElement() {
|
||||
didInsertElement(...args) {
|
||||
this._super(...args);
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById(this.get('editorId')), {
|
||||
theme: "material",
|
||||
lineNumbers: true,
|
||||
|
@ -91,7 +92,8 @@ export default Component.extend({
|
|||
this.set('codeEditor', editor);
|
||||
},
|
||||
|
||||
willDestroyElement() {
|
||||
willDestroyElement(...args) {
|
||||
this._super(...args);
|
||||
let editor = this.get('codeEditor');
|
||||
|
||||
if (!_.isNull(editor)) {
|
||||
|
|
|
@ -17,13 +17,14 @@ import Component from '@ember/component';
|
|||
export default Component.extend({
|
||||
appMeta: service(),
|
||||
sectionSvc: service('section'),
|
||||
i18n: service(),
|
||||
isDirty: false,
|
||||
waiting: false,
|
||||
diagram: '',
|
||||
diagramXML: '',
|
||||
title: '',
|
||||
readyToSave: false,
|
||||
previewButtonCaption: 'Preview',
|
||||
previewButtonCaption: '',
|
||||
flowCallback: null,
|
||||
editorId: computed('page', function () {
|
||||
let page = this.get('page');
|
||||
|
@ -40,6 +41,8 @@ export default Component.extend({
|
|||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
this.previewButtonCaption = this.i18n.localize('preview');
|
||||
|
||||
schedule('afterRender', () => {
|
||||
this.setupEditor();
|
||||
});
|
||||
|
@ -125,7 +128,7 @@ export default Component.extend({
|
|||
action: 'export',
|
||||
format: 'xmlpng',
|
||||
xml: this.get('diagramXML'),
|
||||
spin: 'Updating'
|
||||
spin: this.i18n.localize('updating')
|
||||
}
|
||||
), '*');
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue