From 9008e13bdeed80a5deae8e4d607d0af0dfbacd2e Mon Sep 17 00:00:00 2001 From: Artur Delura Date: Tue, 21 Apr 2015 13:01:12 +0200 Subject: [PATCH 1/3] Tests: Written one for checking whether notification is marked as important one. --- tests/plugins/uploadimage/uploadimage.js | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/plugins/uploadimage/uploadimage.js b/tests/plugins/uploadimage/uploadimage.js index 75dd3b34b1a..46a6fcdf7b9 100644 --- a/tests/plugins/uploadimage/uploadimage.js +++ b/tests/plugins/uploadimage/uploadimage.js @@ -115,6 +115,33 @@ }, 10 ); }, + 'test finish upload notification marked as important and is visible (#13032).': function() { + var editor = this.editors.classic; + + pasteFiles( editor, [ bender.tools.getTestPngFile() ] ); + + var loader = editor.uploadsRepository.loaders[ 0 ]; + + loader.data = bender.tools.pngBase64; + loader.changeStatus( 'uploading' ); + + var area = editor._.notificationArea; + + // Closing notification. + area.notifications[ 0 ].hide(); + + assertUploadingWidgets( editor, LOADED_IMG ); + + // IE needs to wait for image to be loaded so it can read width and height of the image. + wait( function() { + loader.url = IMG_URL; + loader.changeStatus( 'uploaded' ); + + assert.areSame( 1, area.notifications.length, 'Successs notification is present because it\'s important one.' ); + assert.areSame( 'success', area.notifications[ 0 ].type ); + }, 10 ); + }, + 'test inline with image2 (integration test)': function() { var editor = this.editors.inline; From a60570859b3b902b91e28e45b96d3f720bb7ef52 Mon Sep 17 00:00:00 2001 From: Piotr Jasiun Date: Wed, 11 Mar 2015 17:57:36 +0100 Subject: [PATCH 2/3] Added important flag to the update. --- plugins/uploadwidget/plugin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/uploadwidget/plugin.js b/plugins/uploadwidget/plugin.js index eb0446e846e..2a8d7b8a090 100644 --- a/plugins/uploadwidget/plugin.js +++ b/plugins/uploadwidget/plugin.js @@ -458,7 +458,8 @@ message: tasks == 1 ? editor.lang.uploadwidget.doneOne : editor.lang.uploadwidget.doneMany.replace( '%1', tasks ), - type: 'success' + type: 'success', + important: 1 } ); } } ); From b381fb4c2a7f504301ee349ab4c1832b94ca0584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotrek=20Koszuli=C5=84ski?= Date: Fri, 15 May 2015 17:42:53 +0200 Subject: [PATCH 3/3] Changelog entry. --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 0006174911d..62830238d41 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,7 @@ Fixed Issues: * [#13197](http://dev.ckeditor.com/ticket/13197): Fixed: Linked inline image2's alignment class is not transferred to widget wrapper. * [#13199](http://dev.ckeditor.com/ticket/13199): Fixed: Embedsemantic does not support widget classes. * [#13003](http://dev.ckeditor.com/ticket/13003): Fixed: Anchors are uploaded when moving them by drag and drop. +* [#13032](http://dev.ckeditor.com/ticket/13032): Fixed: When upload is done notification update should be marked as important. * Toolbar configurators: * [#13185](http://dev.ckeditor.com/ticket/13185): Fixed: Wrong position of the suggestion box if there is not enough space below the caret. * [#13138](http://dev.ckeditor.com/ticket/13138): Fixed: The "Toggle empty elements" button label is unclear.