mirror of
https://github.com/documize/community.git
synced 2025-07-21 14:19:43 +02:00
Saving work on tag fix
This commit is contained in:
parent
3704981964
commit
98951bc5ef
3 changed files with 11 additions and 6 deletions
|
@ -112,6 +112,7 @@ export default Ember.Component.extend({
|
||||||
save() {
|
save() {
|
||||||
let user = this.get('editUser');
|
let user = this.get('editUser');
|
||||||
let password = this.get('password');
|
let password = this.get('password');
|
||||||
|
debugger;
|
||||||
|
|
||||||
if (is.empty(user.firstname)) {
|
if (is.empty(user.firstname)) {
|
||||||
$("#edit-firstname").addClass("error").focus();
|
$("#edit-firstname").addClass("error").focus();
|
||||||
|
|
|
@ -84,11 +84,13 @@ export default Ember.Route.extend(NotifierMixin, {
|
||||||
permissions.forEach((permission, index) => { /* jshint ignore:line */
|
permissions.forEach((permission, index) => { /* jshint ignore:line */
|
||||||
var folderPermission = folderPermissions.findBy('userId', permission.get('userId'));
|
var folderPermission = folderPermissions.findBy('userId', permission.get('userId'));
|
||||||
if (is.not.undefined(folderPermission)) {
|
if (is.not.undefined(folderPermission)) {
|
||||||
Ember.set(folderPermission, 'orgId', permission.get('orgId'));
|
Ember.setProperties(folderPermission, {
|
||||||
Ember.set(folderPermission, 'folderId', permission.get('folderId'));
|
orgId: permission.get('orgId'),
|
||||||
Ember.set(folderPermission, 'canEdit', permission.get('canEdit'));
|
folderId: permission.get('folderId'),
|
||||||
Ember.set(folderPermission, 'canView', permission.get('canView'));
|
canEdit: permission.get('canEdit'),
|
||||||
Ember.set(folderPermission, 'canViewPrevious', permission.get('canView'));
|
canView: permission.get('canView'),
|
||||||
|
canViewPrevious: permission.get('canView')
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -73,10 +73,12 @@ export default Ember.Service.extend({
|
||||||
// saveDocument updates an existing document record.
|
// saveDocument updates an existing document record.
|
||||||
save(doc) {
|
save(doc) {
|
||||||
let id = doc.get('id');
|
let id = doc.get('id');
|
||||||
|
let data = doc.toJSON();
|
||||||
|
Ember.set(data, 'id', id)
|
||||||
|
|
||||||
return this.get('ajax').request(`documents/${id}`, {
|
return this.get('ajax').request(`documents/${id}`, {
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
data: JSON.stringify(doc)
|
data: JSON.stringify(data)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue