Show feedback when saving settings
authorJack Allnutt <m2ys4u@gmail.com>
Wed, 3 Apr 2013 04:21:10 +0000 (05:21 +0100)
committerJack Allnutt <m2ys4u@gmail.com>
Wed, 3 Apr 2013 04:21:10 +0000 (05:21 +0100)
client/assets/css/style.css
client/assets/dev/applet_settings.js
client/assets/dev/index.html.tmpl

index 7af1011787df29e719b2046e247f4b0a55dab0f3..419d3f656dce48e871de773f70f3e66ef2a10bf2 100644 (file)
@@ -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;
+}
 
 
 
index 78d235a00c8a78284c0e3fa148a62567b4a03a23..bb6f35fe48c9759345bb45c93f1f3eeb07d07103 100644 (file)
@@ -48,7 +48,8 @@
 \r
 \r
         saveSettings: function () {\r
-            var settings = _kiwi.global.settings;\r
+            var settings = _kiwi.global.settings,\r
+                feedback;\r
 \r
             // Stop settings being updated while we're saving one by one\r
             _kiwi.global.settings.off('change', this.loadSettings, this);\r
 \r
             settings.save();\r
 \r
+            feedback = $('.feedback', this.$el);\r
+            feedback.fadeIn('slow', function () {\r
+                feedback.fadeOut('slow');\r
+            })\r
+\r
             // Continue listening for setting changes\r
             _kiwi.global.settings.on('change', this.loadSettings, this);\r
         }\r
index b2caf936bfc42aacdfadfb56d975a1018c805420..e36be1dad897f0fd1de3dca670439867df3ceabb 100644 (file)
                 </tr>\r
 \r
                 <tr class="save">\r
-                    <td colspan="2"><button class="save">Save</button>​​​​​​​​​</td>\r
+                    <td colspan="2"><button class="save">Save</button><br/><span class="feedback">Saved!</span></td>\r
                 </tr>\r
             </table>\r
         </div>\r