mirror of
https://github.com/documize/community.git
synced 2025-08-05 05:25:27 +02:00
upgraded Ember and Bootstrap, merged changes
This commit is contained in:
parent
b4fd42da38
commit
5dd7d9c181
114 changed files with 9814 additions and 1361 deletions
|
@ -9,29 +9,36 @@
|
|||
//
|
||||
// https://documize.com
|
||||
|
||||
import Component from '@ember/component';
|
||||
import $ from 'jquery';
|
||||
import { inject as service } from '@ember/service';
|
||||
import Component from '@ember/component';
|
||||
import AuthMixin from '../../mixins/auth';
|
||||
import TooltipMixin from '../../mixins/tooltip';
|
||||
import ModalMixin from '../../mixins/modal';
|
||||
|
||||
export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, {
|
||||
spaceService: service('folder'),
|
||||
userSvc: service('user'),
|
||||
store: service(),
|
||||
spaceSvc: service('folder'),
|
||||
session: service(),
|
||||
appMeta: service(),
|
||||
pinned: service(),
|
||||
pinState : {
|
||||
isPinned: false,
|
||||
pinId: '',
|
||||
newName: ''
|
||||
},
|
||||
saveTemplate: {
|
||||
name: '',
|
||||
description: ''
|
||||
},
|
||||
showTools: true, // show document related tools? favourite, delete, make template...
|
||||
showDocumentLink: false, // show link to document in breadcrumbs
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.pinState = {
|
||||
isPinned: false,
|
||||
pinId: '',
|
||||
newName: ''
|
||||
};
|
||||
this.saveTemplate = {
|
||||
name: '',
|
||||
description: ''
|
||||
};
|
||||
},
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
@ -62,8 +69,9 @@ export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, {
|
|||
actions: {
|
||||
onDocumentDelete() {
|
||||
this.modalClose('#document-delete-modal');
|
||||
|
||||
this.attrs.onDocumentDelete();
|
||||
|
||||
let cb = this.get('onDocumentDelete');
|
||||
cb();
|
||||
},
|
||||
|
||||
onPrintDocument() {
|
||||
|
@ -118,7 +126,8 @@ export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, {
|
|||
this.set('saveTemplate.name', '');
|
||||
this.set('saveTemplate.description', '');
|
||||
|
||||
this.attrs.onSaveTemplate(name, excerpt);
|
||||
let cb = this.get('onSaveTemplate');
|
||||
cb(name, excerpt);
|
||||
|
||||
this.modalClose('#document-template-modal');
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
//
|
||||
// https://documize.com
|
||||
|
||||
import $ from 'jquery';
|
||||
import Component from '@ember/component';
|
||||
import { computed } from '@ember/object';
|
||||
import { schedule } from '@ember/runloop';
|
||||
|
@ -29,12 +30,7 @@ export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, {
|
|||
copyTemplate: true,
|
||||
copyPermission: true,
|
||||
copyDocument: false,
|
||||
clonedSpace: { id: '' },
|
||||
pinState : {
|
||||
isPinned: false,
|
||||
pinId: '',
|
||||
newName: ''
|
||||
},
|
||||
|
||||
spaceSettings: computed('permissions', function() {
|
||||
return this.get('permissions.spaceOwner') || this.get('permissions.spaceManage');
|
||||
}),
|
||||
|
@ -49,10 +45,21 @@ export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, {
|
|||
templateDocName: '',
|
||||
templateDocNameError: false,
|
||||
selectedTemplate: '',
|
||||
importedDocuments: [],
|
||||
importStatus: [],
|
||||
|
||||
dropzone: null,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.importedDocuments = [];
|
||||
this.importStatus = [];
|
||||
this.clonedSpace = { id: '' };
|
||||
this.pinState = {
|
||||
isPinned: false,
|
||||
pinId: '',
|
||||
newName: ''
|
||||
};
|
||||
},
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
@ -226,8 +233,8 @@ export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, {
|
|||
this.set('deleteSpaceName', '');
|
||||
$("#delete-space-name").removeClass("is-invalid");
|
||||
|
||||
this.attrs.onDeleteSpace(this.get('space.id'));
|
||||
|
||||
let cb = this.get('onDeleteSpace');
|
||||
cb(this.get('space.id'));
|
||||
|
||||
this.modalClose('#space-delete-modal');
|
||||
},
|
||||
|
@ -330,8 +337,9 @@ export default Component.extend(ModalMixin, TooltipMixin, AuthMixin, {
|
|||
this.set('importedDocuments', documents);
|
||||
|
||||
if (documents.length === 0) {
|
||||
this.modalClose("#import-doc-modal");
|
||||
this.attrs.onRefresh();
|
||||
this.modalClose("#import-doc-modal");
|
||||
let cb = this.get('onRefresh');
|
||||
cb();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
//
|
||||
// https://documize.com
|
||||
|
||||
import $ from 'jquery';
|
||||
import Component from '@ember/component';
|
||||
import { schedule } from '@ember/runloop';
|
||||
import { notEmpty } from '@ember/object/computed';
|
||||
|
@ -20,9 +21,13 @@ export default Component.extend(NotifierMixin, AuthMixin, {
|
|||
copyTemplate: true,
|
||||
copyPermission: true,
|
||||
copyDocument: false,
|
||||
clonedSpace: { id: '' },
|
||||
hasClone: notEmpty('clonedSpace.id'),
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.clonedSpace = { id: '' };
|
||||
},
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
@ -64,7 +69,8 @@ export default Component.extend(NotifierMixin, AuthMixin, {
|
|||
$('#add-space-modal').modal('hide');
|
||||
$('#add-space-modal').modal('dispose');
|
||||
|
||||
this.attrs.onAddSpace(payload);
|
||||
let cb = this.get('onAddSpace');
|
||||
cb(payload);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -21,13 +21,13 @@ export default Component.extend({
|
|||
store: service(),
|
||||
pinned: service(),
|
||||
enableLogout: true,
|
||||
pins: [],
|
||||
hasPins: notEmpty('pins'),
|
||||
hasSpacePins: notEmpty('spacePins'),
|
||||
hasDocumentPins: notEmpty('documentPins'),
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.pins = [];
|
||||
|
||||
if (this.get('appMeta.authProvider') === constants.AuthProvider.Keycloak) {
|
||||
let config = this.get('appMeta.authConfig');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue