@@ -125,7 +125,7 @@ app.factory('ApiService', function ($http, $q) {
|
||||
this.data[entity.id] = entity;
|
||||
} else {
|
||||
Object.keys(entity).forEach(function (key) {
|
||||
if (entity[key] !== null) {
|
||||
if (entity[key] !== null && element[key] !== entity[key]) {
|
||||
element[key] = entity[key];
|
||||
}
|
||||
});
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
import app from '../app/App.js';
|
||||
|
||||
/* global OC oc_requesttoken */
|
||||
export default class FileService {
|
||||
|
||||
constructor ($http, FileUploader, CardService) {
|
||||
@@ -51,7 +52,7 @@ export default class FileService {
|
||||
};
|
||||
|
||||
this.uploader.uploadItem(fileItem);
|
||||
};
|
||||
}
|
||||
|
||||
onAfterAddingFile (fileItem) {
|
||||
// Fetch card details before trying to upload so we can detect filename collisions properly
|
||||
@@ -87,11 +88,11 @@ export default class FileService {
|
||||
|
||||
});
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
onSuccessItem(item, response) {
|
||||
let attachments = this.cardservice.get(item.cardId).attachments;
|
||||
let index = attachments.indexOf(attachments.find(attachment => attachment.id === response.id));
|
||||
let index = attachments.indexOf(attachments.find((attachment) => attachment.id === response.id));
|
||||
if (~index) {
|
||||
attachments = attachments.splice(index, 1);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
*/
|
||||
import app from '../app/App.js';
|
||||
|
||||
/* global app angular */
|
||||
app.factory('StackService', function (ApiService, CardService, $http, $q) {
|
||||
var StackService = function ($http, ep, $q) {
|
||||
ApiService.call(this, $http, ep, $q);
|
||||
|
||||
Reference in New Issue
Block a user