From 3300786073de06446670a1779d35451c8ddef953 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Thu, 13 Jun 2013 16:40:14 +0200 Subject: [PATCH] Showing success message after saving --- modules/indicator/indicator.js | 5 ++++- modules/indicator/indicator.less | 5 +++++ modules/rng/rng.js | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) 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}); -- 2.20.1