From 18aaad59606b1db244e410ebf5bacc56ad87a870 Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Wed, 3 Apr 2013 05:21:10 +0100 Subject: [PATCH] Show feedback when saving settings --- client/assets/css/style.css | 5 +++++ client/assets/dev/applet_settings.js | 8 +++++++- client/assets/dev/index.html.tmpl | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/client/assets/css/style.css b/client/assets/css/style.css index 7af1011..419d3f6 100644 --- a/client/assets/css/style.css +++ b/client/assets/css/style.css @@ -205,6 +205,11 @@ html, body { height:100%; } #kiwi .settings table td { padding:0.5em 1em; } +#kiwi .settings .save .feedback { + display: none; + position: relative; + left: -1.6em; +} diff --git a/client/assets/dev/applet_settings.js b/client/assets/dev/applet_settings.js index 78d235a..bb6f35f 100644 --- a/client/assets/dev/applet_settings.js +++ b/client/assets/dev/applet_settings.js @@ -48,7 +48,8 @@ saveSettings: function () { - var settings = _kiwi.global.settings; + var settings = _kiwi.global.settings, + feedback; // Stop settings being updated while we're saving one by one _kiwi.global.settings.off('change', this.loadSettings, this); @@ -61,6 +62,11 @@ settings.save(); + feedback = $('.feedback', this.$el); + feedback.fadeIn('slow', function () { + feedback.fadeOut('slow'); + }) + // Continue listening for setting changes _kiwi.global.settings.on('change', this.loadSettings, this); } diff --git a/client/assets/dev/index.html.tmpl b/client/assets/dev/index.html.tmpl index b2caf93..e36be1d 100644 --- a/client/assets/dev/index.html.tmpl +++ b/client/assets/dev/index.html.tmpl @@ -189,7 +189,7 @@ - ​​​​​​​​​ +
Saved! -- 2.25.1