mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
Set consistent browser titles
This commit is contained in:
parent
88b99979a9
commit
adef6dfffa
37 changed files with 140 additions and 117 deletions
|
@ -26,7 +26,7 @@ export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, {
|
|||
showTools: true, // show document related tools? favourite, delete, make template...
|
||||
showDocumentLink: false, // show link to document in breadcrumbs
|
||||
|
||||
init() {
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.pinState = {
|
||||
isPinned: false,
|
||||
|
@ -38,7 +38,7 @@ init() {
|
|||
description: ''
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
|
|
@ -265,17 +265,17 @@ export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, {
|
|||
|
||||
onShowTemplateDocModal() {
|
||||
let t = this.get('templates');
|
||||
if (t.length > 0) {
|
||||
t[0].set('selected', true);
|
||||
this.modalOpen("#template-doc-modal", {"show": true}, '#template-doc-name');
|
||||
}
|
||||
t.forEach((t) => {
|
||||
t.set('selected', false);
|
||||
});
|
||||
this.modalOpen("#template-doc-modal", {"show": true}, '#template-doc-name');
|
||||
},
|
||||
|
||||
onSelectTemplate(i) {
|
||||
let t = this.get('templates');
|
||||
t.forEach((t) => {
|
||||
t.set('selected', false);
|
||||
})
|
||||
});
|
||||
i.set('selected', true);
|
||||
this.set('selectedTemplate', i.id);
|
||||
},
|
||||
|
@ -288,16 +288,17 @@ export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, {
|
|||
this.set('templateDocNameError', true);
|
||||
$('#template-doc-name').focus();
|
||||
return;
|
||||
} else {
|
||||
this.set('templateDocNameError', false);
|
||||
this.set('templateDocName', '');
|
||||
}
|
||||
|
||||
let id = this.get('selectedTemplate');
|
||||
if (is.empty(id)) {
|
||||
$('#widget-list-picker').addClass('is-invalid');
|
||||
return;
|
||||
}
|
||||
|
||||
this.set('templateDocNameError', false);
|
||||
this.set('templateDocName', '');
|
||||
|
||||
this.modalClose("#template-doc-modal");
|
||||
|
||||
this.get('templateService').importSavedTemplate(this.get('space.id'), id, docName).then((document) => {
|
||||
|
|
|
@ -22,10 +22,11 @@ export default Component.extend(NotifierMixin, AuthMixin, {
|
|||
copyPermission: true,
|
||||
copyDocument: false,
|
||||
hasClone: notEmpty('clonedSpace.id'),
|
||||
clonedSpace: null,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.clonedSpace = { id: '' };
|
||||
// this.clonedSpace = { id: '' };
|
||||
},
|
||||
|
||||
didInsertElement() {
|
||||
|
@ -63,9 +64,8 @@ export default Component.extend(NotifierMixin, AuthMixin, {
|
|||
}
|
||||
|
||||
this.set('spaceName', '');
|
||||
this.set('clonedSpace.id', '');
|
||||
this.set('clonedSpace', null);
|
||||
$("#new-space-name").removeClass("is-invalid");
|
||||
|
||||
$('#add-space-modal').modal('hide');
|
||||
$('#add-space-modal').modal('dispose');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue