mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
parent
763bd1f0e2
commit
bc49041359
8 changed files with 623 additions and 623 deletions
|
@ -8,7 +8,7 @@ The mission is to bring software dev inspired features (refactoring, testing, li
|
||||||
|
|
||||||
## Latest version
|
## Latest version
|
||||||
|
|
||||||
v1.49.2
|
v1.50.0
|
||||||
|
|
||||||
## OS Support
|
## OS Support
|
||||||
|
|
||||||
|
|
|
@ -205,6 +205,10 @@ func GetDocumentsByFolder(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(documents) == 0 {
|
||||||
|
documents = []entity.Document{}
|
||||||
|
}
|
||||||
|
|
||||||
json, err := json.Marshal(documents)
|
json, err := json.Marshal(documents)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -15,7 +15,7 @@ import NotifierMixin from '../../mixins/notifier';
|
||||||
export default Ember.Controller.extend(NotifierMixin, {
|
export default Ember.Controller.extend(NotifierMixin, {
|
||||||
documentService: Ember.inject.service('document'),
|
documentService: Ember.inject.service('document'),
|
||||||
folderService: Ember.inject.service('folder'),
|
folderService: Ember.inject.service('folder'),
|
||||||
localStorage: Ember.inject.service('localStorage'),
|
localStorage: Ember.inject.service('localStorage'),
|
||||||
hasSelectedDocuments: false,
|
hasSelectedDocuments: false,
|
||||||
selectedDocuments: [],
|
selectedDocuments: [],
|
||||||
queryParams: ['tab'],
|
queryParams: ['tab'],
|
||||||
|
|
|
@ -28,7 +28,7 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
this.get('folderService').setCurrentFolder(folder).then(() => {
|
this.get('folderService').setCurrentFolder(folder).then(() => {
|
||||||
this.set('isEditor', this.get('folderService').get('canEditCurrentFolder'));
|
this.set('isEditor', this.get('folderService').get('canEditCurrentFolder'));
|
||||||
this.set('isFolderOwner', this.get('session.user.id') === folder.get('userId'));
|
this.set('isFolderOwner', this.get('session.user.id') === folder.get('userId'));
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -52,10 +52,11 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
error(error /*, transition*/ ) {
|
error(error /*, transition*/ ) {
|
||||||
|
console.log(error); // eslint-disable-line no-console
|
||||||
if (error) {
|
if (error) {
|
||||||
this.transitionTo('/not-found');
|
this.transitionTo('/not-found');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -42,10 +42,6 @@ export default Ember.Service.extend({
|
||||||
content: Ember.A([])
|
content: Ember.A([])
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isObject(response)) {
|
|
||||||
return documents;
|
|
||||||
}
|
|
||||||
|
|
||||||
documents = response.map((doc) => {
|
documents = response.map((doc) => {
|
||||||
let data = this.get('store').normalize('document', doc);
|
let data = this.get('store').normalize('document', doc);
|
||||||
return this.get('store').push(data);
|
return this.get('store').push(data);
|
||||||
|
|
|
@ -61,7 +61,6 @@ export default BaseService.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.reload();
|
return this.reload();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Updates an existing folder record.
|
// Updates an existing folder record.
|
||||||
|
@ -211,7 +210,7 @@ export default BaseService.extend({
|
||||||
canEdit = permission.canEdit;
|
canEdit = permission.canEdit;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Ember.run(() => {
|
Ember.run(() => {
|
||||||
this.set('canEditCurrentFolder', canEdit && this.get('sessionService.authenticated'));
|
this.set('canEditCurrentFolder', canEdit && this.get('sessionService.authenticated'));
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "documize",
|
"name": "documize",
|
||||||
"version": "1.49.2",
|
"version": "1.50.0",
|
||||||
"description": "The Document IDE",
|
"description": "The Document IDE",
|
||||||
"private": true,
|
"private": true,
|
||||||
"repository": "",
|
"repository": "",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue