From: Aleksander Ɓukasz Date: Thu, 13 Jun 2013 14:40:14 +0000 (+0200) Subject: Showing success message after saving X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/3300786073de06446670a1779d35451c8ddef953?hp=f2b74d1a157449d5fc89d37680d95737ef8eb3b8 Showing success message after saving --- diff --git a/modules/indicator/indicator.js b/modules/indicator/indicator.js index 0e9bcdc..f395f83 100644 --- a/modules/indicator/indicator.js +++ b/modules/indicator/indicator.js @@ -21,8 +21,11 @@ return function(sandbox) { showMessage: function(msg) { view.dom.html('' + msg + '').show(); }, - clearMessage: function() { + clearMessage: function(report) { view.dom.empty(); + if(report && report.message) { + view.dom.html('' + report.message + '').show().fadeOut(4000); + } } } diff --git a/modules/indicator/indicator.less b/modules/indicator/indicator.less index 128e775..909cede 100644 --- a/modules/indicator/indicator.less +++ b/modules/indicator/indicator.less @@ -6,4 +6,9 @@ border: solid 1px #f6e39c; font-size:12px; } + + span.success { + background: #cef9be; + border-color: darken(#cef9be, 10%); + } } \ No newline at end of file diff --git a/modules/rng/rng.js b/modules/rng/rng.js index 43216bd..e3e97ed 100644 --- a/modules/rng/rng.js +++ b/modules/rng/rng.js @@ -132,7 +132,7 @@ return function(sandbox) { }, savingEnded: function(status) { sandbox.getModule('mainBar').setCommandEnabled('save', true); - sandbox.getModule('indicator').clearMessage(); + sandbox.getModule('indicator').clearMessage({message:'Dokument zapisany'}); }, historyItemAdded: function(item) { sandbox.getModule('documentHistory').addHistory([item], {animate: true});