summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-23 10:36:34 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-23 10:36:34 +0100
commita3d1b2637de8031f5ba3274928218f0cc169403e (patch)
tree12c2246042bb06478a5b64e643846f70379a5f0e /apps
parent59acc53483bd7c61285fa2495992836c3e00e74b (diff)
parente37372e8832c9d12c0c602356bd7d3a122a2bb61 (diff)
downloadnextcloud-server-a3d1b2637de8031f5ba3274928218f0cc169403e.tar.gz
nextcloud-server-a3d1b2637de8031f5ba3274928218f0cc169403e.zip
Merge pull request #22516 from owncloud/core-cumulativenotifications
Accumulate notifications instead of blinking
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/file-upload.js6
-rw-r--r--apps/files/tests/js/fileactionsSpec.js4
-rw-r--r--apps/systemtags/tests/js/systemtagsinfoviewSpec.js3
3 files changed, 11 insertions, 2 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 8ba294e2a7f..bd80afd072c 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -472,7 +472,11 @@ OC.Upload = {
OC.Upload.showUploadCancelMessage();
} else {
// HTTP connection problem
- OC.Notification.showTemporary(data.errorThrown, {timeout: 10});
+ var message = t('files', 'Error uploading file "{fileName}": {message}', {
+ fileName: data.files[0].name,
+ message: data.errorThrown
+ });
+ OC.Notification.show(message, {timeout: 0, type: 'error'});
if (data.result) {
var result = JSON.parse(data.result);
if (result && result[0] && result[0].data && result[0].data.code === 'targetnotfound') {
diff --git a/apps/files/tests/js/fileactionsSpec.js b/apps/files/tests/js/fileactionsSpec.js
index a905a4d969d..4f4d4d3d197 100644
--- a/apps/files/tests/js/fileactionsSpec.js
+++ b/apps/files/tests/js/fileactionsSpec.js
@@ -20,9 +20,10 @@
*/
describe('OCA.Files.FileActions tests', function() {
- var fileList, fileActions;
+ var fileList, fileActions, clock;
beforeEach(function() {
+ clock = sinon.useFakeTimers();
// init horrible parameters
var $body = $('#testArea');
$body.append('<input type="hidden" id="dir" value="/subdir"></input>');
@@ -63,6 +64,7 @@ describe('OCA.Files.FileActions tests', function() {
fileActions = null;
fileList.destroy();
fileList = undefined;
+ clock.restore();
$('#dir, #permissions, #filestable').remove();
});
it('calling clear() clears file actions', function() {
diff --git a/apps/systemtags/tests/js/systemtagsinfoviewSpec.js b/apps/systemtags/tests/js/systemtagsinfoviewSpec.js
index 0fb4e7b22c2..27724822c2e 100644
--- a/apps/systemtags/tests/js/systemtagsinfoviewSpec.js
+++ b/apps/systemtags/tests/js/systemtagsinfoviewSpec.js
@@ -22,14 +22,17 @@
describe('OCA.SystemTags.SystemTagsInfoView tests', function() {
var isAdminStub;
var view;
+ var clock;
beforeEach(function() {
+ clock = sinon.useFakeTimers();
view = new OCA.SystemTags.SystemTagsInfoView();
$('#testArea').append(view.$el);
isAdminStub = sinon.stub(OC, 'isUserAdmin').returns(true);
});
afterEach(function() {
isAdminStub.restore();
+ clock.restore();
view.remove();
view = undefined;
});